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. | |
void radiostation_busy_wait_for_asqint | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Radio Station Click Busy Wait for ASQINT.
ctx | Click object. |
cmd | Command 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.
void radiostation_busy_wait_for_rdsint | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Radio Station Click Busy Wait for RDSINT.
ctx | Click object. |
cmd | Command 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.
void radiostation_busy_wait_for_stcint | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Radio Station Click Busy Wait for STCINT.
ctx | Click object. |
cmd | Command 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.
void radiostation_cfg_setup | ( | radiostation_cfg_t * | cfg, |
bool | slave_select ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void radiostation_default_cfg | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Click Default Configuration function.
ctx | Click object. |
cmd | Command click object. |
@description This function executes default configuration for RadioStation click.
uint8_t radiostation_get_asq_status | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint8_t * | ret_vals ) |
Radio Station Click ASQ Status.
ctx | Click object. |
cmd | Command click object. |
ret_vals | Pointer 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.
uint8_t radiostation_get_int_status | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Getting int pin status.
ctx | Click object. |
cmd | Command click object. |
@description This function get int status.
uint16_t radiostation_get_property | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint16_t | property_id ) |
Radio Station Click Get Property.
ctx | Click object. |
cmd | Command click object. |
property_id | ID of the property. |
@description Gets specified property. Returns the property value (16 bits).
uint8_t radiostation_get_revision | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint8_t * | ret_vals ) |
Radio Station Click Get Revision.
ctx | Click object. |
cmd | Command click object. |
ret_vals | Pointer 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.
uint8_t radiostation_get_revision1 | ( | radiostation_t * | ctx, |
uint8_t * | ret_vals ) |
Radio Station Click Set Tune Frequency.
ctx | Click object. |
cmd | Command click object. |
freq | Desired carrier frequency (between 7600 and 10800). |
@description Sets carrier frequency to specified value.
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.
ctx | Click object. |
cmd | Command click object. |
freq | Frequency at which measurement is performed. |
capacitance | Tuning capacitor capacitance (between 0 and 191). |
@description Measures Received Noise Level (RNL) at specified frequency and capacitance.
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.
ctx | Click object. |
cmd | Command click object. |
clear_stc_status_bit | Clear STC bit. |
ret_vals | Pointer 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_RETVAL radiostation_init | ( | radiostation_t * | ctx, |
radiostation_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t radiostation_power_down | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Radio Station Click Power Down.
ctx | Click object. |
cmd | Command click object. |
@description Powers down the chip. Any command sent after this will not return correct result.
uint8_t radiostation_power_up | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd ) |
Radio Station Click Power Up.
ctx | Click object. |
cmd | Command click object. |
@description Powers up the chip with default settings. This function should be executed before sending any commands to the chip.
uint8_t radiostation_power_up_advanced | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint8_t | config ) |
Radio Station Click Power Up Advanced.
ctx | Click object. |
cmd | Command click object. |
config | Power 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.
void radiostation_read | ( | radiostation_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data.
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.
ctx | Click object. |
cmd | Command click object. |
property_id | ID of the property. |
property_value | Value of the property being set. |
@description Sets specified property to the specified value.
uint8_t radiostation_set_tune_frequency | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint16_t | freq ) |
Radio Station Click Set Tune Frequency.
ctx | Click object. |
cmd | Command click object. |
freq | Desired carrier frequency (between 7600 and 10800). |
@description Sets carrier frequency to specified value.
uint8_t radiostation_set_tune_power | ( | radiostation_t * | ctx, |
radiostation_cmd_t * | cmd, | ||
uint8_t | voltage, | ||
uint8_t | capacitance ) |
Radio Station Click Get Revision.
ctx | Click object. |
cmd | Command click object. |
voltage | Tune power (between 0 and 115/120 dB�V). |
capacitance | Tuning 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.
void radiostation_write | ( | radiostation_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data.