mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 19:40:29 +08:00
led oops
This commit is contained in:
parent
64dc4784e4
commit
a538f71e41
|
@ -22,13 +22,4 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,12 +56,6 @@ uint8_t matrix_cols(void)
|
|||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
static
|
||||
void setup_leds(void) {
|
||||
DDRF |= 0x00;
|
||||
PORTF |= 0x00;
|
||||
}
|
||||
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
|
@ -69,8 +63,6 @@ void matrix_init(void)
|
|||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
setup_leds();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
|
|
|
@ -22,13 +22,13 @@ 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);
|
||||
}
|
||||
// if (usb_led & (1<<USB_LED_FUNCTION)) {
|
||||
// // Output high.
|
||||
// DDRF |= (1<<0);
|
||||
// PORTF |= (1<<0);
|
||||
// } else {
|
||||
// // Output low.
|
||||
// DDRF &= ~(1<<0);
|
||||
// PORTF &= ~(1<<0);
|
||||
// }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue