2 Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "backlight.h"
21 void backlight_init_ports()
23 DDRB |= 0b11100000; // PB7 (switch), PB6 (pcb), PB5 (caps)
26 void backlight_set(uint8_t level)
28 (level & BACKLIGHT_SWITCH) ? backlight_switch_enable() : backlight_switch_disable();
29 (level & BACKLIGHT_PCB) ? backlight_pcb_enable() : backlight_pcb_disable();
32 void backlight_switch_enable()
37 void backlight_switch_disable()
42 void backlight_switch_invert()
47 void backlight_pcb_enable()
52 void backlight_pcb_disable()
57 void backlight_pcb_invert()
62 void backlight_caps_enable()
67 void backlight_caps_disable()
72 void backlight_caps_invert()