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 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 68 #define SENSOR_I2C_ADDR_HTS221 0xBE 69 #define SENSOR_I2C_ADDR_LTR329 0x52 70 #define SENSOR_I2C_ADDR_FXOS8700 0x3C 78 #define SENSIT_NV_MEM_SIZE 0x03F0 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 'time_ms'.
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'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.