12 lines
248 B
C
12 lines
248 B
C
|
|
#include "device.h"
|
||
|
|
|
||
|
|
Device* createDevice(
|
||
|
|
const char* name,
|
||
|
|
void (*sendToDevice)(uint16_t number),
|
||
|
|
uint16_t (*receiveFromDevice)(),
|
||
|
|
void (*update)()
|
||
|
|
) {
|
||
|
|
Device* new = malloc(sizeof(Device));
|
||
|
|
if (!new)
|
||
|
|
return NULL;
|
||
|
|
}
|