db48dfe812
- Standardized keyboard input using Unicode-based key codes across supported devices and the simulator. Keyboards don't emit `LV_KEY_*` anymore. - Refactored lilygo encoder driver into a reusable GPIO rotary encoder driver (see `Drivers/gpio-encoder-module/`). Added more features to the config file. - Improved LVGL keyboard device management, including duplicate prevention and reliable reconnects. - LVGL file mutex now registers with lvgl start/stop - Improved LVGL startup/shutdown stability and memory allocation reliability. - Increased simulator LVGL memory capacity and improved USB device-class handling.
26 lines
714 B
C
26 lines
714 B
C
// SPDX-License-Identifier: Apache-2.0
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <tactility/drivers/gpio.h>
|
|
|
|
struct GpioEncoderConfig {
|
|
// First pin of encoder wheel
|
|
struct GpioPinSpec pin_a;
|
|
// Second pin of encoder wheel
|
|
struct GpioPinSpec pin_b;
|
|
// "Button" pin of encoder wheel. Optional: GPIO_PIN_SPEC_NONE when the wheel has no click/enter button.
|
|
struct GpioPinSpec pin_enter;
|
|
// Quadrature pulses per mechanical detent (x4 decode gives 4 pulses/detent for a standard EC11-style encoder).
|
|
uint8_t pulses_per_detent;
|
|
// Capacity of the queue buffering key events between read_key() polls.
|
|
uint8_t pending_capacity;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|