expansion and serial fixes and new api

by HaxSam & WillyJL
This commit is contained in:
MX
2025-07-05 17:57:30 +03:00
parent 8f203f47d9
commit aad07ed943
6 changed files with 122 additions and 38 deletions

View File

@@ -17,14 +17,20 @@
*/
typedef struct ExpansionWorker ExpansionWorker;
typedef enum {
ExpansionWorkerCallbackReasonExit,
ExpansionWorkerCallbackReasonConnected,
} ExpansionWorkerCallbackReason;
/**
* @brief Worker callback type.
*
* @see expansion_worker_set_callback()
*
* @param[in,out] context pointer to a user-defined object.
* @param[in] reason reason for the callback.
*/
typedef void (*ExpansionWorkerCallback)(void* context);
typedef void (*ExpansionWorkerCallback)(void* context, ExpansionWorkerCallbackReason reason);
/**
* @brief Create an expansion worker instance.