21 lines
469 B
C
21 lines
469 B
C
|
|
|
|
#ifndef __HOS_DEVICES_H__
|
|
#define __HOS_DEVICES_H__ __HOS_DEVICES_H__
|
|
|
|
typedef unsigned char major_t;
|
|
typedef unsigned char minor_t;
|
|
|
|
typedef struct {
|
|
int (*block_read)(u32_t blockStart, u32_t blocks, void *buffer);
|
|
int (*block_write)(u32_t blockStart, u32_t blocks, void *buffer);
|
|
int (*char_read)(u64_t position);
|
|
int (*char_write)(u64_t position, int value);
|
|
} dev_driver_t;
|
|
|
|
void dev_init();
|
|
int dev_register_major(major_t major, dev_driver_t *dev);
|
|
|
|
#endif
|
|
|