EMILE/libfloppy/libfloppy.h

26 lines
604 B
C
Raw Normal View History

2005-11-18 00:06:31 +00:00
/*
*
* (c) 2005 Laurent Vivier <Laurent@lvivier.info>
2005-11-18 00:06:31 +00:00
*
*/
2005-11-21 23:53:14 +00:00
#ifndef __LIBFLOPY_H__
#define __LIBFLOPY_H__
2005-11-18 00:06:31 +00:00
2005-11-16 01:29:10 +00:00
#include <sys/types.h>
#include <unistd.h>
#define SECTOR_SIZE_BITS 9
#define SECTOR_SIZE (1 << (SECTOR_SIZE_BITS))
#define SECTOR_PER_TRACK 18
#define SIDE_NB 2
typedef struct {
int unit;
} floppy_device_t;
2005-11-16 01:29:10 +00:00
extern floppy_device_t *floppy_open(int unit);
extern int floppy_close(floppy_device_t* device);
extern int floppy_read_sector(floppy_device_t *device,off_t offset, void* buffer, size_t size);
2005-11-23 22:36:15 +00:00
extern int floppy_get_blocksize(floppy_device_t *device);
2005-11-21 23:53:14 +00:00
#endif /* __LIBFLOPY_H__ */