1
0

Support backlight for GH60 revB

Cette révision appartient à :
Kai Ryu 2014-01-10 09:17:28 +09:00
Parent ffaff2845a
révision e35fdfc5c7
3 fichiers modifiés avec 22 ajouts et 1 suppressions

Voir le fichier

@ -52,5 +52,14 @@ void backlight_set(uint8_t level)
}
}
#else
void backlight_set(uint8_t level) {}
void backlight_set(uint8_t level)
{
if (level > 0) {
DDRF |= (1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
PORTF &= ~(1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
}
else {
DDRF &= ~(1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
}
}
#endif

Voir le fichier

@ -31,6 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 5
#define MATRIX_COLS 14
/* keymap in eeprom */
#define FN_ACTIONS_COUNT 32
#define KEYMAPS_COUNT 8
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@ -38,7 +42,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEBOUNCE 5
/* number of backlight levels */
#ifdef GH60_REV_CHN
#define BACKLIGHT_LEVELS 3
#else
#define BACKLIGHT_LEVELS 1
#endif
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

Voir le fichier

@ -57,6 +57,10 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
// disable JTAG
MCUCR = (1<<JTD);
MCUCR = (1<<JTD);
// initialize row and col
unselect_rows();
init_cols();