diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2017-11-20 23:25:38 -0500 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-11-20 23:37:38 -0500 |
| commit | b669d115c2969a58f0ae00f6ae5c2290dba44c03 (patch) | |
| tree | cb6aaf1606105f1806be8c008e0ae6f3e9e36008 /quantum | |
| parent | 7ff96877d2a67fcfabbe2493e7c2a100f3b923da (diff) | |
| download | qmk_firmware-b669d115c2969a58f0ae00f6ae5c2290dba44c03.tar.gz qmk_firmware-b669d115c2969a58f0ae00f6ae5c2290dba44c03.zip | |
adds planck light keyboard
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/audio/audio.c | 5 | ||||
| -rw-r--r-- | quantum/quantum.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index e08233486..29bad8060 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c | |||
| @@ -184,6 +184,9 @@ void audio_init() | |||
| 184 | #ifdef B5_AUDIO | 184 | #ifdef B5_AUDIO |
| 185 | TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10); | 185 | TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10); |
| 186 | TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10); | 186 | TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10); |
| 187 | |||
| 188 | TIMER_1_PERIOD = (uint16_t)(((float)F_CPU) / (440 * CPU_PRESCALER)); | ||
| 189 | TIMER_1_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (440 * CPU_PRESCALER)) * note_timbre); | ||
| 187 | #endif | 190 | #endif |
| 188 | 191 | ||
| 189 | audio_initialized = true; | 192 | audio_initialized = true; |
| @@ -192,7 +195,7 @@ void audio_init() | |||
| 192 | if (audio_config.enable) { | 195 | if (audio_config.enable) { |
| 193 | PLAY_SONG(startup_song); | 196 | PLAY_SONG(startup_song); |
| 194 | } | 197 | } |
| 195 | 198 | ||
| 196 | } | 199 | } |
| 197 | 200 | ||
| 198 | void stop_all_notes() | 201 | void stop_all_notes() |
diff --git a/quantum/quantum.c b/quantum/quantum.c index 23873852f..099201596 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -1105,8 +1105,6 @@ ISR(TIMER1_COMPA_vect) | |||
| 1105 | 1105 | ||
| 1106 | } | 1106 | } |
| 1107 | 1107 | ||
| 1108 | |||
| 1109 | |||
| 1110 | #endif // breathing | 1108 | #endif // breathing |
| 1111 | 1109 | ||
| 1112 | #else // backlight | 1110 | #else // backlight |
| @@ -1168,6 +1166,7 @@ void send_nibble(uint8_t number) { | |||
| 1168 | __attribute__((weak)) | 1166 | __attribute__((weak)) |
| 1169 | uint16_t hex_to_keycode(uint8_t hex) | 1167 | uint16_t hex_to_keycode(uint8_t hex) |
| 1170 | { | 1168 | { |
| 1169 | hex = hex & 0xF; | ||
| 1171 | if (hex == 0x0) { | 1170 | if (hex == 0x0) { |
| 1172 | return KC_0; | 1171 | return KC_0; |
| 1173 | } else if (hex < 0xA) { | 1172 | } else if (hex < 0xA) { |
