aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-28 13:39:56 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-28 13:39:56 +0000
commitfc492c6d190610cc9537360edf44d6dc5d072a2c (patch)
tree53fb1786e058f872671fb3adca4e73c708716d54 /os/hal/include
parentda23780899ae4b9ce1bbe0cb9109da1c87fe0fa1 (diff)
parent663214d0e6728d153fd4118324e69c75c574327c (diff)
downloadChibiOS-fc492c6d190610cc9537360edf44d6dc5d072a2c.tar.gz
ChibiOS-fc492c6d190610cc9537360edf44d6dc5d072a2c.tar.bz2
ChibiOS-fc492c6d190610cc9537360edf44d6dc5d072a2c.zip
I2C. Merge code from trunk.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3263 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/adc.h10
-rw-r--r--os/hal/include/can.h18
-rw-r--r--os/hal/include/icu.h10
-rw-r--r--os/hal/include/mac.h5
-rw-r--r--os/hal/include/mii.h6
-rw-r--r--os/hal/include/mmc_spi.h10
-rw-r--r--os/hal/include/pal.h15
-rw-r--r--os/hal/include/pwm.h15
-rw-r--r--os/hal/include/sdc.h22
-rw-r--r--os/hal/include/serial.h32
-rw-r--r--os/hal/include/serial_usb.h7
-rw-r--r--os/hal/include/spi.h15
-rw-r--r--os/hal/include/uart.h23
-rw-r--r--os/hal/include/usb.h21
-rw-r--r--os/hal/include/usb_cdc.h27
15 files changed, 201 insertions, 35 deletions
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
@@ -40,6 +40,10 @@
/*===========================================================================*/
/**
+ * @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
@@ -36,6 +36,10 @@
/*===========================================================================*/
/**
+ * @name CAN status flags
+ * @{
+ */
+/**
* @brief Errors rate warning.
*/
#define CAN_LIMIT_WARNING 1
@@ -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. */
@@ -97,6 +110,10 @@ typedef enum {
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Adds some flags to the CAN status mask.
*
* @param[in] canp pointer to the @p CANDriver object
@@ -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
@@ -78,6 +78,10 @@ typedef void (*icucallback_t)(ICUDriver *icup);
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Enables the input capture.
*
* @param[in] icup pointer to the @p ICUDriver object
@@ -118,8 +122,13 @@ 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.
*
* @param[in] icup pointer to the @p ICUDriver object
@@ -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
@@ -57,6 +57,10 @@
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Returns the received frames event source.
*
* @param[in] macp pointer to the @p MACDriver object
@@ -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 <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
* @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
@@ -54,6 +54,10 @@
/*===========================================================================*/
/**
+ * @name MMC_SPI configuration options
+ * @{
+ */
+/**
* @brief Block size for MMC transfers.
*/
#if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)
@@ -86,6 +90,7 @@
#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
#define MMC_POLLING_DELAY 10
#endif
+/** @} */
/*===========================================================================*/
/* Derived constants and error checks. */
@@ -182,6 +187,10 @@ typedef struct {
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Returns the driver state.
*
* @param[in] mmcp pointer to the @p MMCDriver object
@@ -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
@@ -36,6 +36,10 @@
/*===========================================================================*/
/**
+ * @name Pads mode constants
+ * @{
+ */
+/**
* @brief After reset state.
* @details The state itself is not specified and is architecture dependent,
* it is guaranteed to be equal to the after-reset state. It is
@@ -81,8 +85,13 @@
* @brief Open-drain output pad.
*/
#define PAL_MODE_OUTPUT_OPENDRAIN 7
+/** @} */
/**
+ * @name Logic level constants
+ * @{
+ */
+/**
* @brief Logical low state.
*/
#define PAL_LOW 0
@@ -91,6 +100,7 @@
* @brief Logical high state.
*/
#define PAL_HIGH 1
+/** @} */
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -178,6 +188,10 @@ typedef struct {
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
* no need to explicitly initialize the driver.
@@ -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
@@ -36,6 +36,10 @@
/*===========================================================================*/
/**
+ * @name PWM output mode macros
+ * @{
+ */
+/**
* @brief Standard output modes mask.
*/
#define PWM_OUTPUT_MASK 0x0F
@@ -54,6 +58,7 @@
* @brief Inverse PWM logic, active is logic level zero.
*/
#define PWM_OUTPUT_ACTIVE_LOW 0x02
+/** @} */
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -95,6 +100,10 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp);
/*===========================================================================*/
/**
+ * @name PWM duty cycle conversion
+ * @{
+ */
+/**
* @brief Converts from fraction to pulse width.
* @note Be careful with rounding errors, this is integer math not magic.
* You can specify tenths of thousandth but make sure you have the
@@ -143,8 +152,13 @@ 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
* been activated using @p pwmStart().
@@ -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..8de6de823 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.
@@ -88,6 +93,10 @@
/*===========================================================================*/
/**
+ * @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. */
@@ -143,6 +153,10 @@ typedef enum {
/*===========================================================================*/
/**
+ * @name R1 response utilities
+ * @{
+ */
+/**
* @brief Evaluates to @p TRUE if the R1 response contains error flags.
*
* @param[in] r1 the r1 response
@@ -162,8 +176,13 @@ 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.
*
* @param[in] sdcp pointer to the @p SDCDriver object
@@ -204,6 +223,7 @@ typedef enum {
* @api
*/
#define sdcIsWriteProtected(sdcp) (sdc_lld_is_write_protected(sdcp))
+/** @} */
/*===========================================================================*/
/* External declarations. */
@@ -222,7 +242,7 @@ extern "C" {
uint8_t *buffer, uint32_t n);
bool_t sdcWrite(SDCDriver *sdcp, uint32_t startblk,
const uint8_t *buffer, uint32_t n);
- bool_t sdc_wait_for_transfer_state(SDCDriver *sdcp);
+ bool_t _sdc_wait_for_transfer_state(SDCDriver *sdcp);
#ifdef __cplusplus
}
#endif
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,22 +35,26 @@
/* 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
* default configuration.
@@ -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 {
@@ -129,6 +136,10 @@ struct SerialDriver {
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Direct output check on a @p SerialDriver.
* @note This function bypasses the indirect access to the channel and
* checks directly the output queue. This is faster but cannot
@@ -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
@@ -40,6 +40,10 @@
/*===========================================================================*/
/**
+ * @name SERIAL_USB configuration options
+ * @{
+ */
+/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
@@ -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
@@ -40,6 +40,10 @@
/*===========================================================================*/
/**
+ * @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. */
@@ -85,6 +90,10 @@ typedef enum {
/*===========================================================================*/
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @brief Asserts the slave select signal and prepares for transfers.
*
* @param[in] spip pointer to the @p SPIDriver object
@@ -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
@@ -78,6 +78,10 @@
#define USB_LATE_SET_ADDRESS 1
/**
+ * @name Helper macros for USB descriptors
+ * @{
+ */
+/**
* @brief Helper macro for index values into descriptor strings.
*/
#define USB_DESC_INDEX(i) ((uint8_t)(i))
@@ -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,8 +426,13 @@ 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.
*
* @param[in] usbp pointer to the @p USBDriver object
@@ -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..48a543642 100644
--- a/os/hal/include/usb_cdc.h
+++ b/os/hal/include/usb_cdc.h
@@ -33,6 +33,10 @@
/* Driver constants. */
/*===========================================================================*/
+/**
+ * @name CDC specific messages.
+ * @{
+ */
#define CDC_SEND_ENCAPSULATED_COMMAND 0x00
#define CDC_GET_ENCAPSULATED_RESPONSE 0x01
#define CDC_SET_COMM_FEATURE 0x02
@@ -52,7 +56,12 @@
#define CDC_GET_RINGER_PARMS 0x31
#define CDC_SET_OPERATION_PARMS 0x32
#define CDC_GET_OPERATION_PARMS 0x33
+/** @} */
+/**
+ * @name Line Control bit definitions.
+ * @{
+ */
#define LC_STOP_1 0
#define LC_STOP_1P5 1
#define LC_STOP_2 2
@@ -62,31 +71,37 @@
#define LC_PARITY_EVEN 2
#define LC_PARITY_MARK 3
#define LC_PARITY_SPACE 4
+/** @} */
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
/**
+ * @name USB_CDC configuration options
+ * @{
+ */
+/**
* @brief Endpoint number for bulk IN.
*/
-#if !defined(DATA_REQUEST_EP) || defined(__DOXYGEN__)
-#define DATA_REQUEST_EP 1
+#if !defined(USB_CDC_DATA_REQUEST_EP) || defined(__DOXYGEN__)
+#define USB_CDC_DATA_REQUEST_EP 1
#endif
/**
* @brief Endpoint number for interrupt IN.
*/
-#if !defined(INTERRUPT_REQUEST_EP) || defined(__DOXYGEN__)
-#define INTERRUPT_REQUEST_EP 2
+#if !defined(USB_CDC_INTERRUPT_REQUEST_EP) || defined(__DOXYGEN__)
+#define USB_CDC_INTERRUPT_REQUEST_EP 2
#endif
/**
* @brief Endpoint number for bulk OUT.
*/
-#if !defined(DATA_AVAILABLE_EP) || defined(__DOXYGEN__)
-#define DATA_AVAILABLE_EP 3
+#if !defined(USB_CDC_DATA_AVAILABLE_EP) || defined(__DOXYGEN__)
+#define USB_CDC_DATA_AVAILABLE_EP 3
#endif
+/** @} */
/*===========================================================================*/
/* Derived constants and error checks. */