From 710937e4ef1e14d82261fc439aa6fcfcdbd64bf5 Mon Sep 17 00:00:00 2001 From: Kosuke Adachi Date: Sat, 9 Jun 2018 07:28:28 +0900 Subject: Add corne keyboard (#3119) * Fork from helix * Move rev2 to rev1 * Remove unused settings * Move split_util to outof rev * Setup KEYMAP for crkbd * Remove old image * Move keymaps directory and glcdfont.c * Remove AUDIO in keymap * Show keylog * Show keylogs * Show time log * Remove EISU/KANA * Use KEYMAP_kc * Remove iota_gfx_record_user wrapping * Remove unused settings for layer * Add keylogger.c * Fix uppercase letters to lower * Add timelogger.c * Default RGBLED_NUM = 27 * Remove unused setting * Add mode icon reader * Add matrix_write_ln * Add layer_state_reader * Move to lib directory * Rename functions * Add host_led_state_reader * Add logo_reader * Cleaning of iota_gfx_task * Fix bugs and add key defines * Remove unnecessary comments * Update crkbd readme * Move libs to lib directories * Rename KEYMAP to LAYOUT --- keyboards/crkbd/rev1/rev1.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 keyboards/crkbd/rev1/rev1.c (limited to 'keyboards/crkbd/rev1/rev1.c') diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c new file mode 100644 index 000000000..6523feeba --- /dev/null +++ b/keyboards/crkbd/rev1/rev1.c @@ -0,0 +1,32 @@ +#include "crkbd.h" + + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); + #endif + + matrix_init_user(); +}; + +void shutdown_kb(void) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); + #endif +} -- cgit v1.2.3-70-g09d2