PU2CLR KT0915 Arduino Library
1.0.1
This is an Arduino Library to control the KT0915 device
|
Functions | |
void | KT0915::setMono (bool on_off) |
Sets the receiver Stereo or Mono. More... | |
bool | KT0915::isFmStereo () |
Return true if the stereo indicator is set to 3;. More... | |
int | KT0915::getFmRssi () |
Gets the current FM RSSI. More... | |
int | KT0915::getAmRssi () |
Gets the current AM RSSI More... | |
int | KT0915::getFmSnr () |
Gets current SNR value. More... | |
void | KT0915::setDeEmphasis (uint8_t value) |
Sets the De-emphasis Time Constant Selection. More... | |
void | KT0915::setFmAfc (bool value) |
Sets FM AFC Disable Control. More... | |
void | KT0915::setAmAfc (bool value) |
Sets AM AFC Disable Control. More... | |
void | KT0915::setAmSpace (uint8_t value) |
Sets the AM Space. More... | |
void | KT0915::setFmSpace (uint8_t value) |
Sets the FM Space. More... | |
void | KT0915::setAmBandwidth (uint8_t value) |
Sets AM Channel Bandwidth Selection. More... | |
uint8_t | KT0915::getAmBandwidth () |
Gets current AM Channel Bandwidth Selection. More... | |
void | KT0915::setFM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step) |
Sets the receiver to FM mode. More... | |
void | KT0915::setAM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step, uint8_t am_space=0) |
Sets the receiver to AM mode. More... | |
void | KT0915::setFrequency (uint32_t frequency) |
Sets the current frequency. More... | |
void | KT0915::frequencyUp () |
Increments the frequency one step. More... | |
void | KT0915::frequencyDown () |
Decrements the frequency one step. More... | |
void | KT0915::setStep (uint16_t step) |
Sets the frequency step. More... | |
uint32_t | KT0915::getFrequency () |
Gets the current frequency. More... | |
uint16_t | KT0915::getFmCurrentChannel () |
Gets the FM Channel Setting. More... | |
uint16_t | KT0915::getAmCurrentChannel () |
Gets the current AM Channel Setting. More... | |
void | KT0915::seekStation () |
Should Seek a station. More... | |
Methods to tune and set the receiver mode
void KT0915::setMono | ( | bool | on_off | ) |
Sets the receiver Stereo or Mono.
Set this parameter to true to force mono or false to stereo
on_off | true = mono; fale = stereo |
Definition at line 508 of file KT0915.cpp.
bool KT0915::isFmStereo | ( | ) |
Return true if the stereo indicator is set to 3;.
Definition at line 521 of file KT0915.cpp.
int KT0915::getFmRssi | ( | ) |
int KT0915::getAmRssi | ( | ) |
int KT0915::getFmSnr | ( | ) |
void KT0915::setDeEmphasis | ( | uint8_t | value | ) |
Sets the De-emphasis Time Constant Selection.
value | 0 = 75us; 1 = 50us |
Definition at line 573 of file KT0915.cpp.
void KT0915::setFmAfc | ( | bool | value | ) |
Sets FM AFC Disable Control.
This function inverts the register enable/disable concept. So, here, 1 means enable and 0 disable.
value | true = enable AFC; false = disable AFC. |
Definition at line 587 of file KT0915.cpp.
void KT0915::setAmAfc | ( | bool | value | ) |
Sets AM AFC Disable Control.
This function inverts the register enable/disable concept. So, here, 1 means enable and 0 disable.
value | true = enable AFC; false = disable AFC. |
Definition at line 602 of file KT0915.cpp.
void KT0915::setAmSpace | ( | uint8_t | value | ) |
Sets the AM Space.
Selects AM channel space
value | space |
---|---|
0 | 1KHz |
1 | 9KHz |
2 | 10KHz |
3 | 10KHz |
value | See table above |
Definition at line 625 of file KT0915.cpp.
void KT0915::setFmSpace | ( | uint8_t | value | ) |
Sets the FM Space.
FM Channel Spacing; 00 = 200KHz; 01 = 100KHz; 10 = 50KHz
Selects FN channel space
value | space KHz |
---|---|
0 | 200 |
1 | 100 |
2 | 50 |
3 | ? |
value | See table above |
Definition at line 649 of file KT0915.cpp.
void KT0915::setAmBandwidth | ( | uint8_t | value | ) |
Sets AM Channel Bandwidth Selection.
Configures the AM Bandwidth
value | Bandwidth |
---|---|
0 | 2KHz |
1 | 2KHz |
2 | 4KHz |
3 | 6KHz |
value | See table above |
Definition at line 672 of file KT0915.cpp.
uint8_t KT0915::getAmBandwidth | ( | ) |
Gets current AM Channel Bandwidth Selection.
value | Bandwidth |
---|---|
0 | 2KHz |
1 | 2KHz |
2 | 4KHz |
3 | 6KHz |
Definition at line 694 of file KT0915.cpp.
void KT0915::setFM | ( | uint32_t | minimum_frequency, |
uint32_t | maximum_frequency, | ||
uint32_t | default_frequency, | ||
uint16_t | step | ||
) |
Sets the receiver to FM mode.
Configures the receiver on FM mode; Also sets the band limits, defaul frequency and step.
minimum_frequency | minimum frequency for the band |
maximum_frequency | maximum frequency for the band |
default_frequency | default freuency |
step | increment and decrement frequency step |
Definition at line 711 of file KT0915.cpp.
void KT0915::setAM | ( | uint32_t | minimum_frequency, |
uint32_t | maximum_frequency, | ||
uint32_t | default_frequency, | ||
uint16_t | step, | ||
uint8_t | am_space = 0 |
||
) |
Sets the receiver to AM mode.
Configures the receiver on AM mode; Also sets the band limits, defaul frequency and step.
minimum_frequency | minimum frequency for the band |
maximum_frequency | maximum frequency for the band |
default_frequency | default freuency |
step | increment and decrement frequency step |
Definition at line 755 of file KT0915.cpp.
void KT0915::setFrequency | ( | uint32_t | frequency | ) |
void KT0915::frequencyUp | ( | ) |
Increments the frequency one step.
if the frequency plus the step value is greater than the maximum frequency for the band,
tne current frequency will be set to minimum frequency.
Definition at line 818 of file KT0915.cpp.
Referenced by KT0915::setFrequencyUp().
void KT0915::frequencyDown | ( | ) |
Decrements the frequency one step.
if the frequency minus the step value is less than the minimum frequency for the band,
tne current frequency will be set to minimum frequency.
Definition at line 835 of file KT0915.cpp.
Referenced by KT0915::setFrequencyDown().
void KT0915::setStep | ( | uint16_t | step | ) |
Sets the frequency step.
Sets increment and decrement frequency
step | Values: 1, 5, 9, 10, 100, 200 in KHz |
Definition at line 850 of file KT0915.cpp.
uint32_t KT0915::getFrequency | ( | ) |
uint16_t KT0915::getFmCurrentChannel | ( | ) |
Gets the FM Channel Setting.
This method returns the current channel value for FM tune.
The channel value multiplied by 50 is the current FM frequency in KHz.
Definition at line 872 of file KT0915.cpp.
uint16_t KT0915::getAmCurrentChannel | ( | ) |
Gets the current AM Channel Setting.
This method returns the current channel value for AM tune
Actually this value is the AM current frequency in KHz
Definition at line 885 of file KT0915.cpp.
void KT0915::seekStation | ( | ) |
Should Seek a station.
However, there no enough information to implement it.
Definition at line 898 of file KT0915.cpp.