Support backlight for GH60 revB
Cette révision appartient à :
Parent
ffaff2845a
révision
e35fdfc5c7
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Référencer dans un nouveau ticket
Block a user