Device migrations, drivers and fixes (#571)
Device migrations: - cyd-4848S040c - guition-jc1060p470ciwy - guition-jc2432w328c - guition-jc3248w535c (known issue with display and touch, Shadowtrance will look into it) - guition-jc8048w550c - heltec-wifi-lora-32-v3 - lilygo-tdeck-max (excluding graphics) - lilygo-tdisplay - lilygo-tdisplay-s3 - lilygo-tdongle-s3 - lilygo-tlora-pager Driver migrations: - Implemented haptic driver interface in kernel - AXS15231b - BQ25896 - BQ27220 - CST328 - CST6xx - DRV2605 - JD9165 - Custom LilyGO driver for T-Lora Pager - SSD1306 - ST7701 - ST7735 - SY6970 - TCA8418 Fixes/improvements: - Boot app: support for multiple power devices, improved UI - lvgl_devices and related code: fixes for mapping - Support for arrays in dts parser
This commit is contained in:
committed by
GitHub
parent
3b5a401594
commit
d896657bf9
@@ -0,0 +1,33 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <tactility/drivers/haptic.h>
|
||||
#include <tactility/device.h>
|
||||
|
||||
#define HAPTIC_DRIVER_API(driver) ((HapticApi*)driver->api)
|
||||
|
||||
extern "C" {
|
||||
|
||||
error_t haptic_set_waveform(Device* device, uint8_t slot, uint8_t waveform) {
|
||||
const auto* driver = device_get_driver(device);
|
||||
return HAPTIC_DRIVER_API(driver)->set_waveform(device, slot, waveform);
|
||||
}
|
||||
|
||||
error_t haptic_select_library(Device* device, uint8_t library) {
|
||||
const auto* driver = device_get_driver(device);
|
||||
return HAPTIC_DRIVER_API(driver)->select_library(device, library);
|
||||
}
|
||||
|
||||
error_t haptic_start_playback(Device* device) {
|
||||
const auto* driver = device_get_driver(device);
|
||||
return HAPTIC_DRIVER_API(driver)->start_playback(device);
|
||||
}
|
||||
|
||||
error_t haptic_stop_playback(Device* device) {
|
||||
const auto* driver = device_get_driver(device);
|
||||
return HAPTIC_DRIVER_API(driver)->stop_playback(device);
|
||||
}
|
||||
|
||||
const DeviceType HAPTIC_TYPE {
|
||||
.name = "haptic"
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user