My local repo of qmk firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qmk_firmware/drivers/qwiic/rgb7seg.h

61 lines
1.7 KiB

6 years ago
/* Copyright 2017 Jason Williams
* Copyright 2017 Jack Humbert
* Copyright 2018 Yiancar
* Copyright 2019 Clueboard
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LED_MATRIX_H
#define LED_MATRIX_H
6 years ago
#include "is31fl3235a.h"
6 years ago
#ifndef BACKLIGHT_ENABLE
#error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE
#endif
6 years ago
void rgb7seg_task(void);
void rgb7seg_init(void);
6 years ago
// This should not be called from an interrupt
// (eg. from a timer interrupt).
// Call this while idle (in between matrix scans).
// If the buffer is dirty, it will update the driver with the buffer.
6 years ago
void rgb7seg_flush(void);
6 years ago
6 years ago
uint32_t rgb7seg_get_tick(void);
6 years ago
6 years ago
void rgb7seg_off(void);
void rgb7seg_set_index_value(int index, uint8_t value);
void rgb7seg_set_index_value_all(uint8_t value);
6 years ago
6 years ago
void rgb7seg_toggle(void);
void rgb7seg_enable(void);
void rgb7seg_disable(void);
void rgb7seg_increase_val(void);
void rgb7seg_decrease_val(void);
6 years ago
6 years ago
typedef struct rgb7seg_led {
uint8_t driver;
uint8_t r;
uint8_t g;
uint8_t b;
} __attribute__((packed)) rgb7seg_led;
6 years ago
6 years ago
extern const rgb7seg_led g_rgb7seg_leds[IS31FL3235A_COUNT * 8];
6 years ago
#endif