Sync changes from galp3-c to darp5 and lemp9
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
bool kbscan_enabled = false;
|
||||
|
||||
uint8_t sci_extra = 0;
|
||||
|
||||
void kbscan_init(void) {
|
||||
KSOCTRL = 0x05;
|
||||
KSICTRLR = 0x04;
|
||||
@@ -107,9 +109,27 @@ void kbscan_event(void) {
|
||||
if (new_b) layer = 1;
|
||||
else layer = 0;
|
||||
break;
|
||||
case (KT_SCI_EXTRA):
|
||||
if (new_b) {
|
||||
uint8_t sci = SCI_EXTRA;
|
||||
sci_extra = (uint8_t)(key & 0xFF);
|
||||
if (!pmc_sci(&PMC_1, sci)) {
|
||||
// In the case of ignored SCI, reset bit
|
||||
new &= ~(1 << j);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (KT_SCI):
|
||||
if (new_b) {
|
||||
uint8_t sci = (uint8_t)(key & 0xFF);
|
||||
|
||||
// HACK FOR HARDWARE HOTKEYS
|
||||
switch (sci) {
|
||||
case SCI_CAMERA_TOGGLE:
|
||||
gpio_set(&CCD_EN, !gpio_get(&CCD_EN));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!pmc_sci(&PMC_1, sci)) {
|
||||
// In the case of ignored SCI, reset bit
|
||||
new &= ~(1 << j);
|
||||
|
Reference in New Issue
Block a user