HP85 GPIB Disk Emulator
1.0
HP85GPIBDiskEmulator
|
Go to the documentation of this file.
27 #include "user_config.h"
86 printf(
"MMC Clock task init failed\n");
188 optimistic_yield(1000);
236 printf(
"START MMC INIT\n");
244 printf(
"*** MMC Card NOT Inserted! ***\n");
251 printf(
"MMC Card Inserted\n");
253 #if defined (FF_USE_LFN)
269 if( rc !=
RES_OK || verbose)
281 printf(
"MMC Block Size - read failed\n");
285 printf(
"MMC Block Size: %ld\n", blksize);
static int mmc_init_flag
has the MMC interface been initialized yet ?
void mmc_spi_begin()
MMC SPI setup and chip select.
MEMSPACE int printf(const char *format,...)
uint8_t spi_TXRX(uint8_t data)
SPI read and write 1 byte.
MEMSPACE void mmc_install_timer(void)
Install MMC timer task: mmc_task()
void mmc_spi_end()
MMC SPI end and chip deselect.
uint32_t _mmc_clock
MMC SPI CLOCK cache.
void mmc_disk_timerproc(void)
Write Sector(s)
MEMSPACE int mmc_wp_status()
MMC Card Write Protect status.
void spi_TX_buffer(const uint8_t *data, int count)
SPI write buffer.
uint16_t _mmc_timeout
MMC timeout counter in ms.
MEMSPACE WEAK_ATR char * strcpy(char *dest, const char *src)
copy a string
DSTATUS disk_initialize(BYTE pdrv)
void mmc_slow()
MMC set slow SPI bus speed Only called when deselected.
MEMSPACE void put_rc(int rc)
display FatFs return code as ascii string
Common Linux/POSIX time functions.
MEMSPACE void mmc_power_on()
MMC Power ON.
void mmc_spi_init()
MMC SPI setup and chip select.
void clear_error()
Set error condition.
void mmc_spi_TX_buffer(const uint8_t *data, int count)
SPI write buffer.
void set_error(uint8_t error)
Set error condition.
MEMSPACE int fatfs_status(char *name)
Compute space used, number of directories and files contained used by a drive.
void mmc_fast()
MMC fast SPI bus speed Only called when deselected.
MEMSPACE int mmc_ins_status()
MMC Card Inserted status.
MEMSPACE int mmc_init(int verbose)
Initialize MMC and FatFs interface, display diagnostics.
static void mmc_task(void)
1000HZ timer task
void chip_select_init(uint8_t pin)
CHIP select HAL.
MEMSPACE void mmc_power_off()
MMC Power OFF.
DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
FRESULT f_mount(FATFS *fs, const TCHAR *path, BYTE opt)
void spi_RX_buffer(const uint8_t *data, int count)
SPI read buffer.
MEMSPACE int set_timers(void(*handler)(void), int timer __attribute__((unused)))
Install a user timer task.
FATFS Fatfs[FF_VOLUMES]
FatFs Drive Volumes.
void mmc_spi_RX_buffer(const uint8_t *data, int count)
SPI read buffer.
uint8_t mmc_spi_TXRX(uint8_t data)
SPI read and write 1 byte.
Math IO functions, and verious conversion code with floating point support.
void spi_end(uint8_t pin)
SPI chip disable function wait for current tranaction to finish!
MEMSPACE int mmc_test_timeout()
Wait for timeout.
void spi_begin(uint32_t clock, int pin)
SPI chip enable function Function waits for current tranaction to finish before proceeding.
MEMSPACE void mmc_set_ms_timeout(uint16_t ms)
Set MMC timeout timer in Milliseconds.
MEMSPACE void mmc_ms_wait(int ms)
Wait for time in milliseconds.