mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
**New Features** * Runtime font accessors and new symbol fonts for text, launcher, statusbar, and shared icons. * Added font height base setting to device.properties * Text fonts now have 3 sizes: small, default, large **Improvements** * Renamed `UiScale` to `UiDensity` * Statusbar, toolbar and many UI components now compute heights and spacing from fonts/density. * SSD1306 initialization sequence refined for more stable startup. * Multiple image assets replaced by symbol-font rendering. * Many layout improvements related to density, font scaling and icon scaling * Updated folder name capitalization for newer style
30 lines
824 B
C++
30 lines
824 B
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#include <tactility/drivers/spi_controller.h>
|
|
#include <tactility/error.h>
|
|
#include <tactility/device.h>
|
|
|
|
#define SPI_DRIVER_API(driver) ((struct SpiControllerApi*)driver->api)
|
|
|
|
extern "C" {
|
|
|
|
error_t spi_controller_lock(struct Device* device) {
|
|
const auto* driver = device_get_driver(device);
|
|
return SPI_DRIVER_API(driver)->lock(device);
|
|
}
|
|
|
|
error_t spi_controller_try_lock(struct Device* device, TickType_t timeout) {
|
|
const auto* driver = device_get_driver(device);
|
|
return SPI_DRIVER_API(driver)->try_lock(device, timeout);
|
|
}
|
|
|
|
error_t spi_controller_unlock(struct Device* device) {
|
|
const auto* driver = device_get_driver(device);
|
|
return SPI_DRIVER_API(driver)->unlock(device);
|
|
}
|
|
|
|
const struct DeviceType SPI_CONTROLLER_TYPE {
|
|
.name = "spi-controller"
|
|
};
|
|
|
|
}
|