ccrf  2.0.0.0
ccrf.h
Go to the documentation of this file.
1 /*
2  * MikroSDK - MikroE Software Development Kit
3  * Copyright© 2020 MikroElektronika d.o.o.
4  *
5  * Permission is hereby granted, free of charge, to any person
6  * obtaining a copy of this software and associated documentation
7  * files (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so,
11  * subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22  * OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
33 // ----------------------------------------------------------------------------
34 
35 #ifndef CCRF_H
36 #define CCRF_H
37 
38 #include "mikrosdk_version.h"
39 
40 #ifdef __GNUC__
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
43 #else
44 #include "delays.h"
45 #endif
46 #endif
47 
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
50 #include "drv_spi_master.h"
51 
52 // -------------------------------------------------------------- PUBLIC MACROS
63 #define CCRF_MAP_MIKROBUS( cfg, mikrobus ) \
64  cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
65  cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
66  cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
67  cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
68  cfg.gd0 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
69  cfg.gd2 = MIKROBUS( mikrobus, MIKROBUS_PWM )
70 
76 #define CCRF_OK 0
77 #define CCRF_ERROR -1
78 
80 // Configuration Registers
81 #define CCRF_IOCFG2 0x00
82 #define CCRF_IOCFG1 0x01
83 #define CCRF_IOCFG0 0x02
84 #define CCRF_FIFOTHR 0x03
85 #define CCRF_SYNC1 0x04
86 #define CCRF_SYNC0 0x05
87 #define CCRF_PKTLEN 0x06
88 #define CCRF_PKTCTRL1 0x07
89 #define CCRF_PKTCTRL0 0x08
90 #define CCRF_ADDR 0x09
91 #define CCRF_CHANNR 0x0A
92 #define CCRF_FSCTRL1 0x0B
93 #define CCRF_FSCTRL0 0x0C
94 #define CCRF_FREQ2 0x0D
95 #define CCRF_FREQ1 0x0E
96 #define CCRF_FREQ0 0x0F
97 #define CCRF_MDMCFG4 0x10
98 #define CCRF_MDMCFG3 0x11
99 #define CCRF_MDMCFG2 0x12
100 #define CCRF_MDMCFG1 0x13
101 #define CCRF_MDMCFG0 0x14
102 #define CCRF_DEVIATN 0x15
103 #define CCRF_MCSM2 0x16
104 #define CCRF_MCSM1 0x17
105 #define CCRF_MCSM0 0x18
106 #define CCRF_FOCCFG 0x19
107 #define CCRF_BSCFG 0x1A
108 #define CCRF_AGCCTRL2 0x1B
109 #define CCRF_AGCCTRL1 0x1C
110 #define CCRF_AGCCTRL0 0x1D
111 #define CCRF_WOREVT1 0x1E
112 #define CCRF_WOREVT0 0x1F
113 #define CCRF_WORCTRL 0x20
114 #define CCRF_FREND1 0x21
115 #define CCRF_FREND0 0x22
116 #define CCRF_FSCAL3 0x23
117 #define CCRF_FSCAL2 0x24
118 #define CCRF_FSCAL1 0x25
119 #define CCRF_FSCAL0 0x26
120 #define CCRF_RCCTRL1 0x27
121 #define CCRF_RCCTRL0 0x28
122 #define CCRF_FSTEST 0x29
123 #define CCRF_PTEST 0x2A
124 #define CCRF_AGCTEST 0x2B
125 #define CCRF_TEST2 0x2C
126 #define CCRF_TEST1 0x2D
127 #define CCRF_TEST0 0x2E
128 
129 // Strobe commands
130 #define CCRF_SRES 0x30
131 #define CCRF_SFSTXON 0x31
132 #define CCRF_SXOFF 0x32
133 #define CCRF_SCAL 0x33
134 #define CCRF_SRX 0x34
135 #define CCRF_STX 0x35
136 #define CCRF_SIDLE 0x36
137 #define CCRF_SAFC 0x37
138 #define CCRF_SWOR 0x38
139 #define CCRF_SPWD 0x39
140 #define CCRF_SFRX 0x3A
141 #define CCRF_SFTX 0x3B
142 #define CCRF_SWORRST 0x3C
143 #define CCRF_SNOP 0x3D
144 
145 // Status registers
146 #define CCRF_PARTNUM 0x30
147 #define CCRF_VERSION 0x31
148 #define CCRF_FREQEST 0x32
149 #define CCRF_LQI 0x33
150 #define CCRF_RSSI 0x34
151 #define CCRF_MARCSTATE 0x35
152 #define CCRF_WORTIME1 0x36
153 #define CCRF_WORTIME0 0x37
154 #define CCRF_PKTSTATUS 0x38
155 #define CCRF_VCO_VC_DAC 0x39
156 #define CCRF_TXBYTES 0x3A
157 #define CCRF_RXBYTES 0x3B
158 #define CCRF_RCCTRL1_STATUS 0x3C
159 #define CCRF_RCCTRL0_STATUS 0x3D
160 #define CCRF_NUM_RXBYTES 0x7F
161 
162 // Other memory locations
163 #define CCRF_PATABLE 0x3E
164 #define CCRF_TXFIFO 0x3F
165 #define CCRF_RXFIFO 0x3F
166 
167 // Masks for appended status bytes
168 #define CCRF_LQI_RX 0x01
169 #define CCRF_CRC_OK 0x80
170 
171 // Definitions to support burst/single access:
172 #define CCRF_WRITE_BURST 0x40
173 #define CCRF_READ_SINGLE 0x80
174 #define CCRF_READ_BURST 0xC0
175 
176 #define CCRF_RECEIVE_CRC_ERROR 0x00
177 #define CCRF_RECEIVE_CRC_OK 0x80
178 #define CCRF_BURST_IN_RXFIFO 0x7F
179 
180 #define CCRF_SINGLE_TXFIFO 0x3F
181 #define CCRF_BURST_TXFIFO 0x7F
182 #define CCRF_SINGLE_RXFIFO 0xBF
183 #define CCRF_BURST_RXFIFO 0xFF
184 
185 #define CCRF_TX_MODE 0
186 #define CCRF_RX_MODE 1
187 #define CCRF_IDLE_MODE 2
188  // End group macro
190 // --------------------------------------------------------------- PUBLIC TYPES
199 typedef struct
200 {
201  // Output pins
202  digital_out_t gd2;
203 
204  // Input pins
205  digital_in_t gd0;
206 
207  // Modules
208  spi_master_t spi;
209  pin_name_t chip_select;
210 
211 } ccrf_t;
212 
216 typedef struct
217 {
218  // Communication gpio pins
219  pin_name_t miso;
220  pin_name_t mosi;
221  pin_name_t sck;
222  pin_name_t cs;
223 
224  // Additional gpio pins
225  pin_name_t gd0;
226  pin_name_t gd2;
227 
228  // static variable
229  uint32_t spi_speed;
230  spi_master_mode_t spi_mode;
231  spi_master_chip_select_polarity_t cs_polarity;
232 
233 } ccrf_cfg_t;
234  // End types group
236 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
237 
242 #ifdef __cplusplus
243 extern "C"{
244 #endif
245 
255 
264 err_t ccrf_init ( ccrf_t *ctx, ccrf_cfg_t *cfg );
265 
273 void ccrf_default_cfg ( ccrf_t *ctx );
274 
282 uint8_t ccrf_get_start( ccrf_t *ctx );
283 
294 void ccrf_write_byte ( ccrf_t *ctx, uint8_t reg_address, uint8_t write_data );
295 
307 void ccrf_write_bytes ( ccrf_t *ctx, uint8_t reg_address, uint8_t *write_data, uint8_t n_bytes );
308 
318 void ccrf_write_strobe ( ccrf_t *ctx, uint8_t strobe );
319 
331 uint8_t ccrf_read_byte ( ccrf_t *ctx, uint8_t reg_address );
332 
344 uint8_t ccrf_read_byte_status ( ccrf_t *ctx, uint8_t reg_address );
345 
357 void ccrf_read_bytes( ccrf_t *ctx, uint8_t reg_address, uint8_t *read_data, uint8_t n_bytes );
358 
367 void ccrf_sw_reset ( ccrf_t *ctx );
368 
379 void ccrf_hw_reset ( ccrf_t *ctx );
380 
399 void ccrf_transmit_packet ( ccrf_t *ctx, uint8_t *tx_buffer, uint8_t n_bytes );
400 
423 uint8_t ccrf_receive_packet ( ccrf_t *ctx, uint8_t *rx_buffer, uint8_t *length_buff );
424 
436 uint8_t ccrf_transmit_packet_with_address ( ccrf_t *ctx, uint8_t *tx_buffer, uint8_t n_bytes, uint8_t *attempts );
437 
448 
459 
470 
481 
494 
505 
535 void ccrf_set_fifo_threshold ( ccrf_t *ctx, uint8_t threshold_rx_tx );
536 
551 void ccrf_set_max_length_packets ( ccrf_t *ctx, uint8_t max_length );
552 
563 
574 
594 void ccrf_format_rx_tx_data ( ccrf_t *ctx, uint8_t rx_tx_data_format );
595 
606 void ccrf_set_device_address ( ccrf_t *ctx, uint8_t dev_addr );
607 
619 void ccrf_set_channel_number ( ccrf_t *ctx, uint8_t ch_num );
620 
631 void ccrf_set_if_frequency ( ccrf_t *ctx, uint8_t if_freq );
632 
643 void ccrf_set_frequency_offset ( ccrf_t *ctx, uint8_t freq_offset );
644 
657 
668 
686 void ccrf_set_modulation ( ccrf_t *ctx, uint8_t rf_modulation );
687 
698 
709 
731 void ccrf_set_sync_word_qualifier_mode ( ccrf_t *ctx, uint8_t q_mode );
732 
742 void ccrf_disable_fec ( ccrf_t *ctx );
743 
753 void ccrf_enable_fec ( ccrf_t *ctx );
754 
776 void ccrf_set_min_num_preamble ( ccrf_t *ctx, uint8_t p_num );
777 
795 void ccrf_set_cca_mode ( ccrf_t *ctx, uint8_t cca_mode );
796 
797 
815 void ccrf_set_state_packet_recived ( ccrf_t *ctx, uint8_t pr_state );
816 
834 void ccrf_set_state_packet_sent ( ccrf_t *ctx, uint8_t ps_state );
835 
853 void ccrf_set_auto_calibrate_mode ( ccrf_t *ctx, uint8_t ac_mode );
854 
872 void ccrf_set_freq_loop_gain_bs ( ccrf_t *ctx, uint8_t fcl_gain );
873 
889 void ccrf_set_freq_loop_gain_as ( ccrf_t *ctx, uint8_t fcl_gain );
890 
925 void ccrf_set_bit_sync_config ( ccrf_t *ctx, uint8_t bs_config );
926 
944 void ccrf_set_dvga_gain ( ccrf_t *ctx, uint8_t dvga_gain );
945 
967 void ccrf_set_lna_gain ( ccrf_t *ctx, uint8_t lna_gain );
968 
990 void ccrf_set_amplitude_ch_filter ( ccrf_t *ctx, uint8_t ach_filter );
991 
1006 void ccrf_set_lna_strategies ( ccrf_t *ctx, uint8_t lna_strat );
1007 
1025 void ccrf_set_relative_rssi_threshold ( ccrf_t *ctx, uint8_t rssi_threshold );
1026 
1056 void ccrf_set_absolute_rssi_threshold ( ccrf_t *ctx, uint8_t rssi_threshold );
1057 
1075 void ccrf_set_hysteresis_lvl ( ccrf_t *ctx, uint8_t hyst_lvl );
1076 
1094 void ccrf_set_num_ch_filter ( ccrf_t *ctx, uint8_t num_ch_filter );
1095 
1112 void ccrf_set_agc_gain ( ccrf_t *ctx, uint8_t agc_gain );
1113 
1131 void ccrf_set_avr_len_ampitude ( ccrf_t *ctx, uint8_t al_amp );
1132 
1143 
1165 void ccrf_set_timeout_reg_block ( ccrf_t *ctx, uint8_t timeout );
1166 
1177 
1188 
1206 void ccrf_set_timeout_wor ( ccrf_t *ctx, uint8_t timeout );
1207 
1219 
1231 
1242 uint8_t ccrf_get_rssi ( ccrf_t *ctx );
1243 
1283 uint8_t ccrf_get_mrc_state ( ccrf_t *ctx );
1284 
1308 
1321 
1334 
1347 
1348 #ifdef __cplusplus
1349 }
1350 #endif
1351 #endif // CCRF_H_
1352  // End public_function group
1355 
1356 // ------------------------------------------------------------------------- END
ccrf_get_chip_part_number
uint8_t ccrf_get_chip_part_number(ccrf_t *ctx)
Get chip part number function.
ccrf_read_byte_status
uint8_t ccrf_read_byte_status(ccrf_t *ctx, uint8_t reg_address)
Read the byte of data from the 8-bit status register address function.
ccrf_set_lna_gain
void ccrf_set_lna_gain(ccrf_t *ctx, uint8_t lna_gain)
Set the maximum allowable LNA gain function.
ccrf_disable_fec
void ccrf_disable_fec(ccrf_t *ctx)
Disable forward error correction function.
ccrf_format_rx_tx_data
void ccrf_format_rx_tx_data(ccrf_t *ctx, uint8_t rx_tx_data_format)
Set format of RX and TX data function.
ccrf_enable_temperature_sensor
void ccrf_enable_temperature_sensor(ccrf_t *ctx)
Enable analog temperature sensor function.
ccrf_t
Click ctx object definition.
Definition: ccrf.h:200
ccrf_set_auto_initial_calibration
void ccrf_set_auto_initial_calibration(ccrf_t *ctx)
Set automatic initial calibration function.
ccrf_set_lna_strategies
void ccrf_set_lna_strategies(ccrf_t *ctx, uint8_t lna_strat)
Set the LNA strategies function.
ccrf_get_rssi
uint8_t ccrf_get_rssi(ccrf_t *ctx)
Get received signal strength indication function.
ccrf_set_state_packet_sent
void ccrf_set_state_packet_sent(ccrf_t *ctx, uint8_t ps_state)
Set state when a packet has been sent function.
ccrf_get_gd0_and_packet_state
uint8_t ccrf_get_gd0_and_packet_state(ccrf_t *ctx)
Get current GDO status and packet status function.
ccrf_set_freq_loop_gain_bs
void ccrf_set_freq_loop_gain_bs(ccrf_t *ctx, uint8_t fcl_gain)
Set frequency compensation loop gain before a sync function.
ccrf_cfg_t
Click configuration structure definition.
Definition: ccrf.h:217
ccrf_t::spi
spi_master_t spi
Definition: ccrf.h:208
ccrf_set_gd0_active_low
void ccrf_set_gd0_active_low(ccrf_t *ctx)
GD0 select active low function.
ccrf_cfg_t::miso
pin_name_t miso
Definition: ccrf.h:219
ccrf_cfg_t::mosi
pin_name_t mosi
Definition: ccrf.h:220
ccrf_set_relative_rssi_threshold
void ccrf_set_relative_rssi_threshold(ccrf_t *ctx, uint8_t rssi_threshold)
Set the relative change threshold for asserting carrier sense function.
ccrf_set_state_packet_recived
void ccrf_set_state_packet_recived(ccrf_t *ctx, uint8_t pr_state)
Set state after finishing packet reception function.
ccrf_set_avr_len_ampitude
void ccrf_set_avr_len_ampitude(ccrf_t *ctx, uint8_t al_amp)
Set the averaging length for the amplitude from the channel filter function.
ccrf_turn_data_whitening_on
void ccrf_turn_data_whitening_on(ccrf_t *ctx)
Turn data whitening on function.
ccrf_t::gd2
digital_out_t gd2
Definition: ccrf.h:202
ccrf_sw_reset
void ccrf_sw_reset(ccrf_t *ctx)
Softwere reset function.
ccrf_set_if_frequency
void ccrf_set_if_frequency(ccrf_t *ctx, uint8_t if_freq)
Set desired IF frequency function.
ccrf_read_byte
uint8_t ccrf_read_byte(ccrf_t *ctx, uint8_t reg_address)
Read the byte of data from the 8-bit register address function.
ccrf_default_cfg
void ccrf_default_cfg(ccrf_t *ctx)
Click Default Configuration function.
ccrf_set_num_ch_filter
void ccrf_set_num_ch_filter(ccrf_t *ctx, uint8_t num_ch_filter)
Set the number of channel filter samples function.
ccrf_get_rx_fifo_num_bytes
uint8_t ccrf_get_rx_fifo_num_bytes(ccrf_t *ctx)
Get number of bytes in RX FIFO function.
ccrf_disable_dc_blocking_filter
void ccrf_disable_dc_blocking_filter(ccrf_t *ctx)
Disable digital DC blocking filter function.
ccrf_cfg_t::cs_polarity
spi_master_chip_select_polarity_t cs_polarity
Definition: ccrf.h:231
ccrf_get_mrc_state
uint8_t ccrf_get_mrc_state(ccrf_t *ctx)
Get main radio control state machine state function.
ccrf_cfg_t::gd0
pin_name_t gd0
Definition: ccrf.h:225
ccrf_set_modulation
void ccrf_set_modulation(ccrf_t *ctx, uint8_t rf_modulation)
Set the modulation format of the radio signal function.
ccrf_disable_manchester_encoding
void ccrf_disable_manchester_encoding(ccrf_t *ctx)
Disable Manchester encoding function.
ccrf_disable_osc_rc
void ccrf_disable_osc_rc(ccrf_t *ctx)
Disables the RC oscillator calibration function.
ccrf_read_bytes
void ccrf_read_bytes(ccrf_t *ctx, uint8_t reg_address, uint8_t *read_data, uint8_t n_bytes)
Sequential read function.
ccrf_enable_fec
void ccrf_enable_fec(ccrf_t *ctx)
Enable forward error correction function.
ccrf_get_rc_osc_cal_result
uint8_t ccrf_get_rc_osc_cal_result(ccrf_t *ctx)
Get RC oscillator calibration result function.
ccrf_set_min_num_preamble
void ccrf_set_min_num_preamble(ccrf_t *ctx, uint8_t p_num)
Set the minimum number of preamble bytes to be transmitted function.
ccrf_write_byte
void ccrf_write_byte(ccrf_t *ctx, uint8_t reg_address, uint8_t write_data)
Write the byte of data to the 8-bit register address function.
ccrf_set_frequency_offset
void ccrf_set_frequency_offset(ccrf_t *ctx, uint8_t freq_offset)
Set frequency offset function.
ccrf_cfg_setup
void ccrf_cfg_setup(ccrf_cfg_t *cfg)
Config Object Initialization function.
ccrf_get_start
uint8_t ccrf_get_start(ccrf_t *ctx)
Get state of GD0 pin function.
ccrf_set_dvga_gain
void ccrf_set_dvga_gain(ccrf_t *ctx, uint8_t dvga_gain)
Set the maximum allowable DVGA gain function.
ccrf_set_timeout_reg_block
void ccrf_set_timeout_reg_block(ccrf_t *ctx, uint8_t timeout)
Set the averaging length for the amplitude from the channel filter function.
ccrf_cfg_t::spi_speed
uint32_t spi_speed
Definition: ccrf.h:229
ccrf_enable_dc_blocking_filter
void ccrf_enable_dc_blocking_filter(ccrf_t *ctx)
Enable digital DC blocking filter function.
ccrf_set_gd2_active_high
void ccrf_set_gd2_active_high(ccrf_t *ctx)
GD2 select active high function.
ccrf_cfg_t::gd2
pin_name_t gd2
Definition: ccrf.h:226
ccrf_set_device_address
void ccrf_set_device_address(ccrf_t *ctx, uint8_t dev_addr)
Set device address function.
ccrf_cfg_t::spi_mode
spi_master_mode_t spi_mode
Definition: ccrf.h:230
ccrf_transmit_packet
void ccrf_transmit_packet(ccrf_t *ctx, uint8_t *tx_buffer, uint8_t n_bytes)
Transmit packet data function.
ccrf_disable_temperature_sensor
void ccrf_disable_temperature_sensor(ccrf_t *ctx)
Disable analog temperature sensor function.
ccrf_transmit_packet_with_address
uint8_t ccrf_transmit_packet_with_address(ccrf_t *ctx, uint8_t *tx_buffer, uint8_t n_bytes, uint8_t *attempts)
Transmit packet data with address function.
ccrf_receive_packet
uint8_t ccrf_receive_packet(ccrf_t *ctx, uint8_t *rx_buffer, uint8_t *length_buff)
Receive packet data function.
ccrf_set_fifo_threshold
void ccrf_set_fifo_threshold(ccrf_t *ctx, uint8_t threshold_rx_tx)
Set the threshold for the TX FIFO and RX FIFO function.
ccrf_t::chip_select
pin_name_t chip_select
Definition: ccrf.h:209
ccrf_enable_osc_rc
void ccrf_enable_osc_rc(ccrf_t *ctx)
Enable the RC oscillator calibration function.
ccrf_set_bit_sync_config
void ccrf_set_bit_sync_config(ccrf_t *ctx, uint8_t bs_config)
Set bit synchronization configuration function.
ccrf_set_channel_number
void ccrf_set_channel_number(ccrf_t *ctx, uint8_t ch_num)
Set channel number function.
ccrf_set_gd2_active_low
void ccrf_set_gd2_active_low(ccrf_t *ctx)
GD2 select active low function.
ccrf_cfg_t::sck
pin_name_t sck
Definition: ccrf.h:221
ccrf_set_sync_word_qualifier_mode
void ccrf_set_sync_word_qualifier_mode(ccrf_t *ctx, uint8_t q_mode)
Set sync-word qualifier mode function.
ccrf_get_chip_version_number
uint8_t ccrf_get_chip_version_number(ccrf_t *ctx)
Get chip version number function.
ccrf_write_strobe
void ccrf_write_strobe(ccrf_t *ctx, uint8_t strobe)
Write a strobe command function.
ccrf_turn_data_whitening_off
void ccrf_turn_data_whitening_off(ccrf_t *ctx)
Turn data whitening off function.
ccrf_set_agc_gain
void ccrf_set_agc_gain(ccrf_t *ctx, uint8_t agc_gain)
Set the AGC gain function.
ccrf_set_amplitude_ch_filter
void ccrf_set_amplitude_ch_filter(ccrf_t *ctx, uint8_t ach_filter)
Set the target amplitude from channel filter function.
ccrf_set_hysteresis_lvl
void ccrf_set_hysteresis_lvl(ccrf_t *ctx, uint8_t hyst_lvl)
Set the level of hysteresis on the magnitude deviation function.
ccrf_set_gd0_active_high
void ccrf_set_gd0_active_high(ccrf_t *ctx)
GD0 select active high function.
ccrf_cfg_t::cs
pin_name_t cs
Definition: ccrf.h:222
ccrf_set_max_length_packets
void ccrf_set_max_length_packets(ccrf_t *ctx, uint8_t max_length)
Set maximum length packets allowed function.
ccrf_init
err_t ccrf_init(ccrf_t *ctx, ccrf_cfg_t *cfg)
Initialization function.
ccrf_set_absolute_rssi_threshold
void ccrf_set_absolute_rssi_threshold(ccrf_t *ctx, uint8_t rssi_threshold)
Set the rabsolute RSSI threshold for asserting carrier sense function.
ccrf_write_bytes
void ccrf_write_bytes(ccrf_t *ctx, uint8_t reg_address, uint8_t *write_data, uint8_t n_bytes)
Sequential write function.
ccrf_set_timeout_wor
void ccrf_set_timeout_wor(ccrf_t *ctx, uint8_t timeout)
Set the maximum timeout of the WOR module function.
ccrf_set_freq_loop_gain_as
void ccrf_set_freq_loop_gain_as(ccrf_t *ctx, uint8_t fcl_gain)
Set frequency compensation loop gain after a sync function.
ccrf_t::gd0
digital_in_t gd0
Definition: ccrf.h:205
ccrf_set_cca_mode
void ccrf_set_cca_mode(ccrf_t *ctx, uint8_t cca_mode)
Set CCA mode function.
ccrf_hw_reset
void ccrf_hw_reset(ccrf_t *ctx)
Hardware reset function.
ccrf_enable_manchester_encoding
void ccrf_enable_manchester_encoding(ccrf_t *ctx)
Enable Manchester encoding function.
ccrf_set_auto_calibrate_mode
void ccrf_set_auto_calibrate_mode(ccrf_t *ctx, uint8_t ac_mode)
Set automatically calibrate function.
ccrf_get_underflow_rx_fifo
uint8_t ccrf_get_underflow_rx_fifo(ccrf_t *ctx)
Get underflow RX FIFO status function.