mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-04-04 12:55:44 +00:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
commit
35fd36b68a
@ -3,14 +3,25 @@
|
||||
"manufacturer": "kpagratis",
|
||||
"url": "",
|
||||
"maintainer": "kpagratis",
|
||||
"bootloader": "caterina",
|
||||
"processor": "atmega32u4",
|
||||
"development_board": "promicro",
|
||||
"usb": {
|
||||
"vid": "0xFEED",
|
||||
"pid": "0x0016",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": true,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"audio": false,
|
||||
"backlight": false,
|
||||
"rgblight": false
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"soft_serial_pin": "D0"
|
||||
},
|
||||
"matrix_pins": {
|
||||
@ -21,80 +32,89 @@
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 0, "y": 0, "matrix": [0, 0]},
|
||||
{"x": 1, "y": 0, "matrix": [0, 1]},
|
||||
{"x": 2, "y": 0, "matrix": [0, 2]},
|
||||
{"x": 3, "y": 0, "matrix": [0, 3]},
|
||||
{"x": 4, "y": 0, "matrix": [0, 4]},
|
||||
{"x": 5, "y": 0, "matrix": [0, 5]},
|
||||
{"x": 14, "y": 0, "matrix": [6, 0]},
|
||||
{"x": 15, "y": 0, "matrix": [6, 1]},
|
||||
{"x": 16, "y": 0, "matrix": [6, 2]},
|
||||
{"x": 17, "y": 0, "matrix": [6, 3]},
|
||||
{"x": 18, "y": 0, "matrix": [6, 4]},
|
||||
{"x": 19, "y": 0, "matrix": [6, 5]},
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
|
||||
{"x": 0, "y": 1, "matrix": [1, 0]},
|
||||
{"x": 1, "y": 1, "matrix": [1, 1]},
|
||||
{"x": 2, "y": 1, "matrix": [1, 2]},
|
||||
{"x": 3, "y": 1, "matrix": [1, 3]},
|
||||
{"x": 4, "y": 1, "matrix": [1, 4]},
|
||||
{"x": 5, "y": 1, "matrix": [1, 5]},
|
||||
{"x": 14, "y": 1, "matrix": [7, 0]},
|
||||
{"x": 15, "y": 1, "matrix": [7, 1]},
|
||||
{"x": 16, "y": 1, "matrix": [7, 2]},
|
||||
{"x": 17, "y": 1, "matrix": [7, 3]},
|
||||
{"x": 18, "y": 1, "matrix": [7, 4]},
|
||||
{"x": 19, "y": 1, "matrix": [7, 5]},
|
||||
{"matrix": [6, 0], "x": 11, "y": 0},
|
||||
{"matrix": [6, 1], "x": 12, "y": 0},
|
||||
{"matrix": [6, 2], "x": 13, "y": 0},
|
||||
{"matrix": [6, 3], "x": 14, "y": 0},
|
||||
{"matrix": [6, 4], "x": 15, "y": 0},
|
||||
{"matrix": [6, 5], "x": 16, "y": 0},
|
||||
|
||||
{"x": 0, "y": 2, "matrix": [2, 0]},
|
||||
{"x": 1, "y": 2, "matrix": [2, 1]},
|
||||
{"x": 2, "y": 2, "matrix": [2, 2]},
|
||||
{"x": 3, "y": 2, "matrix": [2, 3]},
|
||||
{"x": 4, "y": 2, "matrix": [2, 4]},
|
||||
{"x": 5, "y": 2, "matrix": [2, 5]},
|
||||
{"x": 14, "y": 2, "matrix": [8, 0]},
|
||||
{"x": 15, "y": 2, "matrix": [8, 1]},
|
||||
{"x": 16, "y": 2, "matrix": [8, 2]},
|
||||
{"x": 17, "y": 2, "matrix": [8, 3]},
|
||||
{"x": 18, "y": 2, "matrix": [8, 4]},
|
||||
{"x": 19, "y": 2, "matrix": [8, 5]},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
|
||||
{"x": 0, "y": 3, "matrix": [3, 0]},
|
||||
{"x": 1, "y": 3, "matrix": [3, 1]},
|
||||
{"x": 2, "y": 3, "matrix": [3, 2]},
|
||||
{"x": 3, "y": 3, "matrix": [3, 3]},
|
||||
{"x": 4, "y": 3, "matrix": [3, 4]},
|
||||
{"x": 5, "y": 3, "matrix": [3, 5]},
|
||||
{"x": 14, "y": 3, "matrix": [9, 0]},
|
||||
{"x": 15, "y": 3, "matrix": [9, 1]},
|
||||
{"x": 16, "y": 3, "matrix": [9, 2]},
|
||||
{"x": 17, "y": 3, "matrix": [9, 3]},
|
||||
{"x": 18, "y": 3, "matrix": [9, 4]},
|
||||
{"x": 19, "y": 3, "matrix": [9, 5]},
|
||||
{"matrix": [7, 0], "x": 11, "y": 1},
|
||||
{"matrix": [7, 1], "x": 12, "y": 1},
|
||||
{"matrix": [7, 2], "x": 13, "y": 1},
|
||||
{"matrix": [7, 3], "x": 14, "y": 1},
|
||||
{"matrix": [7, 4], "x": 15, "y": 1},
|
||||
{"matrix": [7, 5], "x": 16, "y": 1},
|
||||
|
||||
{"x": 0, "y": 4, "matrix": [4, 0]},
|
||||
{"x": 1, "y": 4, "matrix": [4, 1]},
|
||||
{"x": 2, "y": 4, "matrix": [4, 2]},
|
||||
{"x": 3, "y": 4, "matrix": [4, 3]},
|
||||
{"x": 16, "y": 4, "matrix": [10, 2]},
|
||||
{"x": 17, "y": 4, "matrix": [10, 3]},
|
||||
{"x": 18, "y": 4, "matrix": [10, 4]},
|
||||
{"x": 19, "y": 4, "matrix": [10, 5]},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
|
||||
{"x": 5, "y": 5, "matrix": [5, 0]},
|
||||
{"x": 6, "y": 5, "matrix": [5, 1]},
|
||||
{"x": 7, "y": 5, "matrix": [5, 2]},
|
||||
{"x": 13, "y": 5, "matrix": [11, 0]},
|
||||
{"x": 14, "y": 5, "matrix": [11, 1]},
|
||||
{"x": 15, "y": 5, "matrix": [11, 2]},
|
||||
{"matrix": [8, 0], "x": 11, "y": 2},
|
||||
{"matrix": [8, 1], "x": 12, "y": 2},
|
||||
{"matrix": [8, 2], "x": 13, "y": 2},
|
||||
{"matrix": [8, 3], "x": 14, "y": 2},
|
||||
{"matrix": [8, 4], "x": 15, "y": 2},
|
||||
{"matrix": [8, 5], "x": 16, "y": 2},
|
||||
|
||||
{"x": 5, "y": 6, "matrix": [5, 3]},
|
||||
{"x": 6, "y": 6, "matrix": [5, 4]},
|
||||
{"x": 7, "y": 6, "matrix": [5, 5]},
|
||||
{"x": 13, "y": 6, "matrix": [11, 3]},
|
||||
{"x": 14, "y": 6, "matrix": [11, 4]},
|
||||
{"x": 15, "y": 6, "matrix": [11, 5]}
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
|
||||
{"matrix": [9, 0], "x": 11, "y": 3},
|
||||
{"matrix": [9, 1], "x": 12, "y": 3},
|
||||
{"matrix": [9, 2], "x": 13, "y": 3},
|
||||
{"matrix": [9, 3], "x": 14, "y": 3},
|
||||
{"matrix": [9, 4], "x": 15, "y": 3},
|
||||
{"matrix": [9, 5], "x": 16, "y": 3},
|
||||
|
||||
{"matrix": [4, 0], "x": 0, "y": 4},
|
||||
{"matrix": [4, 1], "x": 1, "y": 4},
|
||||
{"matrix": [4, 2], "x": 2, "y": 4},
|
||||
{"matrix": [4, 3], "x": 3, "y": 4},
|
||||
|
||||
{"matrix": [10, 2], "x": 13, "y": 4},
|
||||
{"matrix": [10, 3], "x": 14, "y": 4},
|
||||
{"matrix": [10, 4], "x": 15, "y": 4},
|
||||
{"matrix": [10, 5], "x": 16, "y": 4},
|
||||
|
||||
{"matrix": [4, 4], "x": 4, "y": 5},
|
||||
{"matrix": [4, 5], "x": 5, "y": 5},
|
||||
|
||||
{"matrix": [10, 0], "x": 11, "y": 5},
|
||||
{"matrix": [10, 1], "x": 12, "y": 5},
|
||||
|
||||
{"matrix": [5, 4], "x": 6, "y": 6},
|
||||
{"matrix": [5, 5], "x": 7, "y": 6},
|
||||
|
||||
{"matrix": [11, 0], "x": 9, "y": 6},
|
||||
{"matrix": [11, 1], "x": 10, "y": 6},
|
||||
|
||||
{"matrix": [5, 2], "x": 6, "y": 7},
|
||||
{"matrix": [5, 3], "x": 7, "y": 7},
|
||||
|
||||
{"matrix": [11, 2], "x": 9, "y": 7},
|
||||
{"matrix": [11, 3], "x": 10, "y": 7}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -5,39 +5,45 @@
|
||||
|
||||
enum custom_layers {
|
||||
_QWERTY,
|
||||
_LAYER2,
|
||||
_LOWER,
|
||||
_RAISE
|
||||
};
|
||||
|
||||
#define GUI_J RGUI_T(KC_J)
|
||||
#define GUI_F LGUI_T(KC_F)
|
||||
#define SFT_A LSFT_T(KC_A)
|
||||
#define CTL_S LCTL_T(KC_S)
|
||||
#define ALT_D LALT_T(KC_D)
|
||||
#define ALT_K RALT_T(KC_K)
|
||||
#define CTL_L RCTL_T(KC_L)
|
||||
#define SFT_SC RSFT_T(KC_SCLN)
|
||||
#define IMPORTS LALT(LCTL(KC_O)) //Intellij Organize Imports
|
||||
#define LINES LALT(LGUI(KC_L)) //Intellij Reformat Code
|
||||
#define USAGES LALT(KC_F7) //Intelllj Find Usages
|
||||
#define RENAME LSFT(KC_F6) //Intellij Refactor Rename
|
||||
#define RAISE MO(_RAISE)
|
||||
#define LOWER MO(_LOWER)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_EQL , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS,
|
||||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSLS,
|
||||
KC_ESC , SFT_A , CTL_S , ALT_D , GUI_F , KC_G , KC_H , GUI_J , ALT_K , CTL_L , SFT_SC , KC_QUOT,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT,
|
||||
KC_GRV , KC_INS , KC_LEFT, KC_RGHT, KC_DOWN, KC_UP , KC_LBRC, KC_RBRC,
|
||||
KC_LCTL, KC_LALT, KC_HOME, KC_DEL , KC_PGUP, KC_BSPC,
|
||||
KC_SPC , KC_DEL , KC_END , MO(_LAYER2), KC_PGDN, KC_ENT
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_RALT, KC_RCTL,
|
||||
RAISE, KC_SPC, KC_ENT, LOWER,
|
||||
KC_HOME, KC_BSPC, KC_DEL, KC_END,
|
||||
KC_PGUP, KC_LGUI, KC_RGUI, KC_PGDN
|
||||
),
|
||||
[_LAYER2] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,
|
||||
XXXXXXX, IMPORTS, XXXXXXX, USAGES , RENAME , XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, LINES , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______,XXXXXXX, XXXXXXX
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, KC_SCRL, KC_INS, KC_PAUS, KC_PSCR, KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______,
|
||||
_______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_F12, KC_F1, KC_F2, KC_F3 , KC_F4, KC_F5, KC_F6, KC_F7 , KC_F8, KC_F9, KC_F10 , KC_F11,
|
||||
_______, _______, _______, _______, _______, KC_TRNS, KC_TRNS, _______, KC_NUM, _______, _______, KC_MUTE,
|
||||
_______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLU,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Dactyl Manuform
|
||||
# Dactyl Manuform 5x6_68
|
||||
|
||||
This is a 5x6 manuform with a 4 key bottom row and 6 key thumb clusters.
|
||||
This is a Dactyl ManuForm 5x6 with an extended, 4 key, bottom row; totalling 68 keys.
|
||||
|
||||
This results in a 68 key 5x6
|
||||

|
||||
|
@ -1,13 +1 @@
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
SPLIT_KEYBOARD = yes
|
||||
# This file intentionally left blank
|
||||
|
@ -25,11 +25,16 @@
|
||||
#include "mousekey.h"
|
||||
|
||||
static inline int8_t times_inv_sqrt2(int8_t x) {
|
||||
// 181/256 is pretty close to 1/sqrt(2)
|
||||
// 0.70703125 0.707106781
|
||||
// 1 too small for x=99 and x=198
|
||||
// This ends up being a mult and discard lower 8 bits
|
||||
return (x * 181) >> 8;
|
||||
// 181/256 (0.70703125) is used as an approximation for 1/sqrt(2)
|
||||
// because it is close to the exact value which is 0.707106781
|
||||
const int16_t n = x * 181;
|
||||
const uint16_t d = 256;
|
||||
|
||||
// To ensure that the integer result is rounded accurately after
|
||||
// division, check the sign of the numerator:
|
||||
// If negative, subtract half of the denominator before dividing
|
||||
// Otherwise, add half of the denominator before dividing
|
||||
return n < 0 ? (n - d / 2) / d : (n + d / 2) / d;
|
||||
}
|
||||
|
||||
static report_mouse_t mouse_report = {0};
|
||||
|
@ -61,7 +61,7 @@ bool qp_lvgl_attach(painter_device_t device) {
|
||||
qp_lvgl_detach();
|
||||
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_lvgl_attach: fail (validation_ok == false)\n");
|
||||
qp_lvgl_detach();
|
||||
return false;
|
||||
|
@ -30,6 +30,11 @@ bool qp_init(painter_device_t device, painter_rotation_t rotation) {
|
||||
qp_dprintf("qp_init: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
|
||||
if (!driver) {
|
||||
qp_dprintf("qp_init: fail (pointer to NULL)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
driver->validate_ok = false;
|
||||
if (!validate_driver_integrity(driver)) {
|
||||
qp_dprintf("Failed to validate driver integrity in qp_init\n");
|
||||
@ -65,7 +70,7 @@ bool qp_init(painter_device_t device, painter_rotation_t rotation) {
|
||||
bool qp_power(painter_device_t device, bool power_on) {
|
||||
qp_dprintf("qp_power: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_power: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -87,7 +92,7 @@ bool qp_power(painter_device_t device, bool power_on) {
|
||||
bool qp_clear(painter_device_t device) {
|
||||
qp_dprintf("qp_clear: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_clear: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -109,7 +114,7 @@ bool qp_clear(painter_device_t device) {
|
||||
bool qp_flush(painter_device_t device) {
|
||||
qp_dprintf("qp_flush: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_flush: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -129,9 +134,14 @@ bool qp_flush(painter_device_t device) {
|
||||
// Quantum Painter External API: qp_get_geometry
|
||||
|
||||
void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y) {
|
||||
qp_dprintf("qp_geometry: entry\n");
|
||||
qp_dprintf("qp_get_geometry: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
|
||||
if (!driver) {
|
||||
qp_dprintf("qp_get_geometry: fail (pointer to NULL)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (driver->rotation) {
|
||||
default:
|
||||
case QP_ROTATION_0:
|
||||
@ -166,7 +176,7 @@ void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height,
|
||||
*offset_y = driver->offset_y;
|
||||
}
|
||||
|
||||
qp_dprintf("qp_geometry: ok\n");
|
||||
qp_dprintf("qp_get_geometry: ok\n");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -176,6 +186,11 @@ void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_
|
||||
qp_dprintf("qp_set_viewport_offsets: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
|
||||
if (!driver) {
|
||||
qp_dprintf("qp_set_viewport_offsets: fail (pointer to NULL)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
driver->offset_x = offset_x;
|
||||
driver->offset_y = offset_y;
|
||||
|
||||
@ -188,7 +203,7 @@ void qp_set_viewport_offsets(painter_device_t device, uint16_t offset_x, uint16_
|
||||
bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom) {
|
||||
qp_dprintf("qp_viewport: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_viewport: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -211,7 +226,7 @@ bool qp_viewport(painter_device_t device, uint16_t left, uint16_t top, uint16_t
|
||||
bool qp_pixdata(painter_device_t device, const void *pixel_data, uint32_t native_pixel_count) {
|
||||
qp_dprintf("qp_pixdata: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_pixdata: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
bool qp_comms_init(painter_device_t device) {
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_comms_init: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -18,7 +18,7 @@ bool qp_comms_init(painter_device_t device) {
|
||||
|
||||
bool qp_comms_start(painter_device_t device) {
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_comms_start: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -28,7 +28,7 @@ bool qp_comms_start(painter_device_t device) {
|
||||
|
||||
void qp_comms_stop(painter_device_t device) {
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_comms_stop: fail (validation_ok == false)\n");
|
||||
return;
|
||||
}
|
||||
@ -38,7 +38,7 @@ void qp_comms_stop(painter_device_t device) {
|
||||
|
||||
uint32_t qp_comms_send(painter_device_t device, const void *data, uint32_t byte_count) {
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_comms_send: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ static bool qp_circle_helper_impl(painter_device_t device, uint16_t centerx, uin
|
||||
bool qp_circle(painter_device_t device, uint16_t x, uint16_t y, uint16_t radius, uint8_t hue, uint8_t sat, uint8_t val, bool filled) {
|
||||
qp_dprintf("qp_circle: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_circle: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ bool qp_internal_load_qgf_palette(qp_stream_t *stream, uint8_t bpp) {
|
||||
|
||||
bool qp_setpixel(painter_device_t device, uint16_t x, uint16_t y, uint8_t hue, uint8_t sat, uint8_t val) {
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_setpixel: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -175,7 +175,7 @@ bool qp_line(painter_device_t device, uint16_t x0, uint16_t y0, uint16_t x1, uin
|
||||
|
||||
qp_dprintf("qp_line(%d, %d, %d, %d): entry\n", (int)x0, (int)y0, (int)x1, (int)y1);
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_line: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
@ -253,7 +253,7 @@ bool qp_internal_fillrect_helper_impl(painter_device_t device, uint16_t left, ui
|
||||
bool qp_rect(painter_device_t device, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint8_t hue, uint8_t sat, uint8_t val, bool filled) {
|
||||
qp_dprintf("qp_rect(%d, %d, %d, %d): entry\n", (int)left, (int)top, (int)right, (int)bottom);
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_rect: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ static bool qp_ellipse_helper_impl(painter_device_t device, uint16_t centerx, ui
|
||||
bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, uint16_t sizey, uint8_t hue, uint8_t sat, uint8_t val, bool filled) {
|
||||
qp_dprintf("qp_ellipse: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_ellipse: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ painter_image_handle_t qp_load_image_mem(const void *buffer) {
|
||||
|
||||
bool qp_close_image(painter_image_handle_t image) {
|
||||
qgf_image_handle_t *qgf_image = (qgf_image_handle_t *)image;
|
||||
if (!qgf_image->validate_ok) {
|
||||
if (!qgf_image || !qgf_image->validate_ok) {
|
||||
qp_dprintf("qp_close_image: fail (invalid image)\n");
|
||||
return false;
|
||||
}
|
||||
@ -210,13 +210,13 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device,
|
||||
static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image, int frame_number, qgf_frame_info_t *frame_info, qp_pixel_t fg_hsv888, qp_pixel_t bg_hsv888) {
|
||||
qp_dprintf("qp_drawimage_recolor: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_drawimage_recolor: fail (validation_ok == false)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
qgf_image_handle_t *qgf_image = (qgf_image_handle_t *)image;
|
||||
if (!qgf_image->validate_ok) {
|
||||
if (!qgf_image || !qgf_image->validate_ok) {
|
||||
qp_dprintf("qp_drawimage_recolor: fail (invalid image)\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ painter_font_handle_t qp_load_font_mem(const void *buffer) {
|
||||
|
||||
bool qp_close_font(painter_font_handle_t font) {
|
||||
qff_font_handle_t *qff_font = (qff_font_handle_t *)font;
|
||||
if (!qff_font->validate_ok) {
|
||||
if (!qff_font || !qff_font->validate_ok) {
|
||||
qp_dprintf("qp_close_font: fail (invalid font)\n");
|
||||
return false;
|
||||
}
|
||||
@ -380,7 +380,7 @@ static inline bool qp_font_code_point_handler_drawglyph(qff_font_handle_t *qff_f
|
||||
|
||||
int16_t qp_textwidth(painter_font_handle_t font, const char *str) {
|
||||
qff_font_handle_t *qff_font = (qff_font_handle_t *)font;
|
||||
if (!qff_font->validate_ok) {
|
||||
if (!qff_font || !qff_font->validate_ok) {
|
||||
qp_dprintf("qp_textwidth: fail (invalid font)\n");
|
||||
return false;
|
||||
}
|
||||
@ -406,13 +406,13 @@ int16_t qp_drawtext(painter_device_t device, uint16_t x, uint16_t y, painter_fon
|
||||
int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, painter_font_handle_t font, const char *str, uint8_t hue_fg, uint8_t sat_fg, uint8_t val_fg, uint8_t hue_bg, uint8_t sat_bg, uint8_t val_bg) {
|
||||
qp_dprintf("qp_drawtext_recolor: entry\n");
|
||||
painter_driver_t *driver = (painter_driver_t *)device;
|
||||
if (!driver->validate_ok) {
|
||||
if (!driver || !driver->validate_ok) {
|
||||
qp_dprintf("qp_drawtext_recolor: fail (validation_ok == false)\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
qff_font_handle_t *qff_font = (qff_font_handle_t *)font;
|
||||
if (!qff_font->validate_ok) {
|
||||
if (!qff_font || !qff_font->validate_ok) {
|
||||
qp_dprintf("qp_drawtext_recolor: fail (invalid font)\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user