llvm-mos-sdk
drive.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Adrian "asie" Siekierka
3  *
4  * Licensed under the Apache License, Version 2.0 with LLVM Exceptions,
5  * See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
6  * information.
7  */
8 
9 #ifndef _RPC8E_DRIVE_H_
10 #define _RPC8E_DRIVE_H_
11 
12 #include <stdbool.h>
13 #include <stdint.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
23 #define DRIVE_BYTES_PER_SECTOR 128
24 #define DRIVE_SECTOR_MAX 2048
25 
33 
40 
47 
54 
62 
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* _RPC8E_DRIVE_H_ */
std::uint16_t
::uint16_t uint16_t
Definition: cstdint:22
rpc8e_drive_write_disk_name
bool rpc8e_drive_write_disk_name(void)
Write the disk name from the drive's buffer.
std::uint8_t
::uint8_t uint8_t
Definition: cstdint:21
rpc8e_drive_write_disk_sector
bool rpc8e_drive_write_disk_sector(uint16_t sector)
Write a given sector from the drive's buffer.
rpc8e_drive_read_disk_name
bool rpc8e_drive_read_disk_name(void)
Read the disk name to the drive's buffer.
rpc8e_drive_read_disk_serial
bool rpc8e_drive_read_disk_serial(void)
Read the disk serial number to the drive's buffer.
rpc8e_drive_command
bool rpc8e_drive_command(uint8_t id)
Send a command to the drive and wait for it to complete.
rpc8e_drive_read_disk_sector
bool rpc8e_drive_read_disk_sector(uint16_t sector)
Read a given sector to the drive's buffer.