mixer-slider/protocol/interface.h

25 lines
406 B
C
Raw Normal View History

#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uint8_t byte_t;
// this struct describes a communication interface
typedef struct iface {
// callback, gets called when data arrives at interface
void (*on_read)(struct iface *, byte_t, void*ptr);
void *callback_data;
void (*write)(struct iface *, byte_t);
} iface_t;
#ifdef __cplusplus
} // end extern "C"
#endif