ccrf3 2.0.0.0
ccRF 3 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ ccrf3_16bit_reg_access()

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.

Parameters
[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.
Returns
8-bit status data.

◆ ccrf3_8bit_reg_access()

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.

Parameters
[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.
Returns
8-bit status data.

◆ ccrf3_cfg_setup()

void ccrf3_cfg_setup ( ccrf3_cfg_t * cfg)

ccRF 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ ccrf3_cmd_strobe()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
[in]cmd: 8-bit command
Returns
8-bit status data

◆ ccrf3_default_cfg()

err_t ccrf3_default_cfg ( ccrf3_t * ctx)

ccRF 3 default configuration function.

This function executes a default configuration of ccRF 3 click board.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ ccrf3_hw_reset()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
Returns
Nothing.
Note
Delay aprox. 300 ms.

◆ ccrf3_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ ccrf3_manual_calibration()

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.

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

◆ ccrf3_read_gp0()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
Returns
State of the GP0 pin.

◆ ccrf3_read_gp2()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
Returns
State of the GP2 pin.

◆ ccrf3_read_gp3()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
Returns
State of the GP3 pin.

◆ ccrf3_read_reg()

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.

Parameters
[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.
Returns
8-bit status data.

◆ ccrf3_read_rx_fifo()

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.

Parameters
[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.
Returns
8-bit status data

◆ ccrf3_read_write_burst_single()

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.

Parameters
[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.
Returns
Nothing.

◆ ccrf3_receive_rx_data()

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.

Parameters
[in]ctx: Click context object. See ccrf3_t object definition for detailed explanation.
[out]rx_data: Pointer to the data to be receive.
Returns
Number of the received data bytes.

◆ ccrf3_send_tx_data()

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.

Parameters
[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.
Returns
Nothing.

◆ ccrf3_set_rx_mode()

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.

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

◆ ccrf3_set_tx_mode()

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.

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

◆ ccrf3_write_reg()

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.

Parameters
[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.
Returns
8-bit status data.

◆ ccrf3_write_reg_single()

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.

Parameters
[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.
Returns
8-bit status data.

◆ ccrf3_write_tx_fifo()

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.

Parameters
[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.
Returns
8-bit status data