fix(ble): Increased the length of addr_str in README.md

This commit is contained in:
Yuhan Wei
2024-08-30 11:45:36 +08:00
committed by Wei Yu Han
parent 45bd7bcde9
commit 052d7ef6e9
3 changed files with 5 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ void app_main(void) {
} }
``` ```
Then, call `nimble_port_init` function to initialize NimBLE host stack. Then, call `nimble_port_init` function to initialize NimBLE host stack.
``` C ``` C
void app_main(void) { void app_main(void) {
@@ -186,7 +186,7 @@ void app_main(void) {
/* Start NimBLE host task thread and return */ /* Start NimBLE host task thread and return */
xTaskCreate(nimble_host_task, "NimBLE Host", 4*1024, NULL, 5, NULL); xTaskCreate(nimble_host_task, "NimBLE Host", 4*1024, NULL, 5, NULL);
return; return;
} }
``` ```
@@ -205,7 +205,7 @@ static void on_stack_sync(void) {
void adv_init(void) { void adv_init(void) {
/* Local variables */ /* Local variables */
int rc = 0; int rc = 0;
char addr_str[12] = {0}; char addr_str[18] = {0};
/* Make sure we have proper BT identity address set */ /* Make sure we have proper BT identity address set */
rc = ble_hs_util_ensure_addr(0); rc = ble_hs_util_ensure_addr(0);

View File

@@ -259,7 +259,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
void adv_init(void) { void adv_init(void) {
/* Local variables */ /* Local variables */
int rc = 0; int rc = 0;
char addr_str[12] = {0}; char addr_str[18] = {0};
/* Make sure we have proper BT identity address set (random preferred) */ /* Make sure we have proper BT identity address set (random preferred) */
rc = ble_hs_util_ensure_addr(0); rc = ble_hs_util_ensure_addr(0);

View File

@@ -322,7 +322,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
void adv_init(void) { void adv_init(void) {
/* Local variables */ /* Local variables */
int rc = 0; int rc = 0;
char addr_str[12] = {0}; char addr_str[18] = {0};
/* Make sure we have proper BT identity address set */ /* Make sure we have proper BT identity address set */
set_random_addr(); set_random_addr();