esp8684 2.1.0.0
ESP8684 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ esp8684_cfg_setup()

void esp8684_cfg_setup ( esp8684_cfg_t * cfg)

ESP8684 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ esp8684_connect_for_trans()

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.

Parameters
[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.
Returns
Nothing.
Note
None.

◆ esp8684_connect_to_network()

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.

Parameters
[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.
Returns
Nothing.
Note
None.

◆ esp8684_default_cfg()

void esp8684_default_cfg ( esp8684_t * ctx)

ESP8684 default configuration function.

This function executes a default configuration of ESP8684 click board.

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

◆ esp8684_generic_read()

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.

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

◆ esp8684_generic_write()

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.

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

◆ esp8684_get_cts_pin()

uint8_t esp8684_get_cts_pin ( esp8684_t * ctx)

ESP8684 get cts pin state function.

This function is used to get cts pin state.

Parameters
[in]ctx: Click context object. See esp8684_t object definition for detailed explanation.
Returns
  • 1 - Pin state high,
  • 0 - Pin state low.
Note
None.

◆ esp8684_init()

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.

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

◆ esp8684_send_cmd()

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.

Parameters
[in]ctx: Click context object. See esp8684_t object definition for detailed explanation.
[in]cmd: Command to be sent.
[in]args: Command arguments.
Returns
Nothing.
Note
None.

◆ esp8684_send_query_cmd()

void esp8684_send_query_cmd ( esp8684_t * ctx,
uint8_t * cmd )

ESP8684 send query command function.

This function is used to send query command.

Parameters
[in]ctx: Click context object. See esp8684_t object definition for detailed explanation.
[in]cmd: Query command to be sent.
Returns
Nothing.
Note
None.

◆ esp8684_send_test_cmd()

void esp8684_send_test_cmd ( esp8684_t * ctx,
uint8_t * cmd )

ESP8684 test query command function.

This function is used to send test command.

Parameters
[in]ctx: Click context object. See esp8684_t object definition for detailed explanation.
[in]cmd: Test command to be sent.
Returns
Nothing.
Note
None.

◆ esp8684_set_bt_pin()

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.

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

◆ esp8684_set_rst_pin()

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.

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

◆ esp8684_set_rts_pin()

void esp8684_set_rts_pin ( esp8684_t * ctx,
uint8_t pin_state )

ESP8684 set rts pin state function.

This function is used to set rts pin state.

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