Ejemplo n.º 1
0
void matrix_init(void)
{
    debug_enable = true;
    debug_matrix = true;
    debug_mouse = true;
    // initialize row and col
    unselect_rows();
    init_cols();

#ifdef USE_I2C
    i2c_master_init();
#else
    serial_master_init();
#endif

    /* int x = USB_IsInitialized; */
    /* if (x) { */
    /*     DDRD  |= 1<<5; */
    /*     PORTD &= ~(1<<5); */
    /* } else { */

    // use the pro micro TX led as an indicator
    // pull D5 low to turn on
    //DDRD  |= 1<<5;
    //PORTD |= (1<<5);
    /* } */

    // initialize matrix state: all keys off
    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
        matrix[i] = 0;
        matrix_debouncing[i] = 0;
    }

}
Ejemplo n.º 2
0
static void keyboard_master_setup(void) {
#ifdef USE_I2C
    i2c_master_init();
#else
    serial_master_init();
#endif
}
Ejemplo n.º 3
0
static void keyboard_master_setup(void) {
#ifdef USE_I2C
    i2c_master_init();
#ifdef SSD1306OLED
    matrix_master_OLED_init();
#endif
#else
    serial_master_init();
#endif
}
Ejemplo n.º 4
0
static void keyboard_master_setup(void) {
#if defined(USE_I2C) || defined(EH)
  i2c_master_init();
  #ifdef SSD1306OLED
    matrix_master_OLED_init ();
  #endif
#else
  serial_master_init();
#endif

    // For master the Backlight info needs to be sent on startup
    // Otherwise the salve won't start with the proper info until an update
    BACKLIT_DIRTY = true;
}