1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #include "retro_refit.h"
- __attribute__ ((weak))
- void matrix_init_user(void) {
-
- };
- __attribute__ ((weak))
- void matrix_scan_user(void) {
-
- };
- __attribute__ ((weak))
- void led_set_user(uint8_t usb_led) {
-
- };
- void matrix_init_kb(void) {
-
-
-
- DDRD |= (1<<6);
- PORTD |= (1<<6);
- matrix_init_user();
- };
- void amatrix_scan_kb(void) {
-
-
- matrix_scan_user();
- };
- void led_set_kb(uint8_t usb_led) {
-
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
-
- DDRD |= (1<<0);
- PORTD &= ~(1<<0);
- } else {
-
- DDRD &= ~(1<<0);
- PORTD &= ~(1<<0);
- }
- if (usb_led & (1<<USB_LED_NUM_LOCK)) {
-
- DDRD |= (1<<1);
- PORTD &= ~(1<<1);
- } else {
-
- DDRD &= ~(1<<1);
- PORTD &= ~(1<<1);
- }
- if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
-
- DDRC |= (1<<6);
- PORTC &= ~(1<<6);
- } else {
-
- DDRC &= ~(1<<6);
- PORTC &= ~(1<<6);
- }
- led_set_user(usb_led);
- };
|