Add huber asyncprotocol and make huber_ap and omron_ap to remove name conflicts

This commit is contained in:
Douglas Clowes
2014-06-23 12:47:33 +10:00
parent 565ba9d10d
commit 6b18de0a03
7 changed files with 144 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
#include <sics.h>
#include <asyncprotocol.h>
#include <asyncqueue.h>
#include "sics.h"
#include "asyncprotocol.h"
#include "asyncqueue.h"
#define STX 2
#define ETX 3
@@ -131,7 +131,7 @@ static pAsyncProtocol OMRON_Protocol = NULL;
*/
void OMRONInitProtocol(SicsInterp *pSics) {
if (OMRON_Protocol == NULL) {
OMRON_Protocol = AsyncProtocolCreate(pSics, "OMRON", NULL, NULL);
OMRON_Protocol = AsyncProtocolCreate(pSics, "OMRON_AP", NULL, NULL);
OMRON_Protocol->sendCommand = OMRON_Tx;
OMRON_Protocol->handleInput = OMRON_Rx;
OMRON_Protocol->handleEvent = OMRON_Ev;