PU2CLR RDA5807 Arduino Library 1.1.9
Arduino Library for RDA5807 Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Union, Structure and Defined Data Types

rda Defined Data Types More...

Classes

union  rda_reg00
 Register 0x00. More...
 
union  rda_reg01
 Register 0x01 - Dummy. More...
 
union  rda_reg02
 Register 0x02 - Basic setup: RESET configuration;. More...
 
union  rda_reg03
 Register 0x03. More...
 
union  rda_reg04
 Register 0x04. More...
 
union  rda_reg05
 Register 0x05. More...
 
union  rda_reg06
 Register 0x06. More...
 
union  rda_reg07
 Register 0x07. More...
 
union  rda_reg08
 Register 0x08 - Direct Frequency. More...
 
union  rda_reg0a
 Register 0x0A - Device current status. More...
 
union  rda_reg0b
 Register 0x0B. More...
 
union  rda_reg0c
 Register 0x0C. More...
 
union  rda_reg0d
 Register 0x0D. More...
 
union  rda_reg0e
 Register 0x0E. More...
 
union  rda_reg0f
 Register 0x0F. More...
 
union  rds_blockb
 RDS Block B data type. More...
 
union  rds_date_time
 
union  word16_to_bytes
 Converts 16 bits word to two bytes. More...
 
class  RDA5807
 KT0915 Class. More...
 
struct  rda_reg00.refined
 
struct  rda_reg01.refined
 
struct  rda_reg02.refined
 
struct  rda_reg03.refined
 
struct  rda_reg04.refined
 
struct  rda_reg05.refined
 
struct  rda_reg06.refined
 
struct  rda_reg07.refined
 
struct  rda_reg08.refined
 
struct  rda_reg0a.refined
 
struct  rda_reg0b.refined
 
struct  rda_reg0c.refined
 
struct  rda_reg0d.refined
 
struct  rda_reg0e.refined
 
struct  rda_reg0f.refined
 
struct  rds_blockb.group0
 
struct  rds_blockb.group2
 
struct  rds_blockb.refined
 
struct  rds_date_time.refined
 
struct  word16_to_bytes.refined
 

Detailed Description

rda Defined Data Types

Defined Data Types is a way to represent the rda registers information

The information shown here was extracted from Datasheet:

rda stereo FM digital tuning radio documentation.


Class Documentation

◆ rda_reg00

union rda_reg00

Register 0x00.

Class Members
uint16_t raw
struct rda_reg00.refined refined

◆ rda_reg01

union rda_reg01

Register 0x01 - Dummy.

It is not documented by the RDA.

Class Members
uint16_t raw
struct rda_reg01.refined refined

◆ rda_reg02

union rda_reg02

Register 0x02 - Basic setup: RESET configuration;.

Clock type configuration; seek operation; Sterio/Mono; Bass; and Audio configuration

The RDA5807M is RESET itself when power up. You also can use soft reset by triggering SOFT_RESET bit to 1.

Seek begins in the direction specified by SEEKUP and ends when a channel is found, or the entire band has been searched.

The SEEK bit is set low and the STC bit is set high when the seek operation completes.

RCLK NON-CALIBRATE MODE. if 0=RCLK clock is always supply; if 1=RCLK clock is not always supply when FM work ( when 1, RDA5807M can’t directly support -20 °C ~70 °C temperature.

Only suppory ±20°C temperature swing from tune point).

Clock CLK_MODE table

Value Clock
000 32.768kHz
001 12Mhz
101 24Mhz
010 13Mhz
110 26Mhz
011 19.2Mhz
111 38.4Mhz
Class Members
uint16_t raw
struct rda_reg02.refined refined

◆ rda_reg03

union rda_reg03

Register 0x03.

Receiver configuratio

The tune operation begins when the TUNE bit is set high. The STC bit is set high when the tune operation completes.

The tune bit is reset to low automatically when the tune operation completes

Channel space table

Value Description
00 100KHz
01 200KHz
10 50KHz
11 25KHz

FM band table

Value Description
00 87–108 MHz (US/Europe)
01 76–91 MHz (Japan)
10 76–108 MHz (world wide)
11 65 –76 MHz (East Europe) or 50-65MHz (see bit 9 of gegister 0x06)

Channel select table

BAND Description
0 Frequency = Channel Spacing (kHz) x CHAN+ 87.0 MHz
1 or 2 Frequency = Channel Spacing (kHz) x CHAN + 76.0 MHz
3 Frequency = Channel Spacing (kHz) x CHAN + 65.0 MHz

IMPORTANT: CHAN is updated after a seek operation.

Class Members
uint16_t raw
struct rda_reg03.refined refined

◆ rda_reg04

union rda_reg04

Register 0x04.

Receiver properties

