Merge develop into main (#494)
* Updated runtime gating to enable LilyGO T-Deck specific apps and services * New device compatibility and model-detection APIs * Added a buffer-overflow error code and message * Updated GitHub Actions checkout to v4 * Adjusted an LVGL-related library version * Device config now emits a T-Deck workaround flag when applicable * Removed internal developer comments and minor cleanups
This commit is contained in:
committed by
GitHub
parent
93efadd5e3
commit
25c3f19e5d
@@ -178,6 +178,14 @@ struct Device* device_get_parent(struct Device* device);
|
||||
*/
|
||||
bool device_is_ready(const struct Device* device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device is compatible with the given compatible string.
|
||||
* @param[in] device non-null device pointer
|
||||
* @param[in] compatible compatible string
|
||||
* @return true if the device is compatible
|
||||
*/
|
||||
bool device_is_compatible(const struct Device* device, const char* compatible);
|
||||
|
||||
/**
|
||||
* Set the driver data for a device.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -10,6 +12,14 @@ struct RootConfig {
|
||||
const char* model;
|
||||
};
|
||||
|
||||
/**
|
||||
* Indicates whether the device's model matches the specified model.
|
||||
* @param[in] device the device to check (non-null)
|
||||
* @param[in] model the model to check against
|
||||
* @return true if the device's model matches the specified model
|
||||
*/
|
||||
bool root_is_model(const struct Device* device, const char* model);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@ typedef int error_t;
|
||||
#define ERROR_OUT_OF_MEMORY 9
|
||||
#define ERROR_NOT_SUPPORTED 10
|
||||
#define ERROR_NOT_ALLOWED 11
|
||||
#define ERROR_BUFFER_OVERFLOW 12
|
||||
|
||||
/** Convert an error_t to a human-readable text. Useful for logging. */
|
||||
const char* error_to_string(error_t error);
|
||||
|
||||
Reference in New Issue
Block a user