#endif
-extern parse_pgm_ctx_t main_ctx[];
+extern const parse_ctx_t PROGMEM main_ctx[];
+
int cmdline_dev_send(char c, FILE* f)
{
+ (void)f;
#ifdef USE_USB
CDC_Device_SendByte(&VirtualSerial1_CDC_Interface, (uint8_t)c);
#else
int cmdline_dev_recv(FILE* f)
{
int16_t c;
+
+ (void)f;
#ifdef USE_USB
/* non-blocking ! */
c = CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
int xbee_dev_send(char c, FILE* f)
{
+ (void)f;
#ifdef USE_USB
CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, (uint8_t)c);
#else
{
int16_t c;
+ (void)f;
#ifdef USE_USB
/* non-blocking ! */
c = CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface);
valid_buffer(const char *buf, uint8_t size)
{
int8_t ret;
+ PGM_P ctx = (PGM_P)main_ctx;
- ret = parse(main_ctx, buf);
+ (void)size;
+ ret = parse(ctx, buf);
if (ret == PARSE_AMBIGUOUS)
printf_P(PSTR("Ambiguous command\r\n"));
else if (ret == PARSE_NOMATCH)
complete_buffer(const char *buf, char *dstbuf, uint8_t dstsize,
int16_t *state)
{
- return complete(main_ctx, buf, state, dstbuf, dstsize);
+ PGM_P ctx = (PGM_P)main_ctx;
+ return complete(ctx, buf, state, dstbuf, dstsize);
}