Bluetooth: Mesh: Use proper _t suffix for typedefs

To be consistent with the coding style, use a _t suffix for typedefs.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-13 19:45:01 +02:00 committed by Johan Hedberg
commit a81fa43a59
9 changed files with 20 additions and 20 deletions

View file

@ -24,7 +24,7 @@ typedef enum {
BT_MESH_VIBRATE = BIT(2), BT_MESH_VIBRATE = BIT(2),
BT_MESH_DISPLAY_NUMBER = BIT(3), BT_MESH_DISPLAY_NUMBER = BIT(3),
BT_MESH_DISPLAY_STRING = BIT(4), BT_MESH_DISPLAY_STRING = BIT(4),
} bt_mesh_output_action; } bt_mesh_output_action_t;
typedef enum { typedef enum {
BT_MESH_NO_INPUT = 0, BT_MESH_NO_INPUT = 0,
@ -32,7 +32,7 @@ typedef enum {
BT_MESH_TWIST = BIT(1), BT_MESH_TWIST = BIT(1),
BT_MESH_ENTER_NUMBER = BIT(2), BT_MESH_ENTER_NUMBER = BIT(2),
BT_MESH_ENTER_STRING = BIT(3), BT_MESH_ENTER_STRING = BIT(3),
} bt_mesh_input_action; } bt_mesh_input_action_t;
struct bt_mesh_prov { struct bt_mesh_prov {
const u8_t *uuid; const u8_t *uuid;
@ -46,12 +46,12 @@ struct bt_mesh_prov {
u8_t input_size; u8_t input_size;
u16_t input_actions; 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 (*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 (*link_close)(void);
void (*complete)(u16_t addr); void (*complete)(u16_t addr);
}; };

View file

@ -7,13 +7,13 @@
*/ */
#if defined(CONFIG_BOARD_BBC_MICROBIT) #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_prov_complete(void);
void board_init(void); void board_init(void);
#else #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) uint32_t number)
{ {
} }

View file

@ -138,7 +138,7 @@ static const struct bt_mesh_comp comp = {
.elem_count = ARRAY_SIZE(elements), .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); printk("OOB Number: %u\n", number);

View file

@ -42,7 +42,7 @@ static void configure_button(void)
gpio_add_callback(gpio, &button_cb); 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_display *disp = mb_display_get();
struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 }, struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 },

View file

@ -552,7 +552,7 @@ static void prov_capabilities(const u8_t *data)
BT_DBG("Input OOB Action: 0x%04x", input_action); 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) { switch (action) {
case OUTPUT_OOB_BLINK: 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) { switch (action) {
case INPUT_OOB_PUSH: 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) static int prov_auth(u8_t method, u8_t action, u8_t size)
{ {
bt_mesh_output_action output; bt_mesh_output_action_t output;
bt_mesh_input_action input; bt_mesh_input_action_t input;
switch (method) { switch (method) {
case AUTH_METHOD_NO_OOB: case AUTH_METHOD_NO_OOB:

View file

@ -73,7 +73,7 @@ static void prov_complete(u16_t addr)
dst = 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); printk("OOB Number: %u\n", number);
return 0; return 0;
@ -85,7 +85,7 @@ static int output_string(const char *str)
return 0; return 0;
} }
static bt_mesh_input_action input_act; static bt_mesh_input_action_t input_act;
static u8_t input_size; static u8_t input_size;
static int cmd_input_num(int argc, char *argv[]) static int cmd_input_num(int argc, char *argv[])
@ -146,7 +146,7 @@ static int cmd_input_str(int argc, char *argv[])
return 0; 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) { switch (act) {
case BT_MESH_ENTER_NUMBER: case BT_MESH_ENTER_NUMBER:

View file

@ -7,13 +7,13 @@
*/ */
#if defined(CONFIG_BOARD_BBC_MICROBIT) #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_prov_complete(void);
void board_init(void); void board_init(void);
#else #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) uint32_t number)
{ {
} }

View file

@ -146,7 +146,7 @@ static const struct bt_mesh_comp comp = {
}; };
#if 0 #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); printk("OOB Number: %u\n", number);

View file

@ -42,7 +42,7 @@ static void configure_button(void)
gpio_add_callback(gpio, &button_cb); 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_display *disp = mb_display_get();
struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 }, struct mb_image arrow = MB_IMAGE({ 0, 0, 1, 0, 0 },