git.droids-corp.org
/
protos
/
xbee-avr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow to dump GPS info
[protos/xbee-avr.git]
/
parse_atcmd.c
diff --git
a/parse_atcmd.c
b/parse_atcmd.c
index
78e28ba
..
fbb0c6e
100644
(file)
--- a/
parse_atcmd.c
+++ b/
parse_atcmd.c
@@
-33,16
+33,16
@@
#include <string.h>
#include <parse.h>
#include <string.h>
#include <parse.h>
+#include <xbee.h>
-#include "xbee_atcmd.h"
#include "parse_atcmd.h"
static int8_t
#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 copy;
struct token_atcmd_data ad;
-
struct xbee_atcmd_pgm
*cmd;
+
const struct xbee_atcmd
*cmd;
char bufcopy[32];
uint8_t token_len = 0;
char bufcopy[32];
uint8_t token_len = 0;
@@
-67,15
+67,15
@@
parse_atcmd(parse_pgm_token_hdr_t *tk, const char *buf, void *res)
return -1;
/* store the address of object in structure */
if (res)
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;
}
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 token_atcmd_data ad;
-
struct xbee_atcmd_pgm
*cmd;
+
const struct xbee_atcmd
*cmd;
struct xbee_atcmd copy;
int8_t cnt = 0;
struct xbee_atcmd copy;
int8_t cnt = 0;
@@
-91,11
+91,11
@@
static int8_t complete_get_nb_atcmd(parse_pgm_token_hdr_t *tk)
return cnt;
}
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;
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;
struct xbee_atcmd copy;
int8_t cnt = 0;
@@
-119,9
+119,9
@@
static int8_t complete_get_elt_atcmd(parse_pgm_token_hdr_t *tk, int8_t idx,
}
static int8_t
}
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;
}
snprintf(dstbuf, size, "ATCMD");
return 0;
}