rfswitch 2.0.0.0
RF Switch Click Driver

API for configuring and manipulating RF Switch Click driver. More...

Topics

 RF Switch Registers Settings
 Settings for registers of RF Switch Click driver.
 
 RF Switch MikroBUS Map
 MikroBUS pin mapping of RF Switch Click driver.
 

Functions

void rfswitch_cfg_setup (rfswitch_cfg_t *cfg)
 RF Switch configuration object setup function.
 
err_t rfswitch_init (rfswitch_t *ctx, rfswitch_cfg_t *cfg)
 RF Switch initialization function.
 
void rfswitch_power_on (rfswitch_t *ctx)
 RF Switch power on function.
 
void rfswitch_on_pin_set (rfswitch_t *ctx, uint8_t enable)
 RF Switch ON pin setting function.
 
void rfswitch_sel_pin_set (rfswitch_t *ctx, uint8_t enable)
 RF Switch SEL pin setting function.
 
void rfswitch_switch_channel (rfswitch_t *ctx)
 RF Switch switch channel function.
 
void rfswitch_select_channel (rfswitch_t *ctx, uint8_t select_channel)
 RF Switch select channel function.
 

Detailed Description

API for configuring and manipulating RF Switch 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

◆ rfswitch_cfg_setup()

void rfswitch_cfg_setup ( rfswitch_cfg_t * cfg)

RF Switch configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ rfswitch_init()

err_t rfswitch_init ( rfswitch_t * ctx,
rfswitch_cfg_t * cfg )

RF Switch initialization function.

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

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

◆ rfswitch_on_pin_set()

void rfswitch_on_pin_set ( rfswitch_t * ctx,
uint8_t enable )

RF Switch ON pin setting function.

This function sets the ON pin on the high level or low level of RF Switch click board.

Parameters
[in]ctx: Click context object. See rfswitch_t object definition for detailed explanation.
[in]enable: State of the ON pin.
Returns
Nothing.
Note
None.

◆ rfswitch_power_on()

void rfswitch_power_on ( rfswitch_t * ctx)

RF Switch power on function.

This function is used to power up RF Switch click board.

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

◆ rfswitch_sel_pin_set()

void rfswitch_sel_pin_set ( rfswitch_t * ctx,
uint8_t enable )

RF Switch SEL pin setting function.

This function sets the SEL pin on the high level or low level of RF Switch click board.

Parameters
[in]ctx: Click context object. See rfswitch_t object definition for detailed explanation.
[in]enable: State of the SEL pin.
Returns
Nothing.
Note
None.

◆ rfswitch_select_channel()

void rfswitch_select_channel ( rfswitch_t * ctx,
uint8_t select_channel )

RF Switch select channel function.

This function enables users to select from channel 1 or channel 2 of the RF Switch click board.

Parameters
[in]ctx: Click context object. See rfswitch_t object definition for detailed explanation.
[in]select_channel: Selected channel.
Returns
Nothing.
Note
None.

◆ rfswitch_switch_channel()

void rfswitch_switch_channel ( rfswitch_t * ctx)

RF Switch switch channel function.

This function toggles the SEL pin from high to low levels of RF Switch click board, and vice versa, therefore changing the channel.

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