forked from eduardocasino/dos-device-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sd.h
26 lines (16 loc) · 655 Bytes
/
sd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* sd.h - SD card driver glue */
#ifndef _SD_H
#define _SD_H
#include <stdbool.h>
#include "template.h"
#define BLOCKSIZE 512
extern uint32_t partition_offset;
/* sd_initialize - establish two way communications with the drive */
bool sd_initialize (uint8_t unit, uint8_t partno, bpb far *bpb);
/* sd_read - read one 512 uint8_t logical block from the tape */
int sd_read (uint16_t, uint32_t, uint8_t far *, uint16_t count);
/* sd_write - write one 512 uint8_t logical block to the tape */
int sd_write (uint16_t, uint32_t, uint8_t far *, uint16_t count);
/* sd_media_check - check if media changed */
bool sd_media_check (uint8_t unit);
#endif