From 06e226e9c89554bbe05698c741115e935699f23d Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 28 Jan 2020 15:07:13 -0700 Subject: [PATCH] Implement hardware camera toggle --- src/board/system76/galp3-c/kbscan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/board/system76/galp3-c/kbscan.c b/src/board/system76/galp3-c/kbscan.c index b064fd2..6df78d4 100644 --- a/src/board/system76/galp3-c/kbscan.c +++ b/src/board/system76/galp3-c/kbscan.c @@ -113,6 +113,14 @@ void kbscan_event(void) { 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);