Skip to content

Commit

Permalink
KT0915 Arduino Library
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Lima Caratti committed Jul 11, 2020
1 parent 325bbd9 commit 0b0310e
Show file tree
Hide file tree
Showing 12 changed files with 1,403 additions and 12 deletions.
3 changes: 2 additions & 1 deletion KT0915.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ void KT0915::enable(uint8_t on_off)
{
if (this->enablePin < 0)
return;

pinMode(this->enablePin, OUTPUT);
digitalWrite(this->enablePin, on_off);
delay(10);
}
Expand Down Expand Up @@ -461,7 +463,6 @@ void KT0915::setLeftChannelInverseControl(uint8_t enable_disable)
void KT0915::setup(int enable_pin, uint8_t oscillator_type, uint8_t ref_clock)
{
this->enablePin = enable_pin;
pinMode(this->enablePin, OUTPUT);
enable(1);
setReferenceClockType(oscillator_type, ref_clock);
setVolume(this->currentVolume);
Expand Down
3 changes: 3 additions & 0 deletions KT0915.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ class KT0915 {
void setStep(uint16_t step);
void frequencyUp();
void frequencyDown();
inline void setFrequencyUp() { frequencyUp(); }; // Just an alias
inline void setFrequencyDown() { frequencyDown(); }; // Just an alias

uint32_t getFrequency();

uint16_t getFmCurrentChannel();
Expand Down
4 changes: 2 additions & 2 deletions examples/KT0915_02_OLED/KT0915_02_OLED/KT0915_02_OLED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#define BAND_MODE_SWITCH_DOWN 5 //
#define VOL_UP 6 // Volume Up
#define VOL_DOWN 7 // Volume Down
#define TEST_BUTTON1 8 // Seek Station Up
#define TEST_BUTTON2 9 // Seek Station Down
#define TEST_BUTTON1 8 // Seek Station Up
#define TEST_BUTTON2 9 // Seek Station Down

#define MIN_ELAPSED_TIME 100

Expand Down
199 changes: 199 additions & 0 deletions examples/KT0915_03_TFT_DISPLAY/DSEG7_Classic_Mini_Regular_30.h

Large diffs are not rendered by default.

Loading

0 comments on commit 0b0310e

Please sign in to comment.