enocean2 2.0.0.0
|
Functions | |
void | enocean2_cfg_setup (enocean2_cfg_t *cfg) |
Config Object Initialization function. | |
ENOCEAN2_RETVAL | enocean2_init (enocean2_t *ctx, enocean2_cfg_t *cfg) |
Initialization function. | |
void | enocean2_default_cfg (enocean2_t *ctx) |
Click Default Configuration function. | |
void | enocean2_generic_write (enocean2_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | enocean2_generic_read (enocean2_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | enocean2_init_rx_buff (enocean2_t *ctx, enocean2_ring_buffer_t *rb, enocean2_rx_data_t *rx_str) |
Module initialization. | |
void | enocean2_set_callback_handler (enocean2_t *ctx, enocean2_callback_t recieve) |
Functions for sets callback handler | |
uint8_t | enocean2_send (enocean2_t *ctx, enocean2_packet_t *packet) |
Send ESP3 packet. | |
uint8_t | enocean2_rx (enocean2_ring_buffer_t *rb, uint8_t rx_data) |
Recieve character. | |
uint8_t | enocean2_packet_recieve (enocean2_t *ctx, enocean2_ring_buffer_t *rb) |
Process. | |
void enocean2_cfg_setup | ( | enocean2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void enocean2_default_cfg | ( | enocean2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for EnOcean2 click.
int32_t enocean2_generic_read | ( | enocean2_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
@description This function read maximum length of data.
void enocean2_generic_write | ( | enocean2_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sending. |
len | Number of bytes to be send. |
@description This function write certian number of bytes
ENOCEAN2_RETVAL enocean2_init | ( | enocean2_t * | ctx, |
enocean2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void enocean2_init_rx_buff | ( | enocean2_t * | ctx, |
enocean2_ring_buffer_t * | rb, | ||
enocean2_rx_data_t * | rx_str ) |
Module initialization.
ctx | Click object. |
rb | Ring buffer object. |
rx_str | Rx buffer object. Structure arguments: - rx_buffer - Ring buffer for recieving characters. - rx_size - Ring buffer size. - data_buffer - Buffer for storing packet data. - data_size - Data buffer size. |
@description EnOcean Serial Protocol ( ESP3 ) module initialization.
uint8_t enocean2_packet_recieve | ( | enocean2_t * | ctx, |
enocean2_ring_buffer_t * | rb ) |
Process.
ctx | Click object. |
rb | Ring buffer object. |
@description Implements state machine for recieving packets. It should be called in loop.
uint8_t enocean2_rx | ( | enocean2_ring_buffer_t * | rb, |
uint8_t | rx_data ) |
Recieve character.
rb | Ring buffer object. |
rx_data | Recieved byte. |
@description The function push recieved character to ring buffer.
uint8_t enocean2_send | ( | enocean2_t * | ctx, |
enocean2_packet_t * | packet ) |
Send ESP3 packet.
ctx | Click object. |
packet | Sending packet. |
@description Sends the ESP3 packet to an EnOcean module.
void enocean2_set_callback_handler | ( | enocean2_t * | ctx, |
enocean2_callback_t | recieve ) |
Functions for sets callback handler
ctx | Click object. |
recieve | Recieve callback. |
@description This function sets callback handler