68 #include "ble_srv_common.h" 69 #include "app_util_platform.h" 71 #define BLE_UIS_UUID_BASE {{0x42, 0x00, 0x74, 0xA9, 0xFF, 0x52, 0x10, 0x9B, 0x33, 0x49, 0x35, 0x9B, 0x00, 0x00, 0x68, 0xEF}} 73 #define BLE_UIS_UUID_SERVICE 0x0300 74 #define BLE_UIS_UUID_LED_CHAR 0x0301 75 #define BLE_UIS_UUID_BUTTON_CHAR 0x0302 76 #define BLE_UIS_UUID_PIN_CHAR 0x0303 83 #define PACKED(TYPE) TYPE __attribute__ ((packed)) 96 #define BLE_UIS_LED_MODE_MIN BLE_UIS_LED_MODE_OFF 97 #define BLE_UIS_LED_MODE_MAX BLE_UIS_LED_MODE_BREATHE_ONE_SHOT 99 #define BLE_UIS_LED_MODE_OFF_LENGTH 1 100 #define BLE_UIS_LED_MODE_CONST_LENGTH 4 101 #define BLE_UIS_LED_MODE_BREATHE_LENGTH 5 102 #define BLE_UIS_LED_MODE_BREATHE_ONE_SHOT_LENGTH 3 104 #define BLE_UIS_LED_COLOR_MIX_MIN 1 105 #define BLE_UIS_LED_COLOR_MIX_MAX 7 106 #define BLE_UIS_LED_INTENSITY_MIN 1 107 #define BLE_UIS_LED_INTENSITY_MAX 100 108 #define BLE_UIS_LED_DELAY_MIN 50 109 #define BLE_UIS_LED_DELAY_MAX 10000 113 typedef PACKED( union 131 })mode_breathe_one_shot;
132 }) ble_uis_led_data_t;
136 typedef PACKED(
struct 139 ble_uis_led_data_t data;
144 typedef PACKED(
struct 169 ble_uis_pin_t init_pin;
170 ble_uis_led_t * p_init_led;
185 bool is_button_notif_enabled;
219 #endif // BLE_UIS_H__ void(* ble_uis_pin_write_handler_t)(ble_uis_t *p_uis, ble_uis_pin_t *pin)
Declaring the pin write handler.
Definition: ble_uis.h:162
ble_uis_led_write_handler_t led_write_handler
Definition: ble_uis.h:171
LED Button Service init structure. This structure contains all options and data needed for initializa...
Definition: ble_uis.h:167
ble_gatts_char_handles_t led_char_handles
Definition: ble_uis.h:180
ble_uis_pin_write_handler_t pin_write_handler
Definition: ble_uis.h:172
uint16_t service_handle
Definition: ble_uis.h:179
ble_uis_led_mode_t
The available LED operation modes.
Definition: ble_uis.h:88
uint32_t ble_uis_on_button_change(ble_uis_t *p_uis, uint8_t buttons_state)
Function for sending a button state notification.
LED Button Service structure. This structure contains various status information for the service...
Definition: ble_uis.h:177
void ble_uis_on_ble_evt(ble_uis_t *p_uis, ble_evt_t *p_ble_evt)
Function for handling the application's BLE stack events.
ble_gatts_char_handles_t pin_char_handles
Definition: ble_uis.h:181
ble_uis_led_write_handler_t led_write_handler
Definition: ble_uis.h:186
ble_uis_pin_write_handler_t pin_write_handler
Definition: ble_uis.h:187
ble_gatts_char_handles_t button_char_handles
Definition: ble_uis.h:182
void(* ble_uis_led_write_handler_t)(ble_uis_t *p_uis, ble_uis_led_t *rgb)
Declaring the LED write handler.
Definition: ble_uis.h:158
uint8_t uuid_type
Definition: ble_uis.h:183
uint32_t ble_uis_init(ble_uis_t *p_uis, const ble_uis_init_t *p_uis_init)
Function for initializing the LED Button Service.
uint16_t conn_handle
Definition: ble_uis.h:184