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
This commit is contained in:
luohui2320@gmail.com 2012-07-08 14:43:08 +00:00
parent 6ae04deffb
commit 7729b4a1e4
15 changed files with 57 additions and 56 deletions

View File

@ -38,7 +38,7 @@
#endif
#ifdef RT_USING_SDIO
#include <mmcsd_core.h>
#include <drivers/mmcsd_core.h>
#include "at91_mci.h"
#endif

View File

@ -14,7 +14,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <mmcsd_core.h>
#include <drivers/mmcsd_core.h>
#include <at91sam926x.h>
#include "at91_mci.h"

View File

@ -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

View File

@ -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" {

View File

@ -15,7 +15,7 @@
*/
#include <rtthread.h>
#include "mmcsd_host.h"
#include <drivers/mmcsd_host.h>
#ifdef __cplusplus
extern "C" {

View File

@ -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)
*/

View File

@ -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__ */

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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,

View File

@ -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