diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-20 11:19:40 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-20 11:19:40 -0700 |
commit | ea7e236e75452e27f3af6730a0542850851eb23d (patch) | |
tree | c0d87fef044e6a788f6a980aaeb7cfc3a3dffa79 /src | |
parent | 0da4e201041a4420f273c2e0cda77eea78099518 (diff) |
altos/rn4678: Add BLE support
This just means ignoring the BLE connect status message.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/ao_rn4678.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/drivers/ao_rn4678.c b/src/drivers/ao_rn4678.c index ba25e70d..98dc35b5 100644 --- a/src/drivers/ao_rn4678.c +++ b/src/drivers/ao_rn4678.c @@ -100,6 +100,7 @@ static const char *status_strings[] = { "RFCOMM_CLOSE", "RFCOMM_OPEN", "CONNECT", + "LCONNECT", "DISCONN", "BONDED", }; @@ -560,8 +561,22 @@ ao_rn_factory(void) ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 1); } +#if AO_RN_DEBUG +static void +ao_rn_send(void) +{ + int c; + + while ((c = getchar()) != '~') + ao_rn_putchar(c); +} +#endif + static const struct ao_cmds rn_cmds[] = { { ao_rn_factory, "F\0Factory reset rn4678" }, +#if AO_RN_DEBUG + { ao_rn_send, "B\0Send data to rn4678. End with ~" }, +#endif { 0 }, }; |