wirelesssun
2.1.0.0
|
API for configuring and manipulating Wireless SUN Click driver. More...
Modules | |
Wireless SUN Device Settings | |
Settings for registers of Wireless SUN Click driver. | |
Wireless SUN MikroBUS Map | |
MikroBUS pin mapping of Wireless SUN Click driver. | |
Functions | |
void | wirelesssun_cfg_setup (wirelesssun_cfg_t *cfg) |
Wireless SUN configuration object setup function. More... | |
err_t | wirelesssun_init (wirelesssun_t *ctx, wirelesssun_cfg_t *cfg) |
Wireless SUN initialization function. More... | |
err_t | wirelesssun_generic_write (wirelesssun_t *ctx, char *data_in, uint16_t len) |
Wireless SUN data writing function. More... | |
err_t | wirelesssun_generic_read (wirelesssun_t *ctx, char *data_out, uint16_t len) |
Wireless SUN data reading function. More... | |
void | wirelesssun_send_cmd (wirelesssun_t *ctx, char *cmd) |
Wireless SUN send cmd function. More... | |
void | wirelesssun_send_cmd_with_parameter (wirelesssun_t *ctx, char *cmd, char *param_buf) |
Wireless SUN send cmd function. More... | |
void | wirelesssun_reset_device (wirelesssun_t *ctx) |
Wireless SUN reset device function. More... | |
void | wirelesssun_set_rst_pin (wirelesssun_t *ctx, uint8_t state) |
Wireless SUN set rst pin function. More... | |
void | wirelesssun_set_cts_pin (wirelesssun_t *ctx, uint8_t state) |
Wireless SUN set cts pin function. More... | |
uint8_t | wirelesssun_get_rts_pin (wirelesssun_t *ctx) |
Wireless SUN get rts pin function. More... | |
API for configuring and manipulating Wireless SUN Click driver.
void wirelesssun_cfg_setup | ( | wirelesssun_cfg_t * | cfg | ) |
Wireless SUN configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See wirelesssun_cfg_t object definition for detailed explanation. |
err_t wirelesssun_generic_read | ( | wirelesssun_t * | ctx, |
char * | data_out, | ||
uint16_t | len | ||
) |
Wireless SUN data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See wirelesssun_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 wirelesssun_generic_write | ( | wirelesssun_t * | ctx, |
char * | data_in, | ||
uint16_t | len | ||
) |
Wireless SUN data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See wirelesssun_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 wirelesssun_get_rts_pin | ( | wirelesssun_t * | ctx | ) |
Wireless SUN get rts pin function.
This function returns the RTS pin logic state.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
err_t wirelesssun_init | ( | wirelesssun_t * | ctx, |
wirelesssun_cfg_t * | cfg | ||
) |
Wireless SUN initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See wirelesssun_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void wirelesssun_reset_device | ( | wirelesssun_t * | ctx | ) |
Wireless SUN reset device function.
This function resets the device by toggling the RST pin state.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
void wirelesssun_send_cmd | ( | wirelesssun_t * | ctx, |
char * | cmd | ||
) |
Wireless SUN send cmd function.
This function sends a specified command to the click module.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
[in] | cmd | : Command string to be send. |
void wirelesssun_send_cmd_with_parameter | ( | wirelesssun_t * | ctx, |
char * | cmd, | ||
char * | param_buf | ||
) |
Wireless SUN send cmd function.
This function sends a specified command to the click module with desired parameters appended to.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
[in] | cmd | : Command string to be send. |
[in] | param_buf | : Command parameters string to be send. |
void wirelesssun_set_cts_pin | ( | wirelesssun_t * | ctx, |
uint8_t | state | ||
) |
Wireless SUN set cts pin function.
This function sets the CTS pin logic state.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void wirelesssun_set_rst_pin | ( | wirelesssun_t * | ctx, |
uint8_t | state | ||
) |
Wireless SUN set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See wirelesssun_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |