annab412 2.1.0.0
|
API for configuring and manipulating ANNA-B412 Click driver. More...
Topics | |
ANNA-B412 Device Settings | |
Settings for registers of ANNA-B412 Click driver. | |
ANNA-B412 MikroBUS Map | |
MikroBUS pin mapping of ANNA-B412 Click driver. | |
Functions | |
void | annab412_cfg_setup (annab412_cfg_t *cfg) |
ANNA-B412 configuration object setup function. | |
err_t | annab412_init (annab412_t *ctx, annab412_cfg_t *cfg) |
ANNA-B412 initialization function. | |
err_t | annab412_default_cfg (annab412_t *ctx) |
ANNA-B412 default configuration function. | |
err_t | annab412_generic_write (annab412_t *ctx, uint8_t *data_in, uint16_t len) |
ANNA-B412 data writing function. | |
err_t | annab412_generic_read (annab412_t *ctx, uint8_t *data_out, uint16_t len) |
ANNA-B412 data reading function. | |
void | annab412_set_rst_pin (annab412_t *ctx, uint8_t state) |
ANNA-B412 set reset pin function. | |
void | annab412_set_dsr_pin (annab412_t *ctx, uint8_t state) |
ANNA-B412 set data set ready pin function. | |
void | annab412_set_cts_pin (annab412_t *ctx, uint8_t state) |
ANNA-B412 set clear to send pin function. | |
uint8_t | annab412_get_dtr_pin (annab412_t *ctx) |
ANNA-B412 get data terminal ready pin function. | |
uint8_t | annab412_get_rts_pin (annab412_t *ctx) |
ANNA-B412 get request to send pin function. | |
void | annab412_hw_reset (annab412_t *ctx) |
ANNA-B412 hw reset function. | |
err_t | annab412_send_command (annab412_t *ctx, char *command) |
ANNA-B412 send command function. | |
err_t | annab412_set_cmd_echo_on (annab412_t *ctx) |
ANNA-B412 set command echo on function. | |
err_t | annab412_set_cmd_echo_off (annab412_t *ctx) |
ANNA-B412 set command echo on function. | |
err_t | annab412_set_cmd_device_name (annab412_t *ctx, char *device_name) |
ANNA-B412 set device name function. | |
err_t | annab412_set_cmd_conn_mode (annab412_t *ctx, uint8_t mode) |
ANNA-B412 set connectability mode function. | |
err_t | annab412_set_cmd_discover_mode (annab412_t *ctx, uint8_t mode) |
ANNA-B412 set discoverability mode function. | |
err_t | annab412_set_cmd_enter_mode (annab412_t *ctx, uint8_t mode) |
ANNA-B412 set enter mode function. | |
API for configuring and manipulating ANNA-B412 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void annab412_cfg_setup | ( | annab412_cfg_t * | cfg | ) |
ANNA-B412 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See annab412_cfg_t object definition for detailed explanation. |
err_t annab412_default_cfg | ( | annab412_t * | ctx | ) |
ANNA-B412 default configuration function.
This function executes a default configuration of ANNA-B412 click board.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t annab412_generic_read | ( | annab412_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len ) |
ANNA-B412 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See annab412_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 annab412_generic_write | ( | annab412_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
ANNA-B412 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See annab412_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 annab412_get_dtr_pin | ( | annab412_t * | ctx | ) |
ANNA-B412 get data terminal ready pin function.
This function the logic state of the DTR pin
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
uint8_t annab412_get_rts_pin | ( | annab412_t * | ctx | ) |
ANNA-B412 get request to send pin function.
This function the logic state of the RTS pin
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void annab412_hw_reset | ( | annab412_t * | ctx | ) |
ANNA-B412 hw reset function.
This function resets the module by toggling the RST pin.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
err_t annab412_init | ( | annab412_t * | ctx, |
annab412_cfg_t * | cfg ) |
ANNA-B412 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See annab412_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t annab412_send_command | ( | annab412_t * | ctx, |
char * | command ) |
ANNA-B412 send command function.
This function sends a desired command of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | command | : 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 annab412_set_cmd_conn_mode | ( | annab412_t * | ctx, |
uint8_t | mode ) |
ANNA-B412 set connectability mode function.
This function sets the connectability mode of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | mode | : Desired connectability mode [1-2]. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t annab412_set_cmd_device_name | ( | annab412_t * | ctx, |
char * | device_name ) |
ANNA-B412 set device name function.
This function sets the device name of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | device_name | : Desired device name. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t annab412_set_cmd_discover_mode | ( | annab412_t * | ctx, |
uint8_t | mode ) |
ANNA-B412 set discoverability mode function.
This function sets the discoverability mode of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | mode | : Desired discoverability mode [1-3]. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t annab412_set_cmd_echo_off | ( | annab412_t * | ctx | ) |
ANNA-B412 set command echo on function.
This function disable the echo mode of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t annab412_set_cmd_echo_on | ( | annab412_t * | ctx | ) |
ANNA-B412 set command echo on function.
This function enables the echo mode of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t annab412_set_cmd_enter_mode | ( | annab412_t * | ctx, |
uint8_t | mode ) |
ANNA-B412 set enter mode function.
This function sets the enter mode of the Stand-alone Bluetooth 5.1 low energy module on the ANNA-B412 click board™.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | mode | : Desired enter mode [0-4]. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. void annab412_set_cts_pin | ( | annab412_t * | ctx, |
uint8_t | state ) |
ANNA-B412 set clear to send pin function.
This function sets a desired logic state of the CTS pin.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void annab412_set_dsr_pin | ( | annab412_t * | ctx, |
uint8_t | state ) |
ANNA-B412 set data set ready pin function.
This function sets a desired logic state of the DSR pin.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void annab412_set_rst_pin | ( | annab412_t * | ctx, |
uint8_t | state ) |
ANNA-B412 set reset pin function.
This function sets a desired logic state of the RST pin.
[in] | ctx | : Click context object. See annab412_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |