Arduino Radio Library
0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
|
Library to control the TEA5767 radio chip. More...
#include <TEA5767.h>
Public Member Functions | |
TEA5767 () | |
bool | init () |
initialize library and the chip. More... | |
void | term () |
terminate all radio functions. More... | |
void | setVolume (uint8_t newVolume) |
setVolume is a non-existing function in TEA5767. It will always me MAXVOLUME. More... | |
void | setBassBoost (bool switchOn) |
setBassBoost is a non-existing function in TEA5767. It will never be acivated. More... | |
void | setMono (bool switchOn) |
force mono receiving mode. More... | |
void | setMute (bool switchOn) |
Force mute mode. More... | |
void | setBand (RADIO_BAND newBand) |
Tune to new a band. More... | |
void | setFrequency (RADIO_FREQ newF) |
Change the frequency in the chip. More... | |
RADIO_FREQ | getFrequency (void) |
Retrieve the real frequency from the chip after automatic tuning. More... | |
void | seekUp (bool toNextSender=true) |
Start seek mode upwards. More... | |
void | seekDown (bool toNextSender=true) |
Start seek mode downwards. More... | |
void | checkRDS () |
Check if RDS Data is available and good. More... | |
void | getRadioInfo (RADIO_INFO *info) |
Retrieve some information about the current radio function of the chip. More... | |
void | getAudioInfo (AUDIO_INFO *info) |
Retrieve some information about the current audio function of the chip. More... | |
void | debugScan () |
void | debugStatus () |
Send the current values of all registers to the Serial port. More... | |
void | _readRegisters () |
Load all status registers from to the chip. More... | |
void | _saveRegisters () |
virtual uint8_t | getVolume () |
Retrieve the current output volume in the range 0..15. More... | |
virtual bool | getMute () |
Retrieve the current mute mode setting. More... | |
virtual void | setSoftMute (bool switchOn) |
Control the softmute mode (mute on low signals) of the radio chip. More... | |
virtual bool | getSoftMute () |
Retrieve the current soft mute mode setting. More... | |
virtual bool | getBassBoost () |
Retrieve the current bass boost mode setting. More... | |
virtual RADIO_FREQ | getMinFrequency () |
Get the minimum frequency of the current selected band. More... | |
virtual RADIO_FREQ | getMaxFrequency () |
Get the maximum frequency of the current selected band. More... | |
virtual RADIO_FREQ | getFrequencyStep () |
Get resolution of the current selected band. More... | |
virtual RADIO_BAND | getBand () |
Retrieve the current band setting. More... | |
virtual void | setBandFrequency (RADIO_BAND newBand, RADIO_FREQ newFreq) |
Set Band and Frequency in one call. More... | |
virtual bool | getMono () |
Retrieve the current mono mode setting. More... | |
virtual void | clearRDS () |
Clear RDS data in the attached RDS Receiver by sending 0,0,0,0. More... | |
virtual void | attachReceiveRDS (receiveRDSFunction newFunction) |
Register a RDS processor function. More... | |
virtual void | formatFrequency (char *s, uint8_t length) |
Format the current frequency for display and printing. More... | |
virtual void | debugEnable (bool enable=true) |
Enable sending debug information to the Serial port. More... | |
virtual void | debugRadioInfo () |
Print out all radio information. More... | |
virtual void | debugAudioInfo () |
Print out all audio information. More... | |
Public Attributes | |
const uint8_t | MAXVOLUME = 15 |
max volume level for radio implementations. More... | |
Protected Member Functions | |
void | _printHex4 (uint16_t val) |
Prints a register as 4 character hexadecimal code with leading zeros. More... | |
Protected Attributes | |
bool | _debugEnabled |
Set by debugEnable() and controls debugging functionality. More... | |
uint8_t | _volume |
Last set volume level. More... | |
bool | _bassBoost |
Last set bass Boost effect. More... | |
bool | _mono |
Last set mono effect. More... | |
bool | _mute |
Last set mute effect. More... | |
bool | _softMute |
Last set softMute effect. More... | |
RADIO_BAND | _band |
Last set band. More... | |
RADIO_FREQ | _freq |
Last set frequency. More... | |
RADIO_FREQ | _freqLow |
Lowest frequency of the current selected band. More... | |
RADIO_FREQ | _freqHigh |
Highest frequency of the current selected band. More... | |
RADIO_FREQ | _freqSteps |
Resulution of the tuner. More... | |
receiveRDSFunction | _sendRDS |
Registered RDS Function that is called on new available data. More... | |
Private Member Functions | |
void | _write16 (uint16_t val) |
uint16_t | _read16 (void) |
void | _seek (bool seekUp=true) |
Seeks out the next available station. More... | |
void | _waitEnd () |
wait until the current seek and tune operation is over. More... | |
Private Attributes | |
uint8_t | registers [5] |
registers for controlling the radio chip. More... | |
uint8_t | status [5] |
registers with the current status of the radio chip. More... | |
Library to control the TEA5767 radio chip.
TEA5767::TEA5767 | ( | ) |
|
protectedinherited |
Prints a register as 4 character hexadecimal code with leading zeros.
|
private |
void TEA5767::_readRegisters | ( | ) |
Load all status registers from to the chip.
void TEA5767::_saveRegisters | ( | ) |
|
private |
Seeks out the next available station.
|
private |
wait until the current seek and tune operation is over.
|
private |
|
virtualinherited |
Register a RDS processor function.
|
virtual |
Check if RDS Data is available and good.
In the general radio implementation there is no chip for RDS. This function needs to be implemented for radio chips with RDS receiving functionality.
Reimplemented from RADIO.
|
virtualinherited |
Clear RDS data in the attached RDS Receiver by sending 0,0,0,0.
Send a 0.0.0.0 to the RDS receiver if there is any attached. This is to point out that there is a new situation and all existing data should be invalid from now on.
|
virtualinherited |
Print out all audio information.
|
virtualinherited |
Enable sending debug information to the Serial port.
|
virtualinherited |
Print out all radio information.
void TEA5767::debugScan | ( | ) |
|
virtual |
Send the current values of all registers to the Serial port.
Reimplemented from RADIO.
|
virtualinherited |
Format the current frequency for display and printing.
|
virtual |
Retrieve some information about the current audio function of the chip.
Return current settings as far as no chip is required. When using the radio::setXXX methods, no chip specific implementation is needed.
Reimplemented from RADIO.
|
virtualinherited |
Retrieve the current band setting.
|
virtualinherited |
Retrieve the current bass boost mode setting.
Retrieve the current bass boost mode setting. The base implementation returns only the value in the internal variable.
|
virtual |
Retrieve the real frequency from the chip after automatic tuning.
Reimplemented from RADIO.
|
virtualinherited |
Get resolution of the current selected band.
|
virtualinherited |
Get the maximum frequency of the current selected band.
|
virtualinherited |
Get the minimum frequency of the current selected band.
|
virtualinherited |
Retrieve the current mono mode setting.
The base implementation returns only the value in the internal variable.
|
virtualinherited |
Retrieve the current mute mode setting.
The base implementation returns only the value in the internal variable.
|
virtual |
Retrieve some information about the current radio function of the chip.
Return all the Radio settings. This implementation only knows some values from the last settings.
Reimplemented from RADIO.
|
virtualinherited |
Retrieve the current soft mute mode setting.
The base implementation returns only the value in the internal variable.
|
virtualinherited |
Retrieve the current output volume in the range 0..15.
|
virtual |
|
virtual |
Start seek mode downwards.
Reimplemented from RADIO.
|
virtual |
Start seek mode upwards.
Reimplemented from RADIO.
|
virtual |
Tune to new a band.
Reimplemented from RADIO.
|
virtualinherited |
Set Band and Frequency in one call.
|
virtual |
|
virtual |
|
virtual |
force mono receiving mode.
Reimplemented from RADIO.
|
virtual |
Force mute mode.
Reimplemented from RADIO.
|
virtualinherited |
|
virtual |
|
virtual |
|
protectedinherited |
Last set band.
|
protectedinherited |
Last set bass Boost effect.
|
protectedinherited |
Set by debugEnable() and controls debugging functionality.
|
protectedinherited |
Last set frequency.
|
protectedinherited |
Highest frequency of the current selected band.
|
protectedinherited |
Lowest frequency of the current selected band.
|
protectedinherited |
Resulution of the tuner.
|
protectedinherited |
Last set mono effect.
|
protectedinherited |
Last set mute effect.
|
protectedinherited |
Registered RDS Function that is called on new available data.
|
protectedinherited |
Last set softMute effect.
|
protectedinherited |
Last set volume level.
const uint8_t TEA5767::MAXVOLUME = 15 |
max volume level for radio implementations.
|
private |
registers for controlling the radio chip.
|
private |
registers with the current status of the radio chip.