llvm-mos-sdk
Macros | Functions
drive.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for drive.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DRIVE_BYTES_PER_SECTOR   128
 
#define DRIVE_SECTOR_MAX   2048
 

Functions

bool rpc8e_drive_command (uint8_t id)
 Send a command to the drive and wait for it to complete. More...
 
bool rpc8e_drive_read_disk_name (void)
 Read the disk name to the drive's buffer. More...
 
bool rpc8e_drive_write_disk_name (void)
 Write the disk name from the drive's buffer. More...
 
bool rpc8e_drive_read_disk_serial (void)
 Read the disk serial number to the drive's buffer. More...
 
bool rpc8e_drive_read_disk_sector (uint16_t sector)
 Read a given sector to the drive's buffer. More...
 
bool rpc8e_drive_write_disk_sector (uint16_t sector)
 Write a given sector from the drive's buffer. More...
 

Detailed Description

Functionality related to the drive.

Macro Definition Documentation

◆ DRIVE_BYTES_PER_SECTOR

#define DRIVE_BYTES_PER_SECTOR   128

◆ DRIVE_SECTOR_MAX

#define DRIVE_SECTOR_MAX   2048

Function Documentation

◆ rpc8e_drive_command()

bool rpc8e_drive_command ( uint8_t  id)

Send a command to the drive and wait for it to complete.

Parameters
idThe command ID.
Returns
bool Whether or not the command was successful.

◆ rpc8e_drive_read_disk_name()

bool rpc8e_drive_read_disk_name ( void  )

Read the disk name to the drive's buffer.

Returns
bool Whether or not the command was successful.

◆ rpc8e_drive_read_disk_sector()

bool rpc8e_drive_read_disk_sector ( uint16_t  sector)

Read a given sector to the drive's buffer.

Parameters
sectorThe sector number.
Returns
bool Whether or not the command was successful.

◆ rpc8e_drive_read_disk_serial()

bool rpc8e_drive_read_disk_serial ( void  )

Read the disk serial number to the drive's buffer.

Returns
bool Whether or not the command was successful.

◆ rpc8e_drive_write_disk_name()

bool rpc8e_drive_write_disk_name ( void  )

Write the disk name from the drive's buffer.

Returns
bool Whether or not the command was successful.

◆ rpc8e_drive_write_disk_sector()

bool rpc8e_drive_write_disk_sector ( uint16_t  sector)

Write a given sector from the drive's buffer.

Parameters
sectorThe sector number.
Returns
bool Whether or not the command was successful.