#include <string.h>
#include <parse.h>
+#include <xbee.h>
-#include "xbee_atcmd.h"
#include "parse_atcmd.h"
static int8_t
-parse_atcmd(parse_pgm_token_hdr_t *tk, const char *buf, void *res)
+parse_atcmd(PGM_P tk, const char *buf, void *res)
{
struct xbee_atcmd copy;
struct token_atcmd_data ad;
- struct xbee_atcmd_pgm *cmd;
+ const struct xbee_atcmd *cmd;
char bufcopy[32];
uint8_t token_len = 0;
return -1;
/* store the address of object in structure */
if (res)
- *(struct xbee_atcmd_pgm **)res = cmd;
+ *(const struct xbee_atcmd **)res = cmd;
return token_len;
}
-static int8_t complete_get_nb_atcmd(parse_pgm_token_hdr_t *tk)
+static int8_t complete_get_nb_atcmd(PGM_P tk)
{
struct token_atcmd_data ad;
- struct xbee_atcmd_pgm *cmd;
+ const struct xbee_atcmd *cmd;
struct xbee_atcmd copy;
int8_t cnt = 0;
return cnt;
}
-static int8_t complete_get_elt_atcmd(parse_pgm_token_hdr_t *tk, int8_t idx,
+static int8_t complete_get_elt_atcmd(PGM_P tk, int8_t idx,
char *dstbuf, uint8_t size)
{
struct token_atcmd_data ad;
- struct xbee_atcmd_pgm *cmd;
+ const struct xbee_atcmd *cmd;
struct xbee_atcmd copy;
int8_t cnt = 0;
}
static int8_t
-help_atcmd(parse_pgm_token_hdr_t *tk, char *dstbuf,
- uint8_t size)
+help_atcmd(PGM_P tk, char *dstbuf, uint8_t size)
{
+ (void)tk;
snprintf(dstbuf, size, "ATCMD");
return 0;
}