diff options
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/mmc_spi.h | 30 | ||||
-rw-r--r-- | os/hal/include/mmcsd.h | 8 | ||||
-rw-r--r-- | os/hal/include/usb.h | 2 |
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.
*
|