Volume scale is logarithmic When 0000, output mute and output impedance is very large

Setting STCIEN = 1 will generate a low pulse on GPIO2 when the interrupt occurs.

Class Members
uint16_t raw
struct rda_reg04.refined refined

◆ rda_reg05

union rda_reg05

Register 0x05.

Class Members
uint16_t raw
struct rda_reg05.refined refined

◆ rda_reg06

union rda_reg06

Register 0x06.

I2S_SW_CNT values table

Value Description
0b1000 WS_STEP_48
0b0111 WS_STEP=44.1kbps
0b0110 WS_STEP=32kbps
0b0101 WS_STEP=24kbps
0b0100 WS_STEP=22.05kbps
0b0011 WS_STEP=16kbps
0b0010 WS_STEP=12kbps
0b0001 WS_STEP=11.025kbps
0b0000 WS_STEP=8kbps
Class Members
uint16_t raw
struct rda_reg06.refined refined

◆ rda_reg07

union rda_reg07

Register 0x07.

Class Members
uint16_t raw
struct rda_reg07.refined refined

◆ rda_reg08

union rda_reg08

Register 0x08 - Direct Frequency.

Valid when freq_mode = 1

Freq = 7600(or 8700) kHz + freq_direct (08H) kHz.

Value to be stores is frequency - 7600 or 8700

Class Members
uint16_t directFrequency
struct rda_reg08.refined refined

◆ rda_reg0a

union rda_reg0a

Register 0x0A - Device current status.

The seek fail flag (SF) is set when the seek operation fails to find a channel with an RSSI level greater than SEEKTH[5:0].

The seek/tune complete (STC) flag is set when the seek or tune operation completes.

Channel table

BAND Description
0 Frequency = Channel Spacing (kHz) x CHAN+ 87.0 MHz
1 or 2 Frequency = Channel Spacing (kHz) x CHAN + 76.0 MHz
3 Frequency = Channel Spacing (kHz) x CHAN + 65.0 MHz
Class Members
uint16_t raw
struct rda_reg0a.refined refined

◆ rda_reg0b

union rda_reg0b

Register 0x0B.

Current RDS and device status

Errors Level table (Block Errors Level of RDS_DATA_0 and RDS_DATA_1. Always read as Errors Level of RDS BLOCKs A and B (in RDS mode ) or E (in RBDS mode when ABCD_E flag is 1).

Value Description
00 0 errors requiring correction
01 1~2 errors requiring correction
10 3~5 errors requiring correction
10 6+ errors or error in checkword, correction not possible
Class Members
uint16_t raw
struct rda_reg0b.refined refined

◆ rda_reg0c

union rda_reg0c

Register 0x0C.

BLOCK A ( in RDS mode) or BLOCK E (in RBDS mode when ABCD_E flag is 1)

Class Members
uint16_t RDSA BLOCK A ( in RDS mode) or BLOCK E (in RBDS mode when ABCD_E flag is 1)
struct rda_reg0c.refined refined

◆ rda_reg0d

union rda_reg0d

Register 0x0D.

BLOCK B ( in RDS mode) or BLOCK E (in RBDS mode when ABCD_E flag is 1)

Class Members
uint16_t RDSB
struct rda_reg0d.refined refined

◆ rda_reg0e

union rda_reg0e

Register 0x0E.

BLOCK C ( in RDS mode) or BLOCK E (in RBDS mode when ABCD_E flag is 1)

Class Members
uint16_t RDSC
struct rda_reg0e.refined refined

◆ rda_reg0f

union rda_reg0f

Register 0x0F.

BLOCK D ( in RDS mode) or BLOCK E (in RBDS mode when ABCD_E flag is 1)

Class Members
uint16_t RDSD
struct rda_reg0f.refined refined

◆ rds_blockb

union rds_blockb

RDS Block B data type.

For GCC on System-V ABI on 386-compatible (32-bit processors), the following stands:

1) Bit-fields are allocated from right to left (least to most significant). 2) A bit-field must entirely reside in a storage unit appropriate for its declared type. Thus a bit-field never crosses its unit boundary. 3) Bit-fields may share a storage unit with other struct/union members, including members that are not bit-fields. Of course, struct members occupy different parts of the storage unit. 4) Unnamed bit-fields' types do not affect the alignment of a structure or union, although individual bit-fields' member offsets obey the alignment constraints.

See also
also https://en.wikipedia.org/wiki/Radio_Data_System
Class Members
uint16_t blockB
struct rds_blockb.group0 group0
struct rds_blockb.group2 group2
struct rds_blockb.refined refined

◆ rds_date_time

union rds_date_time

Group RDS type 4A ( RDS Date and Time) When group type 4A is used by the station, it shall be transmitted every minute according to EN 50067. This Structure uses blocks 2,3 and 5 (B,C,D)

