MicrOS
|
#include "floppy.h"
Functions | |
bool | fdc_init () |
bool | floppy_init (int sectors_per_track) |
bool | fdc_is_present () |
bool | floppy_is_inserted () |
void | floppy_lba_to_chs (uint16_t lba, uint8_t *head, uint8_t *track, uint8_t *sector) |
bool | floppy_reset () |
bool | floppy_wait_until_ready () |
bool | floppy_send_command (uint8_t cmd) |
uint8_t | floppy_read_data () |
void | floppy_confirm_interrupt (uint8_t *st0, uint8_t *cylinder) |
void | floppy_set_parameters (uint32_t step_rate, uint32_t head_load_time, uint32_t head_unload_time, bool dma) |
bool | floppy_calibrate () |
void | floppy_enable_motor () |
void | floppy_disable_motor () |
uint8_t * | floppy_read_sector (int device_number, int sector) |
void | floppy_write_sector (int device_number, int sector, uint8_t *content) |
uint8_t * | floppy_do_operation_on_sector (uint8_t head, uint8_t track, uint8_t sector, bool read) |
bool | floppy_seek (uint8_t cylinder, uint8_t head) |
bool | floppy_wait_for_interrupt () |
bool | floppy_interrupt () |
bool | floppy_timer_interrupt () |
uint8_t * | floppy_read_continous (int device_number, int sector, int count) |
uint8_t * | floppy_read_sectors (int device_number, uint8_t head, uint8_t track, uint8_t sector, uint32_t count) |
uint8_t * | read_track_from_floppy (int device_number, int head, int track) |
Variables | |
volatile uint32_t | floppy_sectors_per_track |
volatile uint32_t | time_of_last_activity = 0 |
volatile bool | motor_enabled = false |
volatile uint32_t | current_cylinder = 0 |
volatile uint32_t | current_head = 0 |
volatile bool | floppy_interrupt_flag = false |
bool fdc_init | ( | ) |
bool fdc_is_present | ( | ) |
bool floppy_calibrate | ( | ) |
void floppy_confirm_interrupt | ( | uint8_t * | st0, |
uint8_t * | cylinder | ||
) |
void floppy_disable_motor | ( | ) |
uint8_t* floppy_do_operation_on_sector | ( | uint8_t | head, |
uint8_t | track, | ||
uint8_t | sector, | ||
bool | read | ||
) |
void floppy_enable_motor | ( | ) |
bool floppy_init | ( | int | sectors_per_track | ) |
bool floppy_interrupt | ( | ) |
bool floppy_is_inserted | ( | ) |
void floppy_lba_to_chs | ( | uint16_t | lba, |
uint8_t * | head, | ||
uint8_t * | track, | ||
uint8_t * | sector | ||
) |
uint8_t* floppy_read_continous | ( | int | device_number, |
int | sector, | ||
int | count | ||
) |
uint8_t floppy_read_data | ( | ) |
uint8_t* floppy_read_sector | ( | int | device_number, |
int | sector | ||
) |
uint8_t* floppy_read_sectors | ( | int | device_number, |
uint8_t | head, | ||
uint8_t | track, | ||
uint8_t | sector, | ||
uint32_t | count | ||
) |
bool floppy_reset | ( | ) |
bool floppy_seek | ( | uint8_t | cylinder, |
uint8_t | head | ||
) |
bool floppy_send_command | ( | uint8_t | cmd | ) |
void floppy_set_parameters | ( | uint32_t | step_rate, |
uint32_t | head_load_time, | ||
uint32_t | head_unload_time, | ||
bool | dma | ||
) |
bool floppy_timer_interrupt | ( | ) |
bool floppy_wait_for_interrupt | ( | ) |
bool floppy_wait_until_ready | ( | ) |
void floppy_write_sector | ( | int | device_number, |
int | sector, | ||
uint8_t * | content | ||
) |
uint8_t* read_track_from_floppy | ( | int | device_number, |
int | head, | ||
int | track | ||
) |
volatile uint32_t current_cylinder = 0 |
volatile uint32_t current_head = 0 |
volatile bool floppy_interrupt_flag = false |
volatile uint32_t floppy_sectors_per_track |
volatile bool motor_enabled = false |
volatile uint32_t time_of_last_activity = 0 |