wireless/bluetooth/btsak/btsak_main.c: Fix address parsing
This commit is contained in:
parent
c0f64622e4
commit
2b8685b63f
@ -137,7 +137,9 @@ int nsh_consolemain(int argc, char *argv[])
|
||||
|
||||
DEBUGASSERT(pstate);
|
||||
|
||||
/* Execute the one-time start-up script. Any output will go to /dev/console. */
|
||||
/* Execute the one-time start-up script. Any output will go to
|
||||
* /dev/console.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NSH_ROMFSETC
|
||||
(void)nsh_initscript(&pstate->cn_vtbl);
|
||||
@ -149,7 +151,9 @@ int nsh_consolemain(int argc, char *argv[])
|
||||
(void)boardctl(BOARDIOC_FINALINIT, 0);
|
||||
#endif
|
||||
|
||||
/* Try to associate /dev/console as stdin because otherwise /dev/slcd0 will be it */
|
||||
/* Try to associate /dev/console as stdin because otherwise /dev/slcd0
|
||||
* will be it
|
||||
*/
|
||||
|
||||
ret = nsh_clone_console(pstate);
|
||||
|
||||
|
@ -530,7 +530,7 @@ int btsak_str2addr(FAR const char *str, FAR uint8_t *addr)
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
ch = (char)*src++;
|
||||
nibble = btsak_char2nibble(ch) << 4;
|
||||
nibble = btsak_char2nibble(ch);
|
||||
if (nibble < 0)
|
||||
{
|
||||
return nibble;
|
||||
@ -545,8 +545,8 @@ int btsak_str2addr(FAR const char *str, FAR uint8_t *addr)
|
||||
return nibble;
|
||||
}
|
||||
|
||||
hex |= (uint8_t)nibble;
|
||||
*addr++ = hex;
|
||||
hex |= (uint8_t)nibble;
|
||||
addr[5 - i] = hex;
|
||||
|
||||
if (i < 5)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user