ATTENTION: To make it compatible with 8, 16 and 32 bits platforms and avoid Crossing boundary, it was necessary to split minute and hour representation.

Class Members
uint8_t raw[6]
struct rds_date_time.refined refined

◆ word16_to_bytes

union word16_to_bytes

Converts 16 bits word to two bytes.

Class Members
uint16_t raw
struct word16_to_bytes.refined refined

◆ RDA5807

class RDA5807

KT0915 Class.

This class implements all functions that will help you to control the KT0915 devices.

Author
PU2CLR - Ricardo Lima Caratti

Public Member Functions

void setDelayAfterCrystalOn (uint8_t ms_value)
 Set the Delay After Crystal On (default 500ms)
 
void setI2CBusAddrs (int directAccess, int fullAccess)
 Sets alternatives I2C bus address.
 
void getStatusRegisters ()
 Gets all current device status and RDS information registers (From 0x0A to 0x0F)
 
word16_to_bytes getDirectRegister (uint8_t reg)
 Gets the register content via direct access.
 
void * getStatus (uint8_t reg)
 Gets the register content of a given status register (from 0x0A to 0x0F)
 
void setRegister (uint8_t reg, uint16_t value)
 Sets a given value to a specific device register.
 
void setGpio (uint8_t gpioPin, uint8_t gpioSetup=0, int mcuPin=-1)
 Sets the Device GPIO pins.
 
void setInterruptMode (uint8_t value)
 Sets Interrupt Mode.
 
void waitAndFinishTune ()
 Waits for Seek or Tune finish.
 
void softReset ()
 Resets the device.
 
void powerUp ()
 Powers the receiver on.
 
void powerDown ()
 Power the receiver off.
 
void setup (uint8_t clock_frequency=CLOCK_32K, uint8_t oscillator_type=OSCILLATOR_TYPE_PASSIVE, uint8_t rlck_no_calibrate=RLCK_NO_CALIBRATE_MODE_OFF)
 Starts the device.
 
void setNewDemodulateMethod (bool value)
 Sets new demodulate method. It can improve the receiver sensitivity about 1dB.
 
void setAFC (bool value)
 Sets AFC true or false.
 
void setLnaIcSel (uint8_t value)
 Sets LNA_ICSEL_BIT.
 
void setLnaPortSel (uint8_t value)
 Sets LNA input port selection bit.
 
uint8_t getLnaIcSel ()
 Gets LNA_ICSEL_BIT current value.
 
uint8_t getLnaPortSel ()
 Gets current vaue of the LNA input port selection bit.
 
void setFrequency (uint16_t frequency)
 Sets the frequency.
 
void setFrequencyToBeginBand ()
 Tunes the receiver at the first channel/frequency of the current band.
 
void setFrequencyToEndBand ()
 Tunes the receiver at the last channel/frequency of the current band.
 
uint16_t getMaximunFrequencyOfTheBand ()
 gets the maximun frequency of the current band
 
uint16_t getMinimumFrequencyOfTheBand ()
 gets the minimum frequency of the current band
 
uint16_t getFrequency ()
 Gets the current frequency.
 
void setFrequencyUp ()
 Increments the current frequency.
 
void setFrequencyDown ()
 Decrements the current frequency.
 
void setDirectFrequency (uint16_t frequency)
 Sets the frequency using the reg08 (direct frequency)
 
void setFrequencyMode (uint8_t value)
 Sets the frequency mode. If 1, then freq setting changed.
 
uint16_t getRealFrequency ()
 Gets the current frequency bases on the current channel.
 
uint16_t getRealChannel ()
 Gets the current channel stored in 0x0A status register.
 
void setChannel (uint16_t channel)
 Sets the channel.
 
void seek (uint8_t seek_mode, uint8_t direction)
 Seek function.
 
void seek (uint8_t seek_mode, uint8_t direction, void(*showFunc)())
 Seek function.
 
void setSeekThreshold (uint8_t value)
 Sets RSSI Seek Threshold.
 
void setBand (uint8_t band=0)
 Sets the FM band. See table below.
 
uint8_t getBand ()
 Returns the current band.
 
void setSpace (uint8_t space=0)
 Sets the FM channel space.
 
void setStep (uint8_t step=100)
 Sets the FM Step;.
 
uint8_t getSpace ()
 Returns the current Band Space.
 
void setBand3_50_65_Mode (uint8_t band3Mode)
 Sets the band 3 mode: 50 to 65 MHZ or 65 to 76 MHz.
 
uint8_t getBand3Status ()
 Gets the status of the Band3.
 
int getRssi ()
 Gets the current Rssi.
 
bool isFmTrue ()
 Returns true if the current channel is a station.
 
