ccrf2 2.0.0.0
Public function

Functions

void ccrf2_cfg_setup (ccrf2_cfg_t *cfg)
 Config Object Initialization function.
 
CCRF2_RETVAL ccrf2_init (ccrf2_t *ctx, ccrf2_cfg_t *cfg)
 Initialization function.
 
void ccrf2_default_cfg (ccrf2_t *ctx)
 Click Default Configuration function.
 
void ccrf2_hw_reset (ccrf2_t *ctx)
 Hardware reset function.
 
uint8_t ccrf2_cmd_strobe (ccrf2_t *ctx, uint8_t cmd)
 Set command strobe function.
 
void ccrf2_read_write_burst_single (ccrf2_t *ctx, uint8_t reg_address, uint8_t *rw_data, uint16_t n_bytes)
 Read or write burst single function.
 
uint8_t ccrf2_8bit_reg_access (ccrf2_t *ctx, char access_type, uint8_t reg_address, uint8_t *rw_data, uint16_t n_bytes)
 Access 8-bit register function.
 
uint8_t ccrf2_16bit_reg_access (ccrf2_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.
 
uint8_t ccrf2_read_reg (ccrf2_t *ctx, uint16_t reg_address, uint8_t *read_data, uint8_t n_bytes)
 Read the byte of data function.
 
uint8_t ccrf2_write_reg (ccrf2_t *ctx, uint16_t reg_address, uint8_t *write_data, uint8_t n_bytes)
 Write sequential data function.
 
uint8_t ccrf2_write_reg_single (ccrf2_t *ctx, uint16_t reg_address, uint8_t write_data)
 Write one byte data function.
 
uint8_t ccrf2_write_tx_fifo (ccrf2_t *ctx, uint8_t *write_data, uint8_t n_bytes)
 Write TX FIFO register function.
 
uint8_t ccrf2_read_rx_fifo (ccrf2_t *ctx, uint8_t *read_data, uint8_t n_bytes)
 Read RX FIFO register function.
 
void ccrf2_manual_calibration (ccrf2_t *ctx)
 Manual calibration function.
 
void ccrf2_set_rx_mode (ccrf2_t *ctx)
 Set RX mode function.
 
void ccrf2_set_tx_mode (ccrf2_t *ctx)
 Set TX mode function.
 
uint8_t ccrf2_read_gp0 (ccrf2_t *ctx)
 Read state of GP0 pin function.
 
uint8_t ccrf2_read_gp2 (ccrf2_t *ctx)
 Read state of GP2 pin function.
 
uint8_t ccrf2_read_gp3 (ccrf2_t *ctx)
 Read state of GP3 pin function.
 
void ccrf2_send_tx_data (ccrf2_t *ctx, uint8_t *tx_data, uint8_t n_bytes)
 Send TX data function.
 
uint8_t ccrf2_receive_rx_data (ccrf2_t *ctx, uint8_t *rx_data)
 Receive RX data function.
 

Detailed Description

Function Documentation

◆ ccrf2_16bit_reg_access()

uint8_t ccrf2_16bit_reg_access ( ccrf2_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.

Parameters
ctxClick object.
access_typeAccess type
ext_addressExt address
reg_address8-bit register address
rw_datapointer to the data to be written/read
n_bytesnumber of bytes to be written/read
Returns
8-bit status data

@description Function access to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_8bit_reg_access()

uint8_t ccrf2_8bit_reg_access ( ccrf2_t * ctx,
char access_type,
uint8_t reg_address,
uint8_t * rw_data,
uint16_t n_bytes )

Access 8-bit register function.

Parameters
ctxClick object.
access_typeAccess type
reg_address8-bit register address
rw_datapointer to the data to be written/read
n_bytesnumber of bytes to be written/read
Returns
8-bit status data

@description Function access to the targeted 8-bit register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_cfg_setup()

void ccrf2_cfg_setup ( ccrf2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ ccrf2_cmd_strobe()

uint8_t ccrf2_cmd_strobe ( ccrf2_t * ctx,
uint8_t cmd )

Set command strobe function.

Parameters
ctxClick object.
cmd8-bit command
Returns
8-bit status data

@description Function sets 8-bit strobe command to the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_default_cfg()

void ccrf2_default_cfg ( ccrf2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for ccRF2 click.

◆ ccrf2_hw_reset()

void ccrf2_hw_reset ( ccrf2_t * ctx)

Hardware reset function.

Parameters
ctxClick object.

@description The function Hardware reset - resets the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

Note
Delay aprox. 300 ms.

◆ ccrf2_init()

CCRF2_RETVAL ccrf2_init ( ccrf2_t * ctx,
ccrf2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ ccrf2_manual_calibration()

void ccrf2_manual_calibration ( ccrf2_t * ctx)

Manual calibration function.

Parameters
ctxClick object.

@description Function manual calibration the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_gp0()

uint8_t ccrf2_read_gp0 ( ccrf2_t * ctx)

Read state of GP0 pin function.

Parameters
ctxClick object.

@description Function reads state of GP0 pin of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_gp2()

uint8_t ccrf2_read_gp2 ( ccrf2_t * ctx)

Read state of GP2 pin function.

Parameters
ctxClick object.

@description Function reads state of GP2 pin of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_gp3()

uint8_t ccrf2_read_gp3 ( ccrf2_t * ctx)

Read state of GP3 pin function.

Parameters
ctxClick object.

@description Function reads state of GP3 pin of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_reg()

uint8_t ccrf2_read_reg ( ccrf2_t * ctx,
uint16_t reg_address,
uint8_t * read_data,
uint8_t n_bytes )

Read the byte of data function.

Parameters
ctxClick object.
reg_address16-bit register address
read_datapointer to the data to be read
n_bytesnumber of bytes to be read
Returns
8-bit status data

@description Function read the byte of data of the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_rx_fifo()

uint8_t ccrf2_read_rx_fifo ( ccrf2_t * ctx,
uint8_t * read_data,
uint8_t n_bytes )

Read RX FIFO register function.

Parameters
ctxClick object.
read_datapointer to the data to be read
n_bytesnumber of bytes to be read
Returns
8-bit status data

@description Function read sequential data from the targeted 8-bit RX FIFO register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_read_write_burst_single()

void ccrf2_read_write_burst_single ( ccrf2_t * ctx,
uint8_t reg_address,
uint8_t * rw_data,
uint16_t n_bytes )

Read or write burst single function.

Parameters
ctxClick object.
reg_address8-bit register address
rw_datapointer to the data to be written/read
n_bytesnumber of bytes to be written/read

@description 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 2 Click board.

◆ ccrf2_receive_rx_data()

uint8_t ccrf2_receive_rx_data ( ccrf2_t * ctx,
uint8_t * rx_data )

Receive RX data function.

Parameters
ctxClick object.
rx_datapointer to the data to be receive
Returns
Number of the received data bytes.

@description Function receive RX data from the transmit module of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_send_tx_data()

void ccrf2_send_tx_data ( ccrf2_t * ctx,
uint8_t * tx_data,
uint8_t n_bytes )

Send TX data function.

Parameters
ctxClick object.
tx_datapointer to the data to be send
n_bytesnumber of bytes to be send

@description Function send TX data to the receive module of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_set_rx_mode()

void ccrf2_set_rx_mode ( ccrf2_t * ctx)

Set RX mode function.

Parameters
ctxClick object.

@description Function set RX mode of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_set_tx_mode()

void ccrf2_set_tx_mode ( ccrf2_t * ctx)

Set TX mode function.

Parameters
ctxClick object.

@description Function set TX mode of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_write_reg()

uint8_t ccrf2_write_reg ( ccrf2_t * ctx,
uint16_t reg_address,
uint8_t * write_data,
uint8_t n_bytes )

Write sequential data function.

Parameters
ctxClick object.
reg_address16-bit register address
write_datapointer to the data to be written
n_bytesnumber of bytes to be written
Returns
8-bit status data

@description Function write a sequential data starting to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_write_reg_single()

uint8_t ccrf2_write_reg_single ( ccrf2_t * ctx,
uint16_t reg_address,
uint8_t write_data )

Write one byte data function.

Parameters
ctxClick object.
reg_address16-bit register address
write_datadata to be written
Returns
8-bit status data

@description Function write a single byte data to the targeted 16-bit register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.

◆ ccrf2_write_tx_fifo()

uint8_t ccrf2_write_tx_fifo ( ccrf2_t * ctx,
uint8_t * write_data,
uint8_t n_bytes )

Write TX FIFO register function.

Parameters
ctxClick object.
write_datapointer to the data to be written
n_bytesnumber of bytes to be written
Returns
8-bit status data

@description Function write sequential data to the targeted 8-bit TX FIFO register address of the CC1120 single-chip radio transceiver on the ccRF 2 Click board.