aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/hal.dox4
-rw-r--r--os/hal/include/mmc_spi.h34
-rw-r--r--os/hal/include/serial.h2
-rw-r--r--os/hal/templates/halconf.h87
-rw-r--r--test/testsem.c1
5 files changed, 90 insertions, 38 deletions
diff --git a/os/hal/hal.dox b/os/hal/hal.dox
index 7b51039ad..619d29796 100644
--- a/os/hal/hal.dox
+++ b/os/hal/hal.dox
@@ -68,14 +68,14 @@
*/
/**
- * @defgroup HAL_CONF HAL Configuration
+ * @defgroup HAL_CONF Configuration
* @brief @ref HAL Configuration.
* @details The file @p halconf.h contains the high level settings for all
* the drivers supported by the HAL. The low level, platform dependent,
* settings are contained in the @p mcuconf.h file instead and are describe
* in the various platforms reference manuals.
*
- * @ingroup HAL
+ * @ingroup IO
*/
/**
diff --git a/os/hal/include/mmc_spi.h b/os/hal/include/mmc_spi.h
index 6af424d29..c5732887d 100644
--- a/os/hal/include/mmc_spi.h
+++ b/os/hal/include/mmc_spi.h
@@ -34,19 +34,19 @@
/* Driver constants. */
/*===========================================================================*/
-#define MMC_CMD0_RETRY 10
-#define MMC_CMD1_RETRY 100
-#define MMC_WAIT_DATA 10000
-
-#define MMC_CMDGOIDLE 0
-#define MMC_CMDINIT 1
-#define MMC_CMDREADCSD 9
-#define MMC_CMDSTOP 12
-#define MMC_CMDSETBLOCKLEN 16
-#define MMC_CMDREAD 17
-#define MMC_CMDREADMULTIPLE 18
-#define MMC_CMDWRITE 24
-#define MMC_CMDWRITEMULTIPLE 25
+#define MMC_CMD0_RETRY 10
+#define MMC_CMD1_RETRY 100
+#define MMC_WAIT_DATA 10000
+
+#define MMC_CMDGOIDLE 0
+#define MMC_CMDINIT 1
+#define MMC_CMDREADCSD 9
+#define MMC_CMDSTOP 12
+#define MMC_CMDSETBLOCKLEN 16
+#define MMC_CMDREAD 17
+#define MMC_CMDREADMULTIPLE 18
+#define MMC_CMDWRITE 24
+#define MMC_CMDWRITEMULTIPLE 25
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -56,7 +56,7 @@
* @brief Block size for MMC transfers.
*/
#if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)
-#define MMC_SECTOR_SIZE 512
+#define MMC_SECTOR_SIZE 512
#endif
/**
@@ -68,7 +68,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/**
@@ -76,14 +76,14 @@
* insertion event.
*/
#if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__)
-#define MMC_POLLING_INTERVAL 10
+#define MMC_POLLING_INTERVAL 10
#endif
/**
* @brief Interval, in milliseconds, between insertion queries.
*/
#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
-#define MMC_POLLING_DELAY 10
+#define MMC_POLLING_DELAY 10
#endif
/*===========================================================================*/
diff --git a/os/hal/include/serial.h b/os/hal/include/serial.h
index 6b4f05688..79e40fa72 100644
--- a/os/hal/include/serial.h
+++ b/os/hal/include/serial.h
@@ -72,7 +72,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 64
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h
index 719a3cf2f..321fa3830 100644
--- a/os/hal/templates/halconf.h
+++ b/os/hal/templates/halconf.h
@@ -36,11 +36,11 @@
#define _HALCONF_H_
/*
- * Uncomment the following line in order to include a mcu-related
+ * Enable the following line in order to include a mcu-related
* settings file. This file can be used to include platform specific
* header files or to override the low level drivers settings.
*/
-/*#include "mcuconf.h"*/
+#include "mcuconf.h"
/*===========================================================================*/
/* PAL driver related settings. */
@@ -64,6 +64,13 @@
#define CH_HAL_USE_ADC TRUE
#endif
+/**
+ * @brief Inclusion of the @p adcWaitConversion() function.
+ */
+#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+#define ADC_USE_WAIT TRUE
+#endif
+
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
@@ -75,10 +82,12 @@
#define CH_HAL_USE_CAN TRUE
#endif
-/*
- * Default CAN settings overrides (uncomment to override).
+/**
+ * @brief Sleep mode related APIs inclusion switch.
*/
-/*#define CAN_USE_SLEEP_MODE TRUE*/
+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
/*===========================================================================*/
/* MAC driver related settings. */
@@ -113,11 +122,25 @@
#define CH_HAL_USE_SERIAL TRUE
#endif
-/*
- * Default SERIAL settings overrides (uncomment to override).
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
*/
-/*#define SERIAL_DEFAULT_BITRATE 38400*/
-/*#define SERIAL_BUFFERS_SIZE 64*/
+#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+#define SERIAL_DEFAULT_BITRATE 38400
+#endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE 16
+#endif
/*===========================================================================*/
/* SPI driver related settings. */
@@ -130,10 +153,12 @@
#define CH_HAL_USE_SPI TRUE
#endif
-/*
- * Default SPI settings overrides (uncomment to override).
+/**
+ * @brief Enables the mutual exclusion APIs on the SPI bus.
*/
-/*#define SPI_USE_MUTUAL_EXCLUSION TRUE*/
+#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
@@ -146,13 +171,39 @@
#define CH_HAL_USE_MMC_SPI TRUE
#endif
-/*
- * Default MMC_SPI settings overrides (uncomment to override).
+/**
+ * @brief Block size for MMC transfers.
*/
-/*#define MMC_SECTOR_SIZE 512*/
-/*#define MMC_NICE_WAITING TRUE*/
-/*#define MMC_POLLING_INTERVAL 10*/
-/*#define MMC_POLLING_DELAY 10*/
+#if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)
+#define MMC_SECTOR_SIZE 512
+#endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+#define MMC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief Number of positive insertion queries before generating the
+ * insertion event.
+ */
+#if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__)
+#define MMC_POLLING_INTERVAL 10
+#endif
+
+/**
+ * @brief Interval, in milliseconds, between insertion queries.
+ */
+#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
+#define MMC_POLLING_DELAY 10
+#endif
/*===========================================================================*/
/* UART driver related settings. */
diff --git a/test/testsem.c b/test/testsem.c
index 85535ed0a..46caad56a 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -42,6 +42,7 @@
* - @subpage test_sem_001
* - @subpage test_sem_002
* - @subpage test_sem_003
+ * - @subpage test_sem_004
* .
* @file testsem.c
* @brief Semaphores test source file