Subversion Repositories HomeAutomation

Rev

Rev 765 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 765 Rev 889
Line 42... Line 42...
42
/*-----------------------------------------------------------------------------
42
/*-----------------------------------------------------------------------------
43
 * Defines
43
 * Defines
44
 *---------------------------------------------------------------------------*/
44
 *---------------------------------------------------------------------------*/
45
#define UART_START_BYTE 253
45
#define UART_START_BYTE 253
46
#define UART_END_BYTE 250
46
#define UART_END_BYTE 250
-
 
47
#define UART_PING_BYTE 251
47
 
48
 
48
#if USE_STDCAN == 0
49
#if USE_STDCAN == 0
49
volatile Can_Message_t rxMsg; // Message storage
50
volatile Can_Message_t rxMsg; // Message storage
50
volatile uint8_t rxMsgFull;   // Synchronization flag
51
volatile uint8_t rxMsgFull;   // Synchronization flag
51
#endif
52
#endif
Line 181... Line 182...
181
    if (c == UART_START_BYTE && !waitingMessage) {
182
    if (c == UART_START_BYTE && !waitingMessage) {
182
        waitingMessage = 1;
183
        waitingMessage = 1;
183
        startTime = Timebase_CurrentTime();
184
        startTime = Timebase_CurrentTime();
184
        count = 0;
185
        count = 0;
185
        cm.Id = 0;
186
        cm.Id = 0;
-
 
187
        return;
-
 
188
    }
-
 
189
 
-
 
190
    if (c == UART_PING_BYTE && !waitingMessage) {
-
 
191
        //send ping reply
-
 
192
        uart_putc(UART_PING_BYTE);
186
        return;
193
        return;
187
    }
194
    }
188
}
195
}
189
 
196
 
190
#if USE_STDCAN == 0
197
#if USE_STDCAN == 0