feat: Framework to handle INCP messages
This commit is contained in:
22
app/src/incp_handler.c
Normal file
22
app/src/incp_handler.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "incp_handler.h"
|
||||
#include "main.h"
|
||||
|
||||
#define INCP_IMPL_CALC
|
||||
#include "gen_wrapper.h"
|
||||
|
||||
|
||||
void handle_incp(msg_buf_t *msgs)
|
||||
{
|
||||
uint8_t *bytes;
|
||||
uint32_t len;
|
||||
err_t err;
|
||||
|
||||
err = msg_buf_peek(msgs, (void**)&bytes, &len);
|
||||
if (err == ERR_EMPTY)
|
||||
return;
|
||||
|
||||
if (err != ERR_OK)
|
||||
Error_Handler();
|
||||
|
||||
//TODO: React to INCP
|
||||
}
|
||||
Reference in New Issue
Block a user