39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_spi_master.h"
73#define ISMRX3_DEMOD 0x00
74#define ISMRX3_AGC 0x01
75#define ISMRX3_IF_CHF_SEL 0x02
76#define ISMRX3_PDF_CFG 0x03
77#define ISMRX3_ATH_CFG_1 0x04
78#define ISMRX3_ATH_CFG_2 0x05
79#define ISMRX3_ATH_CFG_3 0x06
80#define ISMRX3_AFC_CFG_1 0x07
81#define ISMRX3_AFC_CFG_2 0x08
82#define ISMRX3_LO_CTR_FREQ_3 0x09
83#define ISMRX3_LO_CTR_FREQ_2 0x0A
84#define ISMRX3_LO_CTR_FREQ_1 0x0B
85#define ISMRX3_PREAMBLE_CFG_1 0x0C
86#define ISMRX3_PREAMBLE_WORD_1 0x0D
87#define ISMRX3_PREAMBLE_WROD_2 0x0E
88#define ISMRX3_RSS 0x10
89#define ISMRX3_FEI 0x11
90#define ISMRX3_PDF_OUT 0x12
91#define ISMRX3_ISR 0x13
92#define ISMRX3_CDR_CFG 0x35
93#define ISMRX3_STATE_CTRL_1 0x14
94#define ISMRX3_STATE_CTRL_2 0x15
95#define ISMRX3_STATE_CTRL_3 0x16
96#define ISMRX3_WUT_1 0x17
97#define ISMRX3_WUT_2 0x18
98#define ISMRX3_AFE_CTL_1 0x19
99#define ISMRX3_IR_ADJUST 0x1A
100#define ISMRX3_PART_NUM 0x1E
101#define ISMRX3_REV_NUM 0x1F
102#define ISMRX3_STATUS 0x27
120#define ISMRX3_MODULATION_ASK 0x01
121#define ISMRX3_MODULATION_FSK 0x02
127#define ISMRX3_FREQUENCY_MHZ_315 0x01
128#define ISMRX3_FREQUENCY_MHZ_433p92 0x02
129#define ISMRX3_FREQUENCY_MHZ_868p3 0x03
135#define ISMRX3_DEVIATION_KHZ_5 0x01
136#define ISMRX3_DEVIATION_KHZ_10 0x02
137#define ISMRX3_DEVIATION_KHZ_40 0x03
138#define ISMRX3_DEVIATION_KHZ_80 0x04
144#define ISMRX3_DATA_RATE_KBPS_1 0x01
145#define ISMRX3_DATA_RATE_KBPS_2 0x02
146#define ISMRX3_DATA_RATE_KBPS_5 0x03
147#define ISMRX3_DATA_RATE_KBPS_10 0x04
148#define ISMRX3_DATA_RATE_KBPS_50 0x05
149#define ISMRX3_DATA_RATE_KBPS_100 0x06
167#define ISMRX3_MAP_MIKROBUS( cfg, mikrobus ) \
168 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
169 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
170 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
171 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
172 cfg.dat = MIKROBUS( mikrobus, MIKROBUS_AN ); \
173 cfg.pdn = MIKROBUS( mikrobus, MIKROBUS_RST ); \
174 cfg.sw = MIKROBUS( mikrobus, MIKROBUS_PWM );\
175 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT );
err_t ismrx3_init(ismrx3_t *ctx, ismrx3_cfg_t *cfg)
ISM RX 3 initialization function.
err_t ismrx3_generic_write(ismrx3_t *ctx, uint8_t reg, uint8_t data_in)
ISM RX 3 data writing function.
uint8_t ismrx3_get_clk(ismrx3_t *ctx)
Read clock output.
uint8_t ismrx3_get_data(ismrx3_t *ctx)
Read data output.
void ismrx3_cfg_setup(ismrx3_cfg_t *cfg)
ISM RX 3 configuration object setup function.
err_t ismrx3_default_cfg(ismrx3_t *ctx)
ISM RX 3 default configuration function.
err_t ismrx3_generic_read(ismrx3_t *ctx, uint8_t reg, uint8_t *data_out)
ISM RX 3 data reading function.
void ismrx3_reset(ismrx3_t *ctx)
Reset function.
ismrx3_return_value_t
ISM RX 3 Click return value data.
Definition ismrx3.h:234
@ ISMRX3_ERROR_BUF_LEN
Definition ismrx3.h:237
@ ISMRX3_OK
Definition ismrx3.h:235
@ ISMRX3_ERROR
Definition ismrx3.h:236
ISM RX 3 Click configuration object.
Definition ismrx3.h:209
spi_master_chip_select_polarity_t cs_polarity
Definition ismrx3.h:225
pin_name_t sck
Definition ismrx3.h:213
spi_master_mode_t spi_mode
Definition ismrx3.h:224
pin_name_t pdn
Definition ismrx3.h:218
pin_name_t mosi
Definition ismrx3.h:212
uint32_t spi_speed
Definition ismrx3.h:223
pin_name_t int_pin
Definition ismrx3.h:220
pin_name_t dat
Definition ismrx3.h:217
pin_name_t sw
Definition ismrx3.h:219
pin_name_t miso
Definition ismrx3.h:211
pin_name_t cs
Definition ismrx3.h:214
ISM RX 3 Click context object.
Definition ismrx3.h:185
uint8_t reference_freq
Definition ismrx3.h:199
spi_master_t spi
Definition ismrx3.h:195
uint8_t modulation
Definition ismrx3.h:198
digital_out_t sw
Definition ismrx3.h:188
digital_out_t pdn
Definition ismrx3.h:187
digital_in_t dat
Definition ismrx3.h:191
digital_in_t int_pin
Definition ismrx3.h:192
uint8_t data_rate
Definition ismrx3.h:201
uint8_t freq_deviation
Definition ismrx3.h:200
pin_name_t chip_select
Definition ismrx3.h:196