enocean 2.0.0.0
Public function

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.
 

Detailed Description

Function Documentation

◆ enocean_cfg_setup()

void enocean_cfg_setup ( enocean_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ enocean_generic_read()

int32_t enocean_generic_read ( enocean_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
enoceanClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ enocean_generic_write()

void enocean_generic_write ( enocean_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
enoceanClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ enocean_init()

ENOCEAN_RETVAL enocean_init ( enocean_t * ctx,
enocean_cfg_t * cfg )

Initialization function.

Parameters
enoceanClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ enocean_response_handler_set()

void enocean_response_handler_set ( enocean_t * ctx,
enocean_hdl_t handler )

Handler Set function.

Parameters
ctxClick object.
handlerPointer to the function that should be performed

@description This function sets handler on the function that should be performed.

◆ enocean_response_ready()

uint8_t enocean_response_ready ( enocean_t * ctx)

Response Ready function.

Parameters
ctxClick object.
Returns
0 - The response is not ready, 1 - The response is ready

@description This function checks does response ready or not.

◆ enocean_send_packet()

uint8_t enocean_send_packet ( enocean_t * ctx,
enocean_packet_t * packet )

Packet Send function.

Parameters
ctxClick object.
packetPacket data to be sent
Returns
0 - OK, 1 - Packet size is invalid

@description This function sends a packet data to the device by using UART interface.

◆ enocean_set_rst_pin()

void enocean_set_rst_pin ( enocean_t * ctx,
uint8_t state )

Set RST ( reset ) pin state.

Parameters
enoceanClick object.
stattePin state ( 1 or 0 ).

◆ enocean_uart_isr()

void enocean_uart_isr ( enocean_t * ctx)

UART Interrupt Routine function.

Parameters
ctxClick 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.