iotexpresslink2 2.1.0.0
|
API for configuring and manipulating IoT ExpressLink 2 Click driver. More...
Topics | |
IoT ExpressLink 2 Device Settings | |
Settings for registers of IoT ExpressLink 2 Click driver. | |
IoT ExpressLink 2 MikroBUS Map | |
MikroBUS pin mapping of IoT ExpressLink 2 Click driver. | |
Functions | |
void | iotexpresslink2_cfg_setup (iotexpresslink2_cfg_t *cfg) |
IoT ExpressLink 2 configuration object setup function. | |
err_t | iotexpresslink2_init (iotexpresslink2_t *ctx, iotexpresslink2_cfg_t *cfg) |
IoT ExpressLink 2 initialization function. | |
err_t | iotexpresslink2_generic_write (iotexpresslink2_t *ctx, uint8_t *data_in, uint16_t len) |
IoT ExpressLink 2 data writing function. | |
err_t | iotexpresslink2_generic_read (iotexpresslink2_t *ctx, uint8_t *data_out, uint16_t len) |
IoT ExpressLink 2 data reading function. | |
void | iotexpresslink2_send_cmd (iotexpresslink2_t *ctx, uint8_t *cmd) |
IoT ExpressLink 2 send cmd function. | |
void | iotexpresslink2_set_pwr_pin (iotexpresslink2_t *ctx, uint8_t state) |
IoT ExpressLink 2 set pwr pin function. | |
void | iotexpresslink2_set_rst_pin (iotexpresslink2_t *ctx, uint8_t state) |
IoT ExpressLink 2 set rst pin function. | |
uint8_t | iotexpresslink2_get_wake_pin (iotexpresslink2_t *ctx) |
IoT ExpressLink 2 get wake pin function. | |
uint8_t | iotexpresslink2_get_event_pin (iotexpresslink2_t *ctx) |
IoT ExpressLink 2 get event pin function. | |
void | iotexpresslink2_power_on (iotexpresslink2_t *ctx) |
IoT ExpressLink 2 power on function. | |
void | iotexpresslink2_reset_device (iotexpresslink2_t *ctx) |
IoT ExpressLink 2 reset device function. | |
API for configuring and manipulating IoT ExpressLink 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void iotexpresslink2_cfg_setup | ( | iotexpresslink2_cfg_t * | cfg | ) |
IoT ExpressLink 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See iotexpresslink2_cfg_t object definition for detailed explanation. |
err_t iotexpresslink2_generic_read | ( | iotexpresslink2_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
IoT ExpressLink 2 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See iotexpresslink2_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 iotexpresslink2_generic_write | ( | iotexpresslink2_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
IoT ExpressLink 2 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See iotexpresslink2_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 iotexpresslink2_get_event_pin | ( | iotexpresslink2_t * | ctx | ) |
IoT ExpressLink 2 get event pin function.
This function returns the event pin logic state.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
uint8_t iotexpresslink2_get_wake_pin | ( | iotexpresslink2_t * | ctx | ) |
IoT ExpressLink 2 get wake pin function.
This function returns the wake pin logic state.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
err_t iotexpresslink2_init | ( | iotexpresslink2_t * | ctx, |
iotexpresslink2_cfg_t * | cfg ) |
IoT ExpressLink 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See iotexpresslink2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void iotexpresslink2_power_on | ( | iotexpresslink2_t * | ctx | ) |
IoT ExpressLink 2 power on function.
This function performs the power on sequence.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
void iotexpresslink2_reset_device | ( | iotexpresslink2_t * | ctx | ) |
IoT ExpressLink 2 reset device function.
This function resets the device by toggling the RST pin state.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
void iotexpresslink2_send_cmd | ( | iotexpresslink2_t * | ctx, |
uint8_t * | cmd ) |
IoT ExpressLink 2 send cmd function.
This function send command string by using UART serial interface.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
[in] | cmd | : Command string to send. |
void iotexpresslink2_set_pwr_pin | ( | iotexpresslink2_t * | ctx, |
uint8_t | state ) |
IoT ExpressLink 2 set pwr pin function.
This function sets the PWR pin logic state.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void iotexpresslink2_set_rst_pin | ( | iotexpresslink2_t * | ctx, |
uint8_t | state ) |
IoT ExpressLink 2 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See iotexpresslink2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |