mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-03-06 11:38:28 +00:00
parent
3d175f2340
commit
8ca457fc25
21
keyboards/crkbd/.vscode/c_cpp_properties.json
vendored
21
keyboards/crkbd/.vscode/c_cpp_properties.json
vendored
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Win32",
|
|
||||||
"includePath": [
|
|
||||||
"${workspaceFolder}/**"
|
|
||||||
],
|
|
||||||
"defines": [
|
|
||||||
"_DEBUG",
|
|
||||||
"UNICODE",
|
|
||||||
"_UNICODE"
|
|
||||||
],
|
|
||||||
"windowsSdkVersion": "10.0.16299.0",
|
|
||||||
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe",
|
|
||||||
"cStandard": "c11",
|
|
||||||
"cppStandard": "c++17",
|
|
||||||
"intelliSenseMode": "msvc-x64"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": 4
|
|
||||||
}
|
|
@ -1,7 +1 @@
|
|||||||
#include "crkbd.h"
|
#include "crkbd.h"
|
||||||
#include "ssd1306.h"
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
process_record_gfx(keycode,record);
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
@ -24,17 +24,12 @@ static const unsigned char font[] PROGMEM;
|
|||||||
//static uint16_t last_battery_update;
|
//static uint16_t last_battery_update;
|
||||||
//static uint32_t vbat;
|
//static uint32_t vbat;
|
||||||
//#define BatteryUpdateInterval 10000 /* milliseconds */
|
//#define BatteryUpdateInterval 10000 /* milliseconds */
|
||||||
|
#define ScreenOffInterval 300000 /* milliseconds */
|
||||||
// 'last_flush' is declared as uint16_t,
|
|
||||||
// so this must be less than 65535
|
|
||||||
#define ScreenOffInterval 60000 /* milliseconds */
|
|
||||||
#if DEBUG_TO_SCREEN
|
#if DEBUG_TO_SCREEN
|
||||||
static uint8_t displaying;
|
static uint8_t displaying;
|
||||||
#endif
|
#endif
|
||||||
static uint16_t last_flush;
|
static uint16_t last_flush;
|
||||||
|
|
||||||
static bool force_dirty = true;
|
|
||||||
|
|
||||||
// Write command sequence.
|
// Write command sequence.
|
||||||
// Returns true on success.
|
// Returns true on success.
|
||||||
static inline bool _send_cmd1(uint8_t cmd) {
|
static inline bool _send_cmd1(uint8_t cmd) {
|
||||||
@ -326,19 +321,12 @@ void iota_gfx_task_user(void) {
|
|||||||
void iota_gfx_task(void) {
|
void iota_gfx_task(void) {
|
||||||
iota_gfx_task_user();
|
iota_gfx_task_user();
|
||||||
|
|
||||||
if (display.dirty || force_dirty) {
|
if (display.dirty) {
|
||||||
iota_gfx_flush();
|
iota_gfx_flush();
|
||||||
force_dirty = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timer_elapsed(last_flush) > ScreenOffInterval) {
|
if (timer_elapsed(last_flush) > ScreenOffInterval) {
|
||||||
iota_gfx_off();
|
iota_gfx_off();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_gfx(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
force_dirty = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "pincontrol.h"
|
#include "pincontrol.h"
|
||||||
#include "action.h"
|
|
||||||
|
|
||||||
enum ssd1306_cmds {
|
enum ssd1306_cmds {
|
||||||
DisplayOff = 0xAE,
|
DisplayOff = 0xAE,
|
||||||
@ -87,5 +86,3 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data);
|
|||||||
void matrix_write_ln(struct CharacterMatrix *matrix, const char *data);
|
void matrix_write_ln(struct CharacterMatrix *matrix, const char *data);
|
||||||
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
||||||
void matrix_render(struct CharacterMatrix *matrix);
|
void matrix_render(struct CharacterMatrix *matrix);
|
||||||
|
|
||||||
bool process_record_gfx(uint16_t keycode, keyrecord_t *record);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user