Sens'it SDK  v2.0.0
sensit_api.h
Go to the documentation of this file.
1 /*!******************************************************************
2  * \file sensit_api.h
3  * \brief Sens'it SDK user functions
4  * \author Sens'it Team
5  * \copyright Copyright (c) 2018 Sigfox, All Rights Reserved.
6  *
7  * !!! DO NOT MODIFY THIS FILE !!!
8  *******************************************************************/
9 
10 
11 /*!******************************************************************
12  * \defgroup SENSIT_ERR_CODES Sens'it Error Codes
13  * \brief Error code definitions for Sens'it APIs
14  *
15  * @{
16  *******************************************************************/
17 #define SENSIT_ERR_NONE 0x00
19 #define SENSIT_ERR_MEMORY 0x01
21 #define SENSIT_ERR_RADIO_CONF 0x08
22 #define SENSIT_ERR_RADIO_NOT_INIT 0x09
24 #define SENSIT_ERR_REED_SWITCH_STATE 0x10
26 #define SENSIT_ERR_NVMEM_SIZE 0x11
27 #define SENSIT_ERR_NVMEM_INIT 0x12
28 #define SENSIT_ERR_NVMEM_WRITE 0x13
30 #define SENSIT_ERR_I2C_WRITE 0x14
31 #define SENSIT_ERR_I2C_READ 0x15
32 #define SENSIT_ERR_I2C_TIMEOUT 0x16
34 #define SENSIT_ERR_UART_STATE 0x17
35 #define SENSIT_ERR_UART_EMPTY 0x18
36 #define SENSIT_ERR_UART_FULL 0x19
38 #define SENSIT_ERR_USB_STATE 0x1A
39 #define SENSIT_ERR_USB_EMPTY 0x1B
40 #define SENSIT_ERR_USB_FULL 0x1C
42 #define SENSIT_ERR_RESET_SEQ_NB 0x1F
46 /*!******************************************************************
47  * \defgroup INTERRUPT_MASK Interrupt Mask
48  * \brief Mask definition for Sens'it peripherals interrupt
49  *
50  * Use this values with \link pending_interrupt \endlink
51  * to know wich peripherals have generated an interrupt.
52  *
53  * @{
54  *******************************************************************/
55 #define INTERRUPT_MASK_RTC 0b00000001
56 #define INTERRUPT_MASK_BUTTON 0b00000010
57 #define INTERRUPT_MASK_REED_SWITCH 0b00000100
58 #define INTERRUPT_MASK_FXOS8700 0b00001000
62 /*!******************************************************************
63  * \defgroup SENSOR_I2C_ADDR Sensors address
64  * \brief I2C address of Sens'it's sensors
65  *
66  * @{
67  *******************************************************************/
68 #define SENSOR_I2C_ADDR_HTS221 0xBE
69 #define SENSOR_I2C_ADDR_LTR329 0x52
70 #define SENSOR_I2C_ADDR_FXOS8700 0x3C
74 /*!******************************************************************
75  * \def SENSIT_NV_MEM_SIZE
76  * \brief Sens'it Non-Volatile Memory maximum size.
77  *******************************************************************/
78 #define SENSIT_NV_MEM_SIZE 0x03F0
79 
80 
81 /*!******************************************************************
82  * \enum radio_conf_e
83  * \brief List of implemented Sigfox Radio Configuration.
84  *******************************************************************/
85 typedef enum {
86  SIGFOX_RC1 = 0,
87  SIGFOX_RC2 = 1,
89  SIGFOX_RC4 = 3,
90  RADIO_CONF_LAST
91 } radio_conf_e;
92 
93 
94 /*!******************************************************************
95  * \enum rc_origin_e
96  * \brief Enum to be used in \link SENSIT_API_configure_radio \endlink
97  *******************************************************************/
98 typedef enum {
101 } rc_origin_e;
102 
103 
104 /*!******************************************************************
105  * \enum rgb_color_e
106  * \brief List of possible colors for the RGB led.
107  *******************************************************************/
108 typedef enum {
109  RGB_OFF = 0b000,
110  RGB_BLUE = 0b001,
111  RGB_GREEN = 0b010,
112  RGB_CYAN = 0b011,
113  RGB_RED = 0b100,
114  RGB_MAGENTA = 0b101,
115  RGB_YELLOW = 0b110,
116  RGB_WHITE = 0b111,
117 } rgb_color_e;
118 
119 
120 /*!******************************************************************
121  * \enum interrupt_e
122  * \brief Interupt configuration
123  *******************************************************************/
124 typedef enum {
125  INTERRUPT_NONE = 0b00,
129 } interrupt_e;
130 
131 
132 /*!******************************************************************
133  * \var extern u8 firmware_version[16]
134  * \brief Varible use at the device initialization to set your firmware
135  * version in the non-volatile memory.
136  *
137  * Its value is written at the address 0x08007400.
138  *
139  * \warning If the value of firmware_version change, the non-volatile
140  * memory will be erased.
141  *******************************************************************/
142 extern u8 firmware_version[16];
143 
144 
145 /*!******************************************************************
146  * \var volatile u8 pending_interrupt
147  * \brief Bit array of peripherals interrupt.
148  *
149  * Use \link INTERRUPT_MASK \endlink to know wich peripheral
150  * have a pending interrupt.
151  *******************************************************************/
153 
154 
155 /*!******************************************************************
156  * \defgroup SENSIT_API Sens'it APIs
157  * \brief Sens'it SDK user functions
158  *
159  * @{
160  *******************************************************************/
161 
162 /*!******************************************************************
163  * \fn error_t SENSIT_API_get_sdk_version(u8** version, u8* size)
164  * \brief Return Sens'it SDK library version, in ASCII format.
165  *
166  * \param[out] version Pointer to Byte array containing version
167  * \param[out] size Size of version buffer
168  *
169  * \retval SENSIT_ERR_NONE: No error
170  *******************************************************************/
172  u8* size);
173 
174 /*!******************************************************************
175  * \fn error_t SENSIT_API_configure_radio(rc_origin_e origin, radio_conf_e* rc)
176  * \brief Configure the device with the selected Sigfox Radio Configuration (RC).
177  *
178  * \param[in] origin Radio Configuration value origin
179  * \param[out] rc If RC_FROM_MEMORY, Radio Configuration set in the device memory
180  * \param[in] rc If RC_FROM_PARAMETER, Radio Configuration to use
181  *
182  * \retval SENSIT_ERR_NONE: No error
183  * \retval SENSIT_ERR_MEMORY: Error, device memory is corrupted
184  * \retval SENSIT_ERR_RADIO_CONF: Radio Configuration has an invalid value
185  *******************************************************************/
187  radio_conf_e* rc);
188 
189 /*!******************************************************************
190  * \fn error_t SENSIT_API_switch_radio(bool on, rgb_color_e color)
191  * \brief Switch on/off radio power.
192  *
193  * \param[in] on TRUE to switch on radio
194  * FALSE to switch off radio
195  * \param[in] color Color of LEDs blink during transmission.
196  * Use 0xFF to have the white LED blinks.
197  *
198  * \retval SENSIT_ERR_NONE: No error
199  * \retval SENSIT_ERR_RADIO_NOT_INIT Error, radio is not configured
200  *******************************************************************/
202  rgb_color_e color);
203 
204 /*!******************************************************************
205  * \fn void SENSIT_API_reset(void)
206  * \brief Reset the device.
207  *
208  * The device reset is signaled by 5 white led blinks.<BR>
209  * If the button is pressed during the reset,
210  * the device will restart in bootloader.
211  *******************************************************************/
212 void SENSIT_API_reset(void);
213 
214 /*!******************************************************************
215  * \fn error_t SENSIT_API_sleep(bool auto_wake_up)
216  * \brief Put the device in stop mode and wait for an interrupt.
217  *
218  * Use \link pending_interrupt \endlink to know wake up source.
219  *
220  * \param[in] auto_wake_up If TRUE, auto wake up each second
221  *
222  * \retval SENSIT_ERR_NONE: No error
223  *******************************************************************/
224 error_t SENSIT_API_sleep(bool auto_wake_up);
225 
226 /*!******************************************************************
227  * \fn error_t SENSIT_API_set_rtc_alarm(u32 interrupt_period)
228  * \brief Set RTC alarm timer.<BR>
229  * Set interrupt period to 0 to disable it.
230  *
231  * Use \link pending_interrupt \endlink to know when timer interrupt
232  * occurs.
233  *
234  * \param[in] interrupt_period Alarm interrupt period in s
235  *
236  * \retval SENSIT_ERR_NONE: No error
237  *******************************************************************/
238 error_t SENSIT_API_set_rtc_alarm(u32 interrupt_period);
239 
240 /*!******************************************************************
241  * \fn error_t SENSIT_API_configure_button(interrupt_e config)
242  * \brief Configure button interrupt.
243  *
244  * \param[in] config Interrupt configuration
245  *
246  * \retval SENSIT_ERR_NONE: No error
247  *******************************************************************/
249 
250 /*!******************************************************************
251  * \fn error_t SENSIT_API_get_button_state(bool* state)
252  * \brief Get the state of the button.
253  *
254  * \param[out] state If FALSE, button is pressed.
255  * If TRUE, button is released.
256  *
257  * \retval SENSIT_ERR_NONE: No error
258  *******************************************************************/
260 
261 /*!******************************************************************
262  * \fn error_t SENSIT_API_set_rgb_led(rgb_color_e color)
263  * \brief Set RGB led state.
264  *
265  * \param[in] color Color of the RGB led
266  *
267  * \retval SENSIT_ERR_NONE: No error
268  *******************************************************************/
270 
271 /*!******************************************************************
272  * \fn error_t SENSIT_API_set_white_led(bool on)
273  * \brief Set white led state.
274  *
275  * \param[in] on TRUE: led is turned on
276  * FALSE: led is turned off
277  *
278  * \retval SENSIT_ERR_NONE: No error
279  *******************************************************************/
281 
282 /*!******************************************************************
283  * \fn error_t SENSIT_API_get_battery_level(u16* battery_voltage)
284  * \brief Do a measurement of battery voltage.
285  *
286  * \param[out] battery_voltage Battery voltage in mV
287  *
288  * \retval SENSIT_ERR_NONE: No error
289  *******************************************************************/
290 error_t SENSIT_API_get_battery_level(u16* battery_voltage);
291 
292 /*!******************************************************************
293  * \fn error_t SENSIT_API_get_current_time(u32* current_time)
294  * \brief Return time passed since last device reset.
295  *
296  * \param[out] current_time Current time in s
297  *
298  * \retval SENSIT_ERR_NONE: No error
299  *******************************************************************/
301 
302 /*!******************************************************************
303  * \fn error_t SENSIT_API_wait(u32 time_ms)
304  * \brief Wait during 'time_ms'.
305  *
306  * \param[in] time_ms Time to wait in milliseconds
307  *
308  * \retval SENSIT_ERR_NONE: No error
309  *******************************************************************/
310 error_t SENSIT_API_wait(u32 time_ms);
311 
312 /*!******************************************************************
313  * \fn error_t SENSIT_API_configure_reed_switch(bool enable, interrupt_e config)
314  * \brief Enable/disable the reed switch and configure interrupt.
315  *
316  * \param[in] enable TRUE to enable reed switch
317  * \param[in] config Interrupt configuration
318  *
319  * \retval SENSIT_ERR_NONE: No error
320  *******************************************************************/
322  interrupt_e config);
323 
324 /*!******************************************************************
325  * \fn error_t SENSIT_API_get_reed_switch_state(bool* state)
326  * \brief Get the state of the reed switch.
327  *
328  * \param[out] state If FALSE, magnet not detected.
329  * If TRUE, magnet detected
330  *
331  * \retval SENSIT_ERR_NONE: No error
332  * \retval SENSIT_ERR_REED_SWITCH_STATE: Reed switch is not enabled
333  *******************************************************************/
335 
336 /*!******************************************************************
337  * \fn error_t SENSIT_API_write_read_i2c_bus(u8 addr, u8* buffer, u8 nbWrite, u8 nbRead)
338  * \brief I2C bus driver.
339  *
340  * \param[in] addr Sensor address. Use \link SENSOR_I2C_ADDR \endlink values.
341  * \param[in] buffer From buffer[0] to buffer[nbWrite-1]: Data to write
342  * \param[out] buffer From buffer[nbWrite] to buffer[nbWrite+nbRead-1]: Read data
343  * \param[in] nbWrite Number of bytes to write
344  * \param[in] nbRead Number of bytes to read
345  *
346  *
347  * \retval SENSIT_ERR_NONE: No error
348  * \retval SENSIT_ERR_I2C_WRITE: Failed to write data on I2C bus
349  * \retval SENSIT_ERR_I2C_READ: Failed to read data from I2C bus
350  * \retval SENSIT_ERR_I2C_TIMEOUT: I2C communication timeout
351  *******************************************************************/
353  u8* buffer,
354  u8 nbWrite,
355  u8 nbRead);
356 
357 /*!******************************************************************
358  * \fn error_t SENSIT_API_configure_fxos8700_interrupt(bool enable)
359  * \brief Enable/Disable interrupt from Accelerometer.
360  *
361  * \warning Interrupt must be routed to INT1 pin and active low
362  * in FXOS8700 registers.
363  *
364  * \param[in] enable TRUE to enable interrupt
365  *
366  * \retval SENSIT_ERR_NONE: No error
367  *******************************************************************/
369 
370 /*!******************************************************************
371  * \fn error_t SENSIT_API_init_nv_mem(u16 block_length)
372  * \brief Initialize Non-Volatile Memory.
373  *
374  * \warning If you change the block length, it will be impossible to get
375  * data already stored in Non-Volatile Memory.
376  *
377  * \param[in] block_length Non-Volatile Memory data block length
378  *
379  * \retval SENSIT_ERR_NONE: No error
380  * \retval SENSIT_ERR_NVMEM_SIZE: Block length exceeds \link SENSIT_NV_MEM_SIZE \endlink
381  *******************************************************************/
382 error_t SENSIT_API_init_nv_mem(u16 block_length);
383 
384 /*!******************************************************************
385  * \fn error_t SENSIT_API_get_nv_mem(u8* data)
386  * \brief Read user data from non-volatile memory.
387  *
388  * Data length must be defined by initializing the NVMEM with
389  * \link SENSIT_API_init_nv_mem \endlink
390  *
391  * \param[out] data Data read from non-volatile memory
392  *
393  * \retval SENSIT_ERR_NONE: No error
394  * \retval SENSIT_ERR_NVMEM_INIT: Non-Volatile memory must be init first
395  *******************************************************************/
397 
398 /*!******************************************************************
399  * \fn error_t SENSIT_API_set_nv_mem(u8* data)
400  * \brief Write user data in a non-volatile memory.
401  *
402  * Data length must be defined by initializing the NVMEM with
403  * \link SENSIT_API_init_nv_mem \endlink
404  *
405  * \param[in] data Data to write in non-volatile memory
406  *
407  * \retval SENSIT_ERR_NONE: No error
408  * \retval SENSIT_ERR_NVMEM_INIT: Non-Volatile memory must be init first
409  * \retval SENSIT_ERR_NVMEM_WRITE: Failed to write data
410  *******************************************************************/
412 
413 /*!******************************************************************
414  * \fn error_t SENSIT_API_init_watchdog(void)
415  * \brief Activate the watchdog.
416  *
417  * \link SENSIT_API_watchdog_clear \endlink must be called at least
418  * every 26 seconds, otherwise the device will be reset.
419  *
420  * \retval SENSIT_ERR_NONE: No error
421  *******************************************************************/
423 
424 /*!******************************************************************
425  * \fn error_t SENSIT_API_clear_watchdog(void)
426  * \brief Clear watchdog timer.
427  *
428  * \retval SENSIT_ERR_NONE: No error
429  *******************************************************************/
431 
432 /*!******************************************************************
433  * \fn error_t SENSIT_API_init_uart(void)
434  * \brief Initialize the UART communication.
435  *
436  * - Serial Link settings:
437  * * Data Rate: 115,200 bps
438  * * Parity: None
439  * * Bit: 8
440  * * Stop bit: 1
441  * .
442  * .
443  *
444  * \warning Sleep mode will be disable.
445  *
446  * \retval SENSIT_ERR_NONE: No error
447  *******************************************************************/
449 
450 /*!******************************************************************
451  * \fn error_t SENSIT_API_close_uart(void)
452  * \brief Close the UART communication.
453  *
454  * \retval SENSIT_ERR_NONE: No error
455  *******************************************************************/
457 
458 /*!******************************************************************
459  * \fn error_t SENSIT_API_send_data_to_uart(u8* data, u8 size)
460  * \brief Send a string on the UART communication.
461  *
462  * \param[in] data Data to send
463  * \param[in] size Data size
464  *
465  * \retval SENSIT_ERR_NONE No error
466  * \retval SENSIT_ERR_UART_STATE: First init the UART
467  * \retval SENSIT_ERR_UART_FULL: No more space in UART Tx buffer
468  *******************************************************************/
470  u8 size);
471 
472 /*!******************************************************************
473  * \fn error_t SENSIT_API_get_data_from_uart(u8* c)
474  * \brief Get a char from the UART Rx buffer.
475  *
476  * \param[out] c Pointer on the read char
477  *
478  * \retval SENSIT_ERR_NONE No error
479  * \retval SENSIT_ERR_UART_STATE: First init the UART
480  * \retval SENSIT_ERR_UART_EMPTY: UART Rx buffer is empty
481  *******************************************************************/
483 
484 /*!******************************************************************
485  * \fn error_t SENSIT_API_init_usb(void)
486  * \brief Initialize USB communication of the device.
487  *
488  * The USB interfaces will not work if your device is in sleep mode.
489  * - Serial Link settings:
490  * * Data Rate: 115,200 bps
491  * * Parity: None
492  * * Bit: 8
493  * * Stop bit: 1
494  * .
495  * .
496  *
497  * \warning Sleep mode will be disable.
498  *
499  * \retval SENSIT_ERR_NONE: No error
500  *******************************************************************/
502 
503 /*!******************************************************************
504  * \fn error_t SENSIT_API_send_data_to_usb(u8* data, u8 size)
505  * \brief Send a string on the USB communication.
506  *
507  * \param[in] data Data to send
508  * \param[in] size Data size
509  *
510  * \retval SENSIT_ERR_NONE: No error
511  * \retval SENSIT_ERR_USB_STATE: First init the USB
512  *******************************************************************/
514  u8 size);
515 
516 /*!******************************************************************
517  * \fn error_t SENSIT_API_get_data_from_usb(u8* c)
518  * \brief Get a char from the USB Rx buffer.
519  *
520  * \param[out] c Pointer on the read character
521  *
522  * \retval SENSIT_ERR_NONE: No error
523  * \retval SENSIT_ERR_USB_STATE: First init the USB
524  * \retval SENSIT_ERR_USB_EMPTY: USB Rx buffer empty
525  *******************************************************************/
527 
528 /*!******************************************************************
529  * \fn error_t SENSIT_API_switch_battery_charger(bool enable)
530  * \brief Function to disable battery charger in case of use of an
531  * external power supply.
532  *
533  * \param[in] enable TRUE to enable battery charger
534  * FALSE to disable battery charger
535  *
536  * \retval SENSIT_ERR_NONE: No error
537  *******************************************************************/
539 
540 /*!******************************************************************
541  * \fn error_t SENSIT_API_switch_test_mode_creedentials(bool enable)
542  * \brief Switch to private/test mode credentials.
543  *
544  * Test mode credentials are used for Sigfox API test functions &
545  * Sigfox Verified Addon.<BR>
546  * Test mode ID = 0xFEDCBA98 <BR>
547  * TEST mode key = 0x0123456789ABCDEF0123456789ABCDEF
548  *
549  * \warning You will no longer be received by the network when using
550  * the test mode credentials.
551  *
552  * \param[in] enable TRUE to enable test mode credentials
553  *
554  * \retval SENSIT_ERR_NONE: No error
555  *******************************************************************/
557 
558 /*!******************************************************************
559  * \fn error_t SENSIT_API_reset_device_sequence_number(void)
560  * \brief Reset device sequence number.
561  *
562  * This fucntion can be use when you have an error during the save of
563  * sequence number (SFX_ERR_INT_EXECUTE_COM_SEQUENCE_NVM_STORAGE_MESSAGE).
564  *
565  * \warning If you reset the sequence number, you will need to
566  * "Disengage sequence number" on the Sigfox Cloud to continue to
567  * receive your messages.
568  *
569  * \retval SENSIT_ERR_NONE: No error
570  * \retval SENSIT_ERR_RESET_SEQ_NB: Failed to reset device sequence number.
571  *******************************************************************/
573 
rc_origin_e
Enum to be used in SENSIT_API_configure_radio.
Definition: sensit_api.h:98
error_t SENSIT_API_init_uart(void)
Initialize the UART communication.
radio_conf_e
List of implemented Sigfox Radio Configuration.
Definition: sensit_api.h:85
void SENSIT_API_reset(void)
Reset the device.
error_t SENSIT_API_send_data_to_usb(u8 *data, u8 size)
Send a string on the USB communication.
error_t SENSIT_API_get_nv_mem(u8 *data)
Read user data from non-volatile memory.
error_t SENSIT_API_configure_radio(rc_origin_e origin, radio_conf_e *rc)
Configure the device with the selected Sigfox Radio Configuration (RC).
Definition: sensit_api.h:89
error_t SENSIT_API_get_reed_switch_state(bool *state)
Get the state of the reed switch.
error_t SENSIT_API_switch_test_mode_creedentials(bool enable)
Switch to private/test mode credentials.
error_t SENSIT_API_init_nv_mem(u16 block_length)
Initialize Non-Volatile Memory.
Definition: sensit_api.h:99
Definition: sensit_api.h:127
Definition: sensit_api.h:109
error_t SENSIT_API_get_current_time(u32 *current_time)
Return time passed since last device reset.
Definition: sensit_api.h:112
error_t SENSIT_API_wait(u32 time_ms)
Wait during &#39;time_ms&#39;.
error_t SENSIT_API_configure_button(interrupt_e config)
Configure button interrupt.
Definition: sensit_api.h:87
unsigned short u16
Definition: sensit_types.h:12
error_t SENSIT_API_send_data_to_uart(u8 *data, u8 size)
Send a string on the UART communication.
error_t SENSIT_API_init_watchdog(void)
Activate the watchdog.
error_t SENSIT_API_get_sdk_version(u8 **version, u8 *size)
Return Sens&#39;it SDK library version, in ASCII format.
error_t SENSIT_API_close_uart(void)
Close the UART communication.
interrupt_e
Interupt configuration.
Definition: sensit_api.h:124
u8 firmware_version[16]
Varible use at the device initialization to set your firmware version in the non-volatile memory...
Definition: sensit_api.h:114
Definition: sensit_api.h:126
error_t SENSIT_API_init_usb(void)
Initialize USB communication of the device.
error_t SENSIT_API_get_data_from_uart(u8 *c)
Get a char from the UART Rx buffer.
Definition: sensit_api.h:113
error_t SENSIT_API_reset_device_sequence_number(void)
Reset device sequence number.
Definition: sensit_api.h:86
error_t SENSIT_API_get_data_from_usb(u8 *c)
Get a char from the USB Rx buffer.
Definition: sensit_api.h:116
Definition: sensit_api.h:88
error_t SENSIT_API_write_read_i2c_bus(u8 addr, u8 *buffer, u8 nbWrite, u8 nbRead)
I2C bus driver.
unsigned long u32
Definition: sensit_types.h:13
error_t SENSIT_API_configure_fxos8700_interrupt(bool enable)
Enable/Disable interrupt from Accelerometer.
error_t SENSIT_API_set_rtc_alarm(u32 interrupt_period)
Set RTC alarm timer. Set interrupt period to 0 to disable it.
error_t SENSIT_API_configure_reed_switch(bool enable, interrupt_e config)
Enable/disable the reed switch and configure interrupt.
Definition: sensit_api.h:125
volatile u8 pending_interrupt
Bit array of peripherals interrupt.
Definition: sensit_api.h:152
unsigned char error_t
Definition: sensit_types.h:23
error_t SENSIT_API_clear_watchdog(void)
Clear watchdog timer.
rgb_color_e
List of possible colors for the RGB led.
Definition: sensit_api.h:108
Definition: sensit_api.h:115
Definition: sensit_api.h:100
error_t SENSIT_API_switch_battery_charger(bool enable)
Function to disable battery charger in case of use of an external power supply.
unsigned char u8
Definition: sensit_types.h:11
error_t SENSIT_API_set_rgb_led(rgb_color_e color)
Set RGB led state.
Definition: sensit_api.h:111
error_t SENSIT_API_get_battery_level(u16 *battery_voltage)
Do a measurement of battery voltage.
Definition: sensit_api.h:128
error_t SENSIT_API_switch_radio(bool on, rgb_color_e color)
Switch on/off radio power.
Definition: sensit_api.h:110
error_t SENSIT_API_set_nv_mem(u8 *data)
Write user data in a non-volatile memory.
error_t SENSIT_API_sleep(bool auto_wake_up)
Put the device in stop mode and wait for an interrupt.
error_t SENSIT_API_set_white_led(bool on)
Set white led state.
error_t SENSIT_API_get_button_state(bool *state)
Get the state of the button.