thyonei 2.1.0.0
Modules | Functions
Thyone-I Click Driver

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...
 

Detailed Description

API for configuring and manipulating Thyone-I Click driver.

Function Documentation

◆ thyonei_broadcast_data_req()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_cfg_setup()

void thyonei_cfg_setup ( thyonei_cfg_t cfg)

Thyone-I configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See thyonei_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ thyonei_default_cfg()

void thyonei_default_cfg ( thyonei_t ctx)

Thyone-I default configuration function.

This function executes a default configuration of Thyone-I click board.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
Returns
Nothing.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ thyonei_generic_read()

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.

Parameters
[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.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_generic_write()

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.

Parameters
[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.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_get_cts_state()

uint8_t thyonei_get_cts_state ( thyonei_t ctx)

Thyone-I get CTS pin function.

This function returns the CTS pin logic state.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ thyonei_get_req()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_hw_reset()

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.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ thyonei_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_multicast_data_req()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_send_command()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_set_bt()

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.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ thyonei_set_req()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thyonei_set_rst()

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.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ thyonei_set_rts()

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.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ thyonei_set_wup()

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.

Parameters
[in]ctx: Click context object. See thyonei_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ thyonei_unicast_data_req()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.