Sens'it SDK  v2.0.0
radio_api.h
Go to the documentation of this file.
1 /*!******************************************************************
2  * \file radio_api.h
3  * \brief Sigfox APIs implementation for the Sens'it
4  * \author Sens'it Team
5  * \copyright Copyright (c) 2018 Sigfox, All Rights Reserved.
6  *******************************************************************/
7 
8 
9 /*!******************************************************************
10  * \defgroup RADIO_ERR_CODES Radio Error Codes
11  * \brief Error code definitions for RADIO APIs
12  *
13  * @{
14  *******************************************************************/
15 #define RADIO_ERR_NONE 0x00
17 #define RADIO_ERR_CONFIGURE_RADIO 0x20
18 #define RADIO_ERR_OPEN 0x21
19 #define RADIO_ERR_SET_STD_CONFIG 0x22
20 #define RADIO_ERR_SWITCH_ON 0x23
21 #define RADIO_ERR_DUTY_CYCLE 0x24
22 #define RADIO_ERR_NO_CHANNEL 0x25
23 #define RADIO_ERR_LBT 0x26
24 #define RADIO_ERR_SEND 0x27
25 #define RADIO_ERR_RECEIVE 0x28
26 #define RADIO_ERR_NVMEM 0x29
30 /*!******************************************************************
31  * \defgroup RADIO_API Radio APIs
32  * \brief Sigfox APIs implementation for the Sens'it
33  *
34  * @{
35  *******************************************************************/
36 
37 /*!******************************************************************
38  * \fn error_t RADIO_API_init(void)
39  * \brief Initialize Sens'it radio & Sigfox library.
40  *
41  * \retval RADIO_ERR_NONE: No error
42  * \retval RADIO_ERR_CONFIGURE_RADIO: Failed to configure Sens'it radio
43  * \retval RADIO_ERR_OPEN: Failed to open Sigfox library
44  * \retval RADIO_ERR_SET_STD_CONFIG: Failed to configure Sigfox library
45  *******************************************************************/
47 
48 /*!******************************************************************
49  * \fn error_t RADIO_API_send_message(rgb_color_e color, u8* data, u8 size, bool downlink, u8* response_ptr)
50  * \brief Send a Sigfox message.
51  *
52  * \param[in] color Color of led toggle during transmission
53  * \param[in] data Data to transmit
54  * \param[in] size Size of data to transmit
55  * \param[in] downlink True to required a downlink
56  * \param[out] response_ptr Pointer to get downlink data (max: 8 bytes)
57  *
58  * \retval RADIO_ERR_NONE: No error
59  * \retval RADIO_ERR_SWITCH_ON: Failed to switch radio ON
60  * \retval RADIO_ERR_DUTY_CYCLE: Transmission not allowed, duty cycle limit reach (RC1 only)
61  * \retval RADIO_ERR_NO_CHANNEL: Transmission not allowed, no available channel (RC2 & RC4 only)
62  * \retval RADIO_ERR_LBT: Transmission not allowed, channel occupied (RC3 only)
63  * \retval RADIO_ERR_SEND: SIGFOX_API_send_frame internal error
64  * \retval RADIO_ERR_RECEIVE: No downlink message received
65  * \retval RADIO_ERR_NVMEM: Error during NVMEM storage
66  *******************************************************************/
68  u8* data,
69  u8 size,
70  bool downlink,
71  u8* response_ptr);
72 
error_t RADIO_API_init(void)
Initialize Sens'it radio & Sigfox library.
unsigned char error_t
Definition: sensit_types.h:23
rgb_color_e
List of possible colors for the RGB led.
Definition: sensit_api.h:108
unsigned char u8
Definition: sensit_types.h:11
error_t RADIO_API_send_message(rgb_color_e color, u8 *data, u8 size, bool downlink, u8 *response_ptr)
Send a Sigfox message.