24 lines
524 B
C
24 lines
524 B
C
// devices.h
|
|
// Author: Josh Holtrop
|
|
// Date: 08/02/04
|
|
|
|
|
|
#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
|
|
|