ias.h
Go to the documentation of this file.
1
63 #ifndef __IAS_H__
64 #define __IAS_H__
65
66 #include "gr55xx_sys.h"
67 #include "custom_config.h"
68 #include <stdint.h>
69
75 enum
76 {
77 IAS_ALERT_NONE,
78 IAS_ALERT_MILD,
79 IAS_ALERT_HIGH,
80 };
81
83 typedef enum
84 {
85 IAS_EVT_INVALID,
86 IAS_EVT_ALERT_LEVEL_UPDATED,
87 }ias_evt_type_t;
95 typedef struct
96 {
97 ias_evt_type_t evt_type;
98 uint8_t alert_level;
99 }ias_evt_t;
107 typedef void (*ias_evt_handler_t)(ias_evt_t *p_evt);
115 typedef struct
116 {
117 ias_evt_handler_t evt_handler;
118 } ias_init_t;
134 sdk_err_t ias_service_init(ias_init_t *p_ias_init);
135
145 sdk_err_t ias_alert_level_get(uint8_t *p_alert_level);
148 #endif
149
ias_evt_t
Immediate Alert Service event.
Definition: ias.h:96
ias_evt_type_t
ias_evt_type_t
Immediate Alert Service event type.
Definition: ias.h:84
ias_evt_handler_t
void(* ias_evt_handler_t)(ias_evt_t *p_evt)
Immediate Alert Service event handler type.
Definition: ias.h:107
ias_alert_level_get
sdk_err_t ias_alert_level_get(uint8_t *p_alert_level)
Get current value of alert level characteristic.
gr55xx_sys.h
GR55XX System API.
ias_init_t
Immediate Alert Service init stucture. This contains all option and data needed for initialization of...
Definition: ias.h:116
ias_evt_t::evt_type
ias_evt_type_t evt_type
Definition: ias.h:97
IAS_ALERT_HIGH
@ IAS_ALERT_HIGH
Definition: ias.h:79
IAS_ALERT_NONE
@ IAS_ALERT_NONE
Definition: ias.h:77
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
ias_init_t::evt_handler
ias_evt_handler_t evt_handler
Definition: ias.h:117
IAS_ALERT_MILD
@ IAS_ALERT_MILD
Definition: ias.h:78
IAS_EVT_ALERT_LEVEL_UPDATED
@ IAS_EVT_ALERT_LEVEL_UPDATED
Definition: ias.h:86
IAS_EVT_INVALID
@ IAS_EVT_INVALID
Definition: ias.h:85
ias_evt_t::alert_level
uint8_t alert_level
Definition: ias.h:98
ias_service_init
sdk_err_t ias_service_init(ias_init_t *p_ias_init)
Initialize a Immediate Alert Service instance and add in the BLE Stack database.