Exemple #1
0
void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up
	matrix_init_user();
	uart_init();
	led_init();
}
Exemple #2
0
void matrix_init_kb(void) {
    LED_ON();
    _delay_ms(500);
    LED_OFF();
    
    matrix_init_user();
}
Exemple #3
0
void matrix_init_kb(void)
{
    matrix_init_user();

    // Configure the Layer LED
    // Set up 16 bit PWM: Fast PWM, mode 15, inverted
    TCCR1A = 0b11111110;
    TCCR1B = 0b00011001;
    ICR1 = 0xFFFF;
    // PWM values - 0xFFFF = off, 0x0000 = max
    OCR1C = 0x0000; // B7 - Blue
    OCR1B = 0x0000; // B6 - Green
    OCR1A = 0x0FFF; // B5 - Red
    // Set as output
    DDRB |= 0b11100000;

#ifndef AUDIO_ENABLE
    // If we're not using the audio pin, drive it low
    sbi(DDRC, 6);
    cbi(PORTC, 6);
#endif

#ifdef ISSI_ENABLE
    issi_init();
#endif
#ifdef WATCHDOG_ENABLE
    // This is done after turning the layer LED red, if we're caught in a loop
    // we should get a flashing red light
    wdt_enable(WDTO_500MS);
#endif

}
Exemple #4
0
void matrix_init_kb(void) {
	// Turn status LED on
	DDRE |= (1<<6);
	PORTE |= (1<<6);

	matrix_init_user();
}
Exemple #5
0
void matrix_init_kb(void) {
    // put your keyboard start-up code here
    // runs once when the firmware starts up
    matrix_init_user();

    // JTAG disable for PORT F. write JTD bit twice within four cycles.
    MCUCR |= (1<<JTD);
    MCUCR |= (1<<JTD);
};
Exemple #6
0
void matrix_init_kb(void) {

    #ifdef AUDIO_ENABLE
        _delay_ms(20); // gets rid of tick
        PLAY_SONG(tone_startup);
    #endif

	matrix_init_user();
};
Exemple #7
0
void matrix_init_kb(void) {
  matrix_init_user();

  palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
  palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);

  palClearPad(GPIOB, 8);
  palClearPad(GPIOB, 9);
}
void matrix_init_kb(void) {
	#ifdef BACKLIGHT_ENABLE
    	backlight_init_ports();
	#endif

    // Turn status LED on
    DDRE |= (1<<6);
    PORTE |= (1<<6);

	matrix_init_user();
};
Exemple #9
0
void matrix_init_kb(void) {

    // // green led on
    // DDRD |= (1<<5);
    // PORTD &= ~(1<<5);

    // // orange led on
    // DDRB |= (1<<0);
    // PORTB &= ~(1<<0);

	matrix_init_user();
};
Exemple #10
0
void matrix_init(void)
{
    debug_enable = true;
    //debug_matrix = true;
    //debug_keyboard = true;
    //debug_mouse = false;

    ps2_host_init();

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

    matrix_init_user();
    return;
}
Exemple #11
0
void matrix_init_kb(void)
{
	bootmagic_lite();

	// If the EEPROM has the magic, the data is good.
	// OK to load from EEPROM.
	if (eeprom_is_valid())
	{
		backlight_config_load();

		// TODO: do something to "turn on" keymaps in EEPROM?
	}
	else
	{
		// If the EEPROM has not been saved before, or is out of date,
		// save the default values to the EEPROM. Default values
		// come from construction of the zeal_backlight_config instance.
		backlight_config_save();

		// Clear the LED colors stored in EEPROM
		for ( int row=0; row < MATRIX_ROWS; row++ )
		{
			HSV hsv;
			for ( int column=0; column < MATRIX_COLS; column++ )
			{
				hsv.h = rand() & 0xFF;
				hsv.s = rand() & 0x7F;
				hsv.v = 255;
				backlight_set_key_color( row, column, hsv );
			}
		}

		// This saves "empty" keymaps so it falls back to the keymaps
		// in the firmware (aka. progmem/flash)
		keymap_default_save();

		// Save the magic number last, in case saving was interrupted
		eeprom_set_valid(true);
	}

	// Initialize LED drivers for backlight.
	backlight_init_drivers();
	
	backlight_timer_init();
	backlight_timer_enable();

	matrix_init_user();
}
Exemple #12
0
void matrix_init_kb(void) {

    #ifdef AUDIO_ENABLE
        _delay_ms(20); // gets rid of tick
        PLAY_NOTE_ARRAY(tone_startup, false, 0);
    #endif

    // // green led on
    // DDRD |= (1<<5);
    // PORTD &= ~(1<<5);

    // // orange led on
    // DDRB |= (1<<0);
    // PORTB &= ~(1<<0);

	matrix_init_user();
};
Exemple #13
0
void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

    MCUCR |= (1<<JTD);
    MCUCR |= (1<<JTD);

#ifdef BACKLIGHT_ENABLE
    backlight_init_ports();
#endif

    // Turn status LED on
    DDRE |= (1<<6);
    PORTE |= (1<<6);

	matrix_init_user();
}
Exemple #14
0
void matrix_init_kb(void)
{
    debug_enable=true;
    print("meira matrix_init_kb\n");

#ifdef ISSI_ENABLE
    issi_init();
#endif
    backlight_set(5);
#ifdef WATCHDOG_ENABLE
    // This is done after turning the layer LED red, if we're caught in a loop
    // we should get a flashing red light
    wdt_enable(WDTO_500MS);
#endif

    // put your keyboard start-up code here
    // runs once when the firmware starts up
    matrix_init_user();
}
Exemple #15
0
 void matrix_init_kb(void) {
	  blink_all_leds();
	  matrix_init_user();
}
Exemple #16
0
void matrix_init_kb(void) {
    matrix_init_user();
}
//_____COMMON__________________________________________________________________
// user-defined overridable functions
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
Exemple #18
0
void matrix_init_kb(void) {
  // Keyboard start-up code goes here
  // Runs once when the firmware starts up
  matrix_init_user();
};
Exemple #19
0
void matrix_init_kb(void) {
  ergodox_led_init();
  ergodox_blink_all_leds();
  matrix_init_user();
}
Exemple #20
0
void matrix_init_kb (void) {

  matrix_init_user();
  led_init_ports();

}
Exemple #21
0
void matrix_init_kb(void) {
  i2c_init();
  // call user level keymaps, if any
  matrix_init_user();
}