Go to the documentation of this file.
39 #ifdef PREINIT_SUPPORTED
43 #ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
72 #define RFSWITCH_ON_PIN_STATE_HIGH 0x01
73 #define RFSWITCH_ON_PIN_STATE_LOW 0x00
74 #define RFSWITCH_SEL_PIN_STATE_HIGH 0x01
75 #define RFSWITCH_SEL_PIN_STATE_LOW 0x00
76 #define RFSWITCH_SELECT_CHANNEL_1 0x01
77 #define RFSWITCH_SELECT_CHANNEL_2 0x02
95 #define RFSWITCH_MAP_MIKROBUS( cfg, mikrobus ) \
96 cfg.on = MIKROBUS( mikrobus, MIKROBUS_CS ); \
97 cfg.sel = MIKROBUS( mikrobus, MIKROBUS_PWM )
@ RFSWITCH_ERROR
Definition: rfswitch.h:131
void rfswitch_sel_pin_set(rfswitch_t *ctx, uint8_t enable)
RF Switch SEL pin setting function.
rfswitch_return_value_t
RF Switch Click return value data.
Definition: rfswitch.h:129
err_t rfswitch_init(rfswitch_t *ctx, rfswitch_cfg_t *cfg)
RF Switch initialization function.
void rfswitch_select_channel(rfswitch_t *ctx, uint8_t select_channel)
RF Switch select channel function.
RF Switch Click configuration object.
Definition: rfswitch.h:118
void rfswitch_cfg_setup(rfswitch_cfg_t *cfg)
RF Switch configuration object setup function.
digital_out_t on
Definition: rfswitch.h:108
digital_out_t sel
Definition: rfswitch.h:109
@ RFSWITCH_OK
Definition: rfswitch.h:130
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.
RF Switch Click context object.
Definition: rfswitch.h:107
void rfswitch_switch_channel(rfswitch_t *ctx)
RF Switch switch channel function.
pin_name_t sel
Definition: rfswitch.h:120
pin_name_t on
Definition: rfswitch.h:119