aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-14 16:45:57 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-14 16:45:57 +0000
commit2b1173e29246cbc82f45490d0b1b1443d7bf897a (patch)
tree43a43b5de70a4463ae050560f6ebde75f502b0b7 /os/hal/include
parent18cab5548c02bd6c52af77be2a737a8a8fd47070 (diff)
downloadChibiOS-2b1173e29246cbc82f45490d0b1b1443d7bf897a.tar.gz
ChibiOS-2b1173e29246cbc82f45490d0b1b1443d7bf897a.tar.bz2
ChibiOS-2b1173e29246cbc82f45490d0b1b1443d7bf897a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4276 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/mmc_spi.h30
-rw-r--r--os/hal/include/mmcsd.h8
-rw-r--r--os/hal/include/usb.h2
3 files changed, 25 insertions, 15 deletions
diff --git a/os/hal/include/mmc_spi.h b/os/hal/include/mmc_spi.h
index 307ffd3ca..a008292f5 100644
--- a/os/hal/include/mmc_spi.h
+++ b/os/hal/include/mmc_spi.h
@@ -120,6 +120,21 @@ typedef struct {
} MMCConfig;
/**
+ * @brief @p MMCDriver specific methods.
+ */
+#define _mmc_driver_methods \
+ _mmcsd_block_device_methods
+
+/**
+ * @extends MMCSDBlockDeviceVMT
+ *
+ * @brief @p MMCDriver virtual methods table.
+ */
+struct MMCDriverVMT {
+ _mmc_driver_methods
+};
+
+/**
* @extends MMCSDBlockDevice
*
* @brief Structure representing a MMC/SD over SPI driver.
@@ -128,7 +143,8 @@ typedef struct {
/**
* @brief Virtual Methods Table.
*/
- const struct MMCSDBlockDeviceVMT *vmt;
+ const struct MMCDriverVMT *vmt;
+ _mmcsd_block_device_data
/**
* @brief Driver state.
*/
@@ -157,18 +173,6 @@ typedef struct {
* @brief Addresses use blocks instead of bytes.
*/
bool_t block_addresses;
- /**
- * @brief Card CID.
- */
- uint32_t cid[4];
- /**
- * @brief Card CSD.
- */
- uint32_t csd[4];
- /**
- * @brief Total number of blocks in card.
- */
- uint32_t capacity;
} MMCDriver;
/*===========================================================================*/
diff --git a/os/hal/include/mmcsd.h b/os/hal/include/mmcsd.h
index 7595e1202..a05c2602f 100644
--- a/os/hal/include/mmcsd.h
+++ b/os/hal/include/mmcsd.h
@@ -183,7 +183,13 @@
* without implementation.
*/
#define _mmcsd_block_device_data \
- _base_block_device_data
+ _base_block_device_data \
+ /* Card CID.*/ \
+ uint32_t cid[4]; \
+ /* Card CSD.*/ \
+ uint32_t csd[4]; \
+ /* Total number of blocks in card.*/ \
+ uint32_t capacity;
/**
* @extends BaseBlockDeviceVMT
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h
index 751128c7c..ddf8cb321 100644
--- a/os/hal/include/usb.h
+++ b/os/hal/include/usb.h
@@ -423,7 +423,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
* initialized in transaction mode.
* @post The endpoint is ready for @p usbStartReceiveI().
* @note The receive transaction size is equal to the space in the queue
- * rounded to the lower multiple of a packet size. So make sure there
+ * rounded to the lower multiple of a packet size. Make sure there
* is room for at least one packet in the queue before starting
* the receive operation.
*