ccrf3 2.0.0.0
|
API for configuring and manipulating ccRF 3 Click driver. More...
Topics | |
ccRF 3 Registers List | |
List of registers of ccRF 3 Click driver. | |
ccRF 3 Registers Settings | |
Settings for registers of ccRF 3 Click driver. | |
ccRF 3 MikroBUS Map | |
MikroBUS pin mapping of ccRF 3 Click driver. | |
Functions | |
void | ccrf3_cfg_setup (ccrf3_cfg_t *cfg) |
ccRF 3 configuration object setup function. | |
err_t | ccrf3_init (ccrf3_t *ctx, ccrf3_cfg_t *cfg) |
ccRF 3 initialization function. | |
err_t | ccrf3_default_cfg (ccrf3_t *ctx) |
ccRF 3 default configuration function. | |
void | ccrf3_hw_reset (ccrf3_t *ctx) |
Hardware reset function. | |
uint8_t | ccrf3_cmd_strobe (ccrf3_t *ctx, uint8_t cmd) |
Set command strobe function. | |
void | ccrf3_read_write_burst_single (ccrf3_t *ctx, uint8_t reg_address, uint8_t *rw_data, uint16_t n_bytes) |
Read or write burst single function. | |
uint8_t | ccrf3_8bit_reg_access (ccrf3_t *ctx, char access_type, uint8_t reg_address, uint8_t *rw_data, uint16_t n_bytes) |
Access 8-bit register function. | |
uint8_t | ccrf3_16bit_reg_access (ccrf3_t *ctx, uint8_t access_type, uint8_t ext_address, uint8_t reg_address, uint8_t *rw_data, uint8_t n_bytes) |
Access 16-bit register function. | |
err_t | ccrf3_read_reg (ccrf3_t *ctx, uint16_t reg_address, uint8_t *read_data, uint8_t n_bytes) |
Read the byte of data function. | |
err_t | ccrf3_write_reg (ccrf3_t *ctx, uint16_t reg_address, uint8_t *write_data, uint8_t n_bytes) |
Write sequential data function. | |
uint8_t | ccrf3_write_reg_single (ccrf3_t *ctx, uint16_t reg_address, uint8_t write_data) |
Write one byte data function. | |
uint8_t | ccrf3_write_tx_fifo (ccrf3_t *ctx, uint8_t *write_data, uint8_t n_bytes) |
Write TX FIFO register function. | |
uint8_t | ccrf3_read_rx_fifo (ccrf3_t *ctx, uint8_t *read_data, uint8_t n_bytes) |
Read RX FIFO register function. | |
void | ccrf3_manual_calibration (ccrf3_t *ctx) |
Manual calibration function. | |
void | ccrf3_set_rx_mode (ccrf3_t *ctx) |
Set RX mode function. | |
void | ccrf3_set_tx_mode (ccrf3_t *ctx) |
Set TX mode function. | |
uint8_t | ccrf3_read_gp0 (ccrf3_t *ctx) |
Read state of GP0 pin function. | |
uint8_t | ccrf3_read_gp2 (ccrf3_t *ctx) |
Read state of GP2 pin function. | |
uint8_t | ccrf3_read_gp3 (ccrf3_t *ctx) |
Read state of GP3 pin function. | |
void | ccrf3_send_tx_data (ccrf3_t *ctx, uint8_t *tx_data, uint8_t n_bytes) |
Send TX data function. | |
uint8_t | ccrf3_receive_rx_data (ccrf3_t *ctx, uint8_t *rx_data) |
Receive RX data function. | |
API for configuring and manipulating ccRF 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
uint8_t ccrf3_16bit_reg_access | ( | ccrf3_t * | ctx, |
uint8_t | access_type, | ||
uint8_t | ext_address, | ||
uint8_t | reg_address, | ||
uint8_t * | rw_data, | ||
uint8_t | n_bytes ) |
Access 16-bit register function.
Function access to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | access_type | : Access type. |
[in] | ext_address | : Ext address. |
[in] | reg_address | : 8-bit register address. |
[in] | rw_data | : Pointer to the data to be written/read. |
[in] | n_bytes | : Number of bytes to be written/read. |
uint8_t ccrf3_8bit_reg_access | ( | ccrf3_t * | ctx, |
char | access_type, | ||
uint8_t | reg_address, | ||
uint8_t * | rw_data, | ||
uint16_t | n_bytes ) |
Access 8-bit register function.
Function access to the targeted 8-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | access_type | : Access type. |
[in] | reg_address | : 8-bit register address. |
[in] | rw_data | : Pointer to the data to be written/read. |
[in] | n_bytes | : Number of bytes to be written/read. |
void ccrf3_cfg_setup | ( | ccrf3_cfg_t * | cfg | ) |
ccRF 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ccrf3_cfg_t object definition for detailed explanation. |
uint8_t ccrf3_cmd_strobe | ( | ccrf3_t * | ctx, |
uint8_t | cmd ) |
Set command strobe function.
Function sets 8-bit strobe command to the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | cmd | : 8-bit command |
err_t ccrf3_default_cfg | ( | ccrf3_t * | ctx | ) |
ccRF 3 default configuration function.
This function executes a default configuration of ccRF 3 click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void ccrf3_hw_reset | ( | ccrf3_t * | ctx | ) |
Hardware reset function.
The function Hardware reset - resets the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
err_t ccrf3_init | ( | ccrf3_t * | ctx, |
ccrf3_cfg_t * | cfg ) |
ccRF 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ccrf3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void ccrf3_manual_calibration | ( | ccrf3_t * | ctx | ) |
Manual calibration function.
Function manual calibration the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
uint8_t ccrf3_read_gp0 | ( | ccrf3_t * | ctx | ) |
Read state of GP0 pin function.
Function reads state of GP0 pin of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
uint8_t ccrf3_read_gp2 | ( | ccrf3_t * | ctx | ) |
Read state of GP2 pin function.
Function reads state of GP2 pin of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
uint8_t ccrf3_read_gp3 | ( | ccrf3_t * | ctx | ) |
Read state of GP3 pin function.
Function reads state of GP3 pin of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
err_t ccrf3_read_reg | ( | ccrf3_t * | ctx, |
uint16_t | reg_address, | ||
uint8_t * | read_data, | ||
uint8_t | n_bytes ) |
Read the byte of data function.
Function read the byte of data of the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | reg_address | : 16-bit register address. |
[out] | read_data | : Pointer to the data to be read. |
[in] | n_bytes | : Number of bytes to be read. |
uint8_t ccrf3_read_rx_fifo | ( | ccrf3_t * | ctx, |
uint8_t * | read_data, | ||
uint8_t | n_bytes ) |
Read RX FIFO register function.
Function read sequential data from the targeted 8-bit RX FIFO register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | read_data | : Pointer to the data to be read. |
[in] | n_bytes | : Number of bytes to be read. |
void ccrf3_read_write_burst_single | ( | ccrf3_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t * | rw_data, | ||
uint16_t | n_bytes ) |
Read or write burst single function.
Function reads or writes a sequential data starting to the targeted 8-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | reg_address | : 8-bit register address. |
[in] | rw_data | : Pointer to the data to be written/read. |
[in] | n_bytes | : Number of bytes to be written/read. |
uint8_t ccrf3_receive_rx_data | ( | ccrf3_t * | ctx, |
uint8_t * | rx_data ) |
Receive RX data function.
Function receive RX data from the transmit module of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[out] | rx_data | : Pointer to the data to be receive. |
void ccrf3_send_tx_data | ( | ccrf3_t * | ctx, |
uint8_t * | tx_data, | ||
uint8_t | n_bytes ) |
Send TX data function.
Function send TX data to the receive module of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | tx_data | : Pointer to the data to be send. |
[in] | n_bytes | : Number of bytes to be send. |
void ccrf3_set_rx_mode | ( | ccrf3_t * | ctx | ) |
Set RX mode function.
Function set RX mode of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
void ccrf3_set_tx_mode | ( | ccrf3_t * | ctx | ) |
Set TX mode function.
Function set TX mode of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
err_t ccrf3_write_reg | ( | ccrf3_t * | ctx, |
uint16_t | reg_address, | ||
uint8_t * | write_data, | ||
uint8_t | n_bytes ) |
Write sequential data function.
Function write a sequential data starting to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | reg_address | : 16-bit register address. |
[in] | write_data | : Pointer to the data to be written. |
[in] | n_bytes | : Number of bytes to be written. |
uint8_t ccrf3_write_reg_single | ( | ccrf3_t * | ctx, |
uint16_t | reg_address, | ||
uint8_t | write_data ) |
Write one byte data function.
Function write a single byte data to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | reg_address | : 16-bit register address. |
[in] | write_data | : Data to be written. |
uint8_t ccrf3_write_tx_fifo | ( | ccrf3_t * | ctx, |
uint8_t * | write_data, | ||
uint8_t | n_bytes ) |
Write TX FIFO register function.
Function write sequential data to the targeted 8-bit TX FIFO register address of the CC1120 single-chip radio transceiver on the ccRF 3 Click board.
[in] | ctx | : Click context object. See ccrf3_t object definition for detailed explanation. |
[in] | write_data | : Pointer to the data to be written. |
[in] | n_bytes | : Number of bytes to be written. |