Removed dead code and fixed demoes
This commit is contained in:
@@ -11,9 +11,7 @@
|
||||
#endif
|
||||
|
||||
// Helper macros
|
||||
#define TF_MAX(a, b) ((a)>(b)?(a):(b))
|
||||
#define TF_MIN(a, b) ((a)<(b)?(a):(b))
|
||||
|
||||
#define TF_TRY(func) do { if(!(func)) return false; } while (0)
|
||||
|
||||
// TODO It would be nice to have per-instance configurable checksum types, but that would
|
||||
@@ -685,13 +683,6 @@ void _TF_FN TF_AcceptChar(TinyFrame *tf, unsigned char c)
|
||||
break;
|
||||
}
|
||||
//@formatter:on
|
||||
|
||||
// we get here after finishing HEAD, if no data are to be received - handle and clear
|
||||
// TODO verify - this seems unreachable under normal circumstances
|
||||
if (tf->len == 0 && tf->state == TFState_DATA) {
|
||||
TF_HandleReceivedMessage(tf);
|
||||
TF_ResetParser(tf);
|
||||
}
|
||||
}
|
||||
|
||||
// Helper macros for the Compose functions
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ void demo_disconn(void)
|
||||
* @param buff
|
||||
* @param len
|
||||
*/
|
||||
void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, size_t len)
|
||||
void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, uint32_t len)
|
||||
{
|
||||
printf("\033[32mTF_WriteImpl - sending frame:\033[0m\n");
|
||||
dumpFrame(buff, len);
|
||||
|
||||
@@ -11,7 +11,7 @@ extern const char *romeo;
|
||||
* This function should be defined in the application code.
|
||||
* It implements the lowest layer - sending bytes to UART (or other)
|
||||
*/
|
||||
void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, size_t len)
|
||||
void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, uint32_t len)
|
||||
{
|
||||
printf("--------------------\n");
|
||||
printf("\033[32mTF_WriteImpl - sending frame:\033[0m\n");
|
||||
|
||||
Reference in New Issue
Block a user