PU2CLR AKC695X Arduino Library  1.0.2
This is an Arduino Library to control the AKC695X / M695X DSP radio devices
AKC695X Class Reference

#include <AKC695X.h>

Public Member Functions

void reset ()
 Resets the system. More...
 
void setI2CBusAddress (int deviceAddress)
 Sets the I2C bus device address. More...
 
void setup (int reset_pin)
 Receiver startup. More...
 
void setup (int reset_pin, uint8_t crystal_type)
 Receiver startup. More...
 
void powerOn (uint8_t fm_en, uint8_t tune, uint8_t mute, uint8_t seek, uint8_t seekup)
 Power the device on. More...
 
void setRegister (uint8_t reg, uint8_t parameter)
 Sets a given register with a given value. More...
 
uint8_t getRegister (uint8_t reg)
 Gets a given register content. More...
 
void setCrystalType (uint8_t crystal)
 Sets the kind of Crystal. More...
 
bool isTuned ()
 Gets the result of tune processing. More...
 
bool isTuningComplete ()
 Gets the Status of seeking or tuning process. More...
 
void setFmEmphasis (uint8_t de)
 Sets de-emphasis. More...
 
void setFmStereoMono (uint8_t value)
 Sets the FM stereo or mono. More...
 
void setFmBandwidth (uint8_t value)
 Sets the FM Bandwidth. More...
 
uint8_t isCurrentModeFM ()
 Gets the current operation mode;. More...
 
uint16_t getCurrentChannel ()
 Gets the current channel. More...
 
uint16_t channelToFrequency ()
 Converts the channel stored in the registers 20 and 21 to frequency. More...
 
uint8_t getAmCurrentSpace ()
 Gets the current AM space. More...
 
uint8_t getAmCarrierNoiseRatio ()
 Gets the current AM carrier to noise ratio. More...
 
bool isFmStereo ()
 Gets the current FM stereo status. More...
 
uint8_t getFmCarrierNoiseRatio ()
 Gets the current FM carrier to noise ratio. More...
 
void setFM (uint8_t akc695x_fm_band, uint16_t minimum_freq, uint16_t maximum_freq, uint16_t default_frequency, uint8_t default_step)
 Sets the AKC695X to FM mode. More...
 
void setAM (uint8_t akc695x_am_band, uint16_t minimum_freq, uint16_t maximum_freq, uint16_t default_frequency, uint8_t default_step)
 Sets the AKC695X to AM mode and selects the band. More...
 
void setCustomBand (uint16_t minimum_frequency, uint16_t maximum_frequency)
 Sets the start and end frequencies for a custom band. More...
 
void setStep (uint8_t step)
 Sets the step that will be used to increment and decrement the current frequency. More...
 
void setFmSeekStep (uint8_t value)
 Sets FM step for seeking. More...
 
void seekStation (uint8_t up_down, void(*showFunc)()=NULL)
 Seeks a FM station. More...
 
void setFrequency (uint16_t frequency)
 Sets the the device to a given frequency. More...
 
uint16_t getFrequency ()
 Returns the current frequency value. More...
 
void frequencyUp ()
 Adds the current step to the current frequency and sets the new frequency. More...
 
void frequencyDown ()
 Subtracts the current step from the current frequency and assign the new frequency. More...
 
void setAudio (uint8_t phase_inv, uint8_t line, uint8_t volume)
 Configures the audio output. More...
 
void setAudio ()
 Configures the audio output with default values. More...
 
void setVolume (uint8_t volume)
 Sets the output audio volume. More...
 
void setVolumeControl (uint8_t type)
 Sets the kind of audio volume control will be used. More...
 
void setVolumeUp ()
 Increments the audio volume. More...
 
void setVolumeDown ()
 Decrements the audio volume. More...
 
int getVolume ()
 
int getRSSI ()
 Gets the current RSSI. More...
 
float getSupplyVoltage ()
 Gets the supply voltage. More...
 
uint8_t getCurrentMode ()
 
void setMode3k (bool on_off)
 Sets the current AM channel spacing. More...
 
void commitTune ()
 Sets the STC bit to high when the tune operation completes. More...
 
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. More...
 

Protected Attributes

int deviceAddress = AKC695X_I2C_ADRESS
 
int resetPin = -1
 
uint8_t volume
 Store the current volume. More...
 
uint16_t currentStep
 Strore the current step. More...
 
uint16_t currentFrequency
 Store the current frequency. More...
 
uint8_t currentMode = 0
 Store the current mode: 1 = FM; 0 = AM. More...
 
uint8_t currentCrystalType = CRYSTAL_32KHz
 Store the crystal type used: 0 = 12MHz; 1 = 32.768kHz. More...
 
uint8_t currentMode3k = 0
 1 = 3K; 0 = AM More...
 
uint8_t currentBand = 0
 
uint16_t currentBandMinimumFrequency
 
uint16_t currentBandMaximumFrequency
 
uint8_t fmCurrentBand = 0
 

Member Function Documentation

◆ getVolume()

int AKC695X::getVolume ( )
inline

◆ getCurrentMode()

uint8_t AKC695X::getCurrentMode ( )
inline

Field Documentation

◆ deviceAddress

int AKC695X::deviceAddress = AKC695X_I2C_ADRESS
protected

Referenced by setI2CBusAddress().

◆ resetPin

int AKC695X::resetPin = -1
protected

Referenced by reset(), and setup().

◆ volume

uint8_t AKC695X::volume
protected

Store the current volume.

◆ currentStep

uint16_t AKC695X::currentStep
protected

Strore the current step.

◆ currentFrequency

uint16_t AKC695X::currentFrequency
protected

Store the current frequency.

◆ currentMode

uint8_t AKC695X::currentMode = 0
protected

Store the current mode: 1 = FM; 0 = AM.

◆ currentCrystalType

uint8_t AKC695X::currentCrystalType = CRYSTAL_32KHz
protected

Store the crystal type used: 0 = 12MHz; 1 = 32.768kHz.

◆ currentMode3k

uint8_t AKC695X::currentMode3k = 0
protected

1 = 3K; 0 = AM

◆ currentBand

uint8_t AKC695X::currentBand = 0
protected

◆ currentBandMinimumFrequency

uint16_t AKC695X::currentBandMinimumFrequency
protected

◆ currentBandMaximumFrequency

uint16_t AKC695X::currentBandMaximumFrequency
protected

◆ fmCurrentBand

uint8_t AKC695X::fmCurrentBand = 0
protected

The documentation for this class was generated from the following files: