awsiot
2.1.0.0
|
API for configuring and manipulating AWS IoT Click driver. More...
Modules | |
AWS IoT Device Settings | |
Settings for registers of AWS IoT Click driver. | |
AWS IoT MikroBUS Map | |
MikroBUS pin mapping of AWS IoT Click driver. | |
Functions | |
void | awsiot_cfg_setup (awsiot_cfg_t *cfg) |
AWS IoT configuration object setup function. More... | |
err_t | awsiot_init (awsiot_t *ctx, awsiot_cfg_t *cfg) |
AWS IoT initialization function. More... | |
err_t | awsiot_generic_write (awsiot_t *ctx, uint8_t *data_in, uint16_t len) |
AWS IoT data writing function. More... | |
err_t | awsiot_generic_read (awsiot_t *ctx, uint8_t *data_out, uint16_t len) |
AWS IoT data reading function. More... | |
void | awsiot_send_cmd (awsiot_t *ctx, uint8_t *cmd) |
AWS IoT send cmd function. More... | |
void | awsiot_enable_device (awsiot_t *ctx) |
AWS IoT enable device function. More... | |
void | awsiot_disable_device (awsiot_t *ctx) |
AWS IoT disable device function. More... | |
void | awsiot_reset_device (awsiot_t *ctx) |
AWS IoT reset device function. More... | |
void | awsiot_set_boot_pin (awsiot_t *ctx, uint8_t state) |
AWS IoT set boot pin function. More... | |
uint8_t | awsiot_get_event_pin (awsiot_t *ctx) |
AWS IoT get event pin function. More... | |
uint8_t | awsiot_get_wake_pin (awsiot_t *ctx) |
AWS IoT get wake pin function. More... | |
API for configuring and manipulating AWS IoT Click driver.
void awsiot_cfg_setup | ( | awsiot_cfg_t * | cfg | ) |
AWS IoT configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See awsiot_cfg_t object definition for detailed explanation. |
void awsiot_disable_device | ( | awsiot_t * | ctx | ) |
AWS IoT disable device function.
This function disables device by setting the RST pin to low logic state.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
void awsiot_enable_device | ( | awsiot_t * | ctx | ) |
AWS IoT enable device function.
This function enables device by setting the RST pin to high logic state.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
err_t awsiot_generic_read | ( | awsiot_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
AWS IoT data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See awsiot_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 awsiot_generic_write | ( | awsiot_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
AWS IoT data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See awsiot_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 awsiot_get_event_pin | ( | awsiot_t * | ctx | ) |
AWS IoT get event pin function.
This function returns the event pin logic state.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
uint8_t awsiot_get_wake_pin | ( | awsiot_t * | ctx | ) |
AWS IoT get wake pin function.
This function returns the wake pin logic state.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
err_t awsiot_init | ( | awsiot_t * | ctx, |
awsiot_cfg_t * | cfg | ||
) |
AWS IoT initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See awsiot_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void awsiot_reset_device | ( | awsiot_t * | ctx | ) |
AWS IoT reset device function.
This function resets device by toggling the RST pin state.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
void awsiot_send_cmd | ( | awsiot_t * | ctx, |
uint8_t * | cmd | ||
) |
AWS IoT send cmd function.
This function send command string by using UART serial interface.
[in] | ctx | : Click context object. See awsiot_t object definition for detailed explanation. |
[in] | cmd | : Command string to send. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation.