aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nullbitsco/scramble/v1/v1.c
blob: 3a85dce192ddfd5f66bb34548bec589de8fce17f (plain) (blame)
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
// Copyright 2022 Jay Greco
// SPDX-License-Identifier: GPL-2.0-or-later

#include "v1.h"

void set_scramble_LED(uint8_t mode) {
    switch(mode) {
        case LED_ON:
            gpio_set_pin_output(PIN_LED);
            gpio_write_pin(PIN_LED, GPIO_STATE_HIGH);
        break;

        case LED_DIM:
            gpio_set_pin_input(PIN_LED);
        break;

        case LED_OFF:
            gpio_set_pin_output(PIN_LED);
            gpio_write_pin(PIN_LED, GPIO_STATE_LOW);
        break;

        default:
        break;
    }
}