diff --git a/os/hal/include/adc.h b/os/hal/include/adc.h index a236a040a..53c7c199a 100644 --- a/os/hal/include/adc.h +++ b/os/hal/include/adc.h @@ -39,6 +39,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name ADC configuration options + * @{ + */ /** * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. @@ -54,6 +58,7 @@ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #define ADC_USE_MUTUAL_EXCLUSION TRUE #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -84,6 +89,10 @@ typedef enum { /* Driver macros. */ /*===========================================================================*/ +/** + * @name Low Level driver helper macros + * @{ + */ #if ADC_USE_WAIT || defined(__DOXYGEN__) /** * @brief Resumes a thread waiting for a conversion completion. @@ -211,6 +220,7 @@ typedef enum { _adc_wakeup_isr(adcp); \ } \ } +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/can.h b/os/hal/include/can.h index 538284b3b..44d2cfb19 100644 --- a/os/hal/include/can.h +++ b/os/hal/include/can.h @@ -35,6 +35,10 @@ /* Driver constants. */ /*===========================================================================*/ +/** + * @name CAN status flags + * @{ + */ /** * @brief Errors rate warning. */ @@ -55,17 +59,26 @@ * @brief Overflow in receive queue. */ #define CAN_OVERFLOW_ERROR 16 +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name CAN configuration options + * @{ + */ /** * @brief Sleep mode related APIs inclusion switch. + * @details This option can only be enabled if the CAN implementation supports + * the sleep mode, see the macro @p CAN_SUPPORTS_SLEEP exported by + * the underlying implementation. */ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) #define CAN_USE_SLEEP_MODE TRUE #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -96,6 +109,10 @@ typedef enum { /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Adds some flags to the CAN status mask. * @@ -105,6 +122,7 @@ typedef enum { * @iclass */ #define canAddFlagsI(canp, mask) ((canp)->status |= (mask)) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/icu.h b/os/hal/include/icu.h index 38fed2788..65d7794e5 100644 --- a/os/hal/include/icu.h +++ b/os/hal/include/icu.h @@ -77,6 +77,10 @@ typedef void (*icucallback_t)(ICUDriver *icup); /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Enables the input capture. * @@ -118,7 +122,12 @@ typedef void (*icucallback_t)(ICUDriver *icup); * @iclass */ #define icuGetPeriodI(icup) icu_lld_get_period(icup) +/** @} */ +/** + * @name Low Level driver helper macros + * @{ + */ /** * @brief Common ISR code, ICU width event. * @@ -144,6 +153,7 @@ typedef void (*icucallback_t)(ICUDriver *icup); if (previous_state != ICU_WAITING) \ (icup)->config->period_cb(icup); \ } +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/mac.h b/os/hal/include/mac.h index ad3c7b4dc..37d6bbe9b 100644 --- a/os/hal/include/mac.h +++ b/os/hal/include/mac.h @@ -56,6 +56,10 @@ /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Returns the received frames event source. * @@ -98,6 +102,7 @@ */ #define macReadReceiveDescriptor(rdp, buf, size) \ mac_lld_read_receive_descriptor(rdp, buf, size) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/mii.h b/os/hal/include/mii.h index 7199ee86d..89ba69810 100644 --- a/os/hal/include/mii.h +++ b/os/hal/include/mii.h @@ -18,12 +18,6 @@ along with this program. If not, see . */ -/* - * Parts of this file have been borrowed from the Linux include file - * linux/mii.h: - * Copyright (C) 1996, 1999, 2001 David S. Miller (davem@redhat.com) - */ - /*-* * @file mii.h * @brief MII Driver macros and structures. diff --git a/os/hal/include/mmc_spi.h b/os/hal/include/mmc_spi.h index 6940ca479..f51bd6765 100644 --- a/os/hal/include/mmc_spi.h +++ b/os/hal/include/mmc_spi.h @@ -53,6 +53,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name MMC_SPI configuration options + * @{ + */ /** * @brief Block size for MMC transfers. */ @@ -86,6 +90,7 @@ #if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__) #define MMC_POLLING_DELAY 10 #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -181,6 +186,10 @@ typedef struct { /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Returns the driver state. * @@ -202,6 +211,7 @@ typedef struct { * @api */ #define mmcIsWriteProtected(mmcp) ((mmcp)->is_protected()) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/pal.h b/os/hal/include/pal.h index 2e5b78c03..d844ca8b3 100644 --- a/os/hal/include/pal.h +++ b/os/hal/include/pal.h @@ -35,6 +35,10 @@ /* Driver constants. */ /*===========================================================================*/ +/** + * @name Pads mode constants + * @{ + */ /** * @brief After reset state. * @details The state itself is not specified and is architecture dependent, @@ -81,7 +85,12 @@ * @brief Open-drain output pad. */ #define PAL_MODE_OUTPUT_OPENDRAIN 7 +/** @} */ +/** + * @name Logic level constants + * @{ + */ /** * @brief Logical low state. */ @@ -91,6 +100,7 @@ * @brief Logical high state. */ #define PAL_HIGH 1 +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -177,6 +187,10 @@ typedef struct { #define IOBUS_DECL(name, port, width, offset) \ IOBus name = _IOBUS_DATA(name, port, width, offset) +/** + * @name Macro Functions + * @{ + */ /** * @brief PAL subsystem initialization. * @note This function is implicitly invoked by @p halInit(), there is @@ -499,6 +513,7 @@ typedef struct { #else #define palSetPadMode(port, pad, mode) pal_lld_setpadmode(port, pad, mode) #endif +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/pwm.h b/os/hal/include/pwm.h index 2ffd3599c..960ac2a69 100644 --- a/os/hal/include/pwm.h +++ b/os/hal/include/pwm.h @@ -35,6 +35,10 @@ /* Driver constants. */ /*===========================================================================*/ +/** + * @name PWM output mode macros + * @{ + */ /** * @brief Standard output modes mask. */ @@ -54,6 +58,7 @@ * @brief Inverse PWM logic, active is logic level zero. */ #define PWM_OUTPUT_ACTIVE_LOW 0x02 +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -94,6 +99,10 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp); /* Driver macros. */ /*===========================================================================*/ +/** + * @name PWM duty cycle conversion + * @{ + */ /** * @brief Converts from fraction to pulse width. * @note Be careful with rounding errors, this is integer math not magic. @@ -143,7 +152,12 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp); */ #define PWM_PERCENTAGE_TO_WIDTH(pwmp, percentage) \ PWM_FRACTION_TO_WIDTH(pwmp, 10000, percentage) +/** @} */ +/** + * @name Macro Functions + * @{ + */ /** * @brief Changes the period the PWM peripheral. * @details This function changes the period of a PWM unit that has already @@ -197,6 +211,7 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp); */ #define pwmDisableChannelI(pwmp, channel) \ pwm_lld_disable_channel(pwmp, channel) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h index afc3a6aba..466c48fa6 100644 --- a/os/hal/include/sdc.h +++ b/os/hal/include/sdc.h @@ -42,11 +42,16 @@ */ #define SDC_CMD8_PATTERN 0x000001AA +/** + * @name SD cart types + * @{ + */ #define SDC_MODE_CARDTYPE_MASK 0xF /**< @brief Card type mask. */ #define SDC_MODE_CARDTYPE_SDV11 0 /**< @brief Card is SD V1.1.*/ #define SDC_MODE_CARDTYPE_SDV20 1 /**< @brief Card is SD V2.0.*/ #define SDC_MODE_CARDTYPE_MMC 2 /**< @brief Card is MMC. */ #define SDC_MODE_HIGH_CAPACITY 0x10 /**< @brief High cap.card. */ +/** @} */ /** * @brief Mask of error bits in R1 responses. @@ -87,6 +92,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name SDC configuration options + * @{ + */ /** * @brief Number of initialization attempts before rejecting the card. * @note Attempts are performed at 10mS intevals. @@ -113,6 +122,7 @@ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) #define SDC_NICE_WAITING TRUE #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -142,6 +152,10 @@ typedef enum { /* Driver macros. */ /*===========================================================================*/ +/** + * @name R1 response utilities + * @{ + */ /** * @brief Evaluates to @p TRUE if the R1 response contains error flags. * @@ -162,7 +176,12 @@ typedef enum { * @param[in] r1 the r1 response */ #define SDC_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1) +/** @} */ +/** + * @name Macro Functions + * @{ + */ /** * @brief Returns the driver state. * @@ -204,6 +223,7 @@ typedef enum { * @api */ #define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp)) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/serial.h b/os/hal/include/serial.h index a8c3c1aca..8c610e29e 100644 --- a/os/hal/include/serial.h +++ b/os/hal/include/serial.h @@ -35,21 +35,25 @@ /* Driver constants. */ /*===========================================================================*/ -/** @brief Parity error happened.*/ -#define SD_PARITY_ERROR 32 -/** @brief Framing error happened.*/ -#define SD_FRAMING_ERROR 64 -/** @brief Overflow happened.*/ -#define SD_OVERRUN_ERROR 128 -/** @brief Noise on the line.*/ -#define SD_NOISE_ERROR 256 -/** @brief Break detected.*/ -#define SD_BREAK_DETECTED 512 +/** + * @name Serial status flags + * @{ + */ +#define SD_PARITY_ERROR 32 /**< @brief Parity error happened. */ +#define SD_FRAMING_ERROR 64 /**< @brief Framing error happened. */ +#define SD_OVERRUN_ERROR 128 /**< @brief Overflow happened. */ +#define SD_NOISE_ERROR 256 /**< @brief Noise on the line. */ +#define SD_BREAK_DETECTED 512 /**< @brief Break detected. */ +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name Serial configuration options + * @{ + */ /** * @brief Default bit rate. * @details Configuration parameter, this is the baud rate selected for the @@ -69,6 +73,7 @@ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #define SERIAL_BUFFERS_SIZE 16 #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -105,6 +110,8 @@ typedef struct SerialDriver SerialDriver; _base_asynchronous_channel_methods /** + * @extends BaseAsynchronousChannelVMT + * * @brief @p SerialDriver virtual methods table. */ struct SerialDriverVMT { @@ -128,6 +135,10 @@ struct SerialDriver { /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Direct output check on a @p SerialDriver. * @note This function bypasses the indirect access to the channel and @@ -281,6 +292,7 @@ struct SerialDriver { */ #define sdAsynchronousRead(sdp, b, n) \ chIQReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE) +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/serial_usb.h b/os/hal/include/serial_usb.h index 8e518238d..09be9b708 100644 --- a/os/hal/include/serial_usb.h +++ b/os/hal/include/serial_usb.h @@ -39,6 +39,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name SERIAL_USB configuration options + * @{ + */ /** * @brief Serial over USB buffers size. * @details Configuration parameter, the buffer size must be a multiple of @@ -49,6 +53,7 @@ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) #define SERIAL_USB_BUFFERS_SIZE 64 #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -119,6 +124,8 @@ typedef struct { _base_asynchronous_channel_methods /** + * @extends BaseAsynchronousChannelVMT + * * @brief @p SerialDriver virtual methods table. */ struct SerialUSBDriverVMT { diff --git a/os/hal/include/spi.h b/os/hal/include/spi.h index 104dd9d3e..a07d55cf7 100644 --- a/os/hal/include/spi.h +++ b/os/hal/include/spi.h @@ -39,6 +39,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name SPI configuration options + * @{ + */ /** * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. @@ -54,6 +58,7 @@ #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ @@ -84,6 +89,10 @@ typedef enum { /* Driver macros. */ /*===========================================================================*/ +/** + * @name Macro Functions + * @{ + */ /** * @brief Asserts the slave select signal and prepares for transfers. * @@ -201,7 +210,12 @@ typedef enum { * @return The received data frame from the SPI bus. */ #define spiPolledExchange(spip, frame) spi_lld_polled_exchange(spip, frame) +/** @} */ +/** + * @name Low Level driver helper macros + * @{ + */ #if SPI_USE_WAIT || defined(__DOXYGEN__) /** * @brief Waits for operation completion. @@ -268,6 +282,7 @@ typedef enum { (spip)->state = SPI_READY; \ _spi_wakeup_isr(spip); \ } +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/uart.h b/os/hal/include/uart.h index 148aa6877..6d3d12d5f 100644 --- a/os/hal/include/uart.h +++ b/os/hal/include/uart.h @@ -35,18 +35,17 @@ /* Driver constants. */ /*===========================================================================*/ -/** @brief No pending conditions.*/ -#define UART_NO_ERROR 0 -/** @brief Parity error happened.*/ -#define UART_PARITY_ERROR 4 -/** @brief Framing error happened.*/ -#define UART_FRAMING_ERROR 8 -/** @brief Overflow happened.*/ -#define UART_OVERRUN_ERROR 16 -/** @brief Noise on the line.*/ -#define UART_NOISE_ERROR 32 -/** @brief Break detected.*/ -#define UART_BREAK_DETECTED 64 +/** + * @name UART status flags + * @{ + */ +#define UART_NO_ERROR 0 /**< @brief No pending conditions. */ +#define UART_PARITY_ERROR 4 /**< @brief Parity error happened. */ +#define UART_FRAMING_ERROR 8 /**< @brief Framing error happened. */ +#define UART_OVERRUN_ERROR 16 /**< @brief Overflow happened. */ +#define UART_NOISE_ERROR 32 /**< @brief Noise on the line. */ +#define UART_BREAK_DETECTED 64 /**< @brief Break detected. */ +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h index c4cf68fe2..884b11e8d 100644 --- a/os/hal/include/usb.h +++ b/os/hal/include/usb.h @@ -77,6 +77,10 @@ #define USB_EARLY_SET_ADDRESS 0 #define USB_LATE_SET_ADDRESS 1 +/** + * @name Helper macros for USB descriptors + * @{ + */ /** * @brief Helper macro for index values into descriptor strings. */ @@ -166,12 +170,17 @@ USB_DESC_BYTE(bmAttributes), \ USB_DESC_WORD(wMaxPacketSize), \ USB_DESC_BYTE(bInterval) +/** @} */ /** * @brief Returned by some functions to report a busy endpoint. */ #define USB_ENDPOINT_BUSY ((size_t)0xFFFFFFFF) +/** + * @name Endpoint types and settings + * @{ + */ #define USB_EP_MODE_TYPE 0x0003 /**< Endpoint type mask. */ #define USB_EP_MODE_TYPE_CTRL 0x0000 /**< Control endpoint. */ #define USB_EP_MODE_TYPE_ISOC 0x0001 /**< Isochronous endpoint. */ @@ -179,6 +188,7 @@ #define USB_EP_MODE_TYPE_INTR 0x0003 /**< Interrupt endpoint. */ #define USB_EP_MODE_TRANSACTION 0x0000 /**< Transaction mode. */ #define USB_EP_MODE_PACKET 0x0010 /**< Packet mode enabled. */ +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -311,6 +321,11 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/ + +/** + * @name Macro Functions + * @{ + */ /** * @brief Returns the current frame number. * @@ -411,7 +426,12 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, * @special */ #define usbReadSetup(usbp, ep, buf) usb_lld_read_setup(usbp, ep, buf) +/** @} */ +/** + * @name Low Level driver helper macros + * @{ + */ /** * @brief Common ISR code, usb event callback. * @@ -474,6 +494,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, (usbp)->receiving &= ~(1 << (ep)); \ (usbp)->epc[ep]->out_cb(usbp, ep); \ } +/** @} */ /*===========================================================================*/ /* External declarations. */ diff --git a/os/hal/include/usb_cdc.h b/os/hal/include/usb_cdc.h index a388f9f70..cd9d78f10 100644 --- a/os/hal/include/usb_cdc.h +++ b/os/hal/include/usb_cdc.h @@ -67,6 +67,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @name USB_CDC configuration options + * @{ + */ /** * @brief Endpoint number for bulk IN. */ @@ -87,6 +91,7 @@ #if !defined(DATA_AVAILABLE_EP) || defined(__DOXYGEN__) #define DATA_AVAILABLE_EP 3 #endif +/** @} */ /*===========================================================================*/ /* Derived constants and error checks. */ diff --git a/os/hal/src/sdc.c b/os/hal/src/sdc.c index 59d7db005..6bdaa2b5a 100644 --- a/os/hal/src/sdc.c +++ b/os/hal/src/sdc.c @@ -54,7 +54,7 @@ * * @notapi */ -bool_t sdc_wait_for_transfer_state(SDCDriver *sdcp) { +bool_t _sdc_wait_for_transfer_state(SDCDriver *sdcp) { uint32_t resp[1]; while (TRUE) { @@ -314,7 +314,7 @@ bool_t sdcDisconnect(SDCDriver *sdcp) { chSysUnlock(); /* Waits for eventual pending operations completion.*/ - if (sdc_wait_for_transfer_state(sdcp)) + if (_sdc_wait_for_transfer_state(sdcp)) return TRUE; /* Card clock stopped.*/ diff --git a/os/hal/templates/can_lld.h b/os/hal/templates/can_lld.h index d07bd78cc..d1f8d6044 100644 --- a/os/hal/templates/can_lld.h +++ b/os/hal/templates/can_lld.h @@ -45,19 +45,6 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ -/** - * @brief Sleep mode related APIs inclusion switch. - * @note This switch is enforced to @p FALSE if the driver implementation - * does not support the sleep mode. - */ -#if CAN_SUPPORTS_SLEEP || defined(__DOXYGEN__) -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif -#else /* !CAN_SUPPORTS_SLEEP */ -#define CAN_USE_SLEEP_MODE FALSE -#endif /* !CAN_SUPPORTS_SLEEP */ - /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h index da86f61ed..0e616d3d5 100644 --- a/os/hal/templates/halconf.h +++ b/os/hal/templates/halconf.h @@ -34,6 +34,10 @@ #include "mcuconf.h" +/** + * @name Drivers enable switches + * @{ + */ /** * @brief Enables the PAL subsystem. */ @@ -138,9 +142,13 @@ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) #define HAL_USE_USB TRUE #endif +/** @} */ /*===========================================================================*/ -/* ADC driver related settings. */ +/** + * @name ADC driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -158,9 +166,13 @@ #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #define ADC_USE_MUTUAL_EXCLUSION TRUE #endif +/** @} */ /*===========================================================================*/ -/* CAN driver related settings. */ +/** + * @name CAN driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -169,9 +181,13 @@ #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) #define CAN_USE_SLEEP_MODE TRUE #endif +/** @} */ /*===========================================================================*/ -/* I2C driver related settings. */ +/** + * @name I2C driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -180,13 +196,21 @@ #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #define I2C_USE_MUTUAL_EXCLUSION TRUE #endif +/** @} */ /*===========================================================================*/ -/* MAC driver related settings. */ +/** + * @name MAC driver related setting + * @{ + */ /*===========================================================================*/ +/** @} */ /*===========================================================================*/ -/* MMC_SPI driver related settings. */ +/** + * @name MMC_SPI driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -233,17 +257,29 @@ #if !defined(MMC_USE_SPI_POLLING) || defined(__DOXYGEN__) #define MMC_USE_SPI_POLLING TRUE #endif +/** @} */ /*===========================================================================*/ -/* PAL driver related settings. */ +/** + * @name PAL driver related setting + * @{ + */ /*===========================================================================*/ +/** @} */ /*===========================================================================*/ -/* PWM driver related settings. */ +/** + * @name PWM driver related setting + * @{ + */ /*===========================================================================*/ +/** @} */ /*===========================================================================*/ -/* SDC driver related settings. */ +/** + * @name SDC driver related setting + * @{ + */ /*===========================================================================*/ /** * @brief Number of initialization attempts before rejecting the card. @@ -271,9 +307,13 @@ #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) #define SDC_NICE_WAITING TRUE #endif +/** @} */ /*===========================================================================*/ -/* SERIAL driver related settings. */ +/** + * @name SERIAL driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -295,9 +335,32 @@ #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #define SERIAL_BUFFERS_SIZE 16 #endif +/** @} */ + /*===========================================================================*/ -/* SPI driver related settings. */ +/** + * @name SERIAL_USB driver related setting + * @{ + */ +/*===========================================================================*/ +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 64 +#endif +/** @} */ + +/*===========================================================================*/ +/** + * @name SPI driver related setting + * @{ + */ /*===========================================================================*/ /** @@ -315,10 +378,15 @@ #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif +/** @} */ /*===========================================================================*/ -/* UART driver related settings. */ +/** + * @name UART driver related setting + * @{ + */ /*===========================================================================*/ +/** @} */ #endif /* _HALCONF_H_ */ diff --git a/os/hal/templates/mac_lld.h b/os/hal/templates/mac_lld.h index e8abe2941..e103128a9 100644 --- a/os/hal/templates/mac_lld.h +++ b/os/hal/templates/mac_lld.h @@ -39,27 +39,6 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ -/** - * @brief Number of available transmit buffers. - */ -#if !defined(MAC_TRANSMIT_BUFFERS) || defined(__DOXYGEN__) -#define MAC_TRANSMIT_BUFFERS 2 -#endif - -/** - * @brief Number of available receive buffers. - */ -#if !defined(MAC_RECEIVE_BUFFERS) || defined(__DOXYGEN__) -#define MAC_RECEIVE_BUFFERS 2 -#endif - -/** - * @brief Maximum supported frame size. - */ -#if !defined(MAC_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define MAC_BUFFERS_SIZE 1518 -#endif - /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ diff --git a/todo.txt b/todo.txt index 4cd406b16..f64e907cb 100644 --- a/todo.txt +++ b/todo.txt @@ -18,6 +18,7 @@ X STM32L support. X STM32L-Discovery demo and article. X File System infrastructure. X STM32F2xx support. +- MMC_SPI driver revision and speedup. - Test suite overhaul, the API should be more generic in order to be used with different subsystems and not just the kernel. - STM32 USB support for double buffering.