embpart/file_interface.h

17 lines
442 B
C

#ifndef EMBPART_FILE_INTERFACE_H
#define EMBPART_FILE_INTERFACE_H
#include <stdint.h>
#include <stdio.h>
typedef struct File_ {
uint8_t data[32];
ssize_t (*read)(void * ptr, size_t size, struct File_ * f);
ssize_t (*seek)(struct File_ * f, int32_t offset, uint8_t whence);
} File;
ssize_t fi_read(void * ptr, size_t size, File * f);
ssize_t fi_seek(File * f, int32_t offset, uint8_t whence);
#endif //EMBPART_FILE_INTERFACE_H