enocean4 2.0.0.0
|
Functions | |
void | enocean4_cfg_setup (enocean4_cfg_t *cfg) |
Config Object Initialization function. | |
ENOCEAN4_RETVAL | enocean4_init (enocean4_t *ctx, enocean4_cfg_t *cfg) |
Initialization function. | |
void | enocean4_set_rst_pin (enocean4_t *ctx, uint8_t state) |
Set RST ( reset ) pin state. | |
void | enocean4_generic_write (enocean4_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | enocean4_generic_read (enocean4_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | enocean4_response_handler_set (enocean4_t *ctx, void(*handler)(enocean4_packet_t *, uint8_t *)) |
Handler Set function. | |
void | enocean4_uart_isr (enocean4_t *ctx) |
UART Interrupt Routine function. | |
uint8_t | enocean4_process (enocean4_t *ctx) |
Response Proccesing function. | |
uint8_t | enocean4_response_ready (enocean4_t *ctx) |
Response Ready Check function. | |
void | enocean4_reset (enocean4_t *ctx) |
Reset function. | |
uint8_t | enocean4_send_packet (enocean4_t *ctx, enocean4_packet_t *packet) |
Packet Send function. | |
void enocean4_cfg_setup | ( | enocean4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t enocean4_generic_read | ( | enocean4_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
enocean4 | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void enocean4_generic_write | ( | enocean4_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
enocean4 | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
ENOCEAN4_RETVAL enocean4_init | ( | enocean4_t * | ctx, |
enocean4_cfg_t * | cfg ) |
Initialization function.
enocean4 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t enocean4_process | ( | enocean4_t * | ctx | ) |
Response Proccesing function.
ctx | Click object. |
@description This function performs a response proccesing and calls handler function if response is valid.
void enocean4_reset | ( | enocean4_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function performs a module reset.
void enocean4_response_handler_set | ( | enocean4_t * | ctx, |
void(*)(enocean4_packet_t *, uint8_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, for example function for the results logging.
uint8_t enocean4_response_ready | ( | enocean4_t * | ctx | ) |
Response Ready Check function.
ctx | Click object. |
@description This function checks the response ready flag and if flag is set, clears a flag.
uint8_t enocean4_send_packet | ( | enocean4_t * | ctx, |
enocean4_packet_t * | packet ) |
Packet Send function.
ctx | Click object. |
packet | Packet data to be sent |
@description This function allows user to send a valid packet data to the module by using UART interface.
void enocean4_set_rst_pin | ( | enocean4_t * | ctx, |
uint8_t | state ) |
Set RST ( reset ) pin state.
ctx | Click object. |
enocean4 | Click object. |
statte | Pin state ( 1 or 0 ). |
void enocean4_uart_isr | ( | enocean4_t * | ctx | ) |
UART Interrupt Routine function.
ctx | Click object. |
@description This function reads response bytes from the module and sets a flag when response is ready.