1
0
Fork 0

Initial commit for Planck PCB Rev 1.

- Backlight on PB7 controlled by Timer1 Fast PWM (no interrupts).
- Backlight commands connected temporarily to top left keys.
- Backlight init called from matrix.c, since there's no generic keyboard_init() override function.
This commit is contained in:
Wilba6582 2015-03-17 00:43:37 +11:00
parent 0fcb3b65f8
commit 15b9bce6ba
5 changed files with 127 additions and 35 deletions

View file

@ -22,13 +22,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void led_set(uint8_t usb_led)
{
// if (usb_led & (1<<USB_LED_FUNCTION)) {
// // Output high.
// DDRF |= (1<<0);
// PORTF |= (1<<0);
// } else {
// // Output low.
// DDRF &= ~(1<<0);
// PORTF &= ~(1<<0);
// }
// Using PE6 Caps Lock LED
if (usb_led & (1<<USB_LED_CAPS_LOCK))
{
// Output high.
DDRE |= (1<<6);
PORTE |= (1<<6);
}
else
{
// Output low.
DDRE &= ~(1<<6);
PORTE &= ~(1<<6);
}
}