bool isFmReady ()
 Returns true if the FM is ready.
 
uint16_t getDeviceId ()
 Gets the Device identification.
 
void setSoftmute (bool value)
 Sets Soft Mute Enable or disable.
 
bool isSoftmuted ()
 Gets the softmute status.
 
void setMono (bool value)
 Sets audio Mono or stereo.
 
bool isStereo ()
 Gets the current Stereo status.
 
void setBass (bool value)
 Sets Bass Boost.
 
bool getBass ()
 Gets Bass Boost.
 
void setLedStereoIndicator (bool value=true)
 Sets the system to use a LED to indicate Stereo or Mono.
 
void setMute (bool value)
 Sets Audio mute or unmute.
 
bool isMuted ()
 Gets Audio Mute Status.
 
bool getMute ()
 Gets Audio Mute Status. Same isMuted.
 
bool isAudioOutputHighImpedance ()
 Gets true if the output audio impedance is high.
 
void setAudioOutputHighImpedance (bool value)
 Sets audio output impedance high ow low.
 
void setSoftBlendEnable (bool value)
 Sets Soft Blend.
 
void setVolume (uint8_t value)
 Sets the audio volume level.
 
uint8_t getVolume ()
 Gets the current audio volume level.
 
void setVolumeUp ()
 Increments the audio volume.
 
void setVolumeDown ()
 Decrements the audio volume.
 
void setFmDeemphasis (uint8_t de)
 Sets De-emphasis.
 
void setRDS (bool value)
 Sets the RDS operation.
 
void setRBDS (bool value)
 Sets the RBDS operation.
 
void setRdsFifo (bool value)
 Sets RDS fifo mode enable.
 
void clearRdsFifo (bool value=1)
 Clear RDS fifo.
 
void clearRdsBuffer ()
 Clear RDS Information (Station Name, Station Information, Program Information and Time)
 
bool getRdsReady ()
 Returns true if RDS Ready.
 
bool getRdsAllData (char **stationName, char **stationInformation, char **programInformation, char **utcTime)
 Gets Station Name, Station Information, Program Information and utcTime.
 
uint8_t getRdsFlagAB (void)
 Returns the current Text Flag A/B.
 
bool isNewRdsFlagAB (void)
 Returns true if the Text Flag A/B has changed.
 
uint8_t getRdsVersionCode (void)
 Gets the version code (extracted from the Block B)
 
uint16_t getRdsGroupType ()
 Return the group type.
 
uint8_t getRdsProgramType (void)
 Returns the Program Type (extracted from the Block B)
 
uint8_t getRdsTrafficProgramCode (void)
 Returns the Traffic Alerts given by the station.
 
void getNext2Block (char *c)
 Process data received from group 2B.
 
void getNext4Block (char *c)
 Process data received from group 2A.
 
char * getRdsText0A (void)
 Gets the station name and other messages.
 
char * getRdsStationName (void)
 Gets the Station Name.
 
char * getRdsText2A (void)
 Gets the Program Information.
 
char * getRdsProgramInformation (void)
 Gets the Program Information (RT - Radio Text)
 
char * getRdsText2B (void)
 Gets the Station Information.

 
char * getRdsStationInformation (void)
 Gets the Station Information.
 
char * getRdsTime ()
 Gets the RDS UTC time and date when the Group type is 4.
 
char * getRdsLocalTime ()
 Gets the RDS time converted to local time.
 
uint8_t getBlockId ()
 Gets the current Block ID.
 
uint8_t getErrorBlockA ()
 Gets the current Status of block A.
 
uint8_t getErrorBlockB ()
 Gets the current Status of block B.
 
bool hasRdsInfo ()
 Returns true when the RDS system has valid information.
 
bool hasRdsInfoAB ()
 Returns true when the RDS system has valid information.
 
bool getRdsSync ()
 Gets the Rds Sync.
 
void setI2SOn (bool value)
 Enables I2S setup.
 
void setI2SAllParameters (uint8_t R_DELY, uint8_t L_DELY, uint8_t SCLK_O_EDGE, uint8_t SW_O_EDGE, uint8_t I2S_SW_CNT, uint8_t WS_I_EDGE, uint8_t DATA_SIGNED, uint8_t SCLK_I_EDGE, uint8_t WS_LR, uint8_t SLAVE_MASTER, uint8_t OPEN_MODE)
 Configures all parameters for I2S.
 
void setI2SMaster (bool value)
 
void setI2SSpeed (uint8_t value)
 Sets the speed in kbps. You can use the predefined constantes: I2S_WS_STEP_48, I2S_WS_STEP_44_1, I2S_WS_STEP_32,.
 
void setI2SDataSigned (bool value)
 If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
 
