aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/include/mmc_spi.h3
-rw-r--r--os/hal/src/adc.c5
-rw-r--r--os/hal/src/can.c5
-rw-r--r--os/hal/src/mmc_spi.c4
-rw-r--r--readme.txt4
5 files changed, 14 insertions, 7 deletions
diff --git a/os/hal/include/mmc_spi.h b/os/hal/include/mmc_spi.h
index f413e3c15..241fae54a 100644
--- a/os/hal/include/mmc_spi.h
+++ b/os/hal/include/mmc_spi.h
@@ -120,9 +120,10 @@ typedef bool_t (*mmcquery_t)(void);
/**
* @brief Driver configuration structure.
+ * @note Not required in the current implementation.
*/
typedef struct {
-
+ uint8_t dummy;
} MMCConfig;
/**
diff --git a/os/hal/src/adc.c b/os/hal/src/adc.c
index e057ea425..c5ac7534a 100644
--- a/os/hal/src/adc.c
+++ b/os/hal/src/adc.c
@@ -91,13 +91,14 @@ void adcObjectInit(ADCDriver *adcp) {
* @brief Configures and activates the ADC peripheral.
*
* @param[in] adcp pointer to the @p ADCDriver object
- * @param[in] config pointer to the @p ADCConfig object
+ * @param[in] config pointer to the @p ADCConfig object. Depending on
+ * the implementation the value can be @p NULL.
*
* @api
*/
void adcStart(ADCDriver *adcp, const ADCConfig *config) {
- chDbgCheck((adcp != NULL) && (config != NULL), "adcStart");
+ chDbgCheck(adcp != NULL, "adcStart");
chSysLock();
chDbgAssert((adcp->ad_state == ADC_STOP) || (adcp->ad_state == ADC_READY),
diff --git a/os/hal/src/can.c b/os/hal/src/can.c
index f389380ea..22f816e73 100644
--- a/os/hal/src/can.c
+++ b/os/hal/src/can.c
@@ -88,13 +88,14 @@ void canObjectInit(CANDriver *canp) {
* complete.
*
* @param[in] canp pointer to the @p CANDriver object
- * @param[in] config pointer to the @p CANConfig object
+ * @param[in] config pointer to the @p CANConfig object. Depending on
+ * the implementation the value can be @p NULL.
*
* @api
*/
void canStart(CANDriver *canp, const CANConfig *config) {
- chDbgCheck((canp != NULL) && (config != NULL), "canStart");
+ chDbgCheck(canp != NULL, "canStart");
chSysLock();
chDbgAssert((canp->cd_state == CAN_STOP) ||
diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c
index f98f3f435..1004c26c2 100644
--- a/os/hal/src/mmc_spi.c
+++ b/os/hal/src/mmc_spi.c
@@ -236,13 +236,13 @@ void mmcObjectInit(MMCDriver *mmcp, SPIDriver *spip,
* @brief Configures and activates the MMC peripheral.
*
* @param[in] mmcp pointer to the @p MMCDriver object
- * @param[in] config pointer to the @p MMCConfig object
+ * @param[in] config pointer to the @p MMCConfig object. Must be @p NULL.
*
* @api
*/
void mmcStart(MMCDriver *mmcp, const MMCConfig *config) {
- chDbgCheck((mmcp != NULL) && (config != NULL), "mmcStart");
+ chDbgCheck((mmcp != NULL) && (config == NULL), "mmcStart");
chSysLock();
chDbgAssert(mmcp->mmc_state == MMC_STOP, "mmcStart(), #1", "invalid state");
diff --git a/readme.txt b/readme.txt
index 7c9d5505c..fc1982b43 100644
--- a/readme.txt
+++ b/readme.txt
@@ -67,6 +67,10 @@
*** 2.1.7 ***
- NEW: New ARM Cortex-Mx port for RVCT compiler (probably will not be
included in 2.2.0, requires more testing).
+- CHANGE: Modified the ADC and CAN drivers to allow a NULL pointer for
+ the configuration structure if it is not required by the implementation.
+- CHANGE: Modified the MMC_SPI driver to *require* a NULL as pointer to
+ the configuration.
- CHANGE: Removed enforced inlining for the chSchReadyI() function when
the CH_OPTIMIZE_SPEED is enabled. Now the matter is left to the compiler
specific settings. This change is meant to increase compatibility with