HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mmc_hal.h
Go to the documentation of this file.
1 
15 #ifndef _MMC_HAL_H_
16 #define _MMC_HAL_H_
17 
18 // Named address space
19 #ifndef MEMSPACE
20 #define MEMSPACE
21 #endif
22 
23 // Weak attribute
24 #ifndef WEAK_ATR
25 #define WEAK_ATR __attribute__((weak))
26 #endif
27 
28 #ifdef ESP8266
29 // FIXME
30 #define mmc_cli() /*< interrupt disable */
31 // FIXME
32 #define mmc_sei() /*< interrupt enable */
33 #else
34 #define mmc_cli() cli() /*< interrupt disable */
35 #define mmc_sei() sei() /*< interrupt enable */
36 #endif
37 
38 /* mmc_hal.c */
39 MEMSPACE void mmc_install_timer ( void );
40 void mmc_spi_init ( void );
41 void mmc_spi_begin ( void );
42 void mmc_spi_end ( void );
43 void mmc_slow ( void );
44 void mmc_fast ( void );
45 void mmc_spi_TX_buffer ( const uint8_t *data , int count );
46 void mmc_spi_RX_buffer ( const uint8_t *data , int count );
47 uint8_t mmc_spi_TXRX ( uint8_t data );
48 MEMSPACE void mmc_set_ms_timeout ( uint16_t ms );
49 MEMSPACE int mmc_test_timeout ( void );
50 MEMSPACE void mmc_ms_wait ( int ms );
51 MEMSPACE int mmc_init ( int verbose );
52 MEMSPACE void mmc_power_on ( void );
53 MEMSPACE void mmc_power_off ( void );
54 MEMSPACE int mmc_ins_status ( void );
55 MEMSPACE int mmc_wp_status ( void );
56 #endif // _MMC_HAL_H_
mmc_spi_TXRX
uint8_t mmc_spi_TXRX(uint8_t data)
SPI read and write 1 byte.
Definition: mmc_hal.c:158
mmc_test_timeout
MEMSPACE int mmc_test_timeout(void)
Wait for timeout.
Definition: mmc_hal.c:181
mmc_init
MEMSPACE int mmc_init(int verbose)
Initialize MMC and FatFs interface, display diagnostics.
Definition: mmc_hal.c:219
mmc_power_on
MEMSPACE void mmc_power_on(void)
MMC Power ON.
Definition: mmc_hal.c:308
mmc_wp_status
MEMSPACE int mmc_wp_status(void)
MMC Card Write Protect status.
Definition: mmc_hal.c:344
mmc_spi_begin
void mmc_spi_begin(void)
MMC SPI setup and chip select.
Definition: mmc_hal.c:101
mmc_ms_wait
MEMSPACE void mmc_ms_wait(int ms)
Wait for time in milliseconds.
Definition: mmc_hal.c:204
mmc_power_off
MEMSPACE void mmc_power_off(void)
MMC Power OFF.
Definition: mmc_hal.c:317
mmc_ins_status
MEMSPACE int mmc_ins_status(void)
MMC Card Inserted status.
Definition: mmc_hal.c:328
mmc_install_timer
MEMSPACE void mmc_install_timer(void)
Install MMC timer task: mmc_task()
Definition: mmc_hal.c:82
mmc_spi_init
void mmc_spi_init(void)
MMC SPI setup and chip select.
Definition: mmc_hal.c:92
mmc_spi_RX_buffer
void mmc_spi_RX_buffer(const uint8_t *data, int count)
SPI read buffer.
Definition: mmc_hal.c:149
mmc_spi_end
void mmc_spi_end(void)
MMC SPI end and chip deselect.
Definition: mmc_hal.c:109
mmc_slow
void mmc_slow(void)
MMC set slow SPI bus speed Only called when deselected.
Definition: mmc_hal.c:119
mmc_set_ms_timeout
MEMSPACE void mmc_set_ms_timeout(uint16_t ms)
Set MMC timeout timer in Milliseconds.
Definition: mmc_hal.c:169
MEMSPACE
#define MEMSPACE
Definition: mmc_hal.h:20
mmc_fast
void mmc_fast(void)
MMC fast SPI bus speed Only called when deselected.
Definition: mmc_hal.c:129
mmc_spi_TX_buffer
void mmc_spi_TX_buffer(const uint8_t *data, int count)
SPI write buffer.
Definition: mmc_hal.c:139