summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb/sol3/sol3.c
blob: 97ae5bc5de327d24133e2020d03570a64eaf1e62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <https://github.com/Legonut> wrote this file.  As long as you retain this
 * notice you can do whatever you want with this stuff. If we meet some day, and
 * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
 * ----------------------------------------------------------------------------
 */

#include "sol3.h"
#include "eeconfig.h"
#include "audio.h"
#include <transactions.h>

extern audio_config_t audio_config;

void keyboard_post_init_kb(void) {
    touch_encoder_init();
    transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync);
    transaction_register_rpc(RGB_MENU_SYNC, rgb_menu_slave_sync);
    keyboard_post_init_user();
}

void eeconfig_init_kb(void) {
    // Reset Keyboard EEPROM value to blank, rather than to a set value
    eeconfig_update_kb(0);

    audio_config.raw = eeconfig_read_audio();
    audio_config.clicky_enable = false;
    eeconfig_update_audio(audio_config.raw);

    eeconfig_init_user();
}

void housekeeping_task_kb(void) {
    touch_encoder_update(TOUCH_ENCODER_SYNC);
    rgb_menu_update(RGB_MENU_SYNC);
}