2026-07-16 12:43:41 +10:00
|
|
|
#pragma once
|
2026-07-16 13:13:38 +10:00
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdlib.h>
|
2026-07-16 12:43:41 +10:00
|
|
|
|
|
|
|
|
typedef struct {
|
2026-07-16 13:13:38 +10:00
|
|
|
char name[32];
|
2026-07-16 12:43:41 +10:00
|
|
|
|
2026-07-16 13:13:38 +10:00
|
|
|
void (*sendToDevice)(uint16_t number);
|
|
|
|
|
uint16_t (*receiveFromDevice)();
|
|
|
|
|
void (*update)();
|
|
|
|
|
} Device;
|
|
|
|
|
|
|
|
|
|
Device* createDevice(
|
|
|
|
|
const char* name,
|
|
|
|
|
void (*sendToDevice)(uint16_t number),
|
|
|
|
|
uint16_t (*receiveFromDevice)(),
|
|
|
|
|
void (*update)()
|
|
|
|
|
);
|