#include #include #ifndef __STREAM_H #define __STREAM_H /** * Struct for abstract stream * * Stream properties: generalized variables for individual devices * props[0]: Peripheral device (fd, hi2c, huart, and so on) * props[1]: Bus device ID * */ typedef struct { int (*read)(uint8_t *buf, size_t len, void **vptr, void *sptr); int (*write)(uint8_t *buf, size_t len, void **vptr, void *sptr); int (*init)(void **vptr, void *sptr); void **props; } p_stream_t; typedef enum { STDIO, } devices; #endif /* __STREAM_H */