void matrix_init(void) { unselect_cols(); init_rows(); for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } }
void matrix_init(void) { unselect_cols(); init_rows(); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } }
void matrix_init(void) { backlight_init_ports(); unselect_cols(); init_rows(); for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } matrix_init_quantum(); }
/** * @brief Reports row of key that was pressed * @retval Int of row activated */ uint8_t get_row(void) { // Initialize pins to allow for rows as input init_rows(); // Row selection determined by active low if(!HAL_GPIO_ReadPin(GPIOD, row_pinmap[3])) return 3; else if(!HAL_GPIO_ReadPin(GPIOD, row_pinmap[2])) return 2; else if(!HAL_GPIO_ReadPin(GPIOD, row_pinmap[1])) return 0; else if(!HAL_GPIO_ReadPin(GPIOD, row_pinmap[0])) return 1; else return 9; }
void matrix_init(void) { // disable JTAG MCUCR = _BV(JTD); MCUCR = _BV(JTD); // initialize row and col init_rows(); init_cols(); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } }
void matrix_init(void) { // initialize row and col #if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); #elif (DIODE_DIRECTION == ROW2COL) unselect_cols(); init_rows(); #endif // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } matrix_init_quantum(); }
void matrix_init(void) { // To use PORTF disable JTAG with writing JTD bit twice within four cycles. //MCUCR |= (1<<JTD); //MCUCR |= (1<<JTD); // initialize row and col unselect_cols(); init_rows(); #ifndef SLEEP_LED_ENABLE setup_leds(); #endif // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } }
void matrix_init(void) { DDRD |= 0b11010000; PORTD &= ~0b01010000; DDRB |= 0b00011111; PORTB &= ~0b00001110; PORTB |= 0b00010001; DDRE |= 0b01000000; PORTE &= ~0b01000000; unselect_cols(); init_rows(); for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } matrix_init_quantum(); }
void matrix_init(void) { #ifdef UART_RGB_ENABLE uart_rgb_init(); #endif // disable JTAG MCUCR = _BV(JTD); MCUCR = _BV(JTD); // 85 REST DDRD |= _BV(PD7); PORTD |= _BV(PD7); // initialize row and col init_rows(); init_cols(); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; matrix_debouncing[i] = 0; } }