mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 19:05:07 +00:00
- Implemented async keyboard API. Made it backwards compatible. - `KeyboardApi::read_key` and `keyboard_read_key()` automatically forward to subscribing pollers. - Implement `Device::probe` for device hot-plug support. - Implement probing for Tab5 keyboard - Updated coding style guide
34 lines
813 B
C
34 lines
813 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#include <tactility/device.h>
|
|
#include <tactility/drivers/gpio.h>
|
|
|
|
struct Tab5KeyboardConfig {
|
|
/** Fixed 0x6D - not used to probe the bus, kept only for parity with other dynamic devices. */
|
|
uint8_t address;
|
|
/**
|
|
* Wired directly to a native SoC GPIO (not an IO expander) for a real ISR.
|
|
* GPIO_PIN_SPEC_NONE falls back to polling REG_INT_STAT.
|
|
*/
|
|
struct GpioPinSpec pin_interrupt;
|
|
};
|
|
|
|
extern struct Driver tab5_keyboard_driver;
|
|
|
|
/**
|
|
* @brief Constructs (but doesn't start) the keyboard device on i2c2 and registers it with the
|
|
* kernel's hotplug poller. Called once i2c2 is up (see display_detect.cpp).
|
|
*/
|
|
void tab5_create_keyboard(struct Device* i2c2);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|