enocean 2.0.0.0
|
Functions | |
void | enocean_cfg_setup (enocean_cfg_t *cfg) |
Config Object Initialization function. | |
ENOCEAN_RETVAL | enocean_init (enocean_t *ctx, enocean_cfg_t *cfg) |
Initialization function. | |
void | enocean_set_rst_pin (enocean_t *ctx, uint8_t state) |
Set RST ( reset ) pin state. | |
void | enocean_generic_write (enocean_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | enocean_generic_read (enocean_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | enocean_response_handler_set (enocean_t *ctx, enocean_hdl_t handler) |
Handler Set function. | |
uint8_t | enocean_send_packet (enocean_t *ctx, enocean_packet_t *packet) |
Packet Send function. | |
uint8_t | enocean_response_ready (enocean_t *ctx) |
Response Ready function. | |
void | enocean_uart_isr (enocean_t *ctx) |
UART Interrupt Routine function. | |
void enocean_cfg_setup | ( | enocean_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t enocean_generic_read | ( | enocean_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
enocean | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void enocean_generic_write | ( | enocean_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
enocean | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
ENOCEAN_RETVAL enocean_init | ( | enocean_t * | ctx, |
enocean_cfg_t * | cfg ) |
Initialization function.
enocean | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void enocean_response_handler_set | ( | enocean_t * | ctx, |
enocean_hdl_t | handler ) |
Handler Set function.
ctx | Click object. |
handler | Pointer to the function that should be performed |
@description This function sets handler on the function that should be performed.
uint8_t enocean_response_ready | ( | enocean_t * | ctx | ) |
Response Ready function.
ctx | Click object. |
@description This function checks does response ready or not.
uint8_t enocean_send_packet | ( | enocean_t * | ctx, |
enocean_packet_t * | packet ) |
Packet Send function.
ctx | Click object. |
packet | Packet data to be sent |
@description This function sends a packet data to the device by using UART interface.
void enocean_set_rst_pin | ( | enocean_t * | ctx, |
uint8_t | state ) |
Set RST ( reset ) pin state.
enocean | Click object. |
statte | Pin state ( 1 or 0 ). |
void enocean_uart_isr | ( | enocean_t * | ctx | ) |
UART Interrupt Routine function.
ctx | Click object. |
@description This function reads every single byte from the device, performs a crc8 check for header and data packet and makes a received response.