-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Milestone
Description
By adding an additional argument, void * context, to the callbacks, the callback provider can associate the callback to different endpoints. This would enable multiple streams to be managed simultaneously by the callback provider. If the user does not need or desire the context, then they will be able to provide a NULL to the context argument.
Current Implementation:
extern "C" {
// callback function types
typedef void (*callbackFunction)(uint8_t, int);
typedef void (*systemCallbackFunction)(void);
typedef void (*stringCallbackFunction)(char *);
typedef void (*sysexCallbackFunction)(uint8_t command, uint8_t argc, uint8_t *argv);
}Proposed Implementation:
extern "C" {
// callback function types
typedef void (*callbackFunction)(uint8_t, int, void *);
typedef void (*systemCallbackFunction)(void *);
typedef void (*stringCallbackFunction)(char *, void *);
typedef void (*sysexCallbackFunction)(uint8_t command, uint8_t argc, uint8_t *argv, void *context);
}Metadata
Metadata
Assignees
Labels
No labels