HAL documentation improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3252 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
c9be79def6
commit
718dc5084f
|
@ -39,6 +39,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ADC configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Enables synchronous APIs.
|
* @brief Enables synchronous APIs.
|
||||||
* @note Disabling this option saves both code and data space.
|
* @note Disabling this option saves both code and data space.
|
||||||
|
@ -54,6 +58,7 @@
|
||||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -84,6 +89,10 @@ typedef enum {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Low Level driver helper macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
#if ADC_USE_WAIT || defined(__DOXYGEN__)
|
#if ADC_USE_WAIT || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Resumes a thread waiting for a conversion completion.
|
* @brief Resumes a thread waiting for a conversion completion.
|
||||||
|
@ -211,6 +220,7 @@ typedef enum {
|
||||||
_adc_wakeup_isr(adcp); \
|
_adc_wakeup_isr(adcp); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name CAN status flags
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Errors rate warning.
|
* @brief Errors rate warning.
|
||||||
*/
|
*/
|
||||||
|
@ -55,17 +59,26 @@
|
||||||
* @brief Overflow in receive queue.
|
* @brief Overflow in receive queue.
|
||||||
*/
|
*/
|
||||||
#define CAN_OVERFLOW_ERROR 16
|
#define CAN_OVERFLOW_ERROR 16
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name CAN configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Sleep mode related APIs inclusion switch.
|
* @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__)
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
#define CAN_USE_SLEEP_MODE TRUE
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -96,6 +109,10 @@ typedef enum {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Adds some flags to the CAN status mask.
|
* @brief Adds some flags to the CAN status mask.
|
||||||
*
|
*
|
||||||
|
@ -105,6 +122,7 @@ typedef enum {
|
||||||
* @iclass
|
* @iclass
|
||||||
*/
|
*/
|
||||||
#define canAddFlagsI(canp, mask) ((canp)->status |= (mask))
|
#define canAddFlagsI(canp, mask) ((canp)->status |= (mask))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -77,6 +77,10 @@ typedef void (*icucallback_t)(ICUDriver *icup);
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Enables the input capture.
|
* @brief Enables the input capture.
|
||||||
*
|
*
|
||||||
|
@ -118,7 +122,12 @@ typedef void (*icucallback_t)(ICUDriver *icup);
|
||||||
* @iclass
|
* @iclass
|
||||||
*/
|
*/
|
||||||
#define icuGetPeriodI(icup) icu_lld_get_period(icup)
|
#define icuGetPeriodI(icup) icu_lld_get_period(icup)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Low Level driver helper macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Common ISR code, ICU width event.
|
* @brief Common ISR code, ICU width event.
|
||||||
*
|
*
|
||||||
|
@ -144,6 +153,7 @@ typedef void (*icucallback_t)(ICUDriver *icup);
|
||||||
if (previous_state != ICU_WAITING) \
|
if (previous_state != ICU_WAITING) \
|
||||||
(icup)->config->period_cb(icup); \
|
(icup)->config->period_cb(icup); \
|
||||||
}
|
}
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -56,6 +56,10 @@
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Returns the received frames event source.
|
* @brief Returns the received frames event source.
|
||||||
*
|
*
|
||||||
|
@ -98,6 +102,7 @@
|
||||||
*/
|
*/
|
||||||
#define macReadReceiveDescriptor(rdp, buf, size) \
|
#define macReadReceiveDescriptor(rdp, buf, size) \
|
||||||
mac_lld_read_receive_descriptor(rdp, buf, size)
|
mac_lld_read_receive_descriptor(rdp, buf, size)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* 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
|
* @file mii.h
|
||||||
* @brief MII Driver macros and structures.
|
* @brief MII Driver macros and structures.
|
||||||
|
|
|
@ -53,6 +53,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name MMC_SPI configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Block size for MMC transfers.
|
* @brief Block size for MMC transfers.
|
||||||
*/
|
*/
|
||||||
|
@ -86,6 +90,7 @@
|
||||||
#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
|
#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
|
||||||
#define MMC_POLLING_DELAY 10
|
#define MMC_POLLING_DELAY 10
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -181,6 +186,10 @@ typedef struct {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Returns the driver state.
|
* @brief Returns the driver state.
|
||||||
*
|
*
|
||||||
|
@ -202,6 +211,7 @@ typedef struct {
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define mmcIsWriteProtected(mmcp) ((mmcp)->is_protected())
|
#define mmcIsWriteProtected(mmcp) ((mmcp)->is_protected())
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Pads mode constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief After reset state.
|
* @brief After reset state.
|
||||||
* @details The state itself is not specified and is architecture dependent,
|
* @details The state itself is not specified and is architecture dependent,
|
||||||
|
@ -81,7 +85,12 @@
|
||||||
* @brief Open-drain output pad.
|
* @brief Open-drain output pad.
|
||||||
*/
|
*/
|
||||||
#define PAL_MODE_OUTPUT_OPENDRAIN 7
|
#define PAL_MODE_OUTPUT_OPENDRAIN 7
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Logic level constants
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Logical low state.
|
* @brief Logical low state.
|
||||||
*/
|
*/
|
||||||
|
@ -91,6 +100,7 @@
|
||||||
* @brief Logical high state.
|
* @brief Logical high state.
|
||||||
*/
|
*/
|
||||||
#define PAL_HIGH 1
|
#define PAL_HIGH 1
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
@ -177,6 +187,10 @@ typedef struct {
|
||||||
#define IOBUS_DECL(name, port, width, offset) \
|
#define IOBUS_DECL(name, port, width, offset) \
|
||||||
IOBus name = _IOBUS_DATA(name, port, width, offset)
|
IOBus name = _IOBUS_DATA(name, port, width, offset)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief PAL subsystem initialization.
|
* @brief PAL subsystem initialization.
|
||||||
* @note This function is implicitly invoked by @p halInit(), there is
|
* @note This function is implicitly invoked by @p halInit(), there is
|
||||||
|
@ -499,6 +513,7 @@ typedef struct {
|
||||||
#else
|
#else
|
||||||
#define palSetPadMode(port, pad, mode) pal_lld_setpadmode(port, pad, mode)
|
#define palSetPadMode(port, pad, mode) pal_lld_setpadmode(port, pad, mode)
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name PWM output mode macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Standard output modes mask.
|
* @brief Standard output modes mask.
|
||||||
*/
|
*/
|
||||||
|
@ -54,6 +58,7 @@
|
||||||
* @brief Inverse PWM logic, active is logic level zero.
|
* @brief Inverse PWM logic, active is logic level zero.
|
||||||
*/
|
*/
|
||||||
#define PWM_OUTPUT_ACTIVE_LOW 0x02
|
#define PWM_OUTPUT_ACTIVE_LOW 0x02
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
@ -94,6 +99,10 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp);
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name PWM duty cycle conversion
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Converts from fraction to pulse width.
|
* @brief Converts from fraction to pulse width.
|
||||||
* @note Be careful with rounding errors, this is integer math not magic.
|
* @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) \
|
#define PWM_PERCENTAGE_TO_WIDTH(pwmp, percentage) \
|
||||||
PWM_FRACTION_TO_WIDTH(pwmp, 10000, percentage)
|
PWM_FRACTION_TO_WIDTH(pwmp, 10000, percentage)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Changes the period the PWM peripheral.
|
* @brief Changes the period the PWM peripheral.
|
||||||
* @details This function changes the period of a PWM unit that has already
|
* @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) \
|
#define pwmDisableChannelI(pwmp, channel) \
|
||||||
pwm_lld_disable_channel(pwmp, channel)
|
pwm_lld_disable_channel(pwmp, channel)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -42,11 +42,16 @@
|
||||||
*/
|
*/
|
||||||
#define SDC_CMD8_PATTERN 0x000001AA
|
#define SDC_CMD8_PATTERN 0x000001AA
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SD cart types
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
#define SDC_MODE_CARDTYPE_MASK 0xF /**< @brief Card type mask. */
|
#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_SDV11 0 /**< @brief Card is SD V1.1.*/
|
||||||
#define SDC_MODE_CARDTYPE_SDV20 1 /**< @brief Card is SD V2.0.*/
|
#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_CARDTYPE_MMC 2 /**< @brief Card is MMC. */
|
||||||
#define SDC_MODE_HIGH_CAPACITY 0x10 /**< @brief High cap.card. */
|
#define SDC_MODE_HIGH_CAPACITY 0x10 /**< @brief High cap.card. */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mask of error bits in R1 responses.
|
* @brief Mask of error bits in R1 responses.
|
||||||
|
@ -87,6 +92,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SDC configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Number of initialization attempts before rejecting the card.
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
* @note Attempts are performed at 10mS intevals.
|
* @note Attempts are performed at 10mS intevals.
|
||||||
|
@ -113,6 +122,7 @@
|
||||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
#define SDC_NICE_WAITING TRUE
|
#define SDC_NICE_WAITING TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -142,6 +152,10 @@ typedef enum {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name R1 response utilities
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Evaluates to @p TRUE if the R1 response contains error flags.
|
* @brief Evaluates to @p TRUE if the R1 response contains error flags.
|
||||||
*
|
*
|
||||||
|
@ -162,7 +176,12 @@ typedef enum {
|
||||||
* @param[in] r1 the r1 response
|
* @param[in] r1 the r1 response
|
||||||
*/
|
*/
|
||||||
#define SDC_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1)
|
#define SDC_R1_IS_CARD_LOCKED(r1) (((r1) >> 21) & 1)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Returns the driver state.
|
* @brief Returns the driver state.
|
||||||
*
|
*
|
||||||
|
@ -204,6 +223,7 @@ typedef enum {
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
|
#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -35,21 +35,25 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/** @brief Parity error happened.*/
|
/**
|
||||||
#define SD_PARITY_ERROR 32
|
* @name Serial status flags
|
||||||
/** @brief Framing error happened.*/
|
* @{
|
||||||
#define SD_FRAMING_ERROR 64
|
*/
|
||||||
/** @brief Overflow happened.*/
|
#define SD_PARITY_ERROR 32 /**< @brief Parity error happened. */
|
||||||
#define SD_OVERRUN_ERROR 128
|
#define SD_FRAMING_ERROR 64 /**< @brief Framing error happened. */
|
||||||
/** @brief Noise on the line.*/
|
#define SD_OVERRUN_ERROR 128 /**< @brief Overflow happened. */
|
||||||
#define SD_NOISE_ERROR 256
|
#define SD_NOISE_ERROR 256 /**< @brief Noise on the line. */
|
||||||
/** @brief Break detected.*/
|
#define SD_BREAK_DETECTED 512 /**< @brief Break detected. */
|
||||||
#define SD_BREAK_DETECTED 512
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Serial configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Default bit rate.
|
* @brief Default bit rate.
|
||||||
* @details Configuration parameter, this is the baud rate selected for the
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
@ -69,6 +73,7 @@
|
||||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_BUFFERS_SIZE 16
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -105,6 +110,8 @@ typedef struct SerialDriver SerialDriver;
|
||||||
_base_asynchronous_channel_methods
|
_base_asynchronous_channel_methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @extends BaseAsynchronousChannelVMT
|
||||||
|
*
|
||||||
* @brief @p SerialDriver virtual methods table.
|
* @brief @p SerialDriver virtual methods table.
|
||||||
*/
|
*/
|
||||||
struct SerialDriverVMT {
|
struct SerialDriverVMT {
|
||||||
|
@ -128,6 +135,10 @@ struct SerialDriver {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Direct output check on a @p SerialDriver.
|
* @brief Direct output check on a @p SerialDriver.
|
||||||
* @note This function bypasses the indirect access to the channel and
|
* @note This function bypasses the indirect access to the channel and
|
||||||
|
@ -281,6 +292,7 @@ struct SerialDriver {
|
||||||
*/
|
*/
|
||||||
#define sdAsynchronousRead(sdp, b, n) \
|
#define sdAsynchronousRead(sdp, b, n) \
|
||||||
chIQReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE)
|
chIQReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SERIAL_USB configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Serial over USB buffers size.
|
* @brief Serial over USB buffers size.
|
||||||
* @details Configuration parameter, the buffer size must be a multiple of
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
@ -49,6 +53,7 @@
|
||||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 64
|
#define SERIAL_USB_BUFFERS_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -119,6 +124,8 @@ typedef struct {
|
||||||
_base_asynchronous_channel_methods
|
_base_asynchronous_channel_methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @extends BaseAsynchronousChannelVMT
|
||||||
|
*
|
||||||
* @brief @p SerialDriver virtual methods table.
|
* @brief @p SerialDriver virtual methods table.
|
||||||
*/
|
*/
|
||||||
struct SerialUSBDriverVMT {
|
struct SerialUSBDriverVMT {
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SPI configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Enables synchronous APIs.
|
* @brief Enables synchronous APIs.
|
||||||
* @note Disabling this option saves both code and data space.
|
* @note Disabling this option saves both code and data space.
|
||||||
|
@ -54,6 +58,7 @@
|
||||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -84,6 +89,10 @@ typedef enum {
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Asserts the slave select signal and prepares for transfers.
|
* @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.
|
* @return The received data frame from the SPI bus.
|
||||||
*/
|
*/
|
||||||
#define spiPolledExchange(spip, frame) spi_lld_polled_exchange(spip, frame)
|
#define spiPolledExchange(spip, frame) spi_lld_polled_exchange(spip, frame)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Low Level driver helper macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
#if SPI_USE_WAIT || defined(__DOXYGEN__)
|
#if SPI_USE_WAIT || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @brief Waits for operation completion.
|
* @brief Waits for operation completion.
|
||||||
|
@ -268,6 +282,7 @@ typedef enum {
|
||||||
(spip)->state = SPI_READY; \
|
(spip)->state = SPI_READY; \
|
||||||
_spi_wakeup_isr(spip); \
|
_spi_wakeup_isr(spip); \
|
||||||
}
|
}
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -35,18 +35,17 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/** @brief No pending conditions.*/
|
/**
|
||||||
#define UART_NO_ERROR 0
|
* @name UART status flags
|
||||||
/** @brief Parity error happened.*/
|
* @{
|
||||||
#define UART_PARITY_ERROR 4
|
*/
|
||||||
/** @brief Framing error happened.*/
|
#define UART_NO_ERROR 0 /**< @brief No pending conditions. */
|
||||||
#define UART_FRAMING_ERROR 8
|
#define UART_PARITY_ERROR 4 /**< @brief Parity error happened. */
|
||||||
/** @brief Overflow happened.*/
|
#define UART_FRAMING_ERROR 8 /**< @brief Framing error happened. */
|
||||||
#define UART_OVERRUN_ERROR 16
|
#define UART_OVERRUN_ERROR 16 /**< @brief Overflow happened. */
|
||||||
/** @brief Noise on the line.*/
|
#define UART_NOISE_ERROR 32 /**< @brief Noise on the line. */
|
||||||
#define UART_NOISE_ERROR 32
|
#define UART_BREAK_DETECTED 64 /**< @brief Break detected. */
|
||||||
/** @brief Break detected.*/
|
/** @} */
|
||||||
#define UART_BREAK_DETECTED 64
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
|
|
@ -77,6 +77,10 @@
|
||||||
#define USB_EARLY_SET_ADDRESS 0
|
#define USB_EARLY_SET_ADDRESS 0
|
||||||
#define USB_LATE_SET_ADDRESS 1
|
#define USB_LATE_SET_ADDRESS 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Helper macros for USB descriptors
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Helper macro for index values into descriptor strings.
|
* @brief Helper macro for index values into descriptor strings.
|
||||||
*/
|
*/
|
||||||
|
@ -166,12 +170,17 @@
|
||||||
USB_DESC_BYTE(bmAttributes), \
|
USB_DESC_BYTE(bmAttributes), \
|
||||||
USB_DESC_WORD(wMaxPacketSize), \
|
USB_DESC_WORD(wMaxPacketSize), \
|
||||||
USB_DESC_BYTE(bInterval)
|
USB_DESC_BYTE(bInterval)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returned by some functions to report a busy endpoint.
|
* @brief Returned by some functions to report a busy endpoint.
|
||||||
*/
|
*/
|
||||||
#define USB_ENDPOINT_BUSY ((size_t)0xFFFFFFFF)
|
#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 0x0003 /**< Endpoint type mask. */
|
||||||
#define USB_EP_MODE_TYPE_CTRL 0x0000 /**< Control endpoint. */
|
#define USB_EP_MODE_TYPE_CTRL 0x0000 /**< Control endpoint. */
|
||||||
#define USB_EP_MODE_TYPE_ISOC 0x0001 /**< Isochronous 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_TYPE_INTR 0x0003 /**< Interrupt endpoint. */
|
||||||
#define USB_EP_MODE_TRANSACTION 0x0000 /**< Transaction mode. */
|
#define USB_EP_MODE_TRANSACTION 0x0000 /**< Transaction mode. */
|
||||||
#define USB_EP_MODE_PACKET 0x0010 /**< Packet mode enabled. */
|
#define USB_EP_MODE_PACKET 0x0010 /**< Packet mode enabled. */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
@ -311,6 +321,11 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver macros. */
|
/* Driver macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Macro Functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Returns the current frame number.
|
* @brief Returns the current frame number.
|
||||||
*
|
*
|
||||||
|
@ -411,7 +426,12 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
|
||||||
* @special
|
* @special
|
||||||
*/
|
*/
|
||||||
#define usbReadSetup(usbp, ep, buf) usb_lld_read_setup(usbp, ep, buf)
|
#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.
|
* @brief Common ISR code, usb event callback.
|
||||||
*
|
*
|
||||||
|
@ -474,6 +494,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
|
||||||
(usbp)->receiving &= ~(1 << (ep)); \
|
(usbp)->receiving &= ~(1 << (ep)); \
|
||||||
(usbp)->epc[ep]->out_cb(usbp, ep); \
|
(usbp)->epc[ep]->out_cb(usbp, ep); \
|
||||||
}
|
}
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
|
|
|
@ -67,6 +67,10 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name USB_CDC configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Endpoint number for bulk IN.
|
* @brief Endpoint number for bulk IN.
|
||||||
*/
|
*/
|
||||||
|
@ -87,6 +91,7 @@
|
||||||
#if !defined(DATA_AVAILABLE_EP) || defined(__DOXYGEN__)
|
#if !defined(DATA_AVAILABLE_EP) || defined(__DOXYGEN__)
|
||||||
#define DATA_AVAILABLE_EP 3
|
#define DATA_AVAILABLE_EP 3
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
*
|
*
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
bool_t sdc_wait_for_transfer_state(SDCDriver *sdcp) {
|
bool_t _sdc_wait_for_transfer_state(SDCDriver *sdcp) {
|
||||||
uint32_t resp[1];
|
uint32_t resp[1];
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
@ -314,7 +314,7 @@ bool_t sdcDisconnect(SDCDriver *sdcp) {
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
|
|
||||||
/* Waits for eventual pending operations completion.*/
|
/* Waits for eventual pending operations completion.*/
|
||||||
if (sdc_wait_for_transfer_state(sdcp))
|
if (_sdc_wait_for_transfer_state(sdcp))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Card clock stopped.*/
|
/* Card clock stopped.*/
|
||||||
|
|
|
@ -45,19 +45,6 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* 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. */
|
/* Derived constants and error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
|
|
||||||
#include "mcuconf.h"
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Drivers enable switches
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @brief Enables the PAL subsystem.
|
* @brief Enables the PAL subsystem.
|
||||||
*/
|
*/
|
||||||
|
@ -138,9 +142,13 @@
|
||||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_USB TRUE
|
#define HAL_USE_USB TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* ADC driver related settings. */
|
/**
|
||||||
|
* @name ADC driver related setting
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,9 +166,13 @@
|
||||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* CAN driver related settings. */
|
/**
|
||||||
|
* @name CAN driver related setting
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -169,9 +181,13 @@
|
||||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
#define CAN_USE_SLEEP_MODE TRUE
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* I2C driver related settings. */
|
/**
|
||||||
|
* @name I2C driver related setting
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,13 +196,21 @@
|
||||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
#endif
|
#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__)
|
#if !defined(MMC_USE_SPI_POLLING) || defined(__DOXYGEN__)
|
||||||
#define MMC_USE_SPI_POLLING TRUE
|
#define MMC_USE_SPI_POLLING TRUE
|
||||||
#endif
|
#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.
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
@ -271,9 +307,13 @@
|
||||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
#define SDC_NICE_WAITING TRUE
|
#define SDC_NICE_WAITING TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* SERIAL driver related settings. */
|
/**
|
||||||
|
* @name SERIAL driver related setting
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -295,9 +335,32 @@
|
||||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
#define SERIAL_BUFFERS_SIZE 16
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
#endif
|
#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__)
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* UART driver related settings. */
|
/**
|
||||||
|
* @name UART driver related setting
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#endif /* _HALCONF_H_ */
|
#endif /* _HALCONF_H_ */
|
||||||
|
|
||||||
|
|
|
@ -39,27 +39,6 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* 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. */
|
/* Derived constants and error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
1
todo.txt
1
todo.txt
|
@ -18,6 +18,7 @@ X STM32L support.
|
||||||
X STM32L-Discovery demo and article.
|
X STM32L-Discovery demo and article.
|
||||||
X File System infrastructure.
|
X File System infrastructure.
|
||||||
X STM32F2xx support.
|
X STM32F2xx support.
|
||||||
|
- MMC_SPI driver revision and speedup.
|
||||||
- Test suite overhaul, the API should be more generic in order to be used
|
- Test suite overhaul, the API should be more generic in order to be used
|
||||||
with different subsystems and not just the kernel.
|
with different subsystems and not just the kernel.
|
||||||
- STM32 USB support for double buffering.
|
- STM32 USB support for double buffering.
|
||||||
|
|
Loading…
Reference in New Issue