thyonei
2.1.0.0
|
API for configuring and manipulating Thyone-I Click driver. More...
Modules | |
Thyone-I Device Settings | |
Settings for registers of Thyone-I Click driver. | |
Thyone-I MikroBUS Map | |
MikroBUS pin mapping of Thyone-I Click driver. | |
Functions | |
void | thyonei_cfg_setup (thyonei_cfg_t *cfg) |
Thyone-I configuration object setup function. More... | |
err_t | thyonei_init (thyonei_t *ctx, thyonei_cfg_t *cfg) |
Thyone-I initialization function. More... | |
void | thyonei_default_cfg (thyonei_t *ctx) |
Thyone-I default configuration function. More... | |
err_t | thyonei_generic_write (thyonei_t *ctx, uint8_t *data_in, uint16_t len) |
Thyone-I data writing function. More... | |
err_t | thyonei_generic_read (thyonei_t *ctx, uint8_t *data_out, uint16_t len) |
Thyone-I data reading function. More... | |
uint8_t | thyonei_get_cts_state (thyonei_t *ctx) |
Thyone-I get CTS pin function. More... | |
void | thyonei_set_bt (thyonei_t *ctx, uint8_t pin_state) |
Thyone-I set BT pin function. More... | |
void | thyonei_set_rst (thyonei_t *ctx, uint8_t pin_state) |
Thyone-I set RST pin function. More... | |
void | thyonei_set_rts (thyonei_t *ctx, uint8_t pin_state) |
Thyone-I set RTS pin function. More... | |
void | thyonei_set_wup (thyonei_t *ctx, uint8_t pin_state) |
Thyone-I set WUP pin function. More... | |
void | thyonei_hw_reset (thyonei_t *ctx) |
Thyone-I hardware reser function. More... | |
err_t | thyonei_send_command (thyonei_t *ctx, uint8_t command, uint16_t payload_length, uint8_t *payload) |
Thyone-I send command function. More... | |
err_t | thyonei_set_req (thyonei_t *ctx, uint8_t settings_index, uint8_t parameters_length, uint8_t *parameters) |
Thyone-I set individual parameters function. More... | |
err_t | thyonei_get_req (thyonei_t *ctx, uint8_t settings_index, uint8_t *param_len, uint8_t *parameter) |
Thyone-I get individual parameters function. More... | |
err_t | thyonei_broadcast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message) |
Thyone-I brodcast data function. More... | |
err_t | thyonei_multicast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message) |
Thyone-I multicast data function. More... | |
err_t | thyonei_unicast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message) |
Thyone-I unicast data function. More... | |
API for configuring and manipulating Thyone-I Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t thyonei_broadcast_data_req | ( | thyonei_t * | ctx, |
uint8_t | message_len, | ||
uint8_t * | message | ||
) |
Thyone-I brodcast data function.
This command provides the simple broadcast data transmission of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | settings_index | : Index of the selected parameter. |
[in] | message_len | : Data to be sent. ( Maximum of 224 bytes can be transmitted per packet ) |
[in] | message | : Data to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thyonei_cfg_setup | ( | thyonei_cfg_t * | cfg | ) |
Thyone-I configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thyonei_cfg_t object definition for detailed explanation. |
void thyonei_default_cfg | ( | thyonei_t * | ctx | ) |
Thyone-I default configuration function.
This function executes a default configuration of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
err_t thyonei_generic_read | ( | thyonei_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
Thyone-I data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t thyonei_generic_write | ( | thyonei_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
Thyone-I data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. uint8_t thyonei_get_cts_state | ( | thyonei_t * | ctx | ) |
Thyone-I get CTS pin function.
This function returns the CTS pin logic state.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
err_t thyonei_get_req | ( | thyonei_t * | ctx, |
uint8_t | settings_index, | ||
uint8_t * | param_len, | ||
uint8_t * | parameter | ||
) |
Thyone-I get individual parameters function.
This command can be used to query individual setting parameters stored in flash of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | settings_index | : Index of the selected parameter. |
[out] | param_len | : Length of read data. |
[out] | parameter | : Read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thyonei_hw_reset | ( | thyonei_t * | ctx | ) |
Thyone-I hardware reser function.
This function is used to perform hardware reset of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
err_t thyonei_init | ( | thyonei_t * | ctx, |
thyonei_cfg_t * | cfg | ||
) |
Thyone-I initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thyonei_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thyonei_multicast_data_req | ( | thyonei_t * | ctx, |
uint8_t | message_len, | ||
uint8_t * | message | ||
) |
Thyone-I multicast data function.
This command provides the multicast data transmission to a group of modules configured with the same MAC GROUP ADDRESS of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | settings_index | : Index of the selected parameter. |
[in] | message_len | : Data to be sent. ( Maximum of 223 bytes can be transmitted per packet ) |
[in] | message | : Data to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thyonei_send_command | ( | thyonei_t * | ctx, |
uint8_t | command, | ||
uint16_t | payload_length, | ||
uint8_t * | payload | ||
) |
Thyone-I send command function.
This function is used to send selected command and their payload to Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | command | : Command to be sent. |
[in] | payload_length | : Length of data to be sent. |
[in] | payload | : Data to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thyonei_set_bt | ( | thyonei_t * | ctx, |
uint8_t | pin_state | ||
) |
Thyone-I set BT pin function.
This function sets the BT pin logic state.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t thyonei_set_req | ( | thyonei_t * | ctx, |
uint8_t | settings_index, | ||
uint8_t | parameters_length, | ||
uint8_t * | parameters | ||
) |
Thyone-I set individual parameters function.
This command can be used to set individual setting parameters in flash of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | settings_index | : Index of the selected parameter. |
[in] | parameters_length | : Length of data to be sent. |
[in] | parameters | : Data to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thyonei_set_rst | ( | thyonei_t * | ctx, |
uint8_t | pin_state | ||
) |
Thyone-I set RST pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void thyonei_set_rts | ( | thyonei_t * | ctx, |
uint8_t | pin_state | ||
) |
Thyone-I set RTS pin function.
This function sets the RTS pin logic state.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void thyonei_set_wup | ( | thyonei_t * | ctx, |
uint8_t | pin_state | ||
) |
Thyone-I set WUP pin function.
This function sets the WUP pin logic state.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t thyonei_unicast_data_req | ( | thyonei_t * | ctx, |
uint8_t | message_len, | ||
uint8_t * | message | ||
) |
Thyone-I unicast data function.
This command provides the unicast data transmission to the configured MAC DESTINATION ADDRESS of Thyone-I Click board.
[in] | ctx | : Click context object. See thyonei_t object definition for detailed explanation. |
[in] | settings_index | : Index of the selected parameter. |
[in] | message_len | : Data to be sent. ( Maximum of 220 bytes can be transmitted per packet ) |
[in] | message | : Data to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.