diff options
| author | [email protected] <[email protected]> | 2012-07-08 14:43:08 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-07-08 14:43:08 +0000 |
| commit | 7729b4a1e4fa0cda20ba5b8ff21701f9bc89e78c (patch) | |
| tree | de36e1bef32ad2afa4be0e71c8e7ce9f25e08934 /components/drivers | |
| parent | 6ae04deffba86e326764ae74b2f8e95119a727ab (diff) | |
move SDIO driver header files to the drivers/include directory and update rtdevice.h
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2209 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/drivers')
13 files changed, 55 insertions, 54 deletions
diff --git a/components/drivers/sdio/mmcsd_card.h b/components/drivers/include/drivers/mmcsd_card.h index b6f559e34b..20bb7dca7a 100644 --- a/components/drivers/sdio/mmcsd_card.h +++ b/components/drivers/include/drivers/mmcsd_card.h @@ -15,8 +15,7 @@ #ifndef __MMCSD_CARD_H__ #define __MMCSD_CARD_H__ -#include "mmcsd_host.h" -#include "sdio.h" +#include <drivers/mmcsd_host.h> #ifdef __cplusplus extern "C" { @@ -95,6 +94,39 @@ struct rt_sdio_cis { rt_uint32_t max_tran_speed; }; +/* + * 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; +}; + +struct rt_sdio_function; +typedef void (rt_sdio_irq_handler_t)(struct rt_sdio_function *); + +/* + * 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; +}; + #define SDIO_MAX_FUNCTIONS 7 diff --git a/components/drivers/sdio/mmcsd_cmd.h b/components/drivers/include/drivers/mmcsd_cmd.h index 1b12f6b448..1b12f6b448 100644 --- a/components/drivers/sdio/mmcsd_cmd.h +++ b/components/drivers/include/drivers/mmcsd_cmd.h diff --git a/components/drivers/sdio/mmcsd_core.h b/components/drivers/include/drivers/mmcsd_core.h index ca433fe291..1f7b38795c 100644 --- a/components/drivers/sdio/mmcsd_core.h +++ b/components/drivers/include/drivers/mmcsd_core.h @@ -16,9 +16,9 @@ #define __CORE_H__ #include <rtthread.h> -#include "mmcsd_host.h" -#include "mmcsd_card.h" -#include "mmcsd_cmd.h" +#include <drivers/mmcsd_host.h> +#include <drivers/mmcsd_card.h> +#include <drivers/mmcsd_cmd.h> #ifdef __cplusplus extern "C" { diff --git a/components/drivers/sdio/mmcsd_host.h b/components/drivers/include/drivers/mmcsd_host.h index 9cbbb51a76..9cbbb51a76 100644 --- a/components/drivers/sdio/mmcsd_host.h +++ b/components/drivers/include/drivers/mmcsd_host.h diff --git a/components/drivers/sdio/sd.h b/components/drivers/include/drivers/sd.h index 47718cd4a2..b2491d7528 100644 --- a/components/drivers/sdio/sd.h +++ b/components/drivers/include/drivers/sd.h @@ -15,7 +15,7 @@ */
#include <rtthread.h>
-#include "mmcsd_host.h"
+#include <drivers/mmcsd_host.h>
#ifdef __cplusplus
extern "C" {
diff --git a/components/drivers/sdio/sdio.h b/components/drivers/include/drivers/sdio.h index 654ec257b7..5a0272bdb3 100644 --- a/components/drivers/sdio/sdio.h +++ b/components/drivers/include/drivers/sdio.h @@ -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)
*/
diff --git a/components/drivers/sdio/sdio_func_ids.h b/components/drivers/include/drivers/sdio_func_ids.h index 4c25622463..4c25622463 100644 --- a/components/drivers/sdio/sdio_func_ids.h +++ b/components/drivers/include/drivers/sdio_func_ids.h diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h index 26c9b3aa6f..846aac6920 100644 --- a/components/drivers/include/rtdevice.h +++ b/components/drivers/include/rtdevice.h @@ -90,4 +90,10 @@ rt_size_t rt_ringbuffer_emptry_size(struct rt_ringbuffer* rb); #include "drivers/pm.h"
#endif
+#ifdef RT_USING_SDIO
+#include "drivers/mmcsd_core.h"
+#include "drivers/sd.h"
+#include "drivers/sdio.h"
+#endif
+
#endif /* __RT_DEVICE_H__ */
diff --git a/components/drivers/sdio/SConscript b/components/drivers/sdio/SConscript index f232b8e514..83477d00d4 100644 --- a/components/drivers/sdio/SConscript +++ b/components/drivers/sdio/SConscript @@ -10,7 +10,7 @@ sdio.c """)
# The set of source files associated with this SConscript file.
-path = [cwd]
+path = [cwd + '/../include']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SDIO'], CPPPATH = path)
diff --git a/components/drivers/sdio/block_dev.c b/components/drivers/sdio/block_dev.c index 4a5a514b93..3bb2736d05 100644 --- a/components/drivers/sdio/block_dev.c +++ b/components/drivers/sdio/block_dev.c @@ -15,8 +15,7 @@ #include <rtthread.h> #include <dfs_fs.h> -#include "mmcsd_core.h" -#include "mmcsd_cmd.h" +#include <drivers/mmcsd_core.h> static rt_list_t blk_devices; diff --git a/components/drivers/sdio/mmcsd_core.c b/components/drivers/sdio/mmcsd_core.c index d11bcce3a8..fb742278b7 100644 --- a/components/drivers/sdio/mmcsd_core.c +++ b/components/drivers/sdio/mmcsd_core.c @@ -13,10 +13,8 @@ */ #include <rtthread.h> -#include "mmcsd_core.h" -#include "mmcsd_card.h" -#include "mmcsd_cmd.h" -#include "sd.h" +#include <drivers/mmcsd_core.h> +#include <drivers/sd.h> #ifndef RT_MMCSD_STACK_SIZE #define RT_MMCSD_STACK_SIZE 1024 diff --git a/components/drivers/sdio/sd.c b/components/drivers/sdio/sd.c index c00625a9e6..da71d40310 100644 --- a/components/drivers/sdio/sd.c +++ b/components/drivers/sdio/sd.c @@ -12,8 +12,8 @@ * 2011-07-25 weety first version */ -#include "mmcsd_core.h" -#include "mmcsd_cmd.h" +#include <drivers/mmcsd_core.h> +#include <drivers/sd.h> static const rt_uint32_t tran_unit[] = { 10000, 100000, 1000000, 10000000, diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c index 8a1d9aa199..18f4f85163 100644 --- a/components/drivers/sdio/sdio.c +++ b/components/drivers/sdio/sdio.c @@ -12,8 +12,8 @@ * 2012-01-13 weety first version
*/
-#include "mmcsd_core.h"
-#include "mmcsd_cmd.h"
+#include <drivers/mmcsd_core.h>
+#include <drivers/sdio.h>
#ifndef RT_SDIO_STACK_SIZE
#define RT_SDIO_STACK_SIZE 512
|
