|
@@ -18,48 +18,14 @@
|
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
-#include "mmcsd_host.h"
|
|
|
-#include "mmcsd_card.h"
|
|
|
-#include "sdio_func_ids.h"
|
|
|
+#include <drivers/mmcsd_host.h>
|
|
|
+#include <drivers/mmcsd_card.h>
|
|
|
+#include <drivers/sdio_func_ids.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
extern "C" {
|
|
|
#endif
|
|
|
|
|
|
-struct rt_sdio_function;
|
|
|
-
|
|
|
-typedef void (rt_sdio_irq_handler_t)(struct rt_sdio_function *);
|
|
|
-
|
|
|
-/*
|
|
|
- * SDIO function CIS tuple (unknown to the core)
|
|
|
- */
|
|
|
-struct rt_sdio_function_tuple {
|
|
|
- struct rt_sdio_function_tuple *next;
|
|
|
- rt_uint8_t code;
|
|
|
- rt_uint8_t size;
|
|
|
- rt_uint8_t *data;
|
|
|
-};
|
|
|
-
|
|
|
-/*
|
|
|
- * SDIO function devices
|
|
|
- */
|
|
|
-struct rt_sdio_function {
|
|
|
- struct rt_mmcsd_card *card; /* the card this device belongs to */
|
|
|
- rt_sdio_irq_handler_t *irq_handler; /* IRQ callback */
|
|
|
- rt_uint8_t num; /* function number */
|
|
|
-
|
|
|
- rt_uint8_t func_code; /* Standard SDIO Function interface code */
|
|
|
- rt_uint16_t manufacturer; /* manufacturer id */
|
|
|
- rt_uint16_t product; /* product id */
|
|
|
-
|
|
|
- rt_uint32_t max_blk_size; /* maximum block size */
|
|
|
- rt_uint32_t cur_blk_size; /* current block size */
|
|
|
-
|
|
|
- rt_uint32_t enable_timeout_val; /* max enable timeout in msec */
|
|
|
-
|
|
|
- struct rt_sdio_function_tuple *tuples;
|
|
|
-};
|
|
|
-
|
|
|
/*
|
|
|
* Card Common Control Registers (CCCR)
|
|
|
*/
|