From f29443cd40f9050beedab3a822b6e0f24fb789cd Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 4 May 2021 02:22:31 +0200 Subject: optimized the LED and buzzer wiring * since we use timer 3 exclusively for the buzzer but trigger the pin using an IRQ handler, there is no longer any need to occupy a high-resolution pin for the buzzer. * PD5 became a new high resolution LED * PD0 became the new buzzer pin * rearranged the pins used for the different LEDs so that the distribution of high-resolution LEDs is symmetric * Timer 0 is no longer used/modified by setting LEDs. This avoids some workarounds as timer 0 is also used by tmk's timer module. * The song routines could be slightly improved using the timer module. * documented the LED and buzzer pinout in README --- matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'matrix.c') diff --git a/matrix.c b/matrix.c index 5c4ecbd..cbb011d 100644 --- a/matrix.c +++ b/matrix.c @@ -143,7 +143,7 @@ uint8_t matrix_scan(void) case KEYCLICK_BUZZER: if (matrix_debouncing_pressed_keys > matrix_pressed_keys) { - pwm_pb5_set_tone(550); + pwm_pd0_set_tone(550); keyclick_time = timer_read(); } break; @@ -229,7 +229,7 @@ uint8_t matrix_scan(void) case KEYCLICK_BUZZER: if (!(host_keyboard_leds() & (1 << USB_LED_KANA))) - pwm_pb5_set_tone(0); + pwm_pd0_set_tone(0); break; default: -- cgit v1.2.3