radiostation 2.0.0.0

Functions

void radiostation_cfg_setup (radiostation_cfg_t *cfg, bool slave_select)
 Config Object Initialization function.
 
RADIOSTATION_RETVAL radiostation_init (radiostation_t *ctx, radiostation_cfg_t *cfg)
 Initialization function.
 
void radiostation_default_cfg (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Click Default Configuration function.
 
void radiostation_write (radiostation_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void radiostation_read (radiostation_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t radiostation_power_up_advanced (radiostation_t *ctx, radiostation_cmd_t *cmd, uint8_t config)
 Radio Station Click Power Up Advanced.
 
uint8_t radiostation_power_up (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Radio Station Click Power Up.
 
uint8_t radiostation_power_down (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Radio Station Click Power Down.
 
uint8_t radiostation_get_revision (radiostation_t *ctx, radiostation_cmd_t *cmd, uint8_t *ret_vals)
 Radio Station Click Get Revision.
 
uint8_t radiostation_get_revision1 (radiostation_t *ctx, uint8_t *ret_vals)
 Radio Station Click Set Tune Frequency.
 
uint8_t radiostation_set_tune_frequency (radiostation_t *ctx, radiostation_cmd_t *cmd, uint16_t freq)
 Radio Station Click Set Tune Frequency.
 
uint8_t radiostation_set_tune_power (radiostation_t *ctx, radiostation_cmd_t *cmd, uint8_t voltage, uint8_t capacitance)
 Radio Station Click Get Revision.
 
uint8_t radiostation_get_tune_measure (radiostation_t *ctx, radiostation_cmd_t *cmd, uint16_t freq, uint8_t capacitance)
 Radio Station Click Get Tuning Measurements.
 
uint8_t radiostation_get_int_status (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Getting int pin status.
 
void radiostation_busy_wait_for_stcint (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Radio Station Click Busy Wait for STCINT.
 
void radiostation_busy_wait_for_asqint (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Radio Station Click Busy Wait for ASQINT.
 
void radiostation_busy_wait_for_rdsint (radiostation_t *ctx, radiostation_cmd_t *cmd)
 Radio Station Click Busy Wait for RDSINT.
 
uint8_t radiostation_get_tune_status (radiostation_t *ctx, radiostation_cmd_t *cmd, uint8_t clear_stc_status_bit, uint8_t *ret_vals)
 Radio Station Click Get Tune Status.
 
uint8_t radiostation_get_asq_status (radiostation_t *ctx, radiostation_cmd_t *cmd, uint8_t *ret_vals)
 Radio Station Click ASQ Status.
 
uint8_t radiostation_set_property (radiostation_t *ctx, radiostation_cmd_t *cmd, uint16_t property_id, uint16_t property_value)
 Radio Station Click Set Property.
 
uint16_t radiostation_get_property (radiostation_t *ctx, radiostation_cmd_t *cmd, uint16_t property_id)
 Radio Station Click Get Property.
 

Detailed Description

Function Documentation

◆ radiostation_busy_wait_for_asqint()

void radiostation_busy_wait_for_asqint ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Radio Station Click Busy Wait for ASQINT.

Parameters
ctxClick object.
cmdCommand click object.

@description Should be called after a command that sets ASQINT bit if interrupts are not used. Busy waits for the bit to become 1.

◆ radiostation_busy_wait_for_rdsint()

void radiostation_busy_wait_for_rdsint ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Radio Station Click Busy Wait for RDSINT.

Parameters
ctxClick object.
cmdCommand click object.

@description Should be called after a command that sets RDSINT bit if interrupts are not used. Busy waits for the bit to become 1.

◆ radiostation_busy_wait_for_stcint()

void radiostation_busy_wait_for_stcint ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Radio Station Click Busy Wait for STCINT.

Parameters
ctxClick object.
cmdCommand click object.

@description Should be called after a command that sets STCINT bit if interrupts are not used. Busy waits for the bit to become 1.

◆ radiostation_cfg_setup()

void radiostation_cfg_setup ( radiostation_cfg_t * cfg,
bool slave_select )

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.

◆ radiostation_default_cfg()

void radiostation_default_cfg ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Click Default Configuration function.

Parameters
ctxClick object.
cmdCommand click object.

@description This function executes default configuration for RadioStation click.

◆ radiostation_get_asq_status()

uint8_t radiostation_get_asq_status ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint8_t * ret_vals )

Radio Station Click ASQ Status.

Parameters
ctxClick object.
cmdCommand click object.
ret_valsPointer to a buffer that receives ASQ status.

@description Returns status information about the Audio Signal Quality and current FM transmit frequency. 1 byte for return status (same as return value) and 4 bytes for ASQ status.

◆ radiostation_get_int_status()

uint8_t radiostation_get_int_status ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Getting int pin status.

Parameters
ctxClick object.
cmdCommand click object.

@description This function get int status.

◆ radiostation_get_property()

uint16_t radiostation_get_property ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint16_t property_id )

Radio Station Click Get Property.

Parameters
ctxClick object.
cmdCommand click object.
property_idID of the property.

@description Gets specified property. Returns the property value (16 bits).

◆ radiostation_get_revision()

uint8_t radiostation_get_revision ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint8_t * ret_vals )

Radio Station Click Get Revision.

Parameters
ctxClick object.
cmdCommand click object.
ret_valsPointer to a buffer that receives revision information.

@description Gets the revision information about the chip. 1 byte for status (same as return value) and 8 bytes for revision info.

◆ radiostation_get_revision1()

uint8_t radiostation_get_revision1 ( radiostation_t * ctx,
uint8_t * ret_vals )

Radio Station Click Set Tune Frequency.

Parameters
ctxClick object.
cmdCommand click object.
freqDesired carrier frequency (between 7600 and 10800).

@description Sets carrier frequency to specified value.

Note
Value specified represents units of 10 kHz, and has to be multiple of 5 (50 kHz). Example: Value 10300 sets carrier frequency to 10300 * 10 kHz = 103 MHz.

◆ radiostation_get_tune_measure()

uint8_t radiostation_get_tune_measure ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint16_t freq,
uint8_t capacitance )

Radio Station Click Get Tuning Measurements.

Parameters
ctxClick object.
cmdCommand click object.
freqFrequency at which measurement is performed.
capacitanceTuning capacitor capacitance (between 0 and 191).

@description Measures Received Noise Level (RNL) at specified frequency and capacitance.

◆ radiostation_get_tune_status()

uint8_t radiostation_get_tune_status ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint8_t clear_stc_status_bit,
uint8_t * ret_vals )

Radio Station Click Get Tune Status.

Parameters
ctxClick object.
cmdCommand click object.
clear_stc_status_bitClear STC bit.
ret_valsPointer to a buffer that receives tune status.

@description Returns status information which is set by radiostation_get_tune_measure, radiostation_set_tune_frequency or radiostation_set_tune_power. 1 byte for return status (same as return value) and 7 bytes for tune status.

◆ radiostation_init()

RADIOSTATION_RETVAL radiostation_init ( radiostation_t * ctx,
radiostation_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ radiostation_power_down()

uint8_t radiostation_power_down ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Radio Station Click Power Down.

Parameters
ctxClick object.
cmdCommand click object.

@description Powers down the chip. Any command sent after this will not return correct result.

◆ radiostation_power_up()

uint8_t radiostation_power_up ( radiostation_t * ctx,
radiostation_cmd_t * cmd )

Radio Station Click Power Up.

Parameters
ctxClick object.
cmdCommand click object.

@description Powers up the chip with default settings. This function should be executed before sending any commands to the chip.

◆ radiostation_power_up_advanced()

uint8_t radiostation_power_up_advanced ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint8_t config )

Radio Station Click Power Up Advanced.

Parameters
ctxClick object.
cmdCommand click object.
configPower Up settings.

@description Powers up the chip with custom settings. This function (or radiostation_power_up ) should be executed before sending any commands to the chip.

◆ radiostation_read()

void radiostation_read ( radiostation_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data.

◆ radiostation_set_property()

uint8_t radiostation_set_property ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint16_t property_id,
uint16_t property_value )

Radio Station Click Set Property.

Parameters
ctxClick object.
cmdCommand click object.
property_idID of the property.
property_valueValue of the property being set.

@description Sets specified property to the specified value.

◆ radiostation_set_tune_frequency()

uint8_t radiostation_set_tune_frequency ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint16_t freq )

Radio Station Click Set Tune Frequency.

Parameters
ctxClick object.
cmdCommand click object.
freqDesired carrier frequency (between 7600 and 10800).

@description Sets carrier frequency to specified value.

Note
Value specified represents units of 10 kHz, and has to be multiple of 5 (50 kHz). Example: Value 10300 sets carrier frequency to 10300 * 10 kHz = 103 MHz.

◆ radiostation_set_tune_power()

uint8_t radiostation_set_tune_power ( radiostation_t * ctx,
radiostation_cmd_t * cmd,
uint8_t voltage,
uint8_t capacitance )

Radio Station Click Get Revision.

Parameters
ctxClick object.
cmdCommand click object.
voltageTune power (between 0 and 115/120 dB�V).
capacitanceTuning capacitor capacitance (between 0 and 191).

@description Sets power of transmitted signal. Also sets tuning capacitor capacitance (gets multiplied by 0x25 pF), 0 indicates automatic setting of capacitance.

◆ radiostation_write()

void radiostation_write ( radiostation_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data.