ookrx 2.1.0.0
OOK RX Click Driver

API for configuring and manipulating OOK RX Click driver. More...

Topics

 OOK RX Settings
 Settings for configuration of OOK RX Click driver.
 
 OOK RX MikroBUS Map
 MikroBUS pin mapping of OOK RX Click driver.
 

Functions

void ookrx_cfg_setup (ookrx_cfg_t *cfg)
 OOK RX configuration object setup function.
 
err_t ookrx_init (ookrx_t *ctx, ookrx_cfg_t *cfg)
 OOK RX initialization function.
 
void ookrx_enable_squelch (ookrx_t *ctx)
 OOK RX enable squelch function.
 
void ookrx_disable_squelch (ookrx_t *ctx)
 OOK RX disable squelch function.
 
void ookrx_enable_device (ookrx_t *ctx)
 OOK RX enable device function.
 
void ookrx_disable_device (ookrx_t *ctx)
 OOK RX disable device function.
 
uint8_t ookrx_get_data_pin (ookrx_t *ctx)
 OOK RX get data pin function.
 
err_t ookrx_read_rssi_voltage (ookrx_t *ctx, float *data_out)
 OOK RX read RSSI pin voltage level function.
 

Detailed Description

API for configuring and manipulating OOK RX Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ ookrx_cfg_setup()

void ookrx_cfg_setup ( ookrx_cfg_t * cfg)

OOK RX configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See ookrx_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ ookrx_disable_device()

void ookrx_disable_device ( ookrx_t * ctx)

OOK RX disable device function.

This function disables device by setting the EN pin to low logic state.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ ookrx_disable_squelch()

void ookrx_disable_squelch ( ookrx_t * ctx)

OOK RX disable squelch function.

This function disables squelch by setting the SQC pin to high logic state.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ ookrx_enable_device()

void ookrx_enable_device ( ookrx_t * ctx)

OOK RX enable device function.

This function enables device by setting the EN pin to high logic state.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ ookrx_enable_squelch()

void ookrx_enable_squelch ( ookrx_t * ctx)

OOK RX enable squelch function.

This function enables squelch by setting the SQC pin to low logic state.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ ookrx_get_data_pin()

uint8_t ookrx_get_data_pin ( ookrx_t * ctx)

OOK RX get data pin function.

This function returns the DOUT pin logic state.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ ookrx_init()

err_t ookrx_init ( ookrx_t * ctx,
ookrx_cfg_t * cfg )

OOK RX initialization function.

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

Parameters
[out]ctx: Click context object. See ookrx_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See ookrx_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ookrx_read_rssi_voltage()

err_t ookrx_read_rssi_voltage ( ookrx_t * ctx,
float * data_out )

OOK RX read RSSI pin voltage level function.

This function reads results of AD conversion of the RSSI pin and converts them to proportional voltage level.

Parameters
[in]ctx: Click context object. See ookrx_t object definition for detailed explanation.
[out]data_out: Output voltage level of the analog pin [V].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
The conversion to voltage depends on the entered configuration of the ADC (resolution, reference voltage).