void convertToChar (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)
 Converts a number to a char array.
 
char * formatFrequency (uint16_t value, char *strValue, char decimalSeparator)
 Convert a numeric frequency to a formated string (char *) frequency.
 
char * formatCurrentFrequency (char decimalSeparator=',')
 Convert the current frequency to a formated string (char *) frequency.
 
int checkI2C (uint8_t *addressArray)
 Check the I2C bus address.
 

Protected Attributes

uint16_t shadowStatusRegisters [6]
 shadow status registers
 
uint16_t shadowRegisters [9]
 shadow configuration registers
 
rda_reg00reg00 = (rda_reg00 *)&shadowRegisters[0]
 
rda_reg01reg01 = (rda_reg01 *)&shadowRegisters[1]
 
rda_reg02reg02 = (rda_reg02 *)&shadowRegisters[2]
 
rda_reg03reg03 = (rda_reg03 *)&shadowRegisters[3]
 
rda_reg04reg04 = (rda_reg04 *)&shadowRegisters[4]
 
rda_reg05reg05 = (rda_reg05 *)&shadowRegisters[5]
 
rda_reg06reg06 = (rda_reg06 *)&shadowRegisters[6]
 
rda_reg07reg07 = (rda_reg07 *)&shadowRegisters[7]
 
rda_reg08reg08 = (rda_reg08 *)&shadowRegisters[8]
 
rda_reg0areg0a = (rda_reg0a *)&shadowStatusRegisters[0]
 
rda_reg0breg0b = (rda_reg0b *)&shadowStatusRegisters[1]
 
rda_reg0creg0c = (rda_reg0c *)&shadowStatusRegisters[2]
 
rda_reg0dreg0d = (rda_reg0d *)&shadowStatusRegisters[3]
 
rda_reg0ereg0e = (rda_reg0e *)&shadowStatusRegisters[4]
 
rda_reg0freg0f = (rda_reg0f *)&shadowStatusRegisters[5]
 
uint16_t startBand [4] = {8700, 7600, 7600, 6500}
 
uint16_t endBand [4] = {10800, 9100, 10800, 7600}
 End FM band limit.
 
uint16_t fmSpace [4] = {10, 20, 5, 1}
 
char rds_buffer2A [65]
 RT - RDS Radio Text buffer - Program Information.
 
char rds_buffer2B [33]
 RDS Radio Text buffer - Station Information.
 
char rds_buffer0A [9]
 PS - RDS Basic tuning and switching information (Type 0 groups) - Station Name.
 
char rds_time [25]
 CT - RDS date time received information - UTC Time.
 
uint8_t oldTextABFlag
 Saves the latest value of the textABFlag. Useful to check chanhes.
 
char strFrequency [8]
 
int deviceAddressDirectAccess = I2C_ADDR_DIRECT_ACCESS
 
int deviceAddressFullAccess = I2C_ADDR_FULL_ACCESS
 
int resetPin
 
uint16_t currentFrequency
 
uint8_t currentFMBand = 0
 
uint8_t currentFMSpace = 0
 
uint8_t currentVolume = 0
 
int gpio1Control = -1
 Can be used to add control to the system via GPIO1 pin.
 
int gpio2Control = -1
 Can be used to add control to the system via GPIO2 pin.
 
int gpio3Control = -1
 Can be used to add control to the system via GPIO3 pin.
 
uint8_t clockFrequency = CLOCK_32K
 
uint8_t oscillatorType = OSCILLATOR_TYPE_PASSIVE
 
uint8_t rlckNoCalibrate = RLCK_NO_CALIBRATE_MODE_OFF
 Default is 0.
 
uint16_t maxDelayAftarCrystalOn = MAX_DELAY_AFTER_OSCILLATOR
 

Member Data Documentation

◆ clockFrequency

uint8_t RDA5807::clockFrequency = CLOCK_32K
protected

◆ currentFMBand

uint8_t RDA5807::currentFMBand = 0
protected

◆ currentFMSpace

uint8_t RDA5807::currentFMSpace = 0
protected

◆ currentFrequency

uint16_t RDA5807::currentFrequency
protected

◆ currentVolume

uint8_t RDA5807::currentVolume = 0
protected

◆ deviceAddressDirectAccess

int RDA5807::deviceAddressDirectAccess = I2C_ADDR_DIRECT_ACCESS
protected

Referenced by setI2CBusAddrs().

◆ deviceAddressFullAccess

int RDA5807::deviceAddressFullAccess = I2C_ADDR_FULL_ACCESS
protected

Referenced by setI2CBusAddrs().

◆ endBand

uint16_t RDA5807::endBand[4] = {10800, 9100, 10800, 7600}
protected

End FM band limit.

◆ fmSpace

