radiostation 2.0.0.0
radiostation.h File Reference

This file contains API for RadioStation Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  radiostation_t
 Click ctx object definition. More...
 
struct  radiostation_cmd_t
 Click send command object definition. More...
 
struct  radiostation_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RADIOSTATION_MAP_MIKROBUS(cfg, mikrobus)
 
#define RADIOSTATION_RETVAL   uint8_t
 
#define RADIOSTATION_OK   0x00
 
#define RADIOSTATION_INIT_ERROR   0xFF
 
#define RADIOSTATION_SLAVE_ADDR0   0x11
 
#define RADIOSTATION_SLAVE_ADDR1   0x63
 
#define RADIOSTATION_CTS   0x80
 
#define RADIOSTATION_ERR   0x40
 
#define RADIOSTATION_RDSINT   0x04
 
#define RADIOSTATION_ASQINT   0x02
 
#define RADIOSTATION_STCINT   0x01
 
#define RADIOSTATION_CTS_INTERRUPT_ENABLE   0x04
 
#define RADIOSTATION_GPO2_OUTPUT_ENABLE   0x02
 
#define RADIOSTATION_PATCH_ENABLE   0x01
 
#define RADIOSTATION_MIN_TUNE_FREQ   7600
 
#define RADIOSTATION_MAX_TUNE_FREQ   10800
 
#define RADIOSTATION_MIN_STEP   5
 
#define RADIOSTATION_PROP_GPO_IEN   0x0001
 
#define RADIOSTATION_GPO_IEN_ASQREP   0x0200
 
#define RADIOSTATION_GPO_IEN_STCREP   0x0100
 
#define RADIOSTATION_GPO_IEN_CTSIEN   0x0080
 
#define RADIOSTATION_GPO_IEN_ERRIEN   0x0040
 
#define RADIOSTATION_GPO_IEN_RDSIEN   0x0004
 
#define RADIOSTATION_GPO_IEN_ASQIEN   0x0002
 
#define RADIOSTATION_GPO_IEN_STCIENP   0x0001
 
#define RADIOSTATION_PROP_REFCLK_FREQ   0x0201
 
#define RADIOSTATION_PROP_REFCLK_PRESCALE   0x0202
 
#define RADIOSTATION_REFCLK_PRESCALE_RCLK   0x0000 & 0x1000
 
#define RADIOSTATION_REFCLK_PRESCALE_DCLK   0x1000 & 0x1000
 
#define RADIOSTATION_PROP_TX_COMPONENT_ENABLE   0x2100
 
#define RADIOSTATION_TX_COMPONENT_ENABLE_RDS   0x0004
 
#define RADIOSTATION_TX_COMPONENT_ENABLE_LEFT_MINUS_RIGHT   0x0002
 
#define RADIOSTATION_TX_COMPONENT_ENABLE_PILOT_TONE   0x0001
 
#define RADIOSTATION_PROP_TX_AUDIO_DEVIATION   0x2101
 
#define RADIOSTATION_PROP_TX_PILOT_DEVIATION   0x2102
 
#define RADIOSTATION_PROP_TX_LINE_INPUT_LEVEL   0x2104
 
#define RADIOSTATION_TX_LINE_INPUT_LEVEL_LIATTEN_1   0x0000 & 0x3000
 
#define RADIOSTATION_TX_LINE_INPUT_LEVEL_LIATTEN_2   0x1000 & 0x3000
 
#define RADIOSTATION_TX_LINE_INPUT_LEVEL_LIATTEN_3   0x2000 & 0x3000
 
#define RADIOSTATION_TX_LINE_INPUT_LEVEL_LIATTEN_4   0x3000 & 0x3000
 
#define RADIOSTATION_TX_LINE_INPUT_LEVEL_MAX_LILEVEL   636 & 0x03FF
 
#define RADIOSTATION_PROP_TX_LINE_INPUT_MUTE   0x2105
 
#define RADIOSTATION_TX_LINE_INPUT_MUTE_R   0x0001
 
#define RADIOSTATION_TX_LINE_INPUT_MUTE_L   0x0002
 
#define RADIOSTATION_PROP_TX_PREEMPHASIS   0x2106
 
#define RADIOSTATION_TX_PREEMPHASIS_75   0x0000
 
#define RADIOSTATION_TX_PREEMPHASIS_50   0x0001
 
#define RADIOSTATION_TX_PREEMPHASIS_DISABLED   0x0002
 
#define RADIOSTATION_PROP_TX_PILOT_FREQUENCY   0x2107
 
#define RADIOSTATION_PROP_TX_ACOMP_ENABLE   0x2200
 
#define RADIOSTATION_TX_ACOMP_ENABLE_LIMITEN   0x0002
 
#define RADIOSTATION_TX_ACOMP_ENABLE_ACEN   0x0001
 
#define RADIOSTATION_PROP_TX_ACOMP_THRESHOLD   0x2201
 
#define RADIOSTATION_PROP_TX_ACOMP_ATTACK_TIME   0x2202
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_0_5_MS   0x0000
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_1_0_MS   0x0001
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_1_5_MS   0x0002
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_2_0_MS   0x0003
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_2_5_MS   0x0004
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_3_0_MS   0x0005
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_3_5_MS   0x0006
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_4_0_MS   0x0007
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_4_5_MS   0x0008
 
#define RADIOSTATION_TX_ACOMP_ATTACK_TIME_5_0_MS   0x0009
 
#define RADIOSTATION_PROP_TX_ACOMP_RELEASE_TIME   0x2203
 
#define RADIOSTATION_TX_ACOMP_RELEASE_TIME_100_MS   0x0000
 
#define RADIOSTATION_TX_ACOMP_RELEASE_TIME_200_MS   0x0001
 
#define RADIOSTATION_TX_ACOMP_RELEASE_TIME_350_MS   0x0002
 
#define RADIOSTATION_TX_ACOMP_RELEASE_TIME_525_MS   0x0003
 
#define RADIOSTATION_TX_ACOMP_RELEASE_TIME_1000_MS   0x0004
 
#define RADIOSTATION_PROP_TX_ACOMP_GAIN   0x2204
 
#define RADIOSTATION_PROP_TX_LIMITER_RELEASE_TIME   0x2205
 
#define RADIOSTATION_PROP_TX_ASQ_INTERRUPT_SELECT   0x2300
 
#define RADIOSTATION_TX_ASQ_INTERRUPT_OVERMODIEN   0x0004
 
#define RADIOSTATION_TX_ASQ_INTERRUPT_IALHIEN   0x0002
 
#define RADIOSTATION_TX_ASQ_INTERRUPT_IALLIEN   0x0001
 
#define RADIOSTATION_PROP_TX_ASQ_LEVEL_LOW   0x2301
 
#define RADIOSTATION_PROP_TX_ASQ_LEVEL_HIGH   0x2303
 
#define RADIOSTATION_PROP_TX_ASQ_DURATION_LOW   0x2302
 
#define RADIOSTATION_PROP_TX_ASQ_DURATION_HIGH   0x2304
 

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

This file contains API for RadioStation Click driver.