diff --git a/include/bluetooth/mesh/main.h b/include/bluetooth/mesh/main.h index 87da774e8bf..3489ebdb80c 100644 --- a/include/bluetooth/mesh/main.h +++ b/include/bluetooth/mesh/main.h @@ -24,7 +24,7 @@ typedef enum { BT_MESH_VIBRATE = BIT(2), BT_MESH_DISPLAY_NUMBER = BIT(3), BT_MESH_DISPLAY_STRING = BIT(4), -} bt_mesh_output_action; +} bt_mesh_output_action_t; typedef enum { BT_MESH_NO_INPUT = 0, @@ -32,7 +32,7 @@ typedef enum { BT_MESH_TWIST = BIT(1), BT_MESH_ENTER_NUMBER = BIT(2), BT_MESH_ENTER_STRING = BIT(3), -} bt_mesh_input_action; +} bt_mesh_input_action_t; struct bt_mesh_prov { const u8_t *uuid; @@ -46,12 +46,12 @@ struct bt_mesh_prov { u8_t input_size; u16_t input_actions; - int (*output_number)(bt_mesh_output_action act, u32_t num); + int (*output_number)(bt_mesh_output_action_t act, u32_t num); int (*output_string)(const char *str); - int (*input)(bt_mesh_input_action act, u8_t size); + int (*input)(bt_mesh_input_action_t act, u8_t size); - void (*link_open)(void); + void (*link_open)(bt); void (*link_close)(void); void (*complete)(u16_t addr); }; diff --git a/samples/bluetooth/mesh/src/board.h b/samples/bluetooth/mesh/src/board.h index 918c687db42..df9ff8c2fac 100644 --- a/samples/bluetooth/mesh/src/board.h +++ b/samples/bluetooth/mesh/src/board.h @@ -7,13 +7,13 @@ */ #if defined(CONFIG_BOARD_BBC_MICROBIT) -void board_output_number(bt_mesh_output_action action, uint32_t number); +void board_output_number(bt_mesh_output_action_t action, uint32_t number); void board_prov_complete(void); void board_init(void); #else -static inline void board_output_number(bt_mesh_output_action action, +static inline void board_output_number(bt_mesh_output_action_t action, uint32_t number) { } diff --git a/samples/bluetooth/mesh/src/main.c b/samples/bluetooth/mesh/src/main.c index 6e6fbbfabcb..c9616bff4d2 100644 --- a/samples/bluetooth/mesh/src/main.c +++ b/samples/bluetooth/mesh/src/main.c @@ -138,7 +138,7 @@ static const struct bt_mesh_comp comp = { .elem_count = ARRAY_SIZE(elements), }; -static int output_number(bt_mesh_output_action action, uint32_t number) +static int output_number(bt_mesh_output_action_t action, uint32_t number) { printk("OOB Number: %u\n", number); diff --git a/samples/bluetooth/mesh/src/microbit.c b/samples/bluetooth/mesh/src/microbit.c index 6da1fb54c54..ade7efc035a 100644 --- a/samples/bluetooth/mesh/src/microbit.c +++ b/samples/bluetooth/mesh/src/microbit.c @@ -42,7 +42,7 @@ static void configure_button(void) gpio_add_callback(gpio, &button_cb); } -void board_output_number(bt_mesh_output_action action, uint32_t number) +void board_output_number(bt_mesh_output_action_t action, uint32_t number) { struct mb_display *disp = mb_display_get(); struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 }, diff --git a/subsys/bluetooth/host/mesh/prov.c b/subsys/bluetooth/host/mesh/prov.c index 7bd3c214d1c..0e7433f6859 100644 --- a/subsys/bluetooth/host/mesh/prov.c +++ b/subsys/bluetooth/host/mesh/prov.c @@ -552,7 +552,7 @@ static void prov_capabilities(const u8_t *data) BT_DBG("Input OOB Action: 0x%04x", input_action); } -static bt_mesh_output_action output_action(u8_t action) +static bt_mesh_output_action_t output_action(u8_t action) { switch (action) { case OUTPUT_OOB_BLINK: @@ -570,7 +570,7 @@ static bt_mesh_output_action output_action(u8_t action) } } -static bt_mesh_input_action input_action(u8_t action) +static bt_mesh_input_action_t input_action(u8_t action) { switch (action) { case INPUT_OOB_PUSH: @@ -588,8 +588,8 @@ static bt_mesh_input_action input_action(u8_t action) static int prov_auth(u8_t method, u8_t action, u8_t size) { - bt_mesh_output_action output; - bt_mesh_input_action input; + bt_mesh_output_action_t output; + bt_mesh_input_action_t input; switch (method) { case AUTH_METHOD_NO_OOB: diff --git a/subsys/bluetooth/host/mesh/shell.c b/subsys/bluetooth/host/mesh/shell.c index d9436ad1ffd..84170f304d8 100644 --- a/subsys/bluetooth/host/mesh/shell.c +++ b/subsys/bluetooth/host/mesh/shell.c @@ -73,7 +73,7 @@ static void prov_complete(u16_t addr) dst = addr; } -static int output_number(bt_mesh_output_action action, uint32_t number) +static int output_number(bt_mesh_output_action_t action, uint32_t number) { printk("OOB Number: %u\n", number); return 0; @@ -85,7 +85,7 @@ static int output_string(const char *str) return 0; } -static bt_mesh_input_action input_act; +static bt_mesh_input_action_t input_act; static u8_t input_size; static int cmd_input_num(int argc, char *argv[]) @@ -146,7 +146,7 @@ static int cmd_input_str(int argc, char *argv[]) return 0; } -static int input(bt_mesh_input_action act, u8_t size) +static int input(bt_mesh_input_action_t act, u8_t size) { switch (act) { case BT_MESH_ENTER_NUMBER: diff --git a/tests/bluetooth/mesh/src/board.h b/tests/bluetooth/mesh/src/board.h index 918c687db42..df9ff8c2fac 100644 --- a/tests/bluetooth/mesh/src/board.h +++ b/tests/bluetooth/mesh/src/board.h @@ -7,13 +7,13 @@ */ #if defined(CONFIG_BOARD_BBC_MICROBIT) -void board_output_number(bt_mesh_output_action action, uint32_t number); +void board_output_number(bt_mesh_output_action_t action, uint32_t number); void board_prov_complete(void); void board_init(void); #else -static inline void board_output_number(bt_mesh_output_action action, +static inline void board_output_number(bt_mesh_output_action_t action, uint32_t number) { } diff --git a/tests/bluetooth/mesh/src/main.c b/tests/bluetooth/mesh/src/main.c index 396cdfb86ab..c901c39ce61 100644 --- a/tests/bluetooth/mesh/src/main.c +++ b/tests/bluetooth/mesh/src/main.c @@ -146,7 +146,7 @@ static const struct bt_mesh_comp comp = { }; #if 0 -static int output_number(bt_mesh_output_action action, uint32_t number) +static int output_number(bt_mesh_output_action_t action, uint32_t number) { printk("OOB Number: %u\n", number); diff --git a/tests/bluetooth/mesh/src/microbit.c b/tests/bluetooth/mesh/src/microbit.c index 268c4b8cc48..1e1d1f788e6 100644 --- a/tests/bluetooth/mesh/src/microbit.c +++ b/tests/bluetooth/mesh/src/microbit.c @@ -42,7 +42,7 @@ static void configure_button(void) gpio_add_callback(gpio, &button_cb); } -void board_output_number(bt_mesh_output_action action, uint32_t number) +void board_output_number(bt_mesh_output_action_t action, uint32_t number) { struct mb_display *disp = mb_display_get(); struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 },