uint16_t RDA5807::fmSpace[4] = {10, 20, 5, 1}
protected

◆ gpio1Control

int RDA5807::gpio1Control = -1
protected

Can be used to add control to the system via GPIO1 pin.

◆ gpio2Control

int RDA5807::gpio2Control = -1
protected

Can be used to add control to the system via GPIO2 pin.

◆ gpio3Control

int RDA5807::gpio3Control = -1
protected

Can be used to add control to the system via GPIO3 pin.

◆ maxDelayAftarCrystalOn

uint16_t RDA5807::maxDelayAftarCrystalOn = MAX_DELAY_AFTER_OSCILLATOR
protected

◆ oldTextABFlag

uint8_t RDA5807::oldTextABFlag
protected

Saves the latest value of the textABFlag. Useful to check chanhes.

◆ oscillatorType

uint8_t RDA5807::oscillatorType = OSCILLATOR_TYPE_PASSIVE
protected

◆ rds_buffer0A

char RDA5807::rds_buffer0A[9]
protected

PS - RDS Basic tuning and switching information (Type 0 groups) - Station Name.

Referenced by clearRdsBuffer(), getRdsText0A(), and isNewRdsFlagAB().

◆ rds_buffer2A

char RDA5807::rds_buffer2A[65]
protected

RT - RDS Radio Text buffer - Program Information.

Referenced by clearRdsBuffer(), and getRdsText2A().

◆ rds_buffer2B

char RDA5807::rds_buffer2B[33]
protected

RDS Radio Text buffer - Station Information.

Referenced by clearRdsBuffer(), and getRdsText2B().

◆ rds_time

char RDA5807::rds_time[25]
protected

CT - RDS date time received information - UTC Time.

Referenced by clearRdsBuffer(), getRdsLocalTime(), and getRdsTime().

◆ reg00

rda_reg00* RDA5807::reg00 = (rda_reg00 *)&shadowRegisters[0]
protected

◆ reg01

rda_reg01* RDA5807::reg01 = (rda_reg01 *)&shadowRegisters[1]
protected

◆ reg02

rda_reg02* RDA5807::reg02 = (rda_reg02 *)&shadowRegisters[2]
protected

◆ reg03

rda_reg03* RDA5807::reg03 = (rda_reg03 *)&shadowRegisters[3]
protected

◆ reg04

rda_reg04* RDA5807::reg04 = (rda_reg04 *)&shadowRegisters[4]
protected

◆ reg05

rda_reg05* RDA5807::reg05 = (rda_reg05 *)&shadowRegisters[5]
protected

◆ reg06

rda_reg06* RDA5807::reg06 = (rda_reg06 *)&shadowRegisters[6]
protected

◆ reg07

rda_reg07* RDA5807::reg07 = (rda_reg07 *)&shadowRegisters[7]
protected

◆ reg08

rda_reg08* RDA5807::reg08 = (rda_reg08 *)&shadowRegisters[8]
protected

◆ reg0a

rda_reg0a* RDA5807::reg0a = (rda_reg0a *)&shadowStatusRegisters[0]
protected

◆ reg0b

rda_reg0b* RDA5807::reg0b = (rda_reg0b *)&shadowStatusRegisters[1]
protected

◆ reg0c

rda_reg0c* RDA5807::reg0c = (rda_reg0c *)&shadowStatusRegisters[2]
protected

◆ reg0d

rda_reg0d* RDA5807::reg0d = (rda_reg0d *)&shadowStatusRegisters[3]
protected

◆ reg0e

rda_reg0e* RDA5807::reg0e = (rda_reg0e *)&shadowStatusRegisters[4]
protected

◆ reg0f

rda_reg0f* RDA5807::reg0f = (rda_reg0f *)&shadowStatusRegisters[5]
protected

◆ resetPin

int RDA5807::resetPin
protected

◆ rlckNoCalibrate

uint8_t RDA5807::rlckNoCalibrate = RLCK_NO_CALIBRATE_MODE_OFF
protected

Default is 0.

◆ shadowRegisters

uint16_t RDA5807::shadowRegisters[9]
protected

shadow configuration registers

◆ shadowStatusRegisters

uint16_t RDA5807::shadowStatusRegisters[6]
protected

shadow status registers

◆ startBand

uint16_t RDA5807::startBand[4] = {8700, 7600, 7600, 6500}
protected

◆ strFrequency

char RDA5807::strFrequency[8]
protected

Referenced by formatCurrentFrequency().

◆ rda_reg00.refined

struct rda_reg00.refined
Class Members
uint8_t HIGH_CHIP_ID: 8
uint8_t LOW_CHIP_ID: 8 Chip ifdef.

◆ rda_reg01.refined

struct rda_reg01.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rda_reg02.refined

struct rda_reg02.refined
Class Members
uint8_t BASS: 1 Bass Boost; 0 = Disabled; 1 = Bass boost enabled.
uint8_t CLK_MODE: 3 See table above.
uint8_t DHIZ: 1 Audio Output High-Z Disable; 0 = High impedance; 1 = Normal operation.
uint8_t DMUTE: 1 Mute Disable; 0 = Mute; 1 = Normal operation.
uint8_t ENABLE: 1 Power Up Enable; 0 = Disabled; 1 = Enabled.
uint8_t MONO: 1 Mono Select; 0 = Stereo; 1 = Force mono.
uint8_t NEW_METHOD: 1 New Demodulate Method Enable, can improve 0 the receive sensitivity about 1dB.
uint8_t NON_CALIBRATE: 1 0=RCLK clock is always supply; 1=RCLK clock is not always supply when FM work
uint8_t RCLK_DIRECT_IN: 1 RCLK clock use the directly input mode. 1 = enable.
uint8_t RDS_EN: 1 RDS/RBDS enable; If 1, rds/rbds enable.
uint8_t SEEK: 1 Seek; 0 = Disable stop seek; 1 = Enable;.
uint8_t SEEKUP: 1 Seek Up; 0 = Seek down; 1 = Seek up.
uint8_t SKMODE: 1 Seek Mode; 0 = wrap at the upper or lower band limit and continue seeking; 1 = stop seeking at the upper or lower band limit.
uint8_t SOFT_RESET: 1 Soft reset; If 0, not reset; If 1, reset.

◆ rda_reg03.refined

struct rda_reg03.refined
Class Members
uint16_t BAND: 2 Seet band table above.
uint16_t CHAN: 10 Channel Select.
uint16_t DIRECT_MODE: 1 Directly Control Mode, Only used when test.
uint16_t SPACE: 2 See Channel space table above.
uint16_t TUNE: 1 Tune; 0 = Disable; 1 = Enable.

◆ rda_reg04.refined

struct rda_reg04.refined
Class Members
uint8_t AFCD: 1 AFC disable; If 0, afc work; If 1, afc disabled.
uint8_t DE: 1 De-emphasis; 0 = 75 μs; 1 = 50 μs.
uint8_t GPIO1: 2 General Purpose I/O 1. when gpio_sel=01; 00 = High impedance; 01 = Reserved; 10 = Low; 11 = High.
uint8_t GPIO2: 2 General Purpose I/O 2. when gpio_sel=01; 00 = High impedance; 01 = Reserved; 10 = Low; 11 = High.
uint8_t GPIO3: 2 General Purpose I/O 1. when gpio_sel=01; 00 = High impedance; 01 = Mono/Stereo indicator (ST); 10 = Low; 11 = High.
uint8_t I2S_ENABLE: 1 I2S enable; 0 = disabled; 1 = enabled.
uint8_t RBDS: 1 1 = RBDS mode enable; 0 = RDS mode only
uint8_t RDS_FIFO_CLR: 1 1 = clear RDS fifo
uint8_t RDS_FIFO_EN: 1 1 = RDS fifo mode enable.
uint8_t RSVD1: 1
uint8_t RSVD2: 1
uint8_t SOFTMUTE_EN: 1 If 1, softmute enable.
uint8_t STCIEN: 1 Seek/Tune Complete Interrupt Enable; 0 = Disable Interrupt; 1 = Enable Interrupt;.

◆ rda_reg05.refined

struct rda_reg05.refined
Class Members
uint8_t INT_MODE: 1 If 0, generate 5ms interrupt; If 1, interrupt last until read reg0CH action occurs.
uint8_t LNA_ICSEL_BIT: 2 Lna working current bit: 00=1.8mA; 01=2.1mA; 10=2.5mA; 11=3.0mA.
uint8_t LNA_PORT_SEL: 2 LNA input port selection bit: 00: no input; 01: LNAN; 10: LNAP; 11: dual port input.
uint8_t RSVD2: 1
uint8_t SEEK_MODE: 2 Default value is 00; When = 10, will add the RSSI seek mode.
uint8_t SEEKTH: 4 Seek SNR Threshold value.
uint8_t VOLUME: 4 DAC Gain Control Bits (Volume); 0000 = min volume; 1111 = max volume.

◆ rda_reg06.refined

struct rda_reg06.refined
Class Members
uint8_t DATA_SIGNED: 1 If 0, I2S output unsigned 16-bit audio data. If 1, I2S output signed 16-bit audio data.
uint8_t I2S_SW_CNT: 4 Only valid in master mode. See table above.
uint8_t L_DELY: 1 If 1, L channel data delay 1T.
uint8_t OPEN_MODE: 2 Open reserved register mode; 11=open behind registers writing function others: only open behind registers reading function.
uint8_t R_DELY: 1 If 1, R channel data delay 1T.
uint8_t RSVD: 1
uint8_t SCLK_I_EDGE: 1 If 0, use normal sclk internally;If 1, inverte sclk internally.
uint8_t SCLK_O_EDGE: 1 If 1, invert sclk output when as master.
uint8_t SLAVE_MASTER: 1 I2S slave or master; 1 = slave; 0 = master.
uint8_t SW_O_EDGE: 1 If 1, invert ws output when as master.
uint8_t WS_I_EDGE: 1 If 0, use normal ws internally; If 1, inverte ws internally.
uint8_t WS_LR: 1 Ws relation to l/r channel; If 0, ws=0 ->r, ws=1 ->l; If 1, ws=0 ->l, ws=1 ->r.

◆ rda_reg07.refined

struct rda_reg07.refined
Class Members
uint8_t FREQ_MODE: 1 If 1, then freq setting changed. Freq = 76000(or 87000) kHz + freq_direct (08H) kHz.
uint8_t MODE_50_60: 1 1 = 65~76 MHz; 0 = 50~76MHz
uint8_t RSVD1: 1
uint8_t RSVD2: 1
uint8_t SEEK_TH_OLD: 6 Seek threshold for old seek mode, Valid when Seek_Mode=001.
uint8_t SOFTBLEND_EN: 1 If 1, Softblend enable.
uint8_t TH_SOFRBLEND: 5 Threshold for noise soft blend setting, unit 2dB (default 0b10000).

◆ rda_reg08.refined

struct rda_reg08.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rda_reg0a.refined

struct rda_reg0a.refined
Class Members
uint16_t BLK_E: 1 When RDS enable: 1 = Block E has been found; 0 = no Block E has been found.
uint16_t RDSR: 1 RDS ready; 0 = No RDS/RBDS group ready(default); 1 = New RDS/RBDS group ready.
uint16_t RDSS: 1 RDS Synchronization; 0 = RDS decoder not synchronized(default); 1 = RDS decoder synchronized; Available only in RDS Verbose mode.
uint16_t READCHAN: 10 See Channel table . See table above.
uint16_t SF: 1 Seek Fail. 0 = Seek successful; 1 = Seek failure;.
uint16_t ST: 1 Stereo Indicator; 0 = Mono; 1 = Stereo.
uint16_t STC: 1 Seek/Tune Complete. 0 = Not complete; 1 = Complete;.

◆ rda_reg0b.refined

struct rda_reg0b.refined
Class Members
uint8_t ABCD_E: 1 1 = the block id of register 0cH,0dH,0eH,0fH is E; 0 = the block id of register 0cH, 0dH, 0eH,0fH is A, B, C, D
uint8_t BLERA: 2 Block Errors Level of RDS_DATA_0.
uint8_t BLERB: 2 Block Errors Level of RDS_DATA_1.
uint8_t FM_READY: 1 1=ready; 0=not ready.
uint8_t FM_TRUE: 1 1 = the current channel is a station; 0 = the current channel is not a station.
uint8_t RSSI: 7 RSSI; 000000 = min; 111111 = max; RSSI scale is logarithmic.
uint8_t RSVD1: 2

◆ rda_reg0c.refined

struct rda_reg0c.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rda_reg0d.refined

struct rda_reg0d.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rda_reg0e.refined

struct rda_reg0e.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rda_reg0f.refined

struct rda_reg0f.refined
Class Members
uint8_t highByte
uint8_t lowByte

◆ rds_blockb.group0

struct rds_blockb.group0
Class Members
uint16_t address: 2
uint16_t DI: 1
uint16_t groupType: 4
uint16_t MS: 1
uint16_t programType: 5
uint16_t TA: 1
uint16_t trafficProgramCode: 1
uint16_t versionCode: 1

◆ rds_blockb.group2

struct rds_blockb.group2
Class Members
uint16_t address: 4
uint16_t groupType: 4
uint16_t programType: 5
uint16_t textABFlag: 1
uint16_t trafficProgramCode: 1
uint16_t versionCode: 1

◆ rds_blockb.refined

struct rds_blockb.refined
Class Members
uint16_t content: 4
uint16_t groupType: 4
uint16_t programType: 5
uint16_t textABFlag: 1
uint16_t trafficProgramCode: 1
uint16_t versionCode: 1

◆ rds_date_time.refined

struct rds_date_time.refined
Class Members
uint32_t hour: 5
uint32_t minute: 6
uint32_t mjd: 17
uint32_t offset: 5
uint32_t offset_sense: 1

◆ word16_to_bytes.refined

struct word16_to_bytes.refined
Class Members
uint8_t highByte
uint8_t lowByte