master
Jack Humbert 2015-02-23 23:44:11 -05:00
parent 64dc4784e4
commit a538f71e41
4 changed files with 10 additions and 27 deletions

View File

@ -22,13 +22,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void led_set(uint8_t usb_led) 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);
}
} }

View File

@ -56,12 +56,6 @@ uint8_t matrix_cols(void)
return MATRIX_COLS; return MATRIX_COLS;
} }
static
void setup_leds(void) {
DDRF |= 0x00;
PORTF |= 0x00;
}
void matrix_init(void) void matrix_init(void)
{ {
@ -69,8 +63,6 @@ void matrix_init(void)
unselect_rows(); unselect_rows();
init_cols(); init_cols();
setup_leds();
// initialize matrix state: all keys off // initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) { for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0; matrix[i] = 0;

View File

@ -78,7 +78,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
keyevent_t event = record->event; keyevent_t event = record->event;
switch (id) { switch (id) {
case M_Q0: case M_Q0:

View File

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