esp8684 2.1.0.0
|
API for configuring and manipulating ESP8684 Click driver. More...
Topics | |
ESP8684 Device Settings | |
Settings for registers of ESP8684 Click driver. | |
ESP8684 MikroBUS Map | |
MikroBUS pin mapping of ESP8684 Click driver. | |
Functions | |
void | esp8684_cfg_setup (esp8684_cfg_t *cfg) |
ESP8684 configuration object setup function. | |
err_t | esp8684_init (esp8684_t *ctx, esp8684_cfg_t *cfg) |
ESP8684 initialization function. | |
void | esp8684_default_cfg (esp8684_t *ctx) |
ESP8684 default configuration function. | |
err_t | esp8684_generic_write (esp8684_t *ctx, uint8_t *data_in, uint16_t len) |
ESP8684 data writing function. | |
err_t | esp8684_generic_read (esp8684_t *ctx, uint8_t *data_out, uint16_t len) |
ESP8684 data reading function. | |
void | esp8684_set_rst_pin (esp8684_t *ctx, uint8_t pin_state) |
ESP8684 set rst pin state function. | |
void | esp8684_set_bt_pin (esp8684_t *ctx, uint8_t pin_state) |
ESP8684 set bt pin state function. | |
void | esp8684_set_rts_pin (esp8684_t *ctx, uint8_t pin_state) |
ESP8684 set rts pin state function. | |
uint8_t | esp8684_get_cts_pin (esp8684_t *ctx) |
ESP8684 get cts pin state function. | |
void | esp8684_send_cmd (esp8684_t *ctx, uint8_t *cmd, uint8_t *args) |
ESP8684 send command with arguments function. | |
void | esp8684_send_query_cmd (esp8684_t *ctx, uint8_t *cmd) |
ESP8684 send query command function. | |
void | esp8684_send_test_cmd (esp8684_t *ctx, uint8_t *cmd) |
ESP8684 test query command function. | |
void | esp8684_connect_to_network (esp8684_t *ctx, uint8_t *ssid, uint8_t *password) |
ESP8684 connect to network function. | |
void | esp8684_connect_for_trans (esp8684_t *ctx, uint8_t *type, uint8_t *link_id, uint8_t *remote_host, uint8_t *remote_port) |
ESP8684 connect to remote host function. | |
API for configuring and manipulating ESP8684 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void esp8684_cfg_setup | ( | esp8684_cfg_t * | cfg | ) |
ESP8684 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See esp8684_cfg_t object definition for detailed explanation. |
void esp8684_connect_for_trans | ( | esp8684_t * | ctx, |
uint8_t * | type, | ||
uint8_t * | link_id, | ||
uint8_t * | remote_host, | ||
uint8_t * | remote_port ) |
ESP8684 connect to remote host function.
This function is used to connect ESP8684 to the remote host.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | type | : Connection type ( TCP/UDP ). |
[in] | link_id | : Connection ID. |
[in] | remote_host | : Remote host address. |
[in] | remote_port | : Remote host port. |
void esp8684_connect_to_network | ( | esp8684_t * | ctx, |
uint8_t * | ssid, | ||
uint8_t * | password ) |
ESP8684 connect to network function.
This function is used to connect ESP8684 to the network.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | cmd | : Test command to be sent. |
[in] | ssid | : SSID of the targeted network. |
[in] | password | : SSID of the targeted network. |
void esp8684_default_cfg | ( | esp8684_t * | ctx | ) |
ESP8684 default configuration function.
This function executes a default configuration of ESP8684 click board.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
err_t esp8684_generic_read | ( | esp8684_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
ESP8684 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See esp8684_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 esp8684_generic_write | ( | esp8684_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
ESP8684 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See esp8684_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 esp8684_get_cts_pin | ( | esp8684_t * | ctx | ) |
ESP8684 get cts pin state function.
This function is used to get cts pin state.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
1
- Pin state high, 0
- Pin state low. err_t esp8684_init | ( | esp8684_t * | ctx, |
esp8684_cfg_t * | cfg ) |
ESP8684 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See esp8684_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void esp8684_send_cmd | ( | esp8684_t * | ctx, |
uint8_t * | cmd, | ||
uint8_t * | args ) |
ESP8684 send command with arguments function.
This function is used to send command with arguments.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | cmd | : Command to be sent. |
[in] | args | : Command arguments. |
void esp8684_send_query_cmd | ( | esp8684_t * | ctx, |
uint8_t * | cmd ) |
ESP8684 send query command function.
This function is used to send query command.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | cmd | : Query command to be sent. |
void esp8684_send_test_cmd | ( | esp8684_t * | ctx, |
uint8_t * | cmd ) |
ESP8684 test query command function.
This function is used to send test command.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | cmd | : Test command to be sent. |
void esp8684_set_bt_pin | ( | esp8684_t * | ctx, |
uint8_t | pin_state ) |
ESP8684 set bt pin state function.
This function is used to set bt pin state.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | pin_state | : Pin state. |
void esp8684_set_rst_pin | ( | esp8684_t * | ctx, |
uint8_t | pin_state ) |
ESP8684 set rst pin state function.
This function is used to set rst pin state.
[in] | ctx | : Click context object. See esp8684_t object definition for detailed explanation. |
[in] | pin_state | : Pin state. |