Userspace¶
sipo¶
Driver for 74HC595 Serial In - Parallel Out shift registers.
-
void set_sipo_pin(uint8_t pin, bool state)¶
[source] Update the state of a pin in the internal buffer.
Hint
This will not apply the setting yet, because of performance issues.
You should call
send_sipo_state()
to get it flushed.- Parameters:
pin – The name defined on
configure_sipo_pins
.state – Whether low or high output is desired.
spi_custom¶
Some patching on QMK’s spi_master.h
driver, to allow using multiple buses.
Caution
- The following must be set up:
SPI_DRIVERS
SPI_SCK_PINS
SPI_MOSI_PINS
SPI_MISO_PINS
They will be automatically configured with their single-driver counterparts, if available.
-
bool spi_custom_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor, uint8_t n)¶
[source] Set up the
n
’th driver for a transmission.- Parameters:
slavePin – The chip select pin for the target device.
lsbFirst – Whether Least Significant Bit is sent first or last.
mode – SPI clocks’ mode (0-3).
divisor – Control the clock’s speed.
n – Index of the driver to be used.
- Returns:
Whether operation was successful.
-
spi_status_t spi_custom_write(uint8_t data, uint8_t n)¶
[source] Send a single byte (
data
) over then
’th driver.
-
spi_status_t spi_custom_read(uint8_t n)¶
[source] Read a single byte (return) over the
n
’th driver.
-
spi_status_t spi_custom_transmit(const uint8_t *data, uint16_t length, uint8_t n)¶
[source] Send
length
bytes fromdata
over then
’th driver.
-
spi_status_t spi_custom_receive(uint8_t *data, uint16_t length, uint8_t n)¶
[source] Read
length
bytes intodata
over then
’th driver.
-
void spi_custom_stop(uint8_t n)¶
[source] Undo the settings performced by
spi_custom_start()
touch¶
Generic(ish) driver for touch screens.
Danger
Only XPT2046
has been implemented/tested.
-
struct touch_driver_t¶
[source] Configuration for a touch device.
-
spi_touch_comms_config_t spi_config¶
[source] Communications configuration.
-
spi_touch_comms_config_t spi_config¶
-
bool touch_spi_init(touch_device_t device)¶
[source] Initialize a device.
-
void report_from(int16_t x, int16_t y, touch_driver_t *driver, touch_report_t *report)¶
[source] (WEAK) Low-level function that performs math.
- Parameters:
x – Raw X reading from sensor.
y – Raw Y reading from sensor.
driver – Handle to the device, to fetch its configuration.
report – Output struct to be filled/updated.
-
touch_report_t get_spi_touch_report(touch_device_t device, bool check_irq)¶
[source] Get the current state of a sensor.
- Parameters:
device – Sensor’s configuration.
check_irq – Whether to check the IRQ’s pin state.
xap¶
Utilities on top of XAP.
See also
QMK’s documentation about XAP.
-
struct screen_pressed_msg_t¶
[source] Inform about a screen press event.
-
xap_msg_id_t msg_id¶
[source] Identify this message.
-
xap_msg_id_t msg_id¶
-
void xap_screen_pressed(uint8_t screen_id, touch_report_t report)¶
[source] Send a message to PC’s client about a screen press event.
-
struct screen_released_msg_t¶
[source] Information about a screen release event.
-
xap_msg_id_t msg_id¶
[source] Identify this message.
-
xap_msg_id_t msg_id¶
-
void xap_screen_released(uint8_t screen_id)¶
[source] Send a message to PC’s client about a screen release event.
-
struct layer_change_msg_t¶
[source] Information about a layer change event.
-
xap_msg_id_t msg_id¶
[source] Identify this message.
-
xap_msg_id_t msg_id¶
-
void xap_layer(layer_state_t state)¶
[source] Send a message to PC’s client about a layer change event.
-
struct keyevent_msg_t¶
[source] Information about a key event.
-
xap_msg_id_t msg_id¶
[source] Identify this message.
-
xap_msg_id_t msg_id¶
-
void xap_keyevent(uint16_t keycode, keyrecord_t *record)¶
[source] Send a message to PC’s client about a key event.
-
struct shutdown_msg_t¶
[source] Information about shutdown event.
-
xap_msg_id_t msg_id¶
[source] Identify this message.
-
xap_msg_id_t msg_id¶