zigbee 2.0.0.0
|
API for configuring and manipulating ZigBee Click driver. More...
Modules | |
ZigBee Device Settings | |
Settings for registers of ZigBee Click driver. | |
ZigBee MikroBUS Map | |
MikroBUS pin mapping of ZigBee Click driver. | |
Functions | |
void | zigbee_cfg_setup (zigbee_cfg_t *cfg) |
ZigBee configuration object setup function. More... | |
err_t | zigbee_init (zigbee_t *ctx, zigbee_cfg_t *cfg) |
ZigBee initialization function. More... | |
err_t | zigbee_generic_write (zigbee_t *ctx, char *data_buf, uint16_t len) |
ZigBee data writing function. More... | |
err_t | zigbee_generic_read (zigbee_t *ctx, char *data_buf, uint16_t max_len) |
ZigBee data reading function. More... | |
void | zigbee_send_at (zigbee_t *ctx, uint8_t *at_buf, uint8_t *suffix_buf) |
Function merges two string and sends it to device. More... | |
void | zigbee_send_cmd (zigbee_t *ctx, uint8_t *cmd_buf) |
Function sends string to device. More... | |
uint8_t | zigbee_resp (zigbee_t *ctx, char *data_in) |
Function checking driver buffer string. More... | |
char * | zigbee_error_handler (zigbee_t *ctx, uint8_t error_code) |
Function for converting error code to error message. More... | |
void | zigbee_set_pin_rst (zigbee_t *ctx, uint8_t status) |
Function setting RST pin status. More... | |
void | zigbee_set_pin_fw (zigbee_t *ctx, uint8_t status) |
Function setting FW pin status. More... | |
uint8_t | zigbee_get_pin_int (zigbee_t *ctx) |
Function getting INT pin status. More... | |
void | zigbee_restart (zigbee_t *ctx) |
Function for reseting device. More... | |
API for configuring and manipulating ZigBee Click driver.
void zigbee_cfg_setup | ( | zigbee_cfg_t * | cfg | ) |
ZigBee configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See zigbee_cfg_t object definition for detailed explanation. |
char * zigbee_error_handler | ( | zigbee_t * | ctx, |
uint8_t | error_code | ||
) |
Function for converting error code to error message.
This function is used for converting error code to error message.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | error_code | : Error hex code. |
err_t zigbee_generic_read | ( | zigbee_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
ZigBee data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t zigbee_generic_write | ( | zigbee_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
ZigBee data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.uint8_t zigbee_get_pin_int | ( | zigbee_t * | ctx | ) |
Function getting INT pin status.
This function is used for getting the state of INT pin.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
err_t zigbee_init | ( | zigbee_t * | ctx, |
zigbee_cfg_t * | cfg | ||
) |
ZigBee initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See zigbee_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t zigbee_resp | ( | zigbee_t * | ctx, |
char * | data_in | ||
) |
Function checking driver buffer string.
This function is checking driver buffer for the codes.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | data_in | : Pointer to data. |
0x00
- ZIGBEE_OP_WAIT, 0xAA
- ZIGBEE_OP_OK, 0xBB
- ZIGBEE_OP_ERROR, 0xCC
- ZIGBEE_OP_NL. void zigbee_restart | ( | zigbee_t * | ctx | ) |
Function for reseting device.
This function is used for restarting device.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
void zigbee_send_at | ( | zigbee_t * | ctx, |
uint8_t * | at_buf, | ||
uint8_t * | suffix_buf | ||
) |
Function merges two string and sends it to device.
This function is used to send AT command plus parameter that it needs.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | at_buf | : Pointer to at macro defined in driver. |
[in] | suffix_buf | : Pointer to string that concats to at_buf. |
void zigbee_send_cmd | ( | zigbee_t * | ctx, |
uint8_t * | cmd_buf | ||
) |
Function sends string to device.
This function is used to send commands via UART.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | cmd_buf | : String that will be sent to device. |
void zigbee_set_pin_fw | ( | zigbee_t * | ctx, |
uint8_t | status | ||
) |
Function setting FW pin status.
This function is used for setting state of the FW pin.
[in] | ctx | : Click context object. See zigbee_t object definition for detailed explanation. |
[in] | status | : Pin status. |