35
35
extern "C" {
36
36
#endif
37
37
38
- extern bool stm32l4_sdcard_spi_init (dosfs_sdcard_t * sdcard );
39
- extern bool stm32l4_sdcard_spi_present (dosfs_sdcard_t * sdcard );
40
- extern uint32_t stm32l4_sdcard_spi_mode (dosfs_sdcard_t * sdcard , int mode );
41
- extern void stm32l4_sdcard_spi_select (dosfs_sdcard_t * sdcard );
42
- extern void stm32l4_sdcard_spi_deselect (dosfs_sdcard_t * sdcard );
43
- extern void stm32l4_sdcard_spi_send (dosfs_sdcard_t * sdcard , uint8_t data );
44
- extern uint8_t stm32l4_sdcard_spi_receive (dosfs_sdcard_t * sdcard );
45
- extern void stm32l4_sdcard_spi_send_data (dosfs_sdcard_t * sdcard , const uint8_t * data , uint32_t count );
46
- extern uint32_t stm32l4_sdcard_spi_receive_data (dosfs_sdcard_t * sdcard , uint8_t * data , uint32_t count );
47
-
48
38
static inline void stm32l4_system_timedate (uint16_t * p_time , uint16_t * p_date )
49
39
{
50
40
stm32l4_rtc_time_t rtc_time ;
@@ -55,17 +45,7 @@ static inline void stm32l4_system_timedate(uint16_t *p_time, uint16_t *p_date)
55
45
* p_date = ((rtc_time .day << 0 ) | (rtc_time .month << 5 ) | ((rtc_time .year + 20 ) << 9 ));
56
46
}
57
47
58
- #define DOSFS_PORT_SDCARD_SPI_INIT (_sdcard ) stm32l4_sdcard_spi_init((_sdcard))
59
- #define DOSFS_PORT_SDCARD_SPI_PRESENT (_sdcard ) stm32l4_sdcard_spi_present((_sdcard))
60
- #define DOSFS_PORT_SDCARD_SPI_MODE (_sdcard , _mode ) stm32l4_sdcard_spi_mode((_sdcard), (_mode))
61
- #define DOSFS_PORT_SDCARD_SPI_SELECT (_sdcard ) stm32l4_sdcard_spi_select((_sdcard))
62
- #define DOSFS_PORT_SDCARD_SPI_DESELECT (_sdcard ) stm32l4_sdcard_spi_deselect((_sdcard))
63
- #define DOSFS_PORT_SDCARD_SPI_SEND (_sdcard , _data ) stm32l4_sdcard_spi_send((_sdcard), (_data))
64
- #define DOSFS_PORT_SDCARD_SPI_RECEIVE (_sdcard ) stm32l4_sdcard_spi_receive((_sdcard))
65
- #define DOSFS_PORT_SDCARD_SPI_SEND_DATA (_sdcard , _data , _count ) stm32l4_sdcard_spi_send_data((_sdcard), (_data), (_count))
66
- #define DOSFS_PORT_SDCARD_SPI_RECEIVE_DATA (_sdcard , _data , _count ) stm32l4_sdcard_spi_receive_data((_sdcard), (_data), (_count))
67
-
68
- #define DOSFS_PORT_CORE_TIMEDATE (_ctime , _cdata ) stm32l4_rtc_timedate((_ctime),(_cdate))
48
+ #define DOSFS_PORT_CORE_TIMEDATE (_ctime , _cdate ) stm32l4_system_timedate((_ctime),(_cdate))
69
49
70
50
#ifdef __cplusplus
71
51
}
0 commit comments