From 7ced84c5f09e940e26335109d4b150e0697ae379 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 3 Oct 2015 07:25:03 -0600 Subject: [PATCH] Standardize the width of all comment boxes in C files --- arch/arm/src/armv7-m/up_itm.c | 28 +- arch/arm/src/dm320/dm320_usbdev.c | 204 ++++++------- arch/arm/src/efm32/efm32_adc.c | 24 +- arch/arm/src/efm32/efm32_bitband.c | 16 +- arch/arm/src/efm32/efm32_dma.c | 32 +- arch/arm/src/efm32/efm32_flash.c | 10 +- arch/arm/src/efm32/efm32_i2c.c | 146 ++++----- arch/arm/src/efm32/efm32_lowputc.c | 20 +- arch/arm/src/efm32/efm32_usbdev.c | 332 ++++++++++----------- arch/arm/src/efm32/efm32_usbhost.c | 296 +++++++++--------- arch/arm/src/kinetis/kinetis_lowputc.c | 8 +- arch/arm/src/kl/kl_lowputc.c | 8 +- arch/arm/src/lpc11xx/lpc11_i2c.c | 68 ++--- arch/arm/src/lpc17xx/lpc17_ethernet.c | 24 +- arch/arm/src/lpc17xx/lpc17_i2c.c | 72 ++--- arch/arm/src/lpc17xx/lpc17_usbdev.c | 232 +++++++------- arch/arm/src/lpc17xx/lpc17_usbhost.c | 214 ++++++------- arch/arm/src/lpc214x/lpc214x_usbdev.c | 224 +++++++------- arch/arm/src/lpc2378/lpc23xx_i2c.c | 48 +-- arch/arm/src/lpc31xx/lpc31_ehci.c | 316 ++++++++++---------- arch/arm/src/lpc31xx/lpc31_i2c.c | 56 ++-- arch/arm/src/lpc31xx/lpc31_usbdev.c | 228 +++++++------- arch/arm/src/lpc43xx/lpc43_ehci.c | 296 +++++++++--------- arch/arm/src/lpc43xx/lpc43_i2c.c | 52 ++-- arch/arm/src/lpc43xx/lpc43_usb0dev.c | 228 +++++++------- arch/arm/src/moxart/moxart_16550.c | 2 +- arch/arm/src/nuc1xx/nuc_lowputc.c | 8 +- arch/arm/src/sam34/sam_twi.c | 112 +++---- arch/arm/src/sam34/sam_udp.c | 16 +- arch/arm/src/sama5/sam_ehci.c | 320 ++++++++++---------- arch/arm/src/sama5/sam_ohci.c | 210 ++++++------- arch/arm/src/sama5/sam_twi.c | 112 +++---- arch/arm/src/sama5/sam_udphs.c | 16 +- arch/arm/src/samdl/sam_lowputc.c | 8 +- arch/arm/src/samv7/sam_twihs.c | 112 +++---- arch/arm/src/samv7/sam_usbdevhs.c | 16 +- arch/arm/src/stm32/stm32_adc.c | 24 +- arch/arm/src/stm32/stm32_dma2d.c | 156 +++++----- arch/arm/src/stm32/stm32_otgfsdev.c | 332 ++++++++++----------- arch/arm/src/stm32/stm32_otgfshost.c | 296 +++++++++--------- arch/arm/src/stm32/stm32_otghsdev.c | 332 ++++++++++----------- arch/arm/src/stm32/stm32_otghshost.c | 296 +++++++++--------- arch/arm/src/stm32/stm32_usbdev.c | 6 +- arch/arm/src/tiva/tiva_adclib.c | 2 +- arch/arm/src/tiva/tiva_adclow.c | 2 +- arch/avr/src/at32uc3/at32uc3_lowconsole.c | 64 ++-- arch/avr/src/at90usb/at90usb_lowconsole.c | 52 ++-- arch/avr/src/at90usb/at90usb_usbdev.c | 232 +++++++------- arch/avr/src/atmega/atmega_lowconsole.c | 44 +-- arch/mips/src/pic32mx/pic32mx-ethernet.c | 20 +- arch/mips/src/pic32mx/pic32mx-lowconsole.c | 64 ++-- arch/mips/src/pic32mz/pic32mz-ethernet.c | 20 +- arch/mips/src/pic32mz/pic32mz-lowconsole.c | 64 ++-- 53 files changed, 3060 insertions(+), 3060 deletions(-) diff --git a/arch/arm/src/armv7-m/up_itm.c b/arch/arm/src/armv7-m/up_itm.c index e25cd205321..695360a1e70 100644 --- a/arch/arm/src/armv7-m/up_itm.c +++ b/arch/arm/src/armv7-m/up_itm.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * arch/arm/src/armv7-m/up_itm.c * * Copyright (c) 2009 - 2013 ARM LIMITED @@ -59,11 +59,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -72,15 +72,15 @@ #include "up_arch.h" #include "itm.h" -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: itm_sendchar * * Description: @@ -95,7 +95,7 @@ * Returned Value: * Character to transmit. * - *****************************************************************************/ + ****************************************************************************/ uint32_t itm_sendchar(uint32_t ch) { @@ -109,7 +109,7 @@ uint32_t itm_sendchar(uint32_t ch) return ch; } -/***************************************************************************** +/**************************************************************************** * Name: itm_receivechar * * Description: @@ -120,7 +120,7 @@ uint32_t itm_sendchar(uint32_t ch) * Returned Value: * Received character or -1 No character pending. * - *****************************************************************************/ + ****************************************************************************/ int32_t itm_receivechar(void) { @@ -135,7 +135,7 @@ int32_t itm_receivechar(void) return ch; } -/***************************************************************************** +/**************************************************************************** * Name: itm_checkchar * * Description: @@ -148,7 +148,7 @@ int32_t itm_receivechar(void) * 0 No character available. * 1 Character available. * - *****************************************************************************/ + ****************************************************************************/ int32_t itm_checkchar (void) { diff --git a/arch/arm/src/dm320/dm320_usbdev.c b/arch/arm/src/dm320/dm320_usbdev.c index 28a1427f762..612af872717 100644 --- a/arch/arm/src/dm320/dm320_usbdev.c +++ b/arch/arm/src/dm320/dm320_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/dm320/dm320_usbdev.c * * Copyright (C) 2008-2013 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -61,9 +61,9 @@ #include "up_internal.h" #include "dm320_usb.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -184,9 +184,9 @@ #define dm320_rqempty(ep) ((ep)->head == NULL) #define dm320_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request make be retained in a list */ @@ -262,9 +262,9 @@ struct dm320_epinfo_s #endif }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations */ @@ -342,9 +342,9 @@ static int dm320_wakeup(struct usbdev_s *dev); static int dm320_selfpowered(struct usbdev_s *dev, bool selfpowered); static int dm320_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Endpoint methods */ @@ -410,17 +410,17 @@ static const struct dm320_epinfo_s g_epinfo[DM320_NENDPOINTS] = } }; -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: dm320_getreg8 * * Description: * Get the contents of an DM320 8-bit register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint8_t dm320_getreg8(uint32_t addr) @@ -476,13 +476,13 @@ static uint8_t dm320_getreg8(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_getreg16 * * Description: * Get the contents of an DM320 16-bit register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t dm320_getreg16(uint32_t addr) @@ -538,13 +538,13 @@ static uint32_t dm320_getreg16(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_getreg32 * * Description: * Get the contents of an DM320 32-bit register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t dm320_getreg32(uint32_t addr) @@ -600,13 +600,13 @@ static uint32_t dm320_getreg32(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_putreg8 * * Description: * Set the contents of an DM320 8-bit register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void dm320_putreg8(uint8_t val, uint32_t addr) @@ -621,13 +621,13 @@ static void dm320_putreg8(uint8_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_putreg16 * * Description: * Set the contents of an DM320 16-bit register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void dm320_putreg16(uint16_t val, uint32_t addr) @@ -642,13 +642,13 @@ static void dm320_putreg16(uint16_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_putreg32 * * Description: * Set the contents of an DM320 32-bit register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void dm320_putreg32(uint32_t val, uint32_t addr) @@ -663,13 +663,13 @@ static void dm320_putreg32(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct dm320_req_s *dm320_rqdequeue(FAR struct dm320_ep_s *privep) { @@ -689,13 +689,13 @@ static FAR struct dm320_req_s *dm320_rqdequeue(FAR struct dm320_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static void dm320_rqenqueue(FAR struct dm320_ep_s *privep, FAR struct dm320_req_s *req) @@ -713,13 +713,13 @@ static void dm320_rqenqueue(FAR struct dm320_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_ep0write * * Description: * Control endpoint write (IN) * - *******************************************************************************/ + ****************************************************************************/ static int dm320_ep0write(uint8_t *buf, uint16_t nbytes) { @@ -748,13 +748,13 @@ static int dm320_ep0write(uint8_t *buf, uint16_t nbytes) return nwritten; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epwrite * * Description: * Endpoint write (IN) * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epwrite(uint8_t epphy, uint8_t *buf, uint16_t nbytes) { @@ -799,13 +799,13 @@ static int dm320_epwrite(uint8_t epphy, uint8_t *buf, uint16_t nbytes) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epread * * Description: * Endpoint read (OUT) * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epread(uint8_t epphy, uint8_t *buf, uint16_t nbytes) { @@ -853,13 +853,13 @@ static int dm320_epread(uint8_t epphy, uint8_t *buf, uint16_t nbytes) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_abortrequest * * Description: * Discard a request * - *******************************************************************************/ + ****************************************************************************/ static inline void dm320_abortrequest(struct dm320_ep_s *privep, struct dm320_req_s *privreq, @@ -876,13 +876,13 @@ static inline void dm320_abortrequest(struct dm320_ep_s *privep, privreq->req.callback(&privep->ep, &privreq->req); } -/******************************************************************************* +/**************************************************************************** * Name: dm320_reqcomplete * * Description: * Handle termination of a request. * - *******************************************************************************/ + ****************************************************************************/ static void dm320_reqcomplete(struct dm320_ep_s *privep, int16_t result) { @@ -925,7 +925,7 @@ static void dm320_reqcomplete(struct dm320_ep_s *privep, int16_t result) } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_wrrequest * * Description: @@ -934,7 +934,7 @@ static void dm320_reqcomplete(struct dm320_ep_s *privep, int16_t result) * Returned Value: * 0:not finished; 1:completed; <0:error * - *******************************************************************************/ + ****************************************************************************/ static int dm320_wrrequest(struct dm320_ep_s *privep) { @@ -1019,13 +1019,13 @@ static int dm320_wrrequest(struct dm320_ep_s *privep) return OK; /* Won't get here */ } -/******************************************************************************* +/**************************************************************************** * Name: dm320_rdrequest * * Description: * Receive to the next queued read request * - *******************************************************************************/ + ****************************************************************************/ static int dm320_rdrequest(struct dm320_ep_s *privep) { @@ -1068,13 +1068,13 @@ static int dm320_rdrequest(struct dm320_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void dm320_cancelrequests(struct dm320_ep_s *privep) { @@ -1086,14 +1086,14 @@ static void dm320_cancelrequests(struct dm320_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct dm320_ep_s *dm320_epfindbyaddr(struct dm320_usbdev_s *priv, uint16_t eplog) @@ -1129,13 +1129,13 @@ static struct dm320_ep_s *dm320_epfindbyaddr(struct dm320_usbdev_s *priv, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver * - *******************************************************************************/ + ****************************************************************************/ static void dm320_dispatchrequest(struct dm320_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1156,13 +1156,13 @@ static void dm320_dispatchrequest(struct dm320_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_ep0setup * * Description: * USB Ctrl EP Setup Event * - *******************************************************************************/ + ****************************************************************************/ static inline void dm320_ep0setup(struct dm320_usbdev_s *priv) { @@ -1429,13 +1429,13 @@ static inline void dm320_ep0setup(struct dm320_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_highestpriinterrupt * * Description: * Part of the USB core controller interrupt handling logic * - *******************************************************************************/ + ****************************************************************************/ static inline uint32_t dm320_highestpriinterrupt(int intstatus) { @@ -1465,13 +1465,13 @@ static inline uint32_t dm320_highestpriinterrupt(int intstatus) return USB_INT_NOINTERRUPT; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_ctlrinterrupt * * Description: * Handle USB controller core interrupts * - *******************************************************************************/ + ****************************************************************************/ static int dm320_ctlrinterrupt(int irq, FAR void *context) { @@ -1632,13 +1632,13 @@ static int dm320_ctlrinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_attachinterrupt * * Description: * Attach GIO interrtup handler * - *******************************************************************************/ + ****************************************************************************/ static int dm320_attachinterrupt(int irq, FAR void *context) { @@ -1690,9 +1690,9 @@ static int dm320_attachinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epreset - *******************************************************************************/ + ****************************************************************************/ static void dm320_epreset(unsigned int index) { @@ -1702,13 +1702,13 @@ static void dm320_epreset(unsigned int index) dm320_putreg8(USB_CSR2_FLFIFO, DM320_USB_CSR2); } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epinitialize * * Description: * Initialize endpoints. This is logically a part of dm320_ctrlinitialize * - *******************************************************************************/ + ****************************************************************************/ static inline void dm320_epinitialize(struct dm320_usbdev_s *priv) { @@ -1793,13 +1793,13 @@ static inline void dm320_epinitialize(struct dm320_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: dm320_ctrlinitialize * * Description: * Initialize the DM320 USB controller for peripheral mode operation . * - *******************************************************************************/ + ****************************************************************************/ static void dm320_ctrlinitialize(FAR struct dm320_usbdev_s *priv) { @@ -1853,11 +1853,11 @@ static void dm320_ctrlinitialize(FAR struct dm320_usbdev_s *priv) dm320_putreg8(USB_EP0_SELECT, DM320_USB_INDEX); } -/******************************************************************************* +/**************************************************************************** * Endpoint Methods - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: dm320_epconfigure * * Description: @@ -1870,7 +1870,7 @@ static void dm320_ctrlinitialize(FAR struct dm320_usbdev_s *priv) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -1886,13 +1886,13 @@ static int dm320_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epdisable(FAR struct usbdev_ep_s *ep) { @@ -1918,13 +1918,13 @@ static int dm320_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -1949,13 +1949,13 @@ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -1973,13 +1973,13 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -1994,13 +1994,13 @@ static void *dm320_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -2015,13 +2015,13 @@ static void dm320_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: dm320_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2112,13 +2112,13 @@ static int dm320_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return ret; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int dm320_epcancel(struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2142,11 +2142,11 @@ static int dm320_epcancel(struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) return OK; } -/******************************************************************************* +/**************************************************************************** * Device Methods - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: dm320_allocep * * Description: @@ -2160,7 +2160,7 @@ static int dm320_epcancel(struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *dm320_allocep(FAR struct usbdev_s *dev, uint8_t eplog, bool in, uint8_t eptype) @@ -2216,13 +2216,13 @@ static FAR struct usbdev_ep_s *dm320_allocep(FAR struct usbdev_s *dev, uint8_t e return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void dm320_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -2233,13 +2233,13 @@ static void dm320_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) /* Nothing needs to be done */ } -/******************************************************************************* +/**************************************************************************** * Name: dm320_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int dm320_getframe(struct usbdev_s *dev) { @@ -2267,13 +2267,13 @@ static int dm320_getframe(struct usbdev_s *dev) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int dm320_wakeup(struct usbdev_s *dev) { @@ -2286,13 +2286,13 @@ static int dm320_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int dm320_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -2312,13 +2312,13 @@ static int dm320_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: dm320_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_DM320_GIO_USBDPPULLUP static int dm320_pullup(struct usbdev_s *dev, bool enable) @@ -2342,17 +2342,17 @@ static int dm320_pullup(struct usbdev_s *dev, bool enable) } #endif -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: * Initialize USB hardware * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -2457,9 +2457,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { diff --git a/arch/arm/src/efm32/efm32_adc.c b/arch/arm/src/efm32/efm32_adc.c index 5d3a73290f0..c23654c66f5 100644 --- a/arch/arm/src/efm32/efm32_adc.c +++ b/arch/arm/src/efm32/efm32_adc.c @@ -230,7 +230,7 @@ static void adc_putreg(struct efm32_dev_s *priv, int offset, uint32_t value) * ref - Reference to load calibrated values for. No values are loaded for * external references. * - ******************************************************************************/ + ****************************************************************************/ static void ADC_CalibrateLoadScan(ADC_TypeDef *adc, ADC_Ref_TypeDef ref) { @@ -314,7 +314,7 @@ static void ADC_CalibrateLoadScan(ADC_TypeDef *adc, ADC_Ref_TypeDef ref) * ref - Reference to load calibrated values for. No values are loaded for * external references. * - ******************************************************************************/ + ****************************************************************************/ static void ADC_CalibrateLoadSingle(ADC_TypeDef *adc, ADC_Ref_TypeDef ref) { @@ -381,9 +381,9 @@ static void ADC_CalibrateLoadSingle(ADC_TypeDef *adc, ADC_Ref_TypeDef ref) } } -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ /***************************************************************************//** * Name: ADC_Init @@ -400,7 +400,7 @@ static void ADC_CalibrateLoadSingle(ADC_TypeDef *adc, ADC_Ref_TypeDef ref) * adc- Pointer to ADC peripheral register block. * int - Pointer to ADC initialization structure. * - ******************************************************************************/ + ****************************************************************************/ void ADC_Init(ADC_TypeDef *adc, const ADC_Init_TypeDef *init) { @@ -444,7 +444,7 @@ void ADC_Init(ADC_TypeDef *adc, const ADC_Init_TypeDef *init) * adc - Pointer to ADC peripheral register block. * init - Pointer to ADC initialization structure. * - ******************************************************************************/ + ****************************************************************************/ void ADC_InitScan(ADC_TypeDef *adc, const ADC_InitScan_TypeDef *init) { @@ -507,7 +507,7 @@ void ADC_InitScan(ADC_TypeDef *adc, const ADC_InitScan_TypeDef *init) * adc - Pointer to ADC peripheral register block. * init - Pointer to ADC initialization structure. * - ******************************************************************************/ + ****************************************************************************/ void ADC_InitSingle(ADC_TypeDef *adc, const ADC_InitSingle_TypeDef *init) { @@ -570,7 +570,7 @@ void ADC_InitSingle(ADC_TypeDef *adc, const ADC_InitSingle_TypeDef *init) * Prescaler value to use for ADC in order to achieve a clock value * <= @p adcFreq. * - ******************************************************************************/ + ****************************************************************************/ uint8_t ADC_PrescaleCalc(uint32_t adcFreq, uint32_t hfperFreq) { @@ -616,7 +616,7 @@ uint8_t ADC_PrescaleCalc(uint32_t adcFreq, uint32_t hfperFreq) * Input Parameters: * adc - Pointer to ADC peripheral register block. * - ******************************************************************************/ + ****************************************************************************/ void ADC_Reset(ADC_TypeDef *adc) { @@ -651,7 +651,7 @@ void ADC_Reset(ADC_TypeDef *adc) * Returned Value: * Timebase value to use for ADC in order to achieve at least 1 us. * - ******************************************************************************/ + ****************************************************************************/ uint8_t ADC_TimebaseCalc(uint32_t hfperFreq) { @@ -837,7 +837,7 @@ static void adc_hw_reset(struct efm32_dev_s *priv, bool reset) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: adc_enable * * Description : Enables or disables the specified ADC peripheral. @@ -851,7 +851,7 @@ static void adc_hw_reset(struct efm32_dev_s *priv, bool reset) * * Returned Value: * - *******************************************************************************/ + ****************************************************************************/ static void adc_enable(FAR struct efm32_dev_s *priv, bool enable) { diff --git a/arch/arm/src/efm32/efm32_bitband.c b/arch/arm/src/efm32/efm32_bitband.c index cb3f200da4d..fa45b660b83 100644 --- a/arch/arm/src/efm32/efm32_bitband.c +++ b/arch/arm/src/efm32/efm32_bitband.c @@ -73,7 +73,7 @@ * Private Functions ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: bitband_set_peripheral * * Description: @@ -91,7 +91,7 @@ * bit Bit position to modify, 0-31. * val Value to set bit to, 0 or 1. * - ******************************************************************************/ + ****************************************************************************/ inline void bitband_set_peripheral(uint32_t addr, uint32_t bit, uint32_t val) { @@ -101,7 +101,7 @@ inline void bitband_set_peripheral(uint32_t addr, uint32_t bit, uint32_t val) *((volatile uint32_t *)regval) = (uint32_t)val; } -/****************************************************************************** +/**************************************************************************** * Name: bitband_get_peripheral * * Description: @@ -122,7 +122,7 @@ inline void bitband_set_peripheral(uint32_t addr, uint32_t bit, uint32_t val) * Returned Value: * Return bit value read, 0 or 1. * - ******************************************************************************/ + ****************************************************************************/ inline uint32_t bitband_get_peripheral(uint32_t addr, uint32_t bit) { @@ -132,7 +132,7 @@ inline uint32_t bitband_get_peripheral(uint32_t addr, uint32_t bit) return *((volatile uint32_t *)regval); } -/****************************************************************************** +/**************************************************************************** * Name: bitband_set_sram * * Description: @@ -150,7 +150,7 @@ inline uint32_t bitband_get_peripheral(uint32_t addr, uint32_t bit) * bit Bit position to modify, 0-31. * val Value to set bit to, 0 or 1. * - ******************************************************************************/ + ****************************************************************************/ inline void bitband_set_sram(uint32_t addr, uint32_t bit, uint32_t val) { @@ -160,7 +160,7 @@ inline void bitband_set_sram(uint32_t addr, uint32_t bit, uint32_t val) *((volatile uint32_t *)regval) = (uint32_t)val; } -/****************************************************************************** +/**************************************************************************** * Name: bitband_get_sram * * Description:: @@ -181,7 +181,7 @@ inline void bitband_set_sram(uint32_t addr, uint32_t bit, uint32_t val) * Returned Value: * Return bit value read, 0 or 1. * - ******************************************************************************/ + ****************************************************************************/ inline uint32_t bitband_get_sram(uint32_t addr, uint32_t bit) { diff --git a/arch/arm/src/efm32/efm32_dma.c b/arch/arm/src/efm32/efm32_dma.c index 8f32168fb70..8980f737908 100644 --- a/arch/arm/src/efm32/efm32_dma.c +++ b/arch/arm/src/efm32/efm32_dma.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * arch/arm/src/efm32/efm32_dma.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -53,17 +53,17 @@ #include "chip/efm32_dma.h" #include "efm32_dma.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************/ + ****************************************************************************/ #define ALIGN_MASK(s) ((1 << s) - 1) #define ALIGN_DOWN(v,m) ((v) & ~m) #define ALIGN_UP(v,m) (((v) + (m)) & ~m) -/***************************************************************************** +/**************************************************************************** * Public Types - *****************************************************************************/ + ****************************************************************************/ /* This structure describes one DMA channel */ struct dma_channel_s @@ -83,9 +83,9 @@ struct dma_controller_s sem_t chansem; /* Count of free channels */ }; -/***************************************************************************** +/**************************************************************************** * Private Data - *****************************************************************************/ + ****************************************************************************/ /* This is the overall state of the DMA controller */ @@ -130,13 +130,13 @@ static struct dma_descriptor_s g_descriptors[EFM32_DMA_NCHANNELS] __attribute__((aligned(DESC_TABLE_ALIGN))); #endif -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Private Functions - *****************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: efm32_set_chctrl @@ -249,9 +249,9 @@ static int efm32_dmac_interrupt(int irq, void *context) return OK; } -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: up_dmainitialize diff --git a/arch/arm/src/efm32/efm32_flash.c b/arch/arm/src/efm32/efm32_flash.c index adf34fe1801..231612b0e81 100644 --- a/arch/arm/src/efm32/efm32_flash.c +++ b/arch/arm/src/efm32/efm32_flash.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * arch/arm/src/efm32/efm32_flash.c * * Copyright 2014 Silicon Laboratories, Inc. http://www.silabs.com @@ -183,7 +183,7 @@ void efm32_flash_unlock(void) #endif } -/******************************************************************************* +/**************************************************************************** * Name: msc_load_verify_address * * Description: @@ -206,7 +206,7 @@ void efm32_flash_unlock(void) * -EBUSY - Busy timeout. * -EINVAL - Operation tried to access a non-flash area. * -EACCES - Operation tried to access a locked area of the flash. - *******************************************************************************/ + ****************************************************************************/ int __ramfunc__ msc_load_verify_address(uint32_t* address) { @@ -251,7 +251,7 @@ int __ramfunc__ msc_load_verify_address(uint32_t* address) return OK; } -/******************************************************************************* +/**************************************************************************** * Name:msc_load_data * * Description: @@ -276,7 +276,7 @@ int __ramfunc__ msc_load_verify_address(uint32_t* address) * OK - Operation completed successfully. * -ETIMEDOUT - Operation timed out waiting for flash operation * to complete. - ******************************************************************************/ + ****************************************************************************/ int __ramfunc__ msc_load_write_data(uint32_t* data, uint32_t num_words, bool write_strategy_safe) diff --git a/arch/arm/src/efm32/efm32_i2c.c b/arch/arm/src/efm32/efm32_i2c.c index 415e11a7fbd..b1cf9132461 100644 --- a/arch/arm/src/efm32/efm32_i2c.c +++ b/arch/arm/src/efm32/efm32_i2c.c @@ -32,7 +32,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ /* Supports: * - Master operation, 100 kHz (standard) and 400 kHz (full speed) @@ -51,9 +51,9 @@ * */ -/******************************************************************************* +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -84,9 +84,9 @@ #if defined(CONFIG_EFM32_I2C0) || defined(CONFIG_EFM32_I2C1) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* Configuration **************************************************************/ @@ -281,9 +281,9 @@ struct efm32_i2c_inst_s uint32_t flags; /* Flags used in this instantiation */ }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ static inline uint32_t efm32_i2c_getreg(FAR struct efm32_i2c_priv_s *priv, uint8_t offset); @@ -351,9 +351,9 @@ static int efm32_i2c_transfer(FAR struct i2c_dev_s *dev, static const char *efm32_i2c_state_str(int i2c_state); #endif -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ /* Trace events strings */ @@ -433,17 +433,17 @@ static const struct i2c_ops_s efm32_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_getreg * * Description: * Get a 16-bit register value by offset * - ******************************************************************************/ + ****************************************************************************/ static inline uint32_t efm32_i2c_getreg(FAR struct efm32_i2c_priv_s *priv, uint8_t offset) @@ -451,13 +451,13 @@ static inline uint32_t efm32_i2c_getreg(FAR struct efm32_i2c_priv_s *priv, return getreg32(priv->config->base + offset); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_putreg * * Description: * Put a 16-bit register value by offset * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_putreg(FAR struct efm32_i2c_priv_s *priv, uint8_t offset, uint32_t value) @@ -465,13 +465,13 @@ static inline void efm32_i2c_putreg(FAR struct efm32_i2c_priv_s *priv, putreg32(value, priv->config->base + offset); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_modifyreg * * Description: * Modify a 16-bit register value by offset * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_modifyreg(FAR struct efm32_i2c_priv_s *priv, uint8_t offset, uint32_t clearbits, @@ -480,13 +480,13 @@ static inline void efm32_i2c_modifyreg(FAR struct efm32_i2c_priv_s *priv, modifyreg32(priv->config->base + offset, clearbits, setbits); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_state_str * * Description: * Convert i2c_state into corresponding text. * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRACE static const char *efm32_i2c_state_str(int i2c_state) @@ -521,13 +521,13 @@ static const char *efm32_i2c_state_str(int i2c_state) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_sem_wait * * Description: * Take the exclusive access, waiting as necessary * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_sem_wait(FAR struct i2c_dev_s *dev) { @@ -537,14 +537,14 @@ static inline void efm32_i2c_sem_wait(FAR struct i2c_dev_s *dev) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_tousecs * * Description: * Return a micro-second delay based on the number of bytes left to be * processed. * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_I2C_DYNTIMEO static useconds_t efm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs) @@ -566,13 +566,13 @@ static useconds_t efm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_sem_waitdone * * Description: * Wait for a transfer to complete * - ******************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_I2C_POLLED static inline int efm32_i2c_sem_waitdone(FAR struct efm32_i2c_priv_s *priv) @@ -701,26 +701,26 @@ static inline int efm32_i2c_sem_waitdone(FAR struct efm32_i2c_priv_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_sem_post * * Description: * Release the mutual exclusion semaphore * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_sem_post(FAR struct i2c_dev_s *dev) { sem_post(&((struct efm32_i2c_inst_s *)dev)->priv->sem_excl); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_sem_init * * Description: * Initialize semaphores * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_sem_init(FAR struct i2c_dev_s *dev) { @@ -730,13 +730,13 @@ static inline void efm32_i2c_sem_init(FAR struct i2c_dev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_sem_destroy * * Description: * Destroy semaphores. * - ******************************************************************************/ + ****************************************************************************/ static inline void efm32_i2c_sem_destroy(FAR struct i2c_dev_s *dev) { @@ -746,13 +746,13 @@ static inline void efm32_i2c_sem_destroy(FAR struct i2c_dev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_trace* * * Description: * I2C trace instrumentation * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRACE static void efm32_i2c_traceclear(FAR struct efm32_i2c_priv_s *priv) @@ -841,13 +841,13 @@ static void efm32_i2c_tracedump(FAR struct efm32_i2c_priv_s *priv) } #endif /* CONFIG_I2C_TRACE */ -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_setclock * * Description: * Set the I2C clock * - ******************************************************************************/ + ****************************************************************************/ static void efm32_i2c_setclock(FAR struct efm32_i2c_priv_s *priv, uint32_t frequency) @@ -893,13 +893,13 @@ static void efm32_i2c_setclock(FAR struct efm32_i2c_priv_s *priv, efm32_i2c_putreg(priv, EFM32_I2C_CLKDIV_OFFSET, div); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_isr * * Description: * Common Interrupt Service Routine * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_isr(struct efm32_i2c_priv_s *priv) { @@ -1307,13 +1307,13 @@ done: #ifndef CONFIG_I2C_POLLED -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c0_isr * * Description: * I2C0 interrupt service routine * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_I2C0 static int efm32_i2c0_isr(int irq, void *context) @@ -1322,13 +1322,13 @@ static int efm32_i2c0_isr(int irq, void *context) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c1_isr * * Description: * I2C1 interrupt service routine * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_I2C1 static int efm32_i2c1_isr(int irq, void *context) @@ -1339,17 +1339,17 @@ static int efm32_i2c1_isr(int irq, void *context) #endif -/******************************************************************************* +/**************************************************************************** * Private Initialization and Deinitialization - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_reset * * Description: * Reset I2C to same state as after a HW reset. * - ******************************************************************************/ + ****************************************************************************/ static void efm32_i2c_reset(FAR struct efm32_i2c_priv_s *priv) { @@ -1363,14 +1363,14 @@ static void efm32_i2c_reset(FAR struct efm32_i2c_priv_s *priv) /* Do not reset route register, setting should be done independently */ } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_init * * Description: * Setup the I2C hardware, ready for operation with defaults * Prepare and start an I2C transfer (single master mode only). * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_init(FAR struct efm32_i2c_priv_s *priv, int frequency) { @@ -1434,13 +1434,13 @@ static int efm32_i2c_init(FAR struct efm32_i2c_priv_s *priv, int frequency) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_deinit * * Description: * Shutdown the I2C hardware * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_deinit(FAR struct efm32_i2c_priv_s *priv) { @@ -1466,17 +1466,17 @@ static int efm32_i2c_deinit(FAR struct efm32_i2c_priv_s *priv) return OK; } -/******************************************************************************* +/**************************************************************************** * Device Driver Operations - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_setfrequency * * Description: * Set the I2C frequency * - ******************************************************************************/ + ****************************************************************************/ static uint32_t efm32_i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) @@ -1489,13 +1489,13 @@ static uint32_t efm32_i2c_setfrequency(FAR struct i2c_dev_s *dev, return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_setaddress * * Description: * Set the I2C slave address * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -1508,13 +1508,13 @@ static int efm32_i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_process * * Description: * Common I2C transfer logic * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count) @@ -1660,13 +1660,13 @@ static int efm32_i2c_process(FAR struct i2c_dev_s *dev, return -errval; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_write * * Description: * Write I2C data * - ******************************************************************************/ + ****************************************************************************/ static int efm32_i2c_write(FAR struct i2c_dev_s *dev, const uint8_t * buffer, int buflen) @@ -1682,13 +1682,13 @@ static int efm32_i2c_write(FAR struct i2c_dev_s *dev, const uint8_t * buffer, return efm32_i2c_process(dev, &msgv, 1); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_read * * Description: * Read I2C data * - ******************************************************************************/ + ****************************************************************************/ int efm32_i2c_read(FAR struct i2c_dev_s *dev, uint8_t * buffer, int buflen) { @@ -1703,13 +1703,13 @@ int efm32_i2c_read(FAR struct i2c_dev_s *dev, uint8_t * buffer, int buflen) return efm32_i2c_process(dev, &msgv, 1); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_writeread * * Description: * Read then write I2C data * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_WRITEREAD static int efm32_i2c_writeread(FAR struct i2c_dev_s *dev, @@ -1735,13 +1735,13 @@ static int efm32_i2c_writeread(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_i2c_transfer * * Description: * Generic I2C transfer function * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRANSFER static int efm32_i2c_transfer(FAR struct i2c_dev_s *dev, @@ -1751,17 +1751,17 @@ static int efm32_i2c_transfer(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialize one I2C bus * - ******************************************************************************/ + ****************************************************************************/ FAR struct i2c_dev_s *up_i2cinitialize(int port) { @@ -1821,13 +1821,13 @@ FAR struct i2c_dev_s *up_i2cinitialize(int port) return (struct i2c_dev_s *)inst; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitialize * * Description: * Uninitialize an I2C bus * - ******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s *dev) { @@ -1865,13 +1865,13 @@ int up_i2cuninitialize(FAR struct i2c_dev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2creset * * Description: * Reset an I2C bus * - ******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_RESET int up_i2creset(FAR struct i2c_dev_s *dev) diff --git a/arch/arm/src/efm32/efm32_lowputc.c b/arch/arm/src/efm32/efm32_lowputc.c index ebbfce34795..b3fa2ee3866 100644 --- a/arch/arm/src/efm32/efm32_lowputc.c +++ b/arch/arm/src/efm32/efm32_lowputc.c @@ -488,13 +488,13 @@ void efm32_lowsetup(void) #endif } -/***************************************************************************** +/**************************************************************************** * Name: efm32_lowputc * * Description: * Output one character to the UART using a simple polling method. * - *****************************************************************************/ + ****************************************************************************/ #if defined(HAVE_UART_CONSOLE) void efm32_lowputc(uint32_t ch) @@ -527,13 +527,13 @@ void efm32_lowputc(uint32_t ch) } #endif -/***************************************************************************** +/**************************************************************************** * Name: efm32_uartconfigure * * Description: * Configure a U[S]ART as a RS-232 UART. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void efm32_uartconfigure(uintptr_t base, uint32_t baud, unsigned int parity, @@ -646,13 +646,13 @@ void efm32_uartconfigure(uintptr_t base, uint32_t baud, unsigned int parity, } #endif -/***************************************************************************** +/**************************************************************************** * Name: efm32_leuartconfigure * * Description: * Configure a LEUART as a RS-232 UART. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_LEUART_DEVICE void efm32_leuartconfigure(uintptr_t base, uint32_t baud, unsigned int parity, @@ -722,7 +722,7 @@ void efm32_leuartconfigure(uintptr_t base, uint32_t baud, unsigned int parity, } #endif -/***************************************************************************** +/**************************************************************************** * Name: efm32_uart_reset * * Description: @@ -730,7 +730,7 @@ void efm32_leuartconfigure(uintptr_t base, uint32_t baud, unsigned int parity, * to the initial, reset value. Only the ROUTE data set by efm32_lowsetup * is preserved. * - *****************************************************************************/ + ****************************************************************************/ #if defined(HAVE_UART_DEVICE) || defined(HAVE_SPI_DEVICE) void efm32_uart_reset(uintptr_t base) @@ -755,7 +755,7 @@ void efm32_uart_reset(uintptr_t base) } #endif -/***************************************************************************** +/**************************************************************************** * Name: efm32_leuart_reset * * Description: @@ -763,7 +763,7 @@ void efm32_uart_reset(uintptr_t base) * to the initial, reset value. Only the ROUTE data set by efm32_lowsetup * is preserved. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_LEUART_DEVICE void efm32_leuart_reset(uintptr_t base) diff --git a/arch/arm/src/efm32/efm32_usbdev.c b/arch/arm/src/efm32/efm32_usbdev.c index 9ce5b6a1387..18fcb3c7768 100644 --- a/arch/arm/src/efm32/efm32_usbdev.c +++ b/arch/arm/src/efm32/efm32_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/efm32/efm32_usbdev.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -66,9 +66,9 @@ #if defined(CONFIG_USBDEV) && (defined(CONFIG_EFM32_OTGFS)) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_USBDEV_EP0_MAXSIZE @@ -278,9 +278,9 @@ # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Overall device state */ @@ -468,9 +468,9 @@ struct efm32_usbdev_s struct efm32_ep_s epout[EFM32_NENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -649,9 +649,9 @@ static int efm32_rxfifo_flush(void); static void efm32_swinitialize(FAR struct efm32_usbdev_s *priv); static void efm32_hwinitialize(FAR struct efm32_usbdev_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. */ @@ -778,21 +778,21 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = }; #endif -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_getreg * * Description: * Get the contents of an EFM32 register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t efm32_getreg(uint32_t addr) @@ -848,13 +848,13 @@ static uint32_t efm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_putreg * * Description: * Set the contents of an EFM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void efm32_putreg(uint32_t val, uint32_t addr) @@ -869,13 +869,13 @@ static void efm32_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_req_remfirst * * Description: * Remove a request from the head of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct efm32_req_s *efm32_req_remfirst(FAR struct efm32_ep_s *privep) { @@ -895,13 +895,13 @@ static FAR struct efm32_req_s *efm32_req_remfirst(FAR struct efm32_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_req_addlast * * Description: * Add a request to the end of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static bool efm32_req_addlast(FAR struct efm32_ep_s *privep, FAR struct efm32_req_s *req) @@ -922,13 +922,13 @@ static bool efm32_req_addlast(FAR struct efm32_ep_s *privep, return is_empty; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0in_setupresponse * * Description: * Schedule a short transfer on Endpoint 0 (IN or OUT) * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep0in_setupresponse(FAR struct efm32_usbdev_s *priv, FAR uint8_t *buf, uint32_t nbytes) @@ -951,13 +951,13 @@ static inline void efm32_ep0in_transmitzlp(FAR struct efm32_usbdev_s *priv) efm32_ep0in_setupresponse(priv, NULL, 0); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0in_activate * * Description: * Activate the endpoint 0 IN endpoint. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep0in_activate(void) { @@ -989,13 +989,13 @@ static void efm32_ep0in_activate(void) efm32_putreg(regval, EFM32_USB_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0out_ctrlsetup * * Description: * Setup to receive a SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep0out_ctrlsetup(FAR struct efm32_usbdev_s *priv) { @@ -1378,13 +1378,13 @@ static void efm32_epin_request(FAR struct efm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_rxfifo_read * * Description: * Read packet from the RxFIFO into a read request. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_rxfifo_read(FAR struct efm32_ep_s *privep, FAR uint8_t *dest, uint16_t len) @@ -1421,13 +1421,13 @@ static void efm32_rxfifo_read(FAR struct efm32_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_rxfifo_discard * * Description: * Discard packet data from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_rxfifo_discard(FAR struct efm32_ep_s *privep, int len) { @@ -1452,7 +1452,7 @@ static void efm32_rxfifo_discard(FAR struct efm32_ep_s *privep, int len) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_complete * * Description: @@ -1460,7 +1460,7 @@ static void efm32_rxfifo_discard(FAR struct efm32_ep_s *privep, int len) * received. It completes the read request at the head of the endpoint's * request queue. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_epout_complete(FAR struct efm32_usbdev_s *priv, FAR struct efm32_ep_s *privep) @@ -1501,7 +1501,7 @@ static void efm32_epout_complete(FAR struct efm32_usbdev_s *priv, efm32_epout_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0out_receive * * Description: @@ -1509,7 +1509,7 @@ static void efm32_epout_complete(FAR struct efm32_usbdev_s *priv, * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_ep0out_receive(FAR struct efm32_ep_s *privep, int bcnt) { @@ -1559,7 +1559,7 @@ static inline void efm32_ep0out_receive(FAR struct efm32_ep_s *privep, int bcnt) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_receive * * Description: @@ -1567,7 +1567,7 @@ static inline void efm32_ep0out_receive(FAR struct efm32_ep_s *privep, int bcnt) * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epout_receive(FAR struct efm32_ep_s *privep, int bcnt) { @@ -1641,7 +1641,7 @@ static inline void efm32_epout_receive(FAR struct efm32_ep_s *privep, int bcnt) privreq->req.xfrd += readlen; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_request * * Description: @@ -1649,7 +1649,7 @@ static inline void efm32_epout_receive(FAR struct efm32_ep_s *privep, int bcnt) * (2) a pending receive request completes. If there is no read in pending, * then this function will initiate the next OUT (read) operation. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_epout_request(FAR struct efm32_usbdev_s *priv, FAR struct efm32_ep_s *privep) @@ -1780,13 +1780,13 @@ static void efm32_epout_request(FAR struct efm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_flush * * Description: * Flush any primed descriptors from this ep * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep_flush(struct efm32_ep_s *privep) { @@ -1800,13 +1800,13 @@ static void efm32_ep_flush(struct efm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_req_complete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_req_complete(struct efm32_ep_s *privep, int16_t result) { @@ -1840,13 +1840,13 @@ static void efm32_req_complete(struct efm32_ep_s *privep, int16_t result) privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_req_cancel * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void efm32_req_cancel(struct efm32_ep_s *privep, int16_t status) { @@ -1863,14 +1863,14 @@ static void efm32_req_cancel(struct efm32_ep_s *privep, int16_t status) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_findbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct efm32_ep_s *efm32_ep_findbyaddr(struct efm32_usbdev_s *priv, uint16_t eplog) @@ -1900,14 +1900,14 @@ static struct efm32_ep_s *efm32_ep_findbyaddr(struct efm32_usbdev_s *priv, return privep; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_req_dispatch * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_req_dispatch(struct efm32_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1934,13 +1934,13 @@ static int efm32_req_dispatch(struct efm32_usbdev_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void efm32_usbreset(struct efm32_usbdev_s *priv) { @@ -2034,13 +2034,13 @@ static void efm32_usbreset(struct efm32_usbdev_s *priv) efm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0out_testmode * * Description: * Select test mode * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_ep0out_testmode(FAR struct efm32_usbdev_s *priv, uint16_t index) @@ -2081,14 +2081,14 @@ static inline void efm32_ep0out_testmode(FAR struct efm32_usbdev_s *priv, efm32_ep0in_transmitzlp(priv); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0out_stdrequest * * Description: * Handle a stanard request on EP0. Pick off the things of interest to the * USB device controller driver; pass what is left to the class driver. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_ep0out_stdrequest(struct efm32_usbdev_s *priv, FAR struct efm32_ctrlreq_s *ctrlreq) @@ -2449,14 +2449,14 @@ static inline void efm32_ep0out_stdrequest(struct efm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0out_setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_ep0out_setup(struct efm32_usbdev_s *priv) { @@ -2524,14 +2524,14 @@ static inline void efm32_ep0out_setup(struct efm32_usbdev_s *priv) priv->ep0datlen = 0; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout * * Description: * This is part of the OUT endpoint interrupt processing. This function * handles the OUT event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epout(FAR struct efm32_usbdev_s *priv, uint8_t epno) { @@ -2576,7 +2576,7 @@ static inline void efm32_epout(FAR struct efm32_usbdev_s *priv, uint8_t epno) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_interrupt * * Description: @@ -2587,7 +2587,7 @@ static inline void efm32_epout(FAR struct efm32_usbdev_s *priv, uint8_t epno) * corresponding OTGFS DOEPINTx register to determine the exact cause of the * interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epout_interrupt(FAR struct efm32_usbdev_s *priv) { @@ -2710,13 +2710,13 @@ static inline void efm32_epout_interrupt(FAR struct efm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin_runtestmode * * Description: * Execute the test mode setup by the SET FEATURE request * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epin_runtestmode(FAR struct efm32_usbdev_s *priv) { @@ -2729,14 +2729,14 @@ static inline void efm32_epin_runtestmode(FAR struct efm32_usbdev_s *priv) priv->testmode = _USB_DCTL_TSTCTL_DISABLE; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin * * Description: * This is part of the IN endpoint interrupt processing. This function * handles the IN event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epin(FAR struct efm32_usbdev_s *priv, uint8_t epno) { @@ -2807,7 +2807,7 @@ static inline void efm32_epin_txfifoempty(FAR struct efm32_usbdev_s *priv, int e efm32_epin_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin_interrupt * * Description: @@ -2817,7 +2817,7 @@ static inline void efm32_epin_txfifoempty(FAR struct efm32_usbdev_s *priv, int e * endpoint on which the interrupt occurred, and then read the corresponding * OTGFS DIEPINTx register to determine the exact cause of the interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_epin_interrupt(FAR struct efm32_usbdev_s *priv) { @@ -3006,13 +3006,13 @@ static inline void efm32_epin_interrupt(FAR struct efm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_resumeinterrupt * * Description: * Resume/remote wakeup detected interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_resumeinterrupt(FAR struct efm32_usbdev_s *priv) { @@ -3044,13 +3044,13 @@ static inline void efm32_resumeinterrupt(FAR struct efm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_suspendinterrupt * * Description: * USB suspend interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_suspendinterrupt(FAR struct efm32_usbdev_s *priv) { @@ -3099,14 +3099,14 @@ static inline void efm32_suspendinterrupt(FAR struct efm32_usbdev_s *priv) efm32_usbsuspend((FAR struct usbdev_s *)priv, false); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_rxinterrupt * * Description: * RxFIFO non-empty interrupt. This interrupt indicates that there is at * least one packet pending to be read from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_rxinterrupt(FAR struct efm32_usbdev_s *priv) { @@ -3263,13 +3263,13 @@ static inline void efm32_rxinterrupt(FAR struct efm32_usbdev_s *priv) efm32_putreg(regval, EFM32_USB_GINTMSK); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_enuminterrupt * * Description: * Enumeration done interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_enuminterrupt(FAR struct efm32_usbdev_s *priv) { @@ -3287,7 +3287,7 @@ static inline void efm32_enuminterrupt(FAR struct efm32_usbdev_s *priv) efm32_putreg(regval, EFM32_USB_GUSBCFG); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_isocininterrupt * * Description: @@ -3295,7 +3295,7 @@ static inline void efm32_enuminterrupt(FAR struct efm32_usbdev_s *priv) * isochronous IN transfer interrupt indicates an incomplete isochronous IN * transfer on at least one of the isochronous IN endpoints. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void efm32_isocininterrupt(FAR struct efm32_usbdev_s *priv) @@ -3360,13 +3360,13 @@ static inline void efm32_isocininterrupt(FAR struct efm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_isocoutinterrupt * * Description: * Incomplete periodic transfer interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void efm32_isocoutinterrupt(FAR struct efm32_usbdev_s *priv) @@ -3442,13 +3442,13 @@ static inline void efm32_isocoutinterrupt(FAR struct efm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_sessioninterrupt * * Description: * Session request/new session detected interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void efm32_sessioninterrupt(FAR struct efm32_usbdev_s *priv) @@ -3457,13 +3457,13 @@ static inline void efm32_sessioninterrupt(FAR struct efm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_otginterrupt * * Description: * OTG interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void efm32_otginterrupt(FAR struct efm32_usbdev_s *priv) @@ -3484,13 +3484,13 @@ static inline void efm32_otginterrupt(FAR struct efm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int efm32_usbinterrupt(int irq, FAR void *context) { @@ -3679,17 +3679,17 @@ static int efm32_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_enablegonak * * Description: * Enable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void efm32_enablegonak(FAR struct efm32_ep_s *privep) { @@ -3729,13 +3729,13 @@ static void efm32_enablegonak(FAR struct efm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: efm32_disablegonak * * Description: * Disable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void efm32_disablegonak(FAR struct efm32_ep_s *privep) { @@ -3748,7 +3748,7 @@ static void efm32_disablegonak(FAR struct efm32_ep_s *privep) efm32_putreg(regval, EFM32_USB_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_configure * * Description: @@ -3759,7 +3759,7 @@ static void efm32_disablegonak(FAR struct efm32_ep_s *privep) * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3843,7 +3843,7 @@ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin_configure * * Description: @@ -3854,7 +3854,7 @@ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3942,7 +3942,7 @@ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_configure * * Description: @@ -3955,7 +3955,7 @@ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_configure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -3988,13 +3988,13 @@ static int efm32_ep_configure(FAR struct usbdev_ep_s *ep, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0_configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep0_configure(FAR struct efm32_usbdev_s *priv) { @@ -4006,13 +4006,13 @@ static void efm32_ep0_configure(FAR struct efm32_usbdev_s *priv) CONFIG_USBDEV_EP0_MAXSIZE); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_disable * * Description: * Diable an OUT endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void efm32_epout_disable(FAR struct efm32_ep_s *privep) { @@ -4076,13 +4076,13 @@ static void efm32_epout_disable(FAR struct efm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin_disable * * Description: * Disable an IN endpoint when it will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void efm32_epin_disable(FAR struct efm32_ep_s *privep) { @@ -4170,13 +4170,13 @@ static void efm32_epin_disable(FAR struct efm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_disable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_disable(FAR struct usbdev_ep_s *ep) { @@ -4210,13 +4210,13 @@ static int efm32_ep_disable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_allocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *efm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { @@ -4243,13 +4243,13 @@ static FAR struct usbdev_req_s *efm32_ep_allocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_freereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4267,13 +4267,13 @@ static void efm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_allocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *efm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -4288,13 +4288,13 @@ static void *efm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_freebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void efm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -4309,13 +4309,13 @@ static void efm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_submit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4403,13 +4403,13 @@ static int efm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_cancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4439,13 +4439,13 @@ static int efm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epout_setstall * * Description: * Stall an OUT endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_epout_setstall(FAR struct efm32_ep_s *privep) { @@ -4511,13 +4511,13 @@ static int efm32_epout_setstall(FAR struct efm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: efm32_epin_setstall * * Description: * Stall an IN endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_epin_setstall(FAR struct efm32_ep_s *privep) { @@ -4540,13 +4540,13 @@ static int efm32_epin_setstall(FAR struct efm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_setstall * * Description: * Stall an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_setstall(FAR struct efm32_ep_s *privep) { @@ -4564,13 +4564,13 @@ static int efm32_ep_setstall(FAR struct efm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_clrstall * * Description: * Resume a stalled endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_clrstall(FAR struct efm32_ep_s *privep) { @@ -4623,13 +4623,13 @@ static int efm32_ep_clrstall(FAR struct efm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_stall * * Description: * Stall or resume an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -4653,13 +4653,13 @@ static int efm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep0_stall * * Description: * Stall endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep0_stall(FAR struct efm32_usbdev_s *priv) { @@ -4669,11 +4669,11 @@ static void efm32_ep0_stall(FAR struct efm32_usbdev_s *priv) efm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_alloc * * Description: @@ -4687,7 +4687,7 @@ static void efm32_ep0_stall(FAR struct efm32_usbdev_s *priv) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *efm32_ep_alloc(FAR struct usbdev_s *dev, uint8_t eplog, bool in, @@ -4766,13 +4766,13 @@ static FAR struct usbdev_ep_s *efm32_ep_alloc(FAR struct usbdev_s *dev, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ep_free * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void efm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -4792,13 +4792,13 @@ static void efm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int efm32_getframe(struct usbdev_s *dev) { @@ -4812,13 +4812,13 @@ static int efm32_getframe(struct usbdev_s *dev) return (int)((regval & _USB_DSTS_SOFFN_MASK) >> _USB_DSTS_SOFFN_SHIFT); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_wakeup * * Description: * Exit suspend mode. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_wakeup(struct usbdev_s *dev) { @@ -4860,13 +4860,13 @@ static int efm32_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_selfpowered * * Description: * Sets/clears the device self-powered feature * - *******************************************************************************/ + ****************************************************************************/ static int efm32_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -4886,13 +4886,13 @@ static int efm32_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int efm32_pullup(struct usbdev_s *dev, bool enable) { @@ -4924,13 +4924,13 @@ static int efm32_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_setaddress * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static void efm32_setaddress(struct efm32_usbdev_s *priv, uint16_t address) { @@ -4959,13 +4959,13 @@ static void efm32_setaddress(struct efm32_usbdev_s *priv, uint16_t address) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_txfifo_flush * * Description: * Flush the specific TX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_txfifo_flush(uint32_t txfnum) { @@ -4994,13 +4994,13 @@ static int efm32_txfifo_flush(uint32_t txfnum) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_rxfifo_flush * * Description: * Flush the RX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_rxfifo_flush(void) { @@ -5028,13 +5028,13 @@ static int efm32_rxfifo_flush(void) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_swinitialize * * Description: * Initialize all driver data structures. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_swinitialize(FAR struct efm32_usbdev_s *priv) { @@ -5110,13 +5110,13 @@ static void efm32_swinitialize(FAR struct efm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_hwinitialize * * Description: * Configure the OTG FS core for operation. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_hwinitialize(FAR struct efm32_usbdev_s *priv) { @@ -5400,11 +5400,11 @@ static void efm32_hwinitialize(FAR struct efm32_usbdev_s *priv) EFM32_USB_GAHBCFG); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -5417,7 +5417,7 @@ static void efm32_hwinitialize(FAR struct efm32_usbdev_s *priv) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -5510,9 +5510,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -5580,14 +5580,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -5650,7 +5650,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -5658,7 +5658,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/arch/arm/src/efm32/efm32_usbhost.c index 35c0bc65b91..f9681d293bd 100644 --- a/arch/arm/src/efm32/efm32_usbhost.c +++ b/arch/arm/src/efm32/efm32_usbhost.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/efm32/efm32_usbhost.c * * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #if defined(CONFIG_USBHOST) && defined(CONFIG_EFM32_OTGFS) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* * EFM32 USB OTG FS Host Driver Support @@ -164,9 +164,9 @@ #define TRENTRY(id,fmt1,string) {string} -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* The following enumeration represents the various states of the USB host * state machine (for debug purposes only) @@ -291,9 +291,9 @@ struct efm32_usbhost_trace_s }; #endif -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -482,9 +482,9 @@ static void efm32_host_initialize(FAR struct efm32_usbhost_s *priv); static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv); static inline int efm32_hw_initialize(FAR struct efm32_usbhost_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global @@ -564,21 +564,21 @@ static const struct efm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] = }; #endif /* HAVE_USBHOST_TRACE */ -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_printreg * * Description: * Print the contents of an EFM32xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_USBHOST_REGDEBUG static void efm32_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -587,13 +587,13 @@ static void efm32_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_checkreg * * Description: * Get the contents of an EFM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_USBHOST_REGDEBUG static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -651,13 +651,13 @@ static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_getreg * * Description: * Get the contents of an EFM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_USBHOST_REGDEBUG static uint32_t efm32_getreg(uint32_t addr) @@ -673,13 +673,13 @@ static uint32_t efm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_putreg * * Description: * Set the contents of an EFM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_USBHOST_REGDEBUG static void efm32_putreg(uint32_t addr, uint32_t val) @@ -694,13 +694,13 @@ static void efm32_putreg(uint32_t addr, uint32_t val) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_modifyreg * * Description: * Modify selected bits of an EFM32 register. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t setbits) { @@ -714,7 +714,7 @@ static inline void efm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t set * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_takesem(sem_t *sem) { @@ -736,20 +736,20 @@ static void efm32_takesem(sem_t *sem) * Description: * Get a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ static inline uint16_t efm32_getle16(const uint8_t *val) { return (uint16_t)val[1] << 8 | (uint16_t)val[0]; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_alloc * * Description: * Allocate a channel. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_chan_alloc(FAR struct efm32_usbhost_s *priv) { @@ -775,13 +775,13 @@ static int efm32_chan_alloc(FAR struct efm32_usbhost_s *priv) return -EBUSY; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_free * * Description: * Free a previoiusly allocated channel. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_chan_free(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -796,13 +796,13 @@ static void efm32_chan_free(FAR struct efm32_usbhost_s *priv, int chidx) priv->chan[chidx].inuse = false; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_freeall * * Description: * Free all channels. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_chan_freeall(FAR struct efm32_usbhost_s *priv) { @@ -816,7 +816,7 @@ static inline void efm32_chan_freeall(FAR struct efm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_configure * * Description: @@ -824,7 +824,7 @@ static inline void efm32_chan_freeall(FAR struct efm32_usbhost_s *priv) * when endpoint is allocated and EP0 (only) is re-configured with the * max packet size or device address changes. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_chan_configure(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -977,14 +977,14 @@ static void efm32_chan_configure(FAR struct efm32_usbhost_s *priv, int chidx) efm32_putreg(EFM32_USB_HCn_CHAR(chidx), regval); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_halt * * Description: * Halt the channel associated with 'chidx' by setting the CHannel DISable * (CHDIS) bit in in the HCCHAR register. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_chan_halt(FAR struct efm32_usbhost_s *priv, int chidx, enum efm32_chreason_e chreason) @@ -1062,7 +1062,7 @@ static void efm32_chan_halt(FAR struct efm32_usbhost_s *priv, int chidx, efm32_putreg(EFM32_USB_HCn_CHAR(chidx), hcchar); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_waitsetup * * Description: @@ -1074,7 +1074,7 @@ static void efm32_chan_halt(FAR struct efm32_usbhost_s *priv, int chidx, * Assumptions: * Called from a normal thread context BEFORE the transfer has been started. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_chan_waitsetup(FAR struct efm32_usbhost_s *priv, FAR struct efm32_chan_s *chan) @@ -1102,7 +1102,7 @@ static int efm32_chan_waitsetup(FAR struct efm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_asynchsetup * * Description: @@ -1114,7 +1114,7 @@ static int efm32_chan_waitsetup(FAR struct efm32_usbhost_s *priv, * Assumptions: * Might be called from the level of an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int efm32_chan_asynchsetup(FAR struct efm32_usbhost_s *priv, @@ -1143,7 +1143,7 @@ static int efm32_chan_asynchsetup(FAR struct efm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_wait * * Description: @@ -1152,7 +1152,7 @@ static int efm32_chan_asynchsetup(FAR struct efm32_usbhost_s *priv, * Assumptions: * Called from a normal thread context * - *******************************************************************************/ + ****************************************************************************/ static int efm32_chan_wait(FAR struct efm32_usbhost_s *priv, FAR struct efm32_chan_s *chan) @@ -1198,7 +1198,7 @@ static int efm32_chan_wait(FAR struct efm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_chan_wakeup * * Description: @@ -1209,7 +1209,7 @@ static int efm32_chan_wait(FAR struct efm32_usbhost_s *priv, * This function is called from the transfer complete interrupt handler for * the channel. Interrupts are disabled. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_chan_wakeup(FAR struct efm32_usbhost_s *priv, FAR struct efm32_chan_s *chan) @@ -1259,13 +1259,13 @@ static void efm32_chan_wakeup(FAR struct efm32_usbhost_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrlchan_alloc * * Description: * Allocate and configured channels for a control pipe. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrlchan_alloc(FAR struct efm32_usbhost_s *priv, uint8_t epno, uint8_t funcaddr, uint8_t speed, @@ -1322,7 +1322,7 @@ static int efm32_ctrlchan_alloc(FAR struct efm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrlep_alloc * * Description: @@ -1341,7 +1341,7 @@ static int efm32_ctrlchan_alloc(FAR struct efm32_usbhost_s *priv, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrlep_alloc(FAR struct efm32_usbhost_s *priv, FAR const struct usbhost_epdesc_s *epdesc, @@ -1455,13 +1455,13 @@ static int efm32_xfrep_alloc(FAR struct efm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_transfer_start * * Description: * Start at transfer on the select IN or OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_transfer_start(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -1645,7 +1645,7 @@ static void efm32_transfer_start(FAR struct efm32_usbhost_s *priv, int chidx) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_getframe * * Description: @@ -1653,7 +1653,7 @@ static void efm32_transfer_start(FAR struct efm32_usbhost_s *priv, int chidx) * when a new SOF is transmitted on the USB, and is cleared to 0 when it * reaches 0x3fff. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static inline uint16_t efm32_getframe(void) @@ -1662,13 +1662,13 @@ static inline uint16_t efm32_getframe(void) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrl_sendsetup * * Description: * Send an IN/OUT SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrl_sendsetup(FAR struct efm32_usbhost_s *priv, FAR struct efm32_ctrlinfo_s *ep0, @@ -1738,14 +1738,14 @@ static int efm32_ctrl_sendsetup(FAR struct efm32_usbhost_s *priv, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrl_senddata * * Description: * Send data in the data phase of an OUT control transfer. Or send status * in the status phase of an IN control transfer * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrl_senddata(FAR struct efm32_usbhost_s *priv, FAR struct efm32_ctrlinfo_s *ep0, @@ -1791,14 +1791,14 @@ static int efm32_ctrl_senddata(FAR struct efm32_usbhost_s *priv, return efm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrl_recvdata * * Description: * Receive data in the data phase of an IN control transfer. Or receive status * in the status phase of an OUT control transfer * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrl_recvdata(FAR struct efm32_usbhost_s *priv, FAR struct efm32_ctrlinfo_s *ep0, @@ -1832,13 +1832,13 @@ static int efm32_ctrl_recvdata(FAR struct efm32_usbhost_s *priv, return efm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_in_setup * * Description: * Initiate an IN transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_in_setup(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -1893,13 +1893,13 @@ static int efm32_in_setup(FAR struct efm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_in_transfer * * Description: * Transfer 'buflen' bytes into 'buffer' from an IN channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -1975,7 +1975,7 @@ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, return (ssize_t)chan->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_in_next * * Description: @@ -1984,7 +1984,7 @@ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void efm32_in_next(FAR struct efm32_usbhost_s *priv, @@ -2040,7 +2040,7 @@ static void efm32_in_next(FAR struct efm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_in_asynch * * Description: @@ -2049,7 +2049,7 @@ static void efm32_in_next(FAR struct efm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int efm32_in_asynch(FAR struct efm32_usbhost_s *priv, int chidx, @@ -2087,13 +2087,13 @@ static int efm32_in_asynch(FAR struct efm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_out_setup * * Description: * Initiate an OUT transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_out_setup(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -2152,13 +2152,13 @@ static int efm32_out_setup(FAR struct efm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_out_transfer * * Description: * Transfer the 'buflen' bytes in 'buffer' through an OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -2261,7 +2261,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, return xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_out_next * * Description: @@ -2270,7 +2270,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void efm32_out_next(FAR struct efm32_usbhost_s *priv, @@ -2326,7 +2326,7 @@ static void efm32_out_next(FAR struct efm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_out_asynch * * Description: @@ -2335,7 +2335,7 @@ static void efm32_out_next(FAR struct efm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int efm32_out_asynch(FAR struct efm32_usbhost_s *priv, int chidx, @@ -2373,14 +2373,14 @@ static int efm32_out_asynch(FAR struct efm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_wrpacket * * Description: * Transfer the 'buflen' bytes in 'buffer' to the Tx FIFO associated with * 'chidx' (non-DMA). * - *******************************************************************************/ + ****************************************************************************/ static void efm32_gint_wrpacket(FAR struct efm32_usbhost_s *priv, FAR uint8_t *buffer, int chidx, int buflen) @@ -2413,7 +2413,7 @@ static void efm32_gint_wrpacket(FAR struct efm32_usbhost_s *priv, priv->chan[chidx].inflight += buflen; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_hcinisr * * Description: @@ -2430,7 +2430,7 @@ static void efm32_gint_wrpacket(FAR struct efm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_hcinisr(FAR struct efm32_usbhost_s *priv, int chidx) @@ -2674,7 +2674,7 @@ static inline void efm32_gint_hcinisr(FAR struct efm32_usbhost_s *priv, efm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_hcoutisr * * Description: @@ -2691,7 +2691,7 @@ static inline void efm32_gint_hcinisr(FAR struct efm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_hcoutisr(FAR struct efm32_usbhost_s *priv, int chidx) @@ -2884,13 +2884,13 @@ static inline void efm32_gint_hcoutisr(FAR struct efm32_usbhost_s *priv, efm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_connected * * Description: * Handle a connection event. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_gint_connected(FAR struct efm32_usbhost_s *priv) { @@ -2916,13 +2916,13 @@ static void efm32_gint_connected(FAR struct efm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_disconnected * * Description: * Handle a disconnection event. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_gint_disconnected(FAR struct efm32_usbhost_s *priv) { @@ -2963,13 +2963,13 @@ static void efm32_gint_disconnected(FAR struct efm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_sofisr * * Description: * USB OTG FS start-of-frame interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_EFM32_OTGFS_SOFINTR static inline void efm32_gint_sofisr(FAR struct efm32_usbhost_s *priv) @@ -2983,13 +2983,13 @@ static inline void efm32_gint_sofisr(FAR struct efm32_usbhost_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_rxflvlisr * * Description: * USB OTG FS RxFIFO non-empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_rxflvlisr(FAR struct efm32_usbhost_s *priv) { @@ -3084,13 +3084,13 @@ static inline void efm32_gint_rxflvlisr(FAR struct efm32_usbhost_s *priv) efm32_putreg(EFM32_USB_GINTMSK, intmsk); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_nptxfeisr * * Description: * USB OTG FS non-periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_nptxfeisr(FAR struct efm32_usbhost_s *priv) { @@ -3173,13 +3173,13 @@ static inline void efm32_gint_nptxfeisr(FAR struct efm32_usbhost_s *priv) efm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_ptxfeisr * * Description: * USB OTG FS periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_ptxfeisr(FAR struct efm32_usbhost_s *priv) { @@ -3261,13 +3261,13 @@ static inline void efm32_gint_ptxfeisr(FAR struct efm32_usbhost_s *priv) efm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_hcisr * * Description: * USB OTG FS host channels interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_hcisr(FAR struct efm32_usbhost_s *priv) { @@ -3309,13 +3309,13 @@ static inline void efm32_gint_hcisr(FAR struct efm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_hprtisr * * Description: * USB OTG FS host port interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_hprtisr(FAR struct efm32_usbhost_s *priv) { @@ -3443,13 +3443,13 @@ static inline void efm32_gint_hprtisr(FAR struct efm32_usbhost_s *priv) efm32_putreg(EFM32_USB_HPRT, newhprt); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_discisr * * Description: * USB OTG FS disconnect detected interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_discisr(FAR struct efm32_usbhost_s *priv) { @@ -3462,13 +3462,13 @@ static inline void efm32_gint_discisr(FAR struct efm32_usbhost_s *priv) efm32_putreg(EFM32_USB_GINTSTS, USB_GINTSTS_DISCONNINT); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_ipxfrisr * * Description: * USB OTG FS incomplete periodic interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_gint_ipxfrisr(FAR struct efm32_usbhost_s *priv) { @@ -3487,13 +3487,13 @@ static inline void efm32_gint_ipxfrisr(FAR struct efm32_usbhost_s *priv) efm32_putreg(EFM32_USB_GINTSTS, USB_GINTSTS_INCOMPLP); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_isr * * Description: * USB OTG FS global interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int efm32_gint_isr(int irq, FAR void *context) { @@ -3604,7 +3604,7 @@ static int efm32_gint_isr(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_gint_enable and efm32_gint_disable * * Description: @@ -3616,7 +3616,7 @@ static int efm32_gint_isr(int irq, FAR void *context) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void efm32_gint_enable(void) { @@ -3640,7 +3640,7 @@ static void efm32_gint_disable(void) efm32_putreg(EFM32_USB_GAHBCFG, regval); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_hostinit_enable * * Description: @@ -3652,7 +3652,7 @@ static void efm32_gint_disable(void) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_hostinit_enable(void) { @@ -3712,7 +3712,7 @@ static inline void efm32_hostinit_enable(void) efm32_putreg(EFM32_USB_GINTMSK, regval); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_txfe_enable * * Description: @@ -3732,7 +3732,7 @@ static inline void efm32_hostinit_enable(void) * Called from user task context. Interrupts must be disabled to assure * exclusive access to the GINTMSK register. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_txfe_enable(FAR struct efm32_usbhost_s *priv, int chidx) { @@ -3769,11 +3769,11 @@ static void efm32_txfe_enable(FAR struct efm32_usbhost_s *priv, int chidx) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_wait * * Description: @@ -3796,7 +3796,7 @@ static void efm32_txfe_enable(FAR struct efm32_usbhost_s *priv, int chidx) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3857,7 +3857,7 @@ static int efm32_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_enumerate * * Description: @@ -3883,7 +3883,7 @@ static int efm32_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_rh_enumerate(FAR struct efm32_usbhost_s *priv, FAR struct usbhost_connection_s *conn, @@ -4166,7 +4166,7 @@ static int efm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_alloc * * Description: @@ -4196,7 +4196,7 @@ static int efm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -4220,7 +4220,7 @@ static int efm32_alloc(FAR struct usbhost_driver_s *drvr, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_free * * Description: @@ -4241,7 +4241,7 @@ static int efm32_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -4332,7 +4332,7 @@ static int efm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_ctrlin and efm32_ctrlout * * Description: @@ -4365,7 +4365,7 @@ static int efm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int efm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4539,7 +4539,7 @@ static int efm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_transfer * * Description: @@ -4575,7 +4575,7 @@ static int efm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t efm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4607,7 +4607,7 @@ static ssize_t efm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep return nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: efm32_asynch * * Description: @@ -4640,7 +4640,7 @@ static ssize_t efm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int efm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4813,7 +4813,7 @@ static int efm32_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: efm32_disconnect * * Description: @@ -4834,7 +4834,7 @@ static int efm32_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4843,10 +4843,10 @@ static void efm32_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: efm32_portreset * * Description: @@ -4864,7 +4864,7 @@ static void efm32_disconnect(FAR struct usbhost_driver_s *drvr, * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void efm32_portreset(FAR struct efm32_usbhost_s *priv) { @@ -4884,7 +4884,7 @@ static void efm32_portreset(FAR struct efm32_usbhost_s *priv) up_mdelay(20); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_flush_txfifos * * Description: @@ -4896,7 +4896,7 @@ static void efm32_portreset(FAR struct efm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_flush_txfifos(uint32_t txfnum) { @@ -4924,7 +4924,7 @@ static void efm32_flush_txfifos(uint32_t txfnum) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_flush_rxfifo * * Description: @@ -4936,7 +4936,7 @@ static void efm32_flush_txfifos(uint32_t txfnum) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_flush_rxfifo(void) { @@ -4963,7 +4963,7 @@ static void efm32_flush_rxfifo(void) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_vbusdrive * * Description: @@ -4976,7 +4976,7 @@ static void efm32_flush_rxfifo(void) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_vbusdrive(FAR struct efm32_usbhost_s *priv, bool state) { @@ -5007,7 +5007,7 @@ static void efm32_vbusdrive(FAR struct efm32_usbhost_s *priv, bool state) up_mdelay(200); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_host_initialize * * Description: @@ -5022,7 +5022,7 @@ static void efm32_vbusdrive(FAR struct efm32_usbhost_s *priv, bool state) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void efm32_host_initialize(FAR struct efm32_usbhost_s *priv) { @@ -5096,7 +5096,7 @@ static void efm32_host_initialize(FAR struct efm32_usbhost_s *priv) efm32_hostinit_enable(); } -/******************************************************************************* +/**************************************************************************** * Name: efm32_sw_initialize * * Description: @@ -5108,7 +5108,7 @@ static void efm32_host_initialize(FAR struct efm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv) { @@ -5177,7 +5177,7 @@ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: efm32_hw_initialize * * Description: @@ -5189,7 +5189,7 @@ static inline void efm32_sw_initialize(FAR struct efm32_usbhost_s *priv) * Returned Value: * Zero on success; a negated errno value on failure. * - *******************************************************************************/ + ****************************************************************************/ static inline int efm32_hw_initialize(FAR struct efm32_usbhost_s *priv) { @@ -5269,11 +5269,11 @@ static inline int efm32_hw_initialize(FAR struct efm32_usbhost_s *priv) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: efm32_usbhost_initialize * * Description: @@ -5296,7 +5296,7 @@ static inline int efm32_hw_initialize(FAR struct efm32_usbhost_s *priv) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *efm32_usbhost_initialize(int controller) { diff --git a/arch/arm/src/kinetis/kinetis_lowputc.c b/arch/arm/src/kinetis/kinetis_lowputc.c index 86c83327f09..a7b693ccca7 100644 --- a/arch/arm/src/kinetis/kinetis_lowputc.c +++ b/arch/arm/src/kinetis/kinetis_lowputc.c @@ -268,13 +268,13 @@ void kinetis_lowsetup(void) #endif /* HAVE_UART_DEVICE */ } -/****************************************************************************** +/**************************************************************************** * Name: kinetis_uartreset * * Description: * Reset a UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void kinetis_uartreset(uintptr_t uart_base) @@ -289,13 +289,13 @@ void kinetis_uartreset(uintptr_t uart_base) } #endif -/****************************************************************************** +/**************************************************************************** * Name: kinetis_uartconfigure * * Description: * Configure a UART as a RS-232 UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void kinetis_uartconfigure(uintptr_t uart_base, uint32_t baud, diff --git a/arch/arm/src/kl/kl_lowputc.c b/arch/arm/src/kl/kl_lowputc.c index aee40a06638..01288ef874f 100644 --- a/arch/arm/src/kl/kl_lowputc.c +++ b/arch/arm/src/kl/kl_lowputc.c @@ -222,13 +222,13 @@ void kl_lowsetup(void) #endif } -/****************************************************************************** +/**************************************************************************** * Name: kl_uartreset * * Description: * Reset a UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void kl_uartreset(uintptr_t uart_base) @@ -243,13 +243,13 @@ void kl_uartreset(uintptr_t uart_base) } #endif -/****************************************************************************** +/**************************************************************************** * Name: kl_uartconfigure * * Description: * Configure a UART as a RS-232 UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void kl_uartconfigure(uintptr_t uart_base, uint32_t baud, uint32_t clock, diff --git a/arch/arm/src/lpc11xx/lpc11_i2c.c b/arch/arm/src/lpc11xx/lpc11_i2c.c index 9b6462c6763..8af2c0b25aa 100644 --- a/arch/arm/src/lpc11xx/lpc11_i2c.c +++ b/arch/arm/src/lpc11xx/lpc11_i2c.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc11xx/lpc11_i2c.c * * Copyright (C) 2011 Li Zhuoyi. All rights reserved. @@ -39,11 +39,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -72,9 +72,9 @@ #if defined(CONFIG_LPC11_I2C0) || defined(CONFIG_LPC11_I2C1) || defined(CONFIG_LPC11_I2C2) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ #ifndef GPIO_I2C1_SCL # define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 @@ -95,9 +95,9 @@ #define I2C_TIMEOUT ((20 * CLK_TCK) / 1000) /* 20 mS */ -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ struct lpc11_i2cdev_s { @@ -115,9 +115,9 @@ struct lpc11_i2cdev_s uint16_t rdcnt; /* number of bytes read from rx fifo */ }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ static int i2c_start(struct lpc11_i2cdev_s *priv); static void i2c_stop(struct lpc11_i2cdev_s *priv); @@ -132,9 +132,9 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen); static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ static struct lpc11_i2cdev_s i2cdevices[3]; @@ -149,13 +149,13 @@ struct i2c_ops_s lpc11_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Name: lpc11_i2c_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -185,13 +185,13 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: lpc11_i2c_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -206,14 +206,14 @@ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc11_i2c_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) @@ -234,14 +234,14 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, return ret > 0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: lpc11_i2c_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) { @@ -261,13 +261,13 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) return ret > 0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_start * * Description: * Perform a I2C transfer start * - *******************************************************************************/ + ****************************************************************************/ static int i2c_start(struct lpc11_i2cdev_s *priv) { @@ -295,13 +295,13 @@ static int i2c_start(struct lpc11_i2cdev_s *priv) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_stop * * Description: * Perform a I2C transfer stop * - *******************************************************************************/ + ****************************************************************************/ static void i2c_stop(struct lpc11_i2cdev_s *priv) { @@ -313,13 +313,13 @@ static void i2c_stop(struct lpc11_i2cdev_s *priv) sem_post(&priv->wait); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_timeout * * Description: * Watchdog timer for timeout of I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void i2c_timeout(int argc, uint32_t arg, ...) { @@ -331,13 +331,13 @@ static void i2c_timeout(int argc, uint32_t arg, ...) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_interrupt * * Description: * The I2C Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int i2c_interrupt(int irq, FAR void *context) { @@ -439,17 +439,17 @@ static int i2c_interrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int port) { @@ -569,13 +569,13 @@ struct i2c_dev_s *up_i2cinitialize(int port) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s * dev) { diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index 02fcc2a3353..9957c13e2c1 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -448,13 +448,13 @@ static void lpc17_ethreset(struct lpc17_driver_s *priv); * Private Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_printreg * * Description: * Print the contents of an LPC17xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -463,13 +463,13 @@ static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_checkreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -527,13 +527,13 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_getreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static uint32_t lpc17_getreg(uint32_t addr) @@ -549,13 +549,13 @@ static uint32_t lpc17_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_putreg * * Description: * Set the contents of an LPC17xx register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void lpc17_putreg(uint32_t val, uint32_t addr) @@ -2315,7 +2315,7 @@ static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_showpins * * Description: @@ -2329,7 +2329,7 @@ static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) * * Assumptions: * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_NET_REGDEBUG) && defined(CONFIG_DEBUG_GPIO) static void lpc17_showpins(void) @@ -2339,7 +2339,7 @@ static void lpc17_showpins(void) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_showmii * * Description: @@ -2353,7 +2353,7 @@ static void lpc17_showpins(void) * * Assumptions: * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_NET_REGDEBUG) && defined(LPC17_HAVE_PHY) static void lpc17_showmii(uint8_t phyaddr, const char *msg) diff --git a/arch/arm/src/lpc17xx/lpc17_i2c.c b/arch/arm/src/lpc17xx/lpc17_i2c.c index bcab38befee..8d55944a243 100644 --- a/arch/arm/src/lpc17xx/lpc17_i2c.c +++ b/arch/arm/src/lpc17xx/lpc17_i2c.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc17xx/lpc17_i2c.c * * Copyright (C) 2011 Li Zhuoyi. All rights reserved. @@ -39,11 +39,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -89,19 +89,19 @@ # define CONFIG_I2C2_FREQ 100000 #endif -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ #define I2C_TIMEOUT ((20 * CLK_TCK) / 1000) /* 20 mS */ -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ struct lpc17_i2cdev_s { @@ -121,18 +121,18 @@ struct lpc17_i2cdev_s static struct lpc17_i2cdev_s i2cdevices[3]; -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ static int i2c_start(struct lpc17_i2cdev_s *priv); static void i2c_stop(struct lpc17_i2cdev_s *priv); static int i2c_interrupt(int irq, FAR void *context); static void i2c_timeout(int argc, uint32_t arg, ...); -/******************************************************************************* +/**************************************************************************** * I2C device operations - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency); static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits); @@ -151,13 +151,13 @@ struct i2c_ops_s lpc17_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Name: lpc17_i2c_setfrequency * * Description: * Set the frequence for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -183,13 +183,13 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_i2c_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -204,14 +204,14 @@ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_i2c_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) { @@ -231,14 +231,14 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int bufle return ret > 0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_i2c_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) { @@ -258,13 +258,13 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) return ret > 0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_start * * Description: * Perform a I2C transfer start * - *******************************************************************************/ + ****************************************************************************/ static int i2c_start(struct lpc17_i2cdev_s *priv) { @@ -292,13 +292,13 @@ static int i2c_start(struct lpc17_i2cdev_s *priv) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_stop * * Description: * Perform a I2C transfer stop * - *******************************************************************************/ + ****************************************************************************/ static void i2c_stop(struct lpc17_i2cdev_s *priv) { @@ -310,13 +310,13 @@ static void i2c_stop(struct lpc17_i2cdev_s *priv) sem_post(&priv->wait); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_timeout * * Description: * Watchdog timer for timeout of I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void i2c_timeout(int argc, uint32_t arg, ...) { @@ -328,13 +328,13 @@ static void i2c_timeout(int argc, uint32_t arg, ...) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_interrupt * * Description: * The I2C Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int i2c_interrupt(int irq, FAR void *context) { @@ -436,17 +436,17 @@ static int i2c_interrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int port) { @@ -566,13 +566,13 @@ struct i2c_dev_s *up_i2cinitialize(int port) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s * dev) { diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index a7a914f0aef..d53a28e94c7 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc17xx/lpc17_usbdev.c * * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -65,9 +65,9 @@ #include "lpc17_gpio.h" #include "lpc17_gpdma.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -272,9 +272,9 @@ #define lpc17_rqempty(ep) ((ep)->head == NULL) #define lpc17_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request make be retained in a list */ @@ -364,9 +364,9 @@ struct lpc17_usbdev_s struct lpc17_ep_s eplist[LPC17_NPHYSENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -457,9 +457,9 @@ static int lpc17_wakeup(struct usbdev_s *dev); static int lpc17_selfpowered(struct usbdev_s *dev, bool selfpowered); static int lpc17_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. @@ -512,21 +512,21 @@ static uint32_t g_udca[LPC17_NPHYSENDPOINTS] __attribute__ ((alig static struct lpc17_dmadesc_s g_usbddesc[CONFIG_LPC17_USBDEV_NDMADESCRIPTORS]; #endif -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_printreg * * Description: * Print the contents of an LPC17xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -535,13 +535,13 @@ static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_checkreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_REGDEBUG static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -599,13 +599,13 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_getreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_REGDEBUG static uint32_t lpc17_getreg(uint32_t addr) @@ -621,13 +621,13 @@ static uint32_t lpc17_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_putreg * * Description: * Set the contents of an LPC17xx register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_REGDEBUG static void lpc17_putreg(uint32_t val, uint32_t addr) @@ -642,13 +642,13 @@ static void lpc17_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_usbcmd * * Description: * Transmit commands to the USB engine * - *******************************************************************************/ + ****************************************************************************/ static uint32_t lpc17_usbcmd(uint16_t cmd, uint8_t data) { @@ -786,13 +786,13 @@ static uint32_t lpc17_usbcmd(uint16_t cmd, uint8_t data) return tmp; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct lpc17_req_s *lpc17_rqdequeue(FAR struct lpc17_ep_s *privep) { @@ -812,13 +812,13 @@ static FAR struct lpc17_req_s *lpc17_rqdequeue(FAR struct lpc17_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_rqenqueue(FAR struct lpc17_ep_s *privep, FAR struct lpc17_req_s *req) @@ -836,13 +836,13 @@ static void lpc17_rqenqueue(FAR struct lpc17_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epwrite * * Description: * Endpoint write (IN) * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_epwrite(uint8_t epphy, const uint8_t *data, uint32_t nbytes) { @@ -897,13 +897,13 @@ static void lpc17_epwrite(uint8_t epphy, const uint8_t *data, uint32_t nbytes) (void)lpc17_usbcmd(CMD_USBDEV_EPVALIDATEBUFFER, 0); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epread * * Description: * Endpoint read (OUT) * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epread(uint8_t epphy, uint8_t *data, uint32_t nbytes) { @@ -983,13 +983,13 @@ static int lpc17_epread(uint8_t epphy, uint8_t *data, uint32_t nbytes) return pktlen; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_abortrequest * * Description: * Discard a request * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_abortrequest(struct lpc17_ep_s *privep, struct lpc17_req_s *privreq, @@ -1006,13 +1006,13 @@ static inline void lpc17_abortrequest(struct lpc17_ep_s *privep, privreq->req.callback(&privep->ep, &privreq->req); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_reqcomplete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_reqcomplete(struct lpc17_ep_s *privep, int16_t result) { @@ -1052,13 +1052,13 @@ static void lpc17_reqcomplete(struct lpc17_ep_s *privep, int16_t result) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_wrrequest * * Description: * Send from the next queued write request * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_wrrequest(struct lpc17_ep_s *privep) { @@ -1162,13 +1162,13 @@ static int lpc17_wrrequest(struct lpc17_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_rdrequest * * Description: * Receive to the next queued read request * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_rdrequest(struct lpc17_ep_s *privep) { @@ -1223,13 +1223,13 @@ static int lpc17_rdrequest(struct lpc17_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_cancelrequests(struct lpc17_ep_s *privep) { @@ -1241,14 +1241,14 @@ static void lpc17_cancelrequests(struct lpc17_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct lpc17_ep_s *lpc17_epfindbyaddr(struct lpc17_usbdev_s *priv, uint16_t eplog) @@ -1284,13 +1284,13 @@ static struct lpc17_ep_s *lpc17_epfindbyaddr(struct lpc17_usbdev_s *priv, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_eprealize * * Description: * Enable or disable an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_eprealize(struct lpc17_ep_s *privep, bool prio, uint32_t packetsize) { @@ -1334,13 +1334,13 @@ static void lpc17_eprealize(struct lpc17_ep_s *privep, bool prio, uint32_t packe lpc17_putreg(USBDEV_INT_EPRLZED,LPC17_USBDEV_INTCLR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epclrinterrupt * * Description: * Clear the EP interrupt flag and return the current EP status * - *******************************************************************************/ + ****************************************************************************/ static uint8_t lpc17_epclrinterrupt(uint8_t epphy) { @@ -1357,13 +1357,13 @@ static uint8_t lpc17_epclrinterrupt(uint8_t epphy) return lpc17_getreg(LPC17_USBDEV_CMDDATA); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ep0configure * * Description: * Configure endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_ep0configure(struct lpc17_usbdev_s *priv) { @@ -1381,12 +1381,12 @@ static inline void lpc17_ep0configure(struct lpc17_usbdev_s *priv) lpc17_putreg(inten, LPC17_USBDEV_EPINTEN); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dmareset * * Description: Reset USB DMA * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_DMA static inline void lpc17_dmareset(uint32_t enable) @@ -1441,13 +1441,13 @@ static inline void lpc17_dmareset(uint32_t enable) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_usbreset(struct lpc17_usbdev_s *priv) { @@ -1500,14 +1500,14 @@ static void lpc17_usbreset(struct lpc17_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_dispatchrequest(struct lpc17_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1530,14 +1530,14 @@ static void lpc17_dispatchrequest(struct lpc17_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ep0setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_ep0setup(struct lpc17_usbdev_s *priv) { @@ -1911,7 +1911,7 @@ static inline void lpc17_ep0setup(struct lpc17_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ep0dataoutinterrupt * * Description: @@ -1919,7 +1919,7 @@ static inline void lpc17_ep0setup(struct lpc17_usbdev_s *priv) * handler. Each non-isochronous OUT endpoint gives an interrupt when they * receive a packet without error. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_ep0dataoutinterrupt(struct lpc17_usbdev_s *priv) { @@ -1972,7 +1972,7 @@ static inline void lpc17_ep0dataoutinterrupt(struct lpc17_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ep0dataininterrupt * * Description: @@ -1981,7 +1981,7 @@ static inline void lpc17_ep0dataoutinterrupt(struct lpc17_usbdev_s *priv) * packet is successfully transmitted (OR a NAK handshake is sent on the bus * provided that the interrupt on NAK feature is enabled). * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_ep0dataininterrupt(struct lpc17_usbdev_s *priv) { @@ -2037,13 +2037,13 @@ static inline void lpc17_ep0dataininterrupt(struct lpc17_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_usbinterrupt(int irq, FAR void *context) { @@ -2394,13 +2394,13 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dmasetup * * Description: * Setup for DMA Transfer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_DMA static int lpc17_dmasetup(struct lpc17_usbdev_s *priv, uint8_t epphy, @@ -2482,13 +2482,13 @@ static int lpc17_dmasetup(struct lpc17_usbdev_s *priv, uint8_t epphy, } #endif /* CONFIG_LPC17_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dmarestart * * Description: * Restart DMA Transfer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_DMA static void lpc17_dmarestart(uint8_t epphy, uint32_t descndx) @@ -2517,13 +2517,13 @@ static void lpc17_dmarestart(uint8_t epphy, uint32_t descndx) } #endif /* CONFIG_LPC17_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dmadisable * * Description: * Disable DMA transfer for the EP * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBDEV_DMA static void lpc17_dmadisable(uint8_t epphy) @@ -2532,11 +2532,11 @@ static void lpc17_dmadisable(uint8_t epphy) } #endif /* CONFIG_LPC17_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epconfigure * * Description: @@ -2549,7 +2549,7 @@ static void lpc17_dmadisable(uint8_t epphy) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -2593,13 +2593,13 @@ static int lpc17_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epdisable(FAR struct usbdev_ep_s *ep) { @@ -2638,13 +2638,13 @@ static int lpc17_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -2670,13 +2670,13 @@ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2694,13 +2694,13 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes) @@ -2735,13 +2735,13 @@ static FAR void *lpc17_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -2774,13 +2774,13 @@ static void lpc17_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2862,13 +2862,13 @@ static int lpc17_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2891,13 +2891,13 @@ static int lpc17_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_epstall * * Description: * Stall or resume and endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_epstall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -2920,11 +2920,11 @@ static int lpc17_epstall(FAR struct usbdev_ep_s *ep, bool resume) return OK; } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_allocep * * Description: @@ -2938,7 +2938,7 @@ static int lpc17_epstall(FAR struct usbdev_ep_s *ep, bool resume) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *lpc17_allocep(FAR struct usbdev_s *dev, uint8_t eplog, bool in, uint8_t eptype) @@ -3048,13 +3048,13 @@ static FAR struct usbdev_ep_s *lpc17_allocep(FAR struct usbdev_s *dev, uint8_t e return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -3074,13 +3074,13 @@ static void lpc17_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_getframe(struct usbdev_s *dev) { @@ -3099,13 +3099,13 @@ static int lpc17_getframe(struct usbdev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_wakeup(struct usbdev_s *dev) { @@ -3125,13 +3125,13 @@ static int lpc17_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -3151,13 +3151,13 @@ static int lpc17_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_pullup(struct usbdev_s *dev, bool enable) { @@ -3171,11 +3171,11 @@ static int lpc17_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -3185,7 +3185,7 @@ static int lpc17_pullup(struct usbdev_s *dev, bool enable) * This function is called very early in the initialization sequence in order * to initialize the USB device functionality. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -3350,9 +3350,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -3388,14 +3388,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -3439,7 +3439,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -3447,7 +3447,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 06436596166..d1e8ce08376 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc17xx/lpc17_usbhost.c * * Copyright (C) 2010-2012, 2014-2015 Gregory Nutt. All rights reserved. @@ -32,11 +32,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #include "lpc17_gpio.h" #include "lpc17_ohciram.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -143,9 +143,9 @@ #define TD_DELAY(n) (uint32_t)((n) << GTD_STATUS_DI_SHIFT) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* This structure retains the state of the USB host controller */ @@ -260,9 +260,9 @@ struct lpc17_list_s /* Variable length buffer data follows */ }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -404,9 +404,9 @@ static void lpc17_disconnect(struct usbhost_driver_s *drvr, static inline void lpc17_ep0init(struct lpc17_usbhost_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global @@ -437,21 +437,21 @@ static struct lpc17_list_s *g_iofree; /* List of unused I/O buffers */ static struct lpc17_list_s *g_xfrfree; static struct lpc17_xfrinfo_s g_xfrbuffers[CONFIG_LPC17_USBHOST_NPREALLOC]; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_printreg * * Description: * Print the contents of an LPC17xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBHOST_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -460,13 +460,13 @@ static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_checkreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBHOST_REGDEBUG static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -524,13 +524,13 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_getreg * * Description: * Get the contents of an LPC17xx register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBHOST_REGDEBUG static uint32_t lpc17_getreg(uint32_t addr) @@ -546,13 +546,13 @@ static uint32_t lpc17_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_putreg * * Description: * Set the contents of an LPC17xx register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC17_USBHOST_REGDEBUG static void lpc17_putreg(uint32_t val, uint32_t addr) @@ -574,7 +574,7 @@ static void lpc17_putreg(uint32_t val, uint32_t addr) * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_takesem(sem_t *sem) { @@ -596,7 +596,7 @@ static void lpc17_takesem(sem_t *sem) * Description: * Get a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ static inline uint16_t lpc17_getle16(const uint8_t *val) { @@ -609,7 +609,7 @@ static inline uint16_t lpc17_getle16(const uint8_t *val) * Description: * Put a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void lpc17_putle16(uint8_t *dest, uint16_t val) @@ -619,13 +619,13 @@ static void lpc17_putle16(uint8_t *dest, uint16_t val) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_edfree * * Description: * Return an endpoint descriptor to the free list * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_edfree(struct lpc17_ed_s *ed) { @@ -637,7 +637,7 @@ static inline void lpc17_edfree(struct lpc17_ed_s *ed) g_edfree = entry; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_tdalloc * * Description: @@ -649,7 +649,7 @@ static inline void lpc17_edfree(struct lpc17_ed_s *ed) * handler * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ static struct lpc17_gtd_s *lpc17_tdalloc(void) { @@ -671,7 +671,7 @@ static struct lpc17_gtd_s *lpc17_tdalloc(void) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_tdfree * * Description: @@ -681,7 +681,7 @@ static struct lpc17_gtd_s *lpc17_tdalloc(void) * - Only called from the WDH interrupt handler (and during initialization). * - Interrupts are disabled in any case. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_tdfree(struct lpc17_gtd_s *td) { @@ -698,7 +698,7 @@ static void lpc17_tdfree(struct lpc17_gtd_s *td) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_tballoc * * Description: @@ -708,7 +708,7 @@ static void lpc17_tdfree(struct lpc17_gtd_s *td) * - Never called from an interrupt handler. * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ static uint8_t *lpc17_tballoc(void) { @@ -720,13 +720,13 @@ static uint8_t *lpc17_tballoc(void) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_tbfree * * Description: * Return an request/descriptor transfer buffer to the free list * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_tbfree(uint8_t *buffer) { @@ -739,7 +739,7 @@ static void lpc17_tbfree(uint8_t *buffer) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_allocio * * Description: @@ -749,7 +749,7 @@ static void lpc17_tbfree(uint8_t *buffer) * - Never called from an interrupt handler. * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ #if LPC17_IOBUFFERS > 0 static uint8_t *lpc17_allocio(void) @@ -771,13 +771,13 @@ static uint8_t *lpc17_allocio(void) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_freeio * * Description: * Return an TD buffer to the free list * - *******************************************************************************/ + ****************************************************************************/ #if LPC17_IOBUFFERS > 0 static void lpc17_freeio(uint8_t *buffer) @@ -795,7 +795,7 @@ static void lpc17_freeio(uint8_t *buffer) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_alloc_xfrinfo * * Description: @@ -805,7 +805,7 @@ static void lpc17_freeio(uint8_t *buffer) * - Never called from an interrupt handler. * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ static struct lpc17_xfrinfo_s *lpc17_alloc_xfrinfo(void) { @@ -825,13 +825,13 @@ static struct lpc17_xfrinfo_s *lpc17_alloc_xfrinfo(void) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_freeio * * Description: * Return an TD buffer to the free list * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_free_xfrinfo(struct lpc17_xfrinfo_s *xfrinfo) { @@ -847,13 +847,13 @@ static void lpc17_free_xfrinfo(struct lpc17_xfrinfo_s *xfrinfo) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_addctrled * * Description: * Helper function to add an ED to the control list. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_addctrled(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -885,13 +885,13 @@ static inline int lpc17_addctrled(struct lpc17_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_remctrled * * Description: * Helper function remove an ED from the control list. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_remctrled(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -967,13 +967,13 @@ static inline int lpc17_remctrled(struct lpc17_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_addbulked * * Description: * Helper function to add an ED to the bulk list. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_addbulked(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -1009,13 +1009,13 @@ static inline int lpc17_addbulked(struct lpc17_usbhost_s *priv, #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_rembulked * * Description: * Helper function remove an ED from the bulk list. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_rembulked(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -1089,13 +1089,13 @@ static inline int lpc17_rembulked(struct lpc17_usbhost_s *priv, #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_getinterval * * Description: * Convert the endpoint polling interval into a HCCA table increment * - *******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_USBHOST_INT_DISABLE) || !defined(CONFIG_USBHOST_ISOC_DISABLE) static unsigned int lpc17_getinterval(uint8_t interval) @@ -1128,14 +1128,14 @@ static unsigned int lpc17_getinterval(uint8_t interval) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_setinttab * * Description: * Set the interrupt table to the selected value using the provided interval * and offset. * - *******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_USBHOST_INT_DISABLE) || !defined(CONFIG_USBHOST_ISOC_DISABLE) static void lpc17_setinttab(uint32_t value, unsigned int interval, unsigned int offset) @@ -1148,7 +1148,7 @@ static void lpc17_setinttab(uint32_t value, unsigned int interval, unsigned int } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_addinted * * Description: @@ -1166,7 +1166,7 @@ static void lpc17_setinttab(uint32_t value, unsigned int interval, unsigned int * 1. The minimum support polling rate is 2MS, and * 2. Some devices may get polled at a much higher rate than they request. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, const struct usbhost_epdesc_s *epdesc, @@ -1257,7 +1257,7 @@ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_reminted * * Description: @@ -1275,7 +1275,7 @@ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, * 1. The minimum support polling rate is 2MS, and * 2. Some devices may get polled at a much higher rate than they request. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -1398,13 +1398,13 @@ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv, #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_addisoced * * Description: * Helper functions to add an ED to the periodic table. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_addisoced(struct lpc17_usbhost_s *priv, const struct usbhost_epdesc_s *epdesc, @@ -1416,13 +1416,13 @@ static inline int lpc17_addisoced(struct lpc17_usbhost_s *priv, return -ENOSYS; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_remisoced * * Description: * Helper functions to remove an ED from the periodic table. * - *******************************************************************************/ + ****************************************************************************/ static inline int lpc17_remisoced(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) @@ -1433,14 +1433,14 @@ static inline int lpc17_remisoced(struct lpc17_usbhost_s *priv, return -ENOSYS; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_enqueuetd * * Description: * Enqueue a transfer descriptor. Notice that this function only supports * queue on TD per ED. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_enqueuetd(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, uint32_t dirpid, @@ -1480,7 +1480,7 @@ static int lpc17_enqueuetd(struct lpc17_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_wdhwait * * Description: @@ -1489,7 +1489,7 @@ static int lpc17_enqueuetd(struct lpc17_usbhost_s *priv, * We do this to minimize race conditions. This logic would have to be expanded * if we want to have more than one packet in flight at a time! * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_wdhwait(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) { @@ -1516,7 +1516,7 @@ static int lpc17_wdhwait(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ctrltd * * Description: @@ -1528,7 +1528,7 @@ static int lpc17_wdhwait(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed) * These are blocking methods; these functions will not return until the * control transfer has completed. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, uint32_t dirpid, uint8_t *buffer, size_t buflen) @@ -1620,13 +1620,13 @@ errout_with_xfrinfo: return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_usbinterrupt(int irq, void *context) { @@ -1906,11 +1906,11 @@ static int lpc17_usbinterrupt(int irq, void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_wait * * Description: @@ -1933,7 +1933,7 @@ static int lpc17_usbinterrupt(int irq, void *context) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_wait(struct usbhost_connection_s *conn, struct usbhost_hubport_s **hport) @@ -1999,7 +1999,7 @@ static int lpc17_wait(struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_enumerate * * Description: @@ -2025,7 +2025,7 @@ static int lpc17_wait(struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_rh_enumerate(struct usbhost_connection_s *conn, struct usbhost_hubport_s *hport) @@ -2387,7 +2387,7 @@ static int lpc17_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_alloc * * Description: @@ -2417,7 +2417,7 @@ static int lpc17_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_alloc(struct usbhost_driver_s *drvr, uint8_t **buffer, size_t *maxlen) @@ -2441,7 +2441,7 @@ static int lpc17_alloc(struct usbhost_driver_s *drvr, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_free * * Description: @@ -2462,7 +2462,7 @@ static int lpc17_alloc(struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_free(struct usbhost_driver_s *drvr, uint8_t *buffer) { @@ -2561,7 +2561,7 @@ static int lpc17_iofree(struct usbhost_driver_s *drvr, uint8_t *buffer) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_ctrlin and lpc17_ctrlout * * Description: @@ -2595,7 +2595,7 @@ static int lpc17_iofree(struct usbhost_driver_s *drvr, uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_ctrlin(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, const struct usb_ctrlreq_s *req, @@ -2673,7 +2673,7 @@ static int lpc17_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_transfer_common * * Description: @@ -2697,7 +2697,7 @@ static int lpc17_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc17_transfer_common(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, uint8_t *buffer, @@ -2751,7 +2751,7 @@ static int lpc17_transfer_common(struct lpc17_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dma_alloc * * Description: @@ -2774,7 +2774,7 @@ static int lpc17_transfer_common(struct lpc17_usbhost_s *priv, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #if LPC17_IOBUFFERS > 0 static int lpc17_dma_alloc(struct lpc17_usbhost_s *priv, @@ -2823,7 +2823,7 @@ static int lpc17_dma_alloc(struct lpc17_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_dma_free * * Description: @@ -2846,7 +2846,7 @@ static int lpc17_dma_alloc(struct lpc17_usbhost_s *priv, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_dma_free(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, uint8_t *userbuffer, @@ -2879,7 +2879,7 @@ static void lpc17_dma_free(struct lpc17_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_transfer * * Description: @@ -2915,7 +2915,7 @@ static void lpc17_dma_free(struct lpc17_usbhost_s *priv, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, uint8_t *buffer, size_t buflen) @@ -3062,7 +3062,7 @@ errout_with_sem: return nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: lpc17_asynch_completion * * Description: @@ -3080,7 +3080,7 @@ errout_with_sem: * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void lpc17_asynch_completion(struct lpc17_usbhost_s *priv, @@ -3151,7 +3151,7 @@ static void lpc17_asynch_completion(struct lpc17_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_asynch * * Description: @@ -3184,7 +3184,7 @@ static void lpc17_asynch_completion(struct lpc17_usbhost_s *priv, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc17_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -3471,7 +3471,7 @@ static int lpc17_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc17_disconnect * * Description: @@ -3494,7 +3494,7 @@ static int lpc17_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc17_disconnect(struct usbhost_driver_s *drvr, struct usbhost_hubport_s *hport) @@ -3503,10 +3503,10 @@ static void lpc17_disconnect(struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc17_ep0init * * Description: @@ -3519,7 +3519,7 @@ static void lpc17_disconnect(struct usbhost_driver_s *drvr, * Returned Values: * None * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc17_ep0init(struct lpc17_usbhost_s *priv) { @@ -3544,11 +3544,11 @@ static inline void lpc17_ep0init(struct lpc17_usbhost_s *priv) lpc17_addctrled(priv, EDCTRL); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc17_usbhost_initialize * * Description: @@ -3571,7 +3571,7 @@ static inline void lpc17_ep0init(struct lpc17_usbhost_s *priv) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller) { diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c index 5fb688c034c..e9eef2cc9be 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc214x/lpc214x_usbdev.c * * Copyright (C) 2008-2010, 2012-2013 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -64,9 +64,9 @@ #include "lpc214x_pll.h" #include "lpc214x_power.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -283,9 +283,9 @@ #define lpc214x_rqempty(ep) ((ep)->head == NULL) #define lpc214x_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request make be retained in a list */ @@ -376,9 +376,9 @@ struct lpc214x_usbdev_s struct lpc214x_ep_s eplist[LPC214X_NPHYSENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -467,9 +467,9 @@ static int lpc214x_wakeup(struct usbdev_s *dev); static int lpc214x_selfpowered(struct usbdev_s *dev, bool selfpowered); static int lpc214x_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. @@ -502,21 +502,21 @@ static const struct usbdev_ops_s g_devops = .pullup = lpc214x_pullup, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_getreg * * Description: * Get the contents of an LPC214x register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t lpc214x_getreg(uint32_t addr) @@ -572,13 +572,13 @@ static uint32_t lpc214x_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_putreg * * Description: * Set the contents of an LPC214x register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void lpc214x_putreg(uint32_t val, uint32_t addr) @@ -593,13 +593,13 @@ static void lpc214x_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_usbcmd * * Description: * Transmit commands to the USB engine * - *******************************************************************************/ + ****************************************************************************/ static uint32_t lpc214x_usbcmd(uint16_t cmd, uint8_t data) { @@ -729,13 +729,13 @@ static uint32_t lpc214x_usbcmd(uint16_t cmd, uint8_t data) return tmp; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct lpc214x_req_s *lpc214x_rqdequeue(FAR struct lpc214x_ep_s *privep) { @@ -755,13 +755,13 @@ static FAR struct lpc214x_req_s *lpc214x_rqdequeue(FAR struct lpc214x_ep_s *priv return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_rqenqueue(FAR struct lpc214x_ep_s *privep, FAR struct lpc214x_req_s *req) @@ -779,13 +779,13 @@ static void lpc214x_rqenqueue(FAR struct lpc214x_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epwrite * * Description: * Endpoint write (IN) * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_epwrite(uint8_t epphy, const uint8_t *data, uint32_t nbytes) { @@ -840,13 +840,13 @@ static void lpc214x_epwrite(uint8_t epphy, const uint8_t *data, uint32_t nbytes) (void)lpc214x_usbcmd(CMD_USB_EP_VALIDATEBUFFER, 0); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epread * * Description: * Endpoint read (OUT) * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epread(uint8_t epphy, uint8_t *data, uint32_t nbytes) { @@ -926,13 +926,13 @@ static int lpc214x_epread(uint8_t epphy, uint8_t *data, uint32_t nbytes) return pktlen; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_abortrequest * * Description: * Discard a request * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc214x_abortrequest(struct lpc214x_ep_s *privep, struct lpc214x_req_s *privreq, @@ -949,13 +949,13 @@ static inline void lpc214x_abortrequest(struct lpc214x_ep_s *privep, privreq->req.callback(&privep->ep, &privreq->req); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_reqcomplete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_reqcomplete(struct lpc214x_ep_s *privep, int16_t result) { @@ -995,13 +995,13 @@ static void lpc214x_reqcomplete(struct lpc214x_ep_s *privep, int16_t result) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_wrrequest * * Description: * Send from the next queued write request * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_wrrequest(struct lpc214x_ep_s *privep) { @@ -1105,13 +1105,13 @@ static int lpc214x_wrrequest(struct lpc214x_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_rdrequest * * Description: * Receive to the next queued read request * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep) { @@ -1166,13 +1166,13 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_cancelrequests(struct lpc214x_ep_s *privep) { @@ -1184,14 +1184,14 @@ static void lpc214x_cancelrequests(struct lpc214x_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct lpc214x_ep_s *lpc214x_epfindbyaddr(struct lpc214x_usbdev_s *priv, uint16_t eplog) @@ -1227,13 +1227,13 @@ static struct lpc214x_ep_s *lpc214x_epfindbyaddr(struct lpc214x_usbdev_s *priv, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_eprealize * * Description: * Enable or disable an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_eprealize(struct lpc214x_ep_s *privep, bool prio, uint32_t packetsize) { @@ -1277,13 +1277,13 @@ static void lpc214x_eprealize(struct lpc214x_ep_s *privep, bool prio, uint32_t p lpc214x_putreg(USBDEV_DEVINT_EPRLZED,LPC214X_USBDEV_DEVINTCLR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epclrinterrupt * * Description: * Clear the EP interrupt flag and return the current EP status * - *******************************************************************************/ + ****************************************************************************/ static uint8_t lpc214x_epclrinterrupt(uint8_t epphy) { @@ -1300,13 +1300,13 @@ static uint8_t lpc214x_epclrinterrupt(uint8_t epphy) return lpc214x_getreg(LPC214X_USBDEV_CMDDATA); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_ep0configure * * Description: * Configure endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc214x_ep0configure(struct lpc214x_usbdev_s *priv) { @@ -1324,12 +1324,12 @@ static inline void lpc214x_ep0configure(struct lpc214x_usbdev_s *priv) lpc214x_putreg(inten, LPC214X_USBDEV_EPINTEN); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_dmareset * * Description: Reset USB DMA * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC214X_USBDEV_DMA static inline void lpc214x_dmareset(uint32_t enable) @@ -1384,13 +1384,13 @@ static inline void lpc214x_dmareset(uint32_t enable) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_usbreset(struct lpc214x_usbdev_s *priv) { @@ -1457,14 +1457,14 @@ static void lpc214x_usbreset(struct lpc214x_usbdev_s *priv) LPC214X_USBDEV_DEVINTEN); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_dispatchrequest(struct lpc214x_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1487,14 +1487,14 @@ static void lpc214x_dispatchrequest(struct lpc214x_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_ep0setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc214x_ep0setup(struct lpc214x_usbdev_s *priv) { @@ -1870,7 +1870,7 @@ static inline void lpc214x_ep0setup(struct lpc214x_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_ep0dataoutinterrupt * * Description: @@ -1878,7 +1878,7 @@ static inline void lpc214x_ep0setup(struct lpc214x_usbdev_s *priv) * handler. Each non-isochronous OUT endpoint gives an interrupt when they * receive a packet without error. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc214x_ep0dataoutinterrupt(struct lpc214x_usbdev_s *priv) { @@ -1935,7 +1935,7 @@ static inline void lpc214x_ep0dataoutinterrupt(struct lpc214x_usbdev_s *priv) return; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_ep0dataininterrupt * * Description: @@ -1944,7 +1944,7 @@ static inline void lpc214x_ep0dataoutinterrupt(struct lpc214x_usbdev_s *priv) * packet is successfully transmitted (OR a NAK handshake is sent on the bus * provided that the interrupt on NAK feature is enabled). * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc214x_ep0dataininterrupt(struct lpc214x_usbdev_s *priv) { @@ -2002,13 +2002,13 @@ static inline void lpc214x_ep0dataininterrupt(struct lpc214x_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_usbinterrupt(int irq, FAR void *context) { @@ -2359,13 +2359,13 @@ static int lpc214x_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_dmasetup * * Description: * Setup for DMA Transfer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC214X_USBDEV_DMA static int lpc214x_dmasetup(struct lpc214x_usbdev_s *priv, uint8_t epphy, @@ -2447,13 +2447,13 @@ static int lpc214x_dmasetup(struct lpc214x_usbdev_s *priv, uint8_t epphy, } #endif /* CONFIG_LPC214X_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_dmarestart * * Description: * Restart DMA Transfer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC214X_USBDEV_DMA static void lpc214x_dmarestart(uint8_t epphy, uint32_t descndx) @@ -2482,13 +2482,13 @@ static void lpc214x_dmarestart(uint8_t epphy, uint32_t descndx) } #endif /* CONFIG_LPC214X_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_dmadisable * * Description: * Disable DMA transfer for the EP * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC214X_USBDEV_DMA static void lpc214x_dmadisable(uint8_t epphy) @@ -2497,11 +2497,11 @@ static void lpc214x_dmadisable(uint8_t epphy) } #endif /* CONFIG_LPC214X_USBDEV_DMA */ -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epconfigure * * Description: @@ -2514,7 +2514,7 @@ static void lpc214x_dmadisable(uint8_t epphy) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -2558,13 +2558,13 @@ static int lpc214x_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epdisable(FAR struct usbdev_ep_s *ep) { @@ -2603,13 +2603,13 @@ static int lpc214x_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -2635,13 +2635,13 @@ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2659,13 +2659,13 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_ kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC214X_USBDEV_DMA static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbytes) @@ -2700,13 +2700,13 @@ static FAR void *lpc214x_epallocbuffer(FAR struct usbdev_ep_s *ep, uint16_t nbyt } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA @@ -2739,13 +2739,13 @@ static void lpc214x_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2827,13 +2827,13 @@ static int lpc214x_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2855,13 +2855,13 @@ static int lpc214x_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_epstall * * Description: * Stall or resume and endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_epstall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -2884,11 +2884,11 @@ static int lpc214x_epstall(FAR struct usbdev_ep_s *ep, bool resume) return OK; } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lcp214x_allocep * * Description: @@ -2902,7 +2902,7 @@ static int lpc214x_epstall(FAR struct usbdev_ep_s *ep, bool resume) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *lcp214x_allocep(FAR struct usbdev_s *dev, uint8_t eplog, bool in, uint8_t eptype) @@ -3012,13 +3012,13 @@ static FAR struct usbdev_ep_s *lcp214x_allocep(FAR struct usbdev_s *dev, uint8_t return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc214x_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -3038,13 +3038,13 @@ static void lpc214x_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_getframe(struct usbdev_s *dev) { @@ -3063,13 +3063,13 @@ static int lpc214x_getframe(struct usbdev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_wakeup(struct usbdev_s *dev) { @@ -3089,13 +3089,13 @@ static int lpc214x_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -3115,13 +3115,13 @@ static int lpc214x_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc214x_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int lpc214x_pullup(struct usbdev_s *dev, bool enable) { @@ -3135,11 +3135,11 @@ static int lpc214x_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -3152,7 +3152,7 @@ static int lpc214x_pullup(struct usbdev_s *dev, bool enable) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -3265,9 +3265,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -3303,14 +3303,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -3354,7 +3354,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -3362,7 +3362,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/lpc2378/lpc23xx_i2c.c b/arch/arm/src/lpc2378/lpc23xx_i2c.c index cffd08116b1..af014e2da8c 100644 --- a/arch/arm/src/lpc2378/lpc23xx_i2c.c +++ b/arch/arm/src/lpc2378/lpc23xx_i2c.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc2378/lpc23xx_i2c.c * * Copyright (C) 2013 Li Zhuoyi. All rights reserved. @@ -44,11 +44,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -153,13 +153,13 @@ struct i2c_ops_s lpc23xx_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Name: lpc23xx_i2c_setfrequency * * Description: * Set the frequence for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -189,13 +189,13 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: lpc23xx_i2c_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -210,14 +210,14 @@ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc23xx_i2c_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) { @@ -237,14 +237,14 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int bufle return ret >0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: lpc23xx_i2c_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) { @@ -264,13 +264,13 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) return ret > 0 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_start * * Description: * Perform a I2C transfer start * - *******************************************************************************/ + ****************************************************************************/ static int i2c_start (struct lpc23xx_i2cdev_s *priv) { @@ -300,13 +300,13 @@ static int i2c_start (struct lpc23xx_i2cdev_s *priv) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_stop * * Description: * Perform a I2C transfer stop * - *******************************************************************************/ + ****************************************************************************/ static void i2c_stop (struct lpc23xx_i2cdev_s *priv) { @@ -318,13 +318,13 @@ static void i2c_stop (struct lpc23xx_i2cdev_s *priv) sem_post (&priv->wait); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_timeout * * Description: * Watchdog timer for timeout of I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void i2c_timeout (int argc, uint32_t arg, ...) { @@ -336,13 +336,13 @@ static void i2c_timeout (int argc, uint32_t arg, ...) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_interrupt * * Description: * The I2C Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int i2c_interrupt (int irq, FAR void *context) { @@ -447,13 +447,13 @@ static int i2c_interrupt (int irq, FAR void *context) /**************************************************************************** * Public Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int port) { @@ -586,13 +586,13 @@ struct i2c_dev_s *up_i2cinitialize(int port) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s * dev) { diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/arch/arm/src/lpc31xx/lpc31_ehci.c index 9250679b388..adbf4dda206 100644 --- a/arch/arm/src/lpc31xx/lpc31_ehci.c +++ b/arch/arm/src/lpc31xx/lpc31_ehci.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc31xx/lpc31_ehci.c * * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. @@ -32,11 +32,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #if defined(CONFIG_LPC31_USBOTG) && defined(CONFIG_USBHOST) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* Pre-requisites */ @@ -195,9 +195,9 @@ #define RHPNDX(rh) ((rh)->hport.hport.port) #define RHPORT(rh) (RHPNDX(rh)+1) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Internal representation of the EHCI Queue Head (QH) */ struct lpc31_epinfo_s; @@ -397,9 +397,9 @@ struct lpc31_ehci_trace_s #endif /* HAVE_USBHOST_TRACE */ -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -564,9 +564,9 @@ static void lpc31_disconnect(FAR struct usbhost_driver_s *drvr, static int lpc31_reset(void); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global * instance. @@ -705,19 +705,19 @@ static const struct lpc31_ehci_trace_s g_trace2[TRACE2_NSTRINGS] = }; #endif /* HAVE_USBHOST_TRACE */ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Register Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_read16 * * Description: * Read 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static uint16_t lpc31_read16(const uint8_t *addr) { @@ -728,13 +728,13 @@ static uint16_t lpc31_read16(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_read32 * * Description: * Read 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static inline uint32_t lpc31_read32(const uint8_t *addr) { @@ -747,13 +747,13 @@ static inline uint32_t lpc31_read32(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_write16 * * Description: * Write 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void lpc31_write16(uint16_t memval, uint8_t *addr) @@ -768,13 +768,13 @@ static void lpc31_write16(uint16_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_write32 * * Description: * Write 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void lpc31_write32(uint32_t memval, uint8_t *addr) @@ -789,13 +789,13 @@ static void lpc31_write32(uint32_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_swap16 * * Description: * Swap bytes on a 16-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint16_t lpc31_swap16(uint16_t value) @@ -804,13 +804,13 @@ static uint16_t lpc31_swap16(uint16_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_swap32 * * Description: * Swap bytes on a 32-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint32_t lpc31_swap32(uint32_t value) @@ -820,13 +820,13 @@ static uint32_t lpc31_swap32(uint32_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_printreg * * Description: * Print the contents of a LPC31 EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_printreg(volatile uint32_t *regaddr, uint32_t regval, @@ -836,14 +836,14 @@ static void lpc31_printreg(volatile uint32_t *regaddr, uint32_t regval, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_checkreg * * Description: * Check if it is time to output debug information for accesses to a LPC31 * EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) @@ -901,13 +901,13 @@ static void lpc31_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_getreg * * Description: * Get the contents of an LPC31 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static uint32_t lpc31_getreg(volatile uint32_t *regaddr) @@ -928,13 +928,13 @@ static inline uint32_t lpc31_getreg(volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_putreg * * Description: * Set the contents of an LPC31 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_putreg(uint32_t regval, volatile uint32_t *regaddr) @@ -954,7 +954,7 @@ static inline void lpc31_putreg(uint32_t regval, volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: ehci_wait_usbsts * * Description: @@ -962,7 +962,7 @@ static inline void lpc31_putreg(uint32_t regval, volatile uint32_t *regaddr) * value, (2) for a timeout to occur, or (3) a error to occur. Return * a value to indicate which terminated the wait. * - *******************************************************************************/ + ****************************************************************************/ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, unsigned int delay) @@ -1004,17 +1004,17 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, return (regval == donebits) ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Semaphores - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_takesem * * Description: * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_takesem(sem_t *sem) { @@ -1030,10 +1030,10 @@ static void lpc31_takesem(sem_t *sem) } } -/******************************************************************************* +/**************************************************************************** * Allocators - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_qh_alloc * * Description: @@ -1041,7 +1041,7 @@ static void lpc31_takesem(sem_t *sem) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qh_s *lpc31_qh_alloc(void) { @@ -1059,7 +1059,7 @@ static struct lpc31_qh_s *lpc31_qh_alloc(void) return qh; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_free * * Description: @@ -1067,7 +1067,7 @@ static struct lpc31_qh_s *lpc31_qh_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_qh_free(struct lpc31_qh_s *qh) { @@ -1079,7 +1079,7 @@ static void lpc31_qh_free(struct lpc31_qh_s *qh) g_ehci.qhfree = entry; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_alloc * * Description: @@ -1088,7 +1088,7 @@ static void lpc31_qh_free(struct lpc31_qh_s *qh) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qtd_s *lpc31_qtd_alloc(void) { @@ -1106,7 +1106,7 @@ static struct lpc31_qtd_s *lpc31_qtd_alloc(void) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_free * * Description: @@ -1115,7 +1115,7 @@ static struct lpc31_qtd_s *lpc31_qtd_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_qtd_free(struct lpc31_qtd_s *qtd) { @@ -1127,11 +1127,11 @@ static void lpc31_qtd_free(struct lpc31_qtd_s *qtd) g_ehci.qtdfree = entry; } -/******************************************************************************* +/**************************************************************************** * List Management - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_foreach * * Description: @@ -1139,7 +1139,7 @@ static void lpc31_qtd_free(struct lpc31_qtd_s *qtd) * handler for each QH structure in the list (including the one at the head * of the list). * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qh_foreach(struct lpc31_qh_s *qh, uint32_t **bp, foreach_qh_t handler, void *arg) @@ -1211,14 +1211,14 @@ static int lpc31_qh_foreach(struct lpc31_qh_s *qh, uint32_t **bp, foreach_qh_t h return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_foreach * * Description: * Give a Queue Head (QH) instance, call the handler for each qTD structure * in the queue. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qtd_foreach(struct lpc31_qh_s *qh, foreach_qtd_t handler, void *arg) { @@ -1292,14 +1292,14 @@ static int lpc31_qtd_foreach(struct lpc31_qh_s *qh, foreach_qtd_t handler, void return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_discard * * Description: * This is a lpc31_qtd_foreach callback. It simply unlinks the QTD, updates * the back pointer, and frees the QTD structure. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qtd_discard(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -1318,7 +1318,7 @@ static int lpc31_qtd_discard(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_discard * * Description: @@ -1328,7 +1328,7 @@ static int lpc31_qtd_discard(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) * The QH structure itself has already been unlinked from whatever list it * may have been in. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qh_discard(struct lpc31_qh_s *qh) { @@ -1350,18 +1350,18 @@ static int lpc31_qh_discard(struct lpc31_qh_s *qh) return ret; } -/******************************************************************************* +/**************************************************************************** * Cache Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_invalidate * * Description: * This is a callback from lpc31_qtd_foreach. It simply invalidates D-cache for * address range of the qTD entry. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static int lpc31_qtd_invalidate(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) @@ -1376,13 +1376,13 @@ static int lpc31_qtd_invalidate(struct lpc31_qtd_s *qtd, uint32_t **bp, void *ar } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_invalidate * * Description: * Invalidate the Queue Head and all qTD entries in the queue. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static int lpc31_qh_invalidate(struct lpc31_qh_s *qh) @@ -1398,14 +1398,14 @@ static int lpc31_qh_invalidate(struct lpc31_qh_s *qh) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_flush * * Description: * This is a callback from lpc31_qtd_foreach. It simply flushes D-cache for * address range of the qTD entry. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qtd_flush(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -1422,13 +1422,13 @@ static int lpc31_qtd_flush(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_flush * * Description: * Invalidate the Queue Head and all qTD entries in the queue. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qh_flush(struct lpc31_qh_s *qh) { @@ -1447,17 +1447,17 @@ static int lpc31_qh_flush(struct lpc31_qh_s *qh) return lpc31_qtd_foreach(qh, lpc31_qtd_flush, NULL); } -/******************************************************************************* +/**************************************************************************** * Endpoint Transfer Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_print * * Description: * Print the context of one qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_qtd_print(struct lpc31_qtd_s *qtd) @@ -1472,13 +1472,13 @@ static void lpc31_qtd_print(struct lpc31_qtd_s *qtd) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_print * * Description: * Print the context of one QH * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_qh_print(struct lpc31_qh_s *qh) @@ -1514,14 +1514,14 @@ static void lpc31_qh_print(struct lpc31_qh_s *qh) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_dump * * Description: * This is a lpc31_qtd_foreach callout function. It dumps the context of one * qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static int lpc31_qtd_dump(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) @@ -1531,14 +1531,14 @@ static int lpc31_qtd_dump(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_dump * * Description: * This is a lpc31_qh_foreach callout function. It dumps a QH structure and * all of the qTD structures linked to the QH. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC31_EHCI_REGDEBUG static int lpc31_qh_dump(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) @@ -1548,14 +1548,14 @@ static int lpc31_qh_dump(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ehci_speed * * Description: * Map a speed enumeration value per Chapter 9 of the USB specification to the * speed enumeration required in the EHCI queue head. * - *******************************************************************************/ + ****************************************************************************/ static inline uint8_t lpc31_ehci_speed(uint8_t usbspeed) { @@ -1563,7 +1563,7 @@ static inline uint8_t lpc31_ehci_speed(uint8_t usbspeed) return g_ehci_speed[usbspeed]; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ioc_setup * * Description: @@ -1574,7 +1574,7 @@ static inline uint8_t lpc31_ehci_speed(uint8_t usbspeed) * * Assumption: The caller holds tex EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_ioc_setup(struct lpc31_rhport_s *rhport, struct lpc31_epinfo_s *epinfo) { @@ -1611,7 +1611,7 @@ static int lpc31_ioc_setup(struct lpc31_rhport_s *rhport, struct lpc31_epinfo_s return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ioc_wait * * Description: @@ -1620,7 +1620,7 @@ static int lpc31_ioc_setup(struct lpc31_rhport_s *rhport, struct lpc31_epinfo_s * Assumption: The caller does *NOT* hold the EHCI exclsem. That would cause * a deadlock when the bottom-half, worker thread needs to take the semaphore. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_ioc_wait(struct lpc31_epinfo_s *epinfo) { @@ -1634,7 +1634,7 @@ static int lpc31_ioc_wait(struct lpc31_epinfo_s *epinfo) return epinfo->result; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_enqueue * * Description: @@ -1642,7 +1642,7 @@ static int lpc31_ioc_wait(struct lpc31_epinfo_s *epinfo) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_qh_enqueue(struct lpc31_qh_s *qhead, struct lpc31_qh_s *qh) { @@ -1675,13 +1675,13 @@ static void lpc31_qh_enqueue(struct lpc31_qh_s *qhead, struct lpc31_qh_s *qh) (uintptr_t)&qhead->hw + sizeof(struct ehci_qh_s)); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_create * * Description: * Create a new Queue Head (QH) * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qh_s *lpc31_qh_create(struct lpc31_rhport_s *rhport, struct lpc31_epinfo_s *epinfo) @@ -1812,13 +1812,13 @@ static struct lpc31_qh_s *lpc31_qh_create(struct lpc31_rhport_s *rhport, return qh; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_addbpl * * Description: * Add a buffer pointer list to a qTD. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qtd_addbpl(struct lpc31_qtd_s *qtd, const void *buffer, size_t buflen) { @@ -1888,13 +1888,13 @@ static int lpc31_qtd_addbpl(struct lpc31_qtd_s *qtd, const void *buffer, size_t return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_setupphase * * Description: * Create a SETUP phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qtd_s *lpc31_qtd_setupphase(struct lpc31_epinfo_s *epinfo, const struct usb_ctrlreq_s *req) @@ -1955,13 +1955,13 @@ static struct lpc31_qtd_s *lpc31_qtd_setupphase(struct lpc31_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_dataphase * * Description: * Create a data transfer or SET data phase qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qtd_s *lpc31_qtd_dataphase(struct lpc31_epinfo_s *epinfo, void *buffer, int buflen, @@ -2023,13 +2023,13 @@ static struct lpc31_qtd_s *lpc31_qtd_dataphase(struct lpc31_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_statusphase * * Description: * Create a STATUS phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_qtd_s *lpc31_qtd_statusphase(uint32_t tokenbits) { @@ -2072,7 +2072,7 @@ static struct lpc31_qtd_s *lpc31_qtd_statusphase(uint32_t tokenbits) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_async_setup * * Description: @@ -2090,7 +2090,7 @@ static struct lpc31_qtd_s *lpc31_qtd_statusphase(uint32_t tokenbits) * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_async_setup(struct lpc31_rhport_s *rhport, struct lpc31_epinfo_s *epinfo, @@ -2325,7 +2325,7 @@ errout_with_qh: return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_intr_setup * * Description: @@ -2371,7 +2371,7 @@ errout_with_qh: * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_USBHOST_INT_DISABLE static int lpc31_intr_setup(struct lpc31_rhport_s *rhport, @@ -2463,7 +2463,7 @@ errout_with_qh: } #endif /* CONFIG_USBHOST_INT_DISABLE */ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_transfer_wait * * Description: @@ -2480,7 +2480,7 @@ errout_with_qh: * plus the size of the data (which could be short); For bulk transfers, this * will be the number of data bytes transfers (which could be short). * - *******************************************************************************/ + ****************************************************************************/ static ssize_t lpc31_transfer_wait(struct lpc31_epinfo_s *epinfo) { @@ -2542,7 +2542,7 @@ static ssize_t lpc31_transfer_wait(struct lpc31_epinfo_s *epinfo) return epinfo->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ioc_async_setup * * Description: @@ -2560,7 +2560,7 @@ static ssize_t lpc31_transfer_wait(struct lpc31_epinfo_s *epinfo) * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static inline int lpc31_ioc_async_setup(struct lpc31_rhport_s *rhport, @@ -2596,7 +2596,7 @@ static inline int lpc31_ioc_async_setup(struct lpc31_rhport_s *rhport, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_asynch_completion * * Description: @@ -2613,7 +2613,7 @@ static inline int lpc31_ioc_async_setup(struct lpc31_rhport_s *rhport, * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void lpc31_asynch_completion(struct lpc31_epinfo_s *epinfo) @@ -2651,11 +2651,11 @@ static void lpc31_asynch_completion(struct lpc31_epinfo_s *epinfo) } #endif -/******************************************************************************* +/**************************************************************************** * EHCI Interrupt Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_ioccheck * * Description: @@ -2663,7 +2663,7 @@ static void lpc31_asynch_completion(struct lpc31_epinfo_s *epinfo) * qTD in the asynchronous queue. It removes all of the qTD structures that * are no longer active. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qtd_ioccheck(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -2702,7 +2702,7 @@ static int lpc31_qtd_ioccheck(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_ioccheck * * Description: @@ -2711,7 +2711,7 @@ static int lpc31_qtd_ioccheck(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) * remove all of the structures that are no longer active. if all of the * qTD structures are removed, then QH itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_qh_ioccheck(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) { @@ -2861,14 +2861,14 @@ static int lpc31_qh_ioccheck(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qtd_cancel * * Description: * This function is a lpc31_qtd_foreach() callback function. It removes each * qTD attached to a QH. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc31_qtd_cancel(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) @@ -2900,7 +2900,7 @@ static int lpc31_qtd_cancel(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) } #endif /* CONFIG_USBHOST_ASYNCH */ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_qh_cancel * * Description: @@ -2909,7 +2909,7 @@ static int lpc31_qtd_cancel(struct lpc31_qtd_s *qtd, uint32_t **bp, void *arg) * and remove all of the structures that are no longer active. Then QH * itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc31_qh_cancel(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) @@ -2975,7 +2975,7 @@ static int lpc31_qh_cancel(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) } #endif /* CONFIG_USBHOST_ASYNCH */ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ioc_bottomhalf * * Description: @@ -2991,7 +2991,7 @@ static int lpc31_qh_cancel(struct lpc31_qh_s *qh, uint32_t **bp, void *arg) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_ioc_bottomhalf(void) { @@ -3057,7 +3057,7 @@ static inline void lpc31_ioc_bottomhalf(void) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_portsc_bottomhalf * * Description: @@ -3077,7 +3077,7 @@ static inline void lpc31_ioc_bottomhalf(void) * bits (including: Force port resume, over-current change, enable/disable * change and connect status change)." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_portsc_bottomhalf(void) { @@ -3180,7 +3180,7 @@ static inline void lpc31_portsc_bottomhalf(void) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_syserr_bottomhalf * * Description: @@ -3191,7 +3191,7 @@ static inline void lpc31_portsc_bottomhalf(void) * error occurs, the Host Controller clears the Run/Stop bit in the Command * register to prevent further execution of the scheduled TDs." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_syserr_bottomhalf(void) { @@ -3199,7 +3199,7 @@ static inline void lpc31_syserr_bottomhalf(void) PANIC(); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_async_advance_bottomhalf * * Description: @@ -3211,7 +3211,7 @@ static inline void lpc31_syserr_bottomhalf(void) * register. This status bit indicates the assertion of that interrupt * source." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_async_advance_bottomhalf(void) { @@ -3220,13 +3220,13 @@ static inline void lpc31_async_advance_bottomhalf(void) /* REVISIT: Could remove all tagged QH entries here */ } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ehci_bottomhalf * * Description: * EHCI "Bottom Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_ehci_bottomhalf(FAR void *arg) { @@ -3354,13 +3354,13 @@ static void lpc31_ehci_bottomhalf(FAR void *arg) lpc31_putreg(EHCI_HANDLED_INTS, &HCOR->usbintr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ehci_interrupt * * Description: * EHCI "Top Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_ehci_interrupt(int irq, FAR void *context) { @@ -3412,10 +3412,10 @@ static int lpc31_ehci_interrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_wait * * Description: @@ -3438,7 +3438,7 @@ static int lpc31_ehci_interrupt(int irq, FAR void *context) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3510,7 +3510,7 @@ static int lpc31_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_enumerate * * Description: @@ -3536,7 +3536,7 @@ static int lpc31_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_rh_enumerate(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s *hport) @@ -3981,7 +3981,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_alloc * * Description: @@ -4011,7 +4011,7 @@ static int lpc31_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -4034,7 +4034,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_free * * Description: @@ -4055,7 +4055,7 @@ static int lpc31_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -4143,7 +4143,7 @@ static int lpc31_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ctrlin and lpc31_ctrlout * * Description: @@ -4177,7 +4177,7 @@ static int lpc31_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4249,7 +4249,7 @@ static int lpc31_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return lpc31_ctrlin(drvr, ep0, req, (uint8_t *)buffer); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_transfer * * Description: @@ -4285,7 +4285,7 @@ static int lpc31_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t lpc31_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4355,7 +4355,7 @@ errout_with_sem: return (ssize_t)ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_asynch * * Description: @@ -4388,7 +4388,7 @@ errout_with_sem: * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc31_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4706,7 +4706,7 @@ static int lpc31_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_disconnect * * Description: @@ -4729,7 +4729,7 @@ static int lpc31_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4738,10 +4738,10 @@ static void lpc31_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_reset * * Description: @@ -4781,7 +4781,7 @@ static void lpc31_disconnect(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Called during the initialization of the EHCI. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_reset(void) { @@ -4855,10 +4855,10 @@ static int lpc31_reset(void) return (regval & EHCI_USBCMD_HCRESET) != 0 ? -ETIMEDOUT : OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc31_ehci_initialize * * Description: @@ -4881,7 +4881,7 @@ static int lpc31_reset(void) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) { diff --git a/arch/arm/src/lpc31xx/lpc31_i2c.c b/arch/arm/src/lpc31xx/lpc31_i2c.c index c29a28ab569..bb70f7b6aaa 100644 --- a/arch/arm/src/lpc31xx/lpc31_i2c.c +++ b/arch/arm/src/lpc31xx/lpc31_i2c.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc31xx/lpc31_i2c.c * * Author: David Hewson @@ -33,11 +33,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -64,9 +64,9 @@ #include "lpc31_evntrtr.h" #include "lpc31_syscreg.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Pre-processor Definitions @@ -142,13 +142,13 @@ struct i2c_ops_s lpc31_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int port) { @@ -191,13 +191,13 @@ struct i2c_dev_s *up_i2cinitialize(int port) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ void up_i2cuninitalize(struct lpc31_i2cdev_s *priv) { @@ -218,13 +218,13 @@ void up_i2cuninitalize(struct lpc31_i2cdev_s *priv) lpc31_disableclock(priv->clkid); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_i2c_setfrequency * * Description: * Set the frequence for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -252,13 +252,13 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_i2c_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -273,14 +273,14 @@ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_i2c_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) { @@ -298,14 +298,14 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int bufle return ret == 1 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_i2c_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) { @@ -323,13 +323,13 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) return ret == 1 ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_transfer * * Description: * Perform a sequence of I2C transfers * - *******************************************************************************/ + ****************************************************************************/ static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count) { @@ -367,13 +367,13 @@ static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, i return ret; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_interrupt * * Description: * The I2C Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int i2c_interrupt(int irq, FAR void *context) { @@ -390,13 +390,13 @@ static int i2c_interrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_progress * * Description: * Progress any remaining I2C transfers * - *******************************************************************************/ + ****************************************************************************/ static void i2c_progress(struct lpc31_i2cdev_s *priv) { @@ -589,13 +589,13 @@ out: } } -/******************************************************************************* +/**************************************************************************** * Name: i2c_timeout * * Description: * Watchdog timer for timeout of I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void i2c_timeout(int argc, uint32_t arg, ...) { @@ -630,13 +630,13 @@ static void i2c_timeout(int argc, uint32_t arg, ...) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_reset * * Description: * Perform a soft reset of the I2C controller * - *******************************************************************************/ + ****************************************************************************/ static void i2c_reset(struct lpc31_i2cdev_s *priv) { putreg32(I2C_CTRL_RESET, priv->base + LPC31_I2C_CTRL_OFFSET); diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c b/arch/arm/src/lpc31xx/lpc31_usbdev.c index caac8970923..a2e43861693 100644 --- a/arch/arm/src/lpc31xx/lpc31_usbdev.c +++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc31xx/lpc31_usbdev.c * * Authors: David Hewson @@ -36,11 +36,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #include "lpc31_evntrtr.h" #include "lpc31_syscreg.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -255,9 +255,9 @@ struct lpc31_dqh_s #define lpc31_rqempty(ep) ((ep)->head == NULL) #define lpc31_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request may be retained in a list */ @@ -333,9 +333,9 @@ struct lpc31_usbdev_s #define EP0STATE_DATA_IN 8 #define EP0STATE_DATA_OUT 9 -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -422,9 +422,9 @@ static int lpc31_wakeup(struct usbdev_s *dev); static int lpc31_selfpowered(struct usbdev_s *dev, bool selfpowered); static int lpc31_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. @@ -460,21 +460,21 @@ static const struct usbdev_ops_s g_devops = .pullup = lpc31_pullup, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_getreg * * Description: * Get the contents of an LPC313x register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC31_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t lpc31_getreg(uint32_t addr) @@ -530,13 +530,13 @@ static uint32_t lpc31_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_putreg * * Description: * Set the contents of an LPC313x register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC31_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void lpc31_putreg(uint32_t val, uint32_t addr) @@ -551,13 +551,13 @@ static void lpc31_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_clrbits * * Description: * Clear bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_clrbits(uint32_t mask, uint32_t addr) { @@ -566,13 +566,13 @@ static inline void lpc31_clrbits(uint32_t mask, uint32_t addr) lpc31_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_setbits * * Description: * Set bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_setbits(uint32_t mask, uint32_t addr) { @@ -581,13 +581,13 @@ static inline void lpc31_setbits(uint32_t mask, uint32_t addr) lpc31_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_chgbits * * Description: * Change bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_chgbits(uint32_t mask, uint32_t val, uint32_t addr) { @@ -597,13 +597,13 @@ static inline void lpc31_chgbits(uint32_t mask, uint32_t val, uint32_t addr) lpc31_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct lpc31_req_s *lpc31_rqdequeue(FAR struct lpc31_ep_s *privep) { @@ -623,13 +623,13 @@ static FAR struct lpc31_req_s *lpc31_rqdequeue(FAR struct lpc31_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static bool lpc31_rqenqueue(FAR struct lpc31_ep_s *privep, FAR struct lpc31_req_s *req) @@ -650,13 +650,13 @@ static bool lpc31_rqenqueue(FAR struct lpc31_ep_s *privep, return is_empty; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_writedtd * * Description: * Initialise a DTD to transfer the data * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_writedtd(struct lpc31_dtd_s *dtd, const uint8_t *data, uint32_t nbytes) { @@ -670,13 +670,13 @@ static inline void lpc31_writedtd(struct lpc31_dtd_s *dtd, const uint8_t *data, dtd->xfer_len = nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_queuedtd * * Description: * Add the DTD to the device list * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_queuedtd(uint8_t epphy, struct lpc31_dtd_s *dtd) { @@ -694,13 +694,13 @@ static void lpc31_queuedtd(uint8_t epphy, struct lpc31_dtd_s *dtd) ; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ep0xfer * * Description: * Schedule a short transfer for Endpoint 0 (IN or OUT) * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_ep0xfer(uint8_t epphy, uint8_t *buf, uint32_t nbytes) { @@ -711,13 +711,13 @@ static inline void lpc31_ep0xfer(uint8_t epphy, uint8_t *buf, uint32_t nbytes) lpc31_queuedtd(epphy, dtd); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_readsetup * * Description: * Read a Setup packet from the DTD. * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_readsetup(uint8_t epphy, struct usb_ctrlreq_s *ctrl) { struct lpc31_dqh_s *dqh = &g_qh[epphy]; @@ -740,13 +740,13 @@ static void lpc31_readsetup(uint8_t epphy, struct usb_ctrlreq_s *ctrl) lpc31_putreg (LPC31_ENDPTMASK(LPC31_EP0_OUT), LPC31_USBDEV_ENDPTSETUPSTAT); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_set_address * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_set_address(struct lpc31_usbdev_s *priv, uint16_t address) { @@ -757,13 +757,13 @@ static inline void lpc31_set_address(struct lpc31_usbdev_s *priv, uint16_t addre LPC31_USBDEV_DEVICEADDR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_flushep * * Description: * Flush any primed descriptors from this ep * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_flushep(struct lpc31_ep_s *privep) { @@ -778,13 +778,13 @@ static void lpc31_flushep(struct lpc31_ep_s *privep) } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_progressep * * Description: * Progress the Endpoint by priming the first request into the queue head * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_progressep(struct lpc31_ep_s *privep) { @@ -843,13 +843,13 @@ static int lpc31_progressep(struct lpc31_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_abortrequest * * Description: * Discard a request * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_abortrequest(struct lpc31_ep_s *privep, struct lpc31_req_s *privreq, @@ -866,13 +866,13 @@ static inline void lpc31_abortrequest(struct lpc31_ep_s *privep, privreq->req.callback(&privep->ep, &privreq->req); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_reqcomplete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_reqcomplete(struct lpc31_ep_s *privep, struct lpc31_req_s *privreq, int16_t result) @@ -898,13 +898,13 @@ static void lpc31_reqcomplete(struct lpc31_ep_s *privep, privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_cancelrequests(struct lpc31_ep_s *privep, int16_t status) { @@ -921,14 +921,14 @@ static void lpc31_cancelrequests(struct lpc31_ep_s *privep, int16_t status) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct lpc31_ep_s *lpc31_epfindbyaddr(struct lpc31_usbdev_s *priv, uint16_t eplog) @@ -964,14 +964,14 @@ static struct lpc31_ep_s *lpc31_epfindbyaddr(struct lpc31_usbdev_s *priv, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_dispatchrequest(struct lpc31_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -995,13 +995,13 @@ static void lpc31_dispatchrequest(struct lpc31_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ep0configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_ep0configure(struct lpc31_usbdev_s *priv) { @@ -1021,13 +1021,13 @@ static void lpc31_ep0configure(struct lpc31_usbdev_s *priv) lpc31_setbits (USBDEV_ENDPTCTRL0_RXE | USBDEV_ENDPTCTRL0_TXE, LPC31_USBDEV_ENDPTCTRL0); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_usbreset(struct lpc31_usbdev_s *priv) { @@ -1094,13 +1094,13 @@ static void lpc31_usbreset(struct lpc31_usbdev_s *priv) LPC31_USBDEV_USBINTR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_setstate * * Description: * Sets the EP0 state and manages the NAK interrupts * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_ep0state(struct lpc31_usbdev_s *priv, uint16_t state) { @@ -1120,14 +1120,14 @@ static inline void lpc31_ep0state(struct lpc31_usbdev_s *priv, uint16_t state) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ep0setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc31_ep0setup(struct lpc31_usbdev_s *priv) { @@ -1457,13 +1457,13 @@ static inline void lpc31_ep0setup(struct lpc31_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ep0complete * * Description: * Transfer complete handler for Endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_ep0complete(struct lpc31_usbdev_s *priv, uint8_t epphy) { @@ -1529,13 +1529,13 @@ static void lpc31_ep0complete(struct lpc31_usbdev_s *priv, uint8_t epphy) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_ep0nak * * Description: * Handle a NAK interrupt on EP0 * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_ep0nak(struct lpc31_usbdev_s *priv, uint8_t epphy) { @@ -1568,14 +1568,14 @@ static void lpc31_ep0nak(struct lpc31_usbdev_s *priv, uint8_t epphy) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epcomplete * * Description: * Transfer complete handler for Endpoints other than 0 * returns whether the request at the head has completed * - *******************************************************************************/ + ****************************************************************************/ bool lpc31_epcomplete(struct lpc31_usbdev_s *priv, uint8_t epphy) { @@ -1638,13 +1638,13 @@ bool lpc31_epcomplete(struct lpc31_usbdev_s *priv, uint8_t epphy) } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_usbinterrupt(int irq, FAR void *context) { @@ -1803,11 +1803,11 @@ static int lpc31_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epconfigure * * Description: @@ -1820,7 +1820,7 @@ static int lpc31_usbinterrupt(int irq, FAR void *context) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -1890,13 +1890,13 @@ static int lpc31_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_epdisable(FAR struct usbdev_ep_s *ep) { @@ -1929,13 +1929,13 @@ static int lpc31_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -1961,13 +1961,13 @@ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -1985,13 +1985,13 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -2006,13 +2006,13 @@ static void *lpc31_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -2027,13 +2027,13 @@ static void lpc31_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2095,13 +2095,13 @@ static int lpc31_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2131,13 +2131,13 @@ static int lpc31_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_epstall * * Description: * Stall or resume and endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_epstall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -2172,11 +2172,11 @@ static int lpc31_epstall(FAR struct usbdev_ep_s *ep, bool resume) return OK; } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc31_allocep * * Description: @@ -2190,7 +2190,7 @@ static int lpc31_epstall(FAR struct usbdev_ep_s *ep, bool resume) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *lpc31_allocep(FAR struct usbdev_s *dev, uint8_t eplog, bool in, uint8_t eptype) @@ -2300,13 +2300,13 @@ static FAR struct usbdev_ep_s *lpc31_allocep(FAR struct usbdev_s *dev, uint8_t e return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc31_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -2326,13 +2326,13 @@ static void lpc31_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_getframe(struct usbdev_s *dev) { @@ -2353,13 +2353,13 @@ static int lpc31_getframe(struct usbdev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_wakeup(struct usbdev_s *dev) { @@ -2373,13 +2373,13 @@ static int lpc31_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -2399,13 +2399,13 @@ static int lpc31_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc31_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int lpc31_pullup(struct usbdev_s *dev, bool enable) { @@ -2420,11 +2420,11 @@ static int lpc31_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -2437,7 +2437,7 @@ static int lpc31_pullup(struct usbdev_s *dev, bool enable) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -2562,9 +2562,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -2604,14 +2604,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -2666,7 +2666,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -2674,7 +2674,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/lpc43xx/lpc43_ehci.c b/arch/arm/src/lpc43xx/lpc43_ehci.c index 09c144ebbb5..f9673ab12a6 100644 --- a/arch/arm/src/lpc43xx/lpc43_ehci.c +++ b/arch/arm/src/lpc43xx/lpc43_ehci.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc43xx/lpc43_ehci.c * * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -68,9 +68,9 @@ #if defined(CONFIG_LPC43_USBOTG) && defined(CONFIG_USBHOST) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* Pre-requisites */ @@ -187,9 +187,9 @@ #define RHPNDX(rh) ((rh)->hport.hport.port) #define RHPORT(rh) (RHPNDX(rh)+1) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Internal representation of the EHCI Queue Head (QH) */ struct lpc43_epinfo_s; @@ -389,9 +389,9 @@ struct lpc43_ehci_trace_s #endif /* HAVE_USBHOST_TRACE */ -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -548,9 +548,9 @@ static void lpc43_disconnect(FAR struct usbhost_driver_s *drvr, static int lpc43_reset(void); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global * instance. @@ -689,19 +689,19 @@ static const struct lpc43_ehci_trace_s g_trace2[TRACE2_NSTRINGS] = }; #endif /* HAVE_USBHOST_TRACE */ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Register Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_read16 * * Description: * Read 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static uint16_t lpc43_read16(const uint8_t *addr) { @@ -712,13 +712,13 @@ static uint16_t lpc43_read16(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_read32 * * Description: * Read 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static inline uint32_t lpc43_read32(const uint8_t *addr) { @@ -731,13 +731,13 @@ static inline uint32_t lpc43_read32(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_write16 * * Description: * Write 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void lpc43_write16(uint16_t memval, uint8_t *addr) @@ -752,13 +752,13 @@ static void lpc43_write16(uint16_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_write32 * * Description: * Write 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void lpc43_write32(uint32_t memval, uint8_t *addr) @@ -773,13 +773,13 @@ static void lpc43_write32(uint32_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_swap16 * * Description: * Swap bytes on a 16-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint16_t lpc43_swap16(uint16_t value) @@ -788,13 +788,13 @@ static uint16_t lpc43_swap16(uint16_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_swap32 * * Description: * Swap bytes on a 32-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint32_t lpc43_swap32(uint32_t value) @@ -804,13 +804,13 @@ static uint32_t lpc43_swap32(uint32_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_printreg * * Description: * Print the contents of a LPC43 EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_printreg(volatile uint32_t *regaddr, uint32_t regval, @@ -820,14 +820,14 @@ static void lpc43_printreg(volatile uint32_t *regaddr, uint32_t regval, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_checkreg * * Description: * Check if it is time to output debug information for accesses to a LPC43 * EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) @@ -885,13 +885,13 @@ static void lpc43_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_getreg * * Description: * Get the contents of an LPC43 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static uint32_t lpc43_getreg(volatile uint32_t *regaddr) @@ -912,13 +912,13 @@ static inline uint32_t lpc43_getreg(volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_putreg * * Description: * Set the contents of an LPC43 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_putreg(uint32_t regval, volatile uint32_t *regaddr) @@ -938,7 +938,7 @@ static inline void lpc43_putreg(uint32_t regval, volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: ehci_wait_usbsts * * Description: @@ -946,7 +946,7 @@ static inline void lpc43_putreg(uint32_t regval, volatile uint32_t *regaddr) * value, (2) for a timeout to occur, or (3) a error to occur. Return * a value to indicate which terminated the wait. * - *******************************************************************************/ + ****************************************************************************/ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, unsigned int delay) @@ -988,17 +988,17 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, return (regval == donebits) ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Semaphores - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_takesem * * Description: * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_takesem(sem_t *sem) { @@ -1014,10 +1014,10 @@ static void lpc43_takesem(sem_t *sem) } } -/******************************************************************************* +/**************************************************************************** * Allocators - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_qh_alloc * * Description: @@ -1025,7 +1025,7 @@ static void lpc43_takesem(sem_t *sem) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qh_s *lpc43_qh_alloc(void) { @@ -1043,7 +1043,7 @@ static struct lpc43_qh_s *lpc43_qh_alloc(void) return qh; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_free * * Description: @@ -1051,7 +1051,7 @@ static struct lpc43_qh_s *lpc43_qh_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_qh_free(struct lpc43_qh_s *qh) { @@ -1063,7 +1063,7 @@ static void lpc43_qh_free(struct lpc43_qh_s *qh) g_ehci.qhfree = entry; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_alloc * * Description: @@ -1072,7 +1072,7 @@ static void lpc43_qh_free(struct lpc43_qh_s *qh) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qtd_s *lpc43_qtd_alloc(void) { @@ -1090,7 +1090,7 @@ static struct lpc43_qtd_s *lpc43_qtd_alloc(void) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_free * * Description: @@ -1099,7 +1099,7 @@ static struct lpc43_qtd_s *lpc43_qtd_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_qtd_free(struct lpc43_qtd_s *qtd) { @@ -1111,11 +1111,11 @@ static void lpc43_qtd_free(struct lpc43_qtd_s *qtd) g_ehci.qtdfree = entry; } -/******************************************************************************* +/**************************************************************************** * List Management - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_foreach * * Description: @@ -1123,7 +1123,7 @@ static void lpc43_qtd_free(struct lpc43_qtd_s *qtd) * handler for each QH structure in the list (including the one at the head * of the list). * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qh_foreach(struct lpc43_qh_s *qh, uint32_t **bp, foreach_qh_t handler, void *arg) @@ -1195,14 +1195,14 @@ static int lpc43_qh_foreach(struct lpc43_qh_s *qh, uint32_t **bp, foreach_qh_t h return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_foreach * * Description: * Give a Queue Head (QH) instance, call the handler for each qTD structure * in the queue. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qtd_foreach(struct lpc43_qh_s *qh, foreach_qtd_t handler, void *arg) { @@ -1276,14 +1276,14 @@ static int lpc43_qtd_foreach(struct lpc43_qh_s *qh, foreach_qtd_t handler, void return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_discard * * Description: * This is a lpc43_qtd_foreach callback. It simply unlinks the QTD, updates * the back pointer, and frees the QTD structure. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qtd_discard(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -1302,7 +1302,7 @@ static int lpc43_qtd_discard(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_discard * * Description: @@ -1312,7 +1312,7 @@ static int lpc43_qtd_discard(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) * The QH structure itself has already been unlinked from whatever list it * may have been in. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qh_discard(struct lpc43_qh_s *qh) { @@ -1334,17 +1334,17 @@ static int lpc43_qh_discard(struct lpc43_qh_s *qh) return ret; } -/******************************************************************************* +/**************************************************************************** * Endpoint Transfer Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_print * * Description: * Print the context of one qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_qtd_print(struct lpc43_qtd_s *qtd) @@ -1359,13 +1359,13 @@ static void lpc43_qtd_print(struct lpc43_qtd_s *qtd) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_print * * Description: * Print the context of one QH * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_qh_print(struct lpc43_qh_s *qh) @@ -1401,14 +1401,14 @@ static void lpc43_qh_print(struct lpc43_qh_s *qh) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_dump * * Description: * This is a lpc43_qtd_foreach callout function. It dumps the context of one * qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static int lpc43_qtd_dump(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) @@ -1418,14 +1418,14 @@ static int lpc43_qtd_dump(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_dump * * Description: * This is a lpc43_qh_foreach callout function. It dumps a QH structure and * all of the qTD structures linked to the QH. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_LPC43_EHCI_REGDEBUG static int lpc43_qh_dump(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) @@ -1435,14 +1435,14 @@ static int lpc43_qh_dump(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ehci_speed * * Description: * Map a speed enumeration value per Chapter 9 of the USB specification to the * speed enumeration required in the EHCI queue head. * - *******************************************************************************/ + ****************************************************************************/ static inline uint8_t lpc43_ehci_speed(uint8_t usbspeed) { @@ -1450,7 +1450,7 @@ static inline uint8_t lpc43_ehci_speed(uint8_t usbspeed) return g_ehci_speed[usbspeed]; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ioc_setup * * Description: @@ -1461,7 +1461,7 @@ static inline uint8_t lpc43_ehci_speed(uint8_t usbspeed) * * Assumption: The caller holds tex EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_ioc_setup(struct lpc43_rhport_s *rhport, struct lpc43_epinfo_s *epinfo) { @@ -1498,7 +1498,7 @@ static int lpc43_ioc_setup(struct lpc43_rhport_s *rhport, struct lpc43_epinfo_s return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ioc_wait * * Description: @@ -1507,7 +1507,7 @@ static int lpc43_ioc_setup(struct lpc43_rhport_s *rhport, struct lpc43_epinfo_s * Assumption: The caller does *NOT* hold the EHCI exclsem. That would cause * a deadlock when the bottom-half, worker thread needs to take the semaphore. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_ioc_wait(struct lpc43_epinfo_s *epinfo) { @@ -1521,7 +1521,7 @@ static int lpc43_ioc_wait(struct lpc43_epinfo_s *epinfo) return epinfo->result; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_enqueue * * Description: @@ -1529,7 +1529,7 @@ static int lpc43_ioc_wait(struct lpc43_epinfo_s *epinfo) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_qh_enqueue(struct lpc43_qh_s *qhead, struct lpc43_qh_s *qh) { @@ -1559,13 +1559,13 @@ static void lpc43_qh_enqueue(struct lpc43_qh_s *qhead, struct lpc43_qh_s *qh) qhead->hw.hlp = lpc43_swap32(physaddr | QH_HLP_TYP_QH); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_create * * Description: * Create a new Queue Head (QH) * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qh_s *lpc43_qh_create(struct lpc43_rhport_s *rhport, struct lpc43_epinfo_s *epinfo) @@ -1696,13 +1696,13 @@ static struct lpc43_qh_s *lpc43_qh_create(struct lpc43_rhport_s *rhport, return qh; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_addbpl * * Description: * Add a buffer pointer list to a qTD. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qtd_addbpl(struct lpc43_qtd_s *qtd, const void *buffer, size_t buflen) { @@ -1765,13 +1765,13 @@ static int lpc43_qtd_addbpl(struct lpc43_qtd_s *qtd, const void *buffer, size_t return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_setupphase * * Description: * Create a SETUP phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qtd_s *lpc43_qtd_setupphase(struct lpc43_epinfo_s *epinfo, const struct usb_ctrlreq_s *req) @@ -1832,13 +1832,13 @@ static struct lpc43_qtd_s *lpc43_qtd_setupphase(struct lpc43_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_dataphase * * Description: * Create a data transfer or SET data phase qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qtd_s *lpc43_qtd_dataphase(struct lpc43_epinfo_s *epinfo, void *buffer, int buflen, @@ -1900,13 +1900,13 @@ static struct lpc43_qtd_s *lpc43_qtd_dataphase(struct lpc43_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_statusphase * * Description: * Create a STATUS phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_qtd_s *lpc43_qtd_statusphase(uint32_t tokenbits) { @@ -1949,7 +1949,7 @@ static struct lpc43_qtd_s *lpc43_qtd_statusphase(uint32_t tokenbits) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_async_setup * * Description: @@ -1967,7 +1967,7 @@ static struct lpc43_qtd_s *lpc43_qtd_statusphase(uint32_t tokenbits) * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_async_setup(struct lpc43_rhport_s *rhport, struct lpc43_epinfo_s *epinfo, @@ -2201,7 +2201,7 @@ errout_with_qh: return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_intr_setup * * Description: @@ -2247,7 +2247,7 @@ errout_with_qh: * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_USBHOST_INT_DISABLE static int lpc43_intr_setup(struct lpc43_rhport_s *rhport, @@ -2339,7 +2339,7 @@ errout_with_qh: } #endif /* CONFIG_USBHOST_INT_DISABLE */ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_transfer_wait * * Description: @@ -2356,7 +2356,7 @@ errout_with_qh: * plus the size of the data (which could be short); For bulk transfers, this * will be the number of data bytes transfers (which could be short). * - *******************************************************************************/ + ****************************************************************************/ static ssize_t lpc43_transfer_wait(struct lpc43_epinfo_s *epinfo) { @@ -2400,7 +2400,7 @@ static ssize_t lpc43_transfer_wait(struct lpc43_epinfo_s *epinfo) return epinfo->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ioc_async_setup * * Description: @@ -2418,7 +2418,7 @@ static ssize_t lpc43_transfer_wait(struct lpc43_epinfo_s *epinfo) * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static inline int lpc43_ioc_async_setup(struct lpc43_rhport_s *rhport, @@ -2454,7 +2454,7 @@ static inline int lpc43_ioc_async_setup(struct lpc43_rhport_s *rhport, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_asynch_completion * * Description: @@ -2471,7 +2471,7 @@ static inline int lpc43_ioc_async_setup(struct lpc43_rhport_s *rhport, * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void lpc43_asynch_completion(struct lpc43_epinfo_s *epinfo) @@ -2509,11 +2509,11 @@ static void lpc43_asynch_completion(struct lpc43_epinfo_s *epinfo) } #endif -/******************************************************************************* +/**************************************************************************** * EHCI Interrupt Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_ioccheck * * Description: @@ -2521,7 +2521,7 @@ static void lpc43_asynch_completion(struct lpc43_epinfo_s *epinfo) * qTD in the asynchronous queue. It removes all of the qTD structures that * are no longer active. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qtd_ioccheck(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -2556,7 +2556,7 @@ static int lpc43_qtd_ioccheck(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_ioccheck * * Description: @@ -2565,7 +2565,7 @@ static int lpc43_qtd_ioccheck(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) * remove all of the structures that are no longer active. if all of the * qTD structures are removed, then QH itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_qh_ioccheck(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) { @@ -2710,14 +2710,14 @@ static int lpc43_qh_ioccheck(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qtd_cancel * * Description: * This function is a lpc43_qtd_foreach() callback function. It removes each * qTD attached to a QH. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc43_qtd_cancel(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) @@ -2745,7 +2745,7 @@ static int lpc43_qtd_cancel(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) } #endif /* CONFIG_USBHOST_ASYNCH */ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_qh_cancel * * Description: @@ -2754,7 +2754,7 @@ static int lpc43_qtd_cancel(struct lpc43_qtd_s *qtd, uint32_t **bp, void *arg) * and remove all of the structures that are no longer active. Then QH * itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc43_qh_cancel(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) @@ -2815,7 +2815,7 @@ static int lpc43_qh_cancel(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) } #endif /* CONFIG_USBHOST_ASYNCH */ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ioc_bottomhalf * * Description: @@ -2831,7 +2831,7 @@ static int lpc43_qh_cancel(struct lpc43_qh_s *qh, uint32_t **bp, void *arg) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_ioc_bottomhalf(void) { @@ -2887,7 +2887,7 @@ static inline void lpc43_ioc_bottomhalf(void) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_portsc_bottomhalf * * Description: @@ -2907,7 +2907,7 @@ static inline void lpc43_ioc_bottomhalf(void) * bits (including: Force port resume, over-current change, enable/disable * change and connect status change)." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_portsc_bottomhalf(void) { @@ -3010,7 +3010,7 @@ static inline void lpc43_portsc_bottomhalf(void) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_syserr_bottomhalf * * Description: @@ -3021,7 +3021,7 @@ static inline void lpc43_portsc_bottomhalf(void) * error occurs, the Host Controller clears the Run/Stop bit in the Command * register to prevent further execution of the scheduled TDs." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_syserr_bottomhalf(void) { @@ -3029,7 +3029,7 @@ static inline void lpc43_syserr_bottomhalf(void) PANIC(); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_async_advance_bottomhalf * * Description: @@ -3041,7 +3041,7 @@ static inline void lpc43_syserr_bottomhalf(void) * register. This status bit indicates the assertion of that interrupt * source." * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_async_advance_bottomhalf(void) { @@ -3050,13 +3050,13 @@ static inline void lpc43_async_advance_bottomhalf(void) /* REVISIT: Could remove all tagged QH entries here */ } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ehci_bottomhalf * * Description: * EHCI "Bottom Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_ehci_bottomhalf(FAR void *arg) { @@ -3184,13 +3184,13 @@ static void lpc43_ehci_bottomhalf(FAR void *arg) lpc43_putreg(EHCI_HANDLED_INTS, &HCOR->usbintr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ehci_interrupt * * Description: * EHCI "Top Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_ehci_interrupt(int irq, FAR void *context) { @@ -3242,10 +3242,10 @@ static int lpc43_ehci_interrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_wait * * Description: @@ -3268,7 +3268,7 @@ static int lpc43_ehci_interrupt(int irq, FAR void *context) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3340,7 +3340,7 @@ static int lpc43_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_enumerate * * Description: @@ -3366,7 +3366,7 @@ static int lpc43_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_rh_enumerate(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s *hport) @@ -3811,7 +3811,7 @@ static int lpc43_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_alloc * * Description: @@ -3841,7 +3841,7 @@ static int lpc43_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -3861,7 +3861,7 @@ static int lpc43_alloc(FAR struct usbhost_driver_s *drvr, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_free * * Description: @@ -3882,7 +3882,7 @@ static int lpc43_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -3967,7 +3967,7 @@ static int lpc43_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ctrlin and lpc43_ctrlout * * Description: @@ -4001,7 +4001,7 @@ static int lpc43_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4073,7 +4073,7 @@ static int lpc43_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return lpc43_ctrlin(drvr, ep0, req, (uint8_t *)buffer); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_transfer * * Description: @@ -4109,7 +4109,7 @@ static int lpc43_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t lpc43_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4179,7 +4179,7 @@ errout_with_sem: return (ssize_t)ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_asynch * * Description: @@ -4212,7 +4212,7 @@ errout_with_sem: * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int lpc43_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4530,7 +4530,7 @@ static int lpc43_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_disconnect * * Description: @@ -4553,7 +4553,7 @@ static int lpc43_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4562,10 +4562,10 @@ static void lpc43_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_reset * * Description: @@ -4605,7 +4605,7 @@ static void lpc43_disconnect(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Called during the initialization of the EHCI. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_reset(void) { @@ -4679,10 +4679,10 @@ static int lpc43_reset(void) return (regval & EHCI_USBCMD_HCRESET) != 0 ? -ETIMEDOUT : OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: lpc43_ehci_initialize * * Description: @@ -4705,7 +4705,7 @@ static int lpc43_reset(void) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *lpc43_ehci_initialize(int controller) { diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.c b/arch/arm/src/lpc43xx/lpc43_i2c.c index 90652f08eec..52111024900 100644 --- a/arch/arm/src/lpc43xx/lpc43_i2c.c +++ b/arch/arm/src/lpc43xx/lpc43_i2c.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc43xx/lpc43_i2c.c * * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. @@ -44,11 +44,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -160,13 +160,13 @@ struct i2c_ops_s lpc43_i2c_ops = #endif }; -/******************************************************************************* +/**************************************************************************** * Name: lpc43_i2c_setfrequency * * Description: * Set the frequence for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { struct lpc43_i2cdev_s *priv = (struct lpc43_i2cdev_s *) dev; @@ -191,13 +191,13 @@ static uint32_t i2c_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return frequency; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_i2c_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -212,14 +212,14 @@ static int i2c_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_i2c_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, int buflen) @@ -246,14 +246,14 @@ static int i2c_write(FAR struct i2c_dev_s *dev, const uint8_t *buffer, return (ret == 0 ? 0 : -ETIMEDOUT); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_i2c_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) { @@ -279,13 +279,13 @@ static int i2c_read(FAR struct i2c_dev_s *dev, uint8_t *buffer, int buflen) return (ret == 0 ? 0 : -ETIMEDOUT); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_start * * Description: * Perform a I2C transfer start * - *******************************************************************************/ + ****************************************************************************/ static int i2c_start(struct lpc43_i2cdev_s *priv) { @@ -308,13 +308,13 @@ static int i2c_start(struct lpc43_i2cdev_s *priv) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: i2c_stop * * Description: * Perform a I2C transfer stop * - *******************************************************************************/ + ****************************************************************************/ static void i2c_stop(struct lpc43_i2cdev_s *priv) { @@ -326,13 +326,13 @@ static void i2c_stop(struct lpc43_i2cdev_s *priv) sem_post(&priv->wait); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_timeout * * Description: * Watchdog timer for timeout of I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void i2c_timeout(int argc, uint32_t arg, ...) { @@ -344,13 +344,13 @@ static void i2c_timeout(int argc, uint32_t arg, ...) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: i2c_transfer * * Description: * Perform a sequence of I2C transfers * - *******************************************************************************/ + ****************************************************************************/ static int i2c_transfer(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *msgs, int count) { @@ -384,13 +384,13 @@ void startStopNextMessage(struct lpc43_i2cdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: i2c_interrupt * * Description: * The I2C Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int i2c_interrupt(int irq, FAR void *context) { @@ -489,13 +489,13 @@ static int i2c_interrupt(int irq, FAR void *context) * Public Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int port) { @@ -601,13 +601,13 @@ struct i2c_dev_s *up_i2cinitialize(int port) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s * dev) { diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/arch/arm/src/lpc43xx/lpc43_usb0dev.c index 0f09d91c28f..45371bb6a16 100644 --- a/arch/arm/src/lpc43xx/lpc43_usb0dev.c +++ b/arch/arm/src/lpc43xx/lpc43_usb0dev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/lpc43xx/lpc43_usbdev.c * * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. @@ -41,11 +41,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -76,9 +76,9 @@ #include "lpc43_cgu.h" #include "lpc43_rgu.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ @@ -272,9 +272,9 @@ struct lpc43_dqh_s #define lpc43_rqempty(ep) ((ep)->head == NULL) #define lpc43_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request may be retained in a list */ @@ -351,9 +351,9 @@ struct lpc43_usbdev_s #define EP0STATE_DATA_IN 8 #define EP0STATE_DATA_OUT 9 -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -441,9 +441,9 @@ static int lpc43_wakeup(struct usbdev_s *dev); static int lpc43_selfpowered(struct usbdev_s *dev, bool selfpowered); static int lpc43_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. @@ -479,21 +479,21 @@ static const struct usbdev_ops_s g_devops = .pullup = lpc43_pullup, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_getreg * * Description: * Get the contents of an LPC433x register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t lpc43_getreg(uint32_t addr) @@ -549,13 +549,13 @@ static uint32_t lpc43_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_putreg * * Description: * Set the contents of an LPC433x register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void lpc43_putreg(uint32_t val, uint32_t addr) @@ -570,13 +570,13 @@ static void lpc43_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_clrbits * * Description: * Clear bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_clrbits(uint32_t mask, uint32_t addr) { @@ -585,13 +585,13 @@ static inline void lpc43_clrbits(uint32_t mask, uint32_t addr) lpc43_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_setbits * * Description: * Set bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_setbits(uint32_t mask, uint32_t addr) { @@ -600,13 +600,13 @@ static inline void lpc43_setbits(uint32_t mask, uint32_t addr) lpc43_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_chgbits * * Description: * Change bits in a register * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_chgbits(uint32_t mask, uint32_t val, uint32_t addr) { @@ -616,13 +616,13 @@ static inline void lpc43_chgbits(uint32_t mask, uint32_t val, uint32_t addr) lpc43_putreg(reg, addr); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct lpc43_req_s *lpc43_rqdequeue(FAR struct lpc43_ep_s *privep) { @@ -642,13 +642,13 @@ static FAR struct lpc43_req_s *lpc43_rqdequeue(FAR struct lpc43_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static bool lpc43_rqenqueue(FAR struct lpc43_ep_s *privep, FAR struct lpc43_req_s *req) @@ -670,13 +670,13 @@ static bool lpc43_rqenqueue(FAR struct lpc43_ep_s *privep, return is_empty; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_writedtd * * Description: * Initialise a DTD to transfer the data * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_writedtd(struct lpc43_dtd_s *dtd, const uint8_t *data, uint32_t nbytes) { @@ -690,13 +690,13 @@ static inline void lpc43_writedtd(struct lpc43_dtd_s *dtd, const uint8_t *data, dtd->xfer_len = nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_queuedtd * * Description: * Add the DTD to the device list * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_queuedtd(uint8_t epphy, struct lpc43_dtd_s *dtd) { @@ -714,13 +714,13 @@ static void lpc43_queuedtd(uint8_t epphy, struct lpc43_dtd_s *dtd) ; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ep0xfer * * Description: * Schedule a short transfer for Endpoint 0 (IN or OUT) * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_ep0xfer(uint8_t epphy, uint8_t *buf, uint32_t nbytes) { @@ -731,13 +731,13 @@ static inline void lpc43_ep0xfer(uint8_t epphy, uint8_t *buf, uint32_t nbytes) lpc43_queuedtd(epphy, dtd); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_readsetup * * Description: * Read a Setup packet from the DTD. * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_readsetup(uint8_t epphy, struct usb_ctrlreq_s *ctrl) { struct lpc43_dqh_s *dqh = &g_qh[epphy]; @@ -767,13 +767,13 @@ static void lpc43_readsetup(uint8_t epphy, struct usb_ctrlreq_s *ctrl) lpc43_putreg (LPC43_ENDPTMASK(LPC43_EP0_OUT), LPC43_USBDEV_ENDPTSETUPSTAT); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_set_address * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_set_address(struct lpc43_usbdev_s *priv, uint16_t address) { @@ -784,13 +784,13 @@ static inline void lpc43_set_address(struct lpc43_usbdev_s *priv, uint16_t addre LPC43_USBDEV_DEVICEADDR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_flushep * * Description: * Flush any primed descriptors from this ep * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_flushep(struct lpc43_ep_s *privep) { @@ -805,13 +805,13 @@ static void lpc43_flushep(struct lpc43_ep_s *privep) } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_progressep * * Description: * Progress the Endpoint by priming the first request into the queue head * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_progressep(struct lpc43_ep_s *privep) { @@ -886,13 +886,13 @@ static int lpc43_progressep(struct lpc43_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_abortrequest * * Description: * Discard a request * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_abortrequest(struct lpc43_ep_s *privep, struct lpc43_req_s *privreq, @@ -909,13 +909,13 @@ static inline void lpc43_abortrequest(struct lpc43_ep_s *privep, privreq->req.callback(&privep->ep, &privreq->req); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_reqcomplete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_reqcomplete(struct lpc43_ep_s *privep, struct lpc43_req_s *privreq, int16_t result) @@ -941,13 +941,13 @@ static void lpc43_reqcomplete(struct lpc43_ep_s *privep, privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_cancelrequests(struct lpc43_ep_s *privep, int16_t status) { @@ -964,14 +964,14 @@ static void lpc43_cancelrequests(struct lpc43_ep_s *privep, int16_t status) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct lpc43_ep_s *lpc43_epfindbyaddr(struct lpc43_usbdev_s *priv, uint16_t eplog) @@ -1007,14 +1007,14 @@ static struct lpc43_ep_s *lpc43_epfindbyaddr(struct lpc43_usbdev_s *priv, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_dispatchrequest(struct lpc43_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1038,13 +1038,13 @@ static void lpc43_dispatchrequest(struct lpc43_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ep0configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_ep0configure(struct lpc43_usbdev_s *priv) { @@ -1066,13 +1066,13 @@ static void lpc43_ep0configure(struct lpc43_usbdev_s *priv) lpc43_setbits (USBDEV_ENDPTCTRL0_RXE | USBDEV_ENDPTCTRL0_TXE, LPC43_USBDEV_ENDPTCTRL0); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_usbreset(struct lpc43_usbdev_s *priv) { @@ -1148,13 +1148,13 @@ static void lpc43_usbreset(struct lpc43_usbdev_s *priv) LPC43_USBDEV_USBINTR); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_setstate * * Description: * Sets the EP0 state and manages the NAK interrupts * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_ep0state(struct lpc43_usbdev_s *priv, uint16_t state) { @@ -1176,14 +1176,14 @@ static inline void lpc43_ep0state(struct lpc43_usbdev_s *priv, uint16_t state) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ep0setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void lpc43_ep0setup(struct lpc43_usbdev_s *priv) { @@ -1528,13 +1528,13 @@ static inline void lpc43_ep0setup(struct lpc43_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ep0complete * * Description: * Transfer complete handler for Endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_ep0complete(struct lpc43_usbdev_s *priv, uint8_t epphy) { @@ -1611,13 +1611,13 @@ static void lpc43_ep0complete(struct lpc43_usbdev_s *priv, uint8_t epphy) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_ep0nak * * Description: * Handle a NAK interrupt on EP0 * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_ep0nak(struct lpc43_usbdev_s *priv, uint8_t epphy) { @@ -1652,14 +1652,14 @@ static void lpc43_ep0nak(struct lpc43_usbdev_s *priv, uint8_t epphy) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epcomplete * * Description: * Transfer complete handler for Endpoints other than 0 * returns whether the request at the head has completed * - *******************************************************************************/ + ****************************************************************************/ bool lpc43_epcomplete(struct lpc43_usbdev_s *priv, uint8_t epphy) { @@ -1727,13 +1727,13 @@ bool lpc43_epcomplete(struct lpc43_usbdev_s *priv, uint8_t epphy) } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_usbinterrupt(int irq, FAR void *context) { @@ -1913,11 +1913,11 @@ static int lpc43_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epconfigure * * Description: @@ -1930,7 +1930,7 @@ static int lpc43_usbinterrupt(int irq, FAR void *context) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -2012,13 +2012,13 @@ static int lpc43_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_epdisable(FAR struct usbdev_ep_s *ep) { @@ -2057,13 +2057,13 @@ static int lpc43_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -2089,13 +2089,13 @@ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2113,13 +2113,13 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -2134,13 +2134,13 @@ static void *lpc43_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -2155,13 +2155,13 @@ static void lpc43_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2227,13 +2227,13 @@ static int lpc43_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return ret; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -2263,13 +2263,13 @@ static int lpc43_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_epstall * * Description: * Stall or resume and endpoint * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_epstall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -2304,11 +2304,11 @@ static int lpc43_epstall(FAR struct usbdev_ep_s *ep, bool resume) return OK; } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: lpc43_allocep * * Description: @@ -2322,7 +2322,7 @@ static int lpc43_epstall(FAR struct usbdev_ep_s *ep, bool resume) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *lpc43_allocep(FAR struct usbdev_s *dev, uint8_t eplog, bool in, uint8_t eptype) @@ -2435,13 +2435,13 @@ static FAR struct usbdev_ep_s *lpc43_allocep(FAR struct usbdev_s *dev, uint8_t e return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void lpc43_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -2461,13 +2461,13 @@ static void lpc43_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_getframe(struct usbdev_s *dev) { @@ -2489,13 +2489,13 @@ static int lpc43_getframe(struct usbdev_s *dev) #endif } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_wakeup(struct usbdev_s *dev) { @@ -2509,13 +2509,13 @@ static int lpc43_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -2535,13 +2535,13 @@ static int lpc43_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: lpc43_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int lpc43_pullup(struct usbdev_s *dev, bool enable) { @@ -2561,11 +2561,11 @@ static int lpc43_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -2576,7 +2576,7 @@ static int lpc43_pullup(struct usbdev_s *dev, bool enable) * - PLL initialization is not performed here but should been in * the low-level boot logic: PLL0 must be configured for operation at 480MHz * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -2712,9 +2712,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -2753,14 +2753,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -2815,7 +2815,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -2823,7 +2823,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/moxart/moxart_16550.c b/arch/arm/src/moxart/moxart_16550.c index 8152c28a800..ce24cf7312b 100644 --- a/arch/arm/src/moxart/moxart_16550.c +++ b/arch/arm/src/moxart/moxart_16550.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/arm/src/moxart/moxart_irq.c * Driver for MoxaRT IRQ controller * diff --git a/arch/arm/src/nuc1xx/nuc_lowputc.c b/arch/arm/src/nuc1xx/nuc_lowputc.c index dc22db8774b..e9248ac7804 100644 --- a/arch/arm/src/nuc1xx/nuc_lowputc.c +++ b/arch/arm/src/nuc1xx/nuc_lowputc.c @@ -108,7 +108,7 @@ * Wait until the console is ready to add another character to the TX * FIFO. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE static inline void nuc_console_ready(void) @@ -142,7 +142,7 @@ static inline void nuc_console_ready(void) * Description: * Called at the very beginning of _start. Performs low level initialization. * - *****************************************************************************/ + ****************************************************************************/ void nuc_lowsetup(void) { @@ -323,7 +323,7 @@ void nuc_lowsetup(void) * Description: * Output one character to the UART using a simple polling method. * - *****************************************************************************/ + ****************************************************************************/ void nuc_lowputc(uint32_t ch) { @@ -353,7 +353,7 @@ void nuc_lowputc(uint32_t ch) * Here we assume that the default clock source for the UART modules is * the external high speed crystal. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART void nuc_setbaud(uintptr_t base, uint32_t baud) diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c index 32edc655a37..d9e6f6ceb28 100644 --- a/arch/arm/src/sam34/sam_twi.c +++ b/arch/arm/src/sam34/sam_twi.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/sam34/sam_twi.c * * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. @@ -40,11 +40,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -72,9 +72,9 @@ #if defined(CONFIG_SAM34_TWI0) || defined(CONFIG_SAM34_TWI1) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_SAM34_TWI0_FREQUENCY @@ -110,9 +110,9 @@ # define i2cllvdbg(x...) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ struct twi_dev_s { @@ -144,9 +144,9 @@ struct twi_dev_s #endif }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Low-level helper functions */ @@ -216,9 +216,9 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid, uint32_t frequency); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAM34_TWI0 static struct twi_dev_s g_twi0; @@ -407,7 +407,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * I2C transfer helper functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_wait * * Description: @@ -416,7 +416,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * Assumptions: * Interrupts are disabled * - *******************************************************************************/ + ****************************************************************************/ static int twi_wait(struct twi_dev_s *priv) { @@ -441,13 +441,13 @@ static int twi_wait(struct twi_dev_s *priv) return priv->result; } -/******************************************************************************* +/**************************************************************************** * Name: twi_wakeup * * Description: * A terminal event has occurred. Wake-up the waiting thread * - *******************************************************************************/ + ****************************************************************************/ static void twi_wakeup(struct twi_dev_s *priv, int result) { @@ -465,13 +465,13 @@ static void twi_wakeup(struct twi_dev_s *priv, int result) twi_givesem(&priv->waitsem); } -/******************************************************************************* +/**************************************************************************** * Name: twi_interrupt * * Description: * The TWI Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int twi_interrupt(struct twi_dev_s *priv) { @@ -605,7 +605,7 @@ static int twi1_interrupt(int irq, FAR void *context) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_timeout * * Description: @@ -614,7 +614,7 @@ static int twi1_interrupt(int irq, FAR void *context) * Assumptions: * Called from the timer interrupt handler with interrupts disabled. * - *******************************************************************************/ + ****************************************************************************/ static void twi_timeout(int argc, uint32_t arg, ...) { @@ -624,13 +624,13 @@ static void twi_timeout(int argc, uint32_t arg, ...) twi_wakeup(priv, -ETIMEDOUT); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startread * * Description: * Start the next read message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -661,13 +661,13 @@ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWI_CR_OFFSET, TWI_CR_START); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startwrite * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -694,13 +694,13 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWI_IER_OFFSET, TWI_INT_TXRDY | TWI_INT_ERRORS); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startmessage * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -714,17 +714,17 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) } } -/******************************************************************************* +/**************************************************************************** * I2C device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -744,13 +744,13 @@ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -772,14 +772,14 @@ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: twi_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuflen) { @@ -838,14 +838,14 @@ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuf return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) { @@ -904,12 +904,12 @@ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_writeread * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_WRITEREAD static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, @@ -971,12 +971,12 @@ static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_setownaddress * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) @@ -986,12 +986,12 @@ static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_registercallback * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_registercallback(FAR struct i2c_dev_s *dev, @@ -1002,14 +1002,14 @@ static int twi_registercallback(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_transfer * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRANSFER static int twi_transfer(FAR struct i2c_dev_s *dev, @@ -1055,17 +1055,17 @@ static int twi_transfer(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) { @@ -1115,13 +1115,13 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_initialize * * Description: * Initialize one TWI peripheral for I2C operation * - *******************************************************************************/ + ****************************************************************************/ static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid, uint32_t frequency) @@ -1191,17 +1191,17 @@ static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid, (void)twi_hw_setfrequency(priv, frequency); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialize a TWI device for I2C operation * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int bus) { @@ -1305,13 +1305,13 @@ struct i2c_dev_s *up_i2cinitialize(int bus) return &priv->dev; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialise an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s * dev) { diff --git a/arch/arm/src/sam34/sam_udp.c b/arch/arm/src/sam34/sam_udp.c index 3227b53afb7..29e66e3cdf3 100644 --- a/arch/arm/src/sam34/sam_udp.c +++ b/arch/arm/src/sam34/sam_udp.c @@ -594,13 +594,13 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = /**************************************************************************** * Register Operations ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_printreg * * Description: * Print the contents of a SAM34 UDP registers * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAM34_UDP_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -609,14 +609,14 @@ static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_checkreg * * Description: * Check if it is time to output debug information for accesses to a SAM34 * UDP registers * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAM34_UDP_REGDEBUG static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -674,13 +674,13 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_getreg * * Description: * Get the contents of an SAM34 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAM34_UDP_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) @@ -701,13 +701,13 @@ static inline uint32_t sam_getreg(uintptr_t regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_putreg * * Description: * Set the contents of an SAM34 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAM34_UDP_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c index 6fbc135769a..cf622bd039e 100644 --- a/arch/arm/src/sama5/sam_ehci.c +++ b/arch/arm/src/sama5/sam_ehci.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/sama5/sam_ehci.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -68,9 +68,9 @@ #ifdef CONFIG_SAMA5_EHCI -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* Pre-requisites */ @@ -162,9 +162,9 @@ #define RHPNDX(rh) ((rh)->hport.hport.port) #define RHPORT(rh) (RHPNDX(rh)+1) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Internal representation of the EHCI Queue Head (QH) */ struct sam_epinfo_s; @@ -276,9 +276,9 @@ struct sam_ehci_s struct sam_rhport_s rhport[SAM_EHCI_NRHPORT]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -438,9 +438,9 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr, static int sam_reset(void); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global * instance. @@ -507,19 +507,19 @@ static struct sam_qtd_s *g_qtdpool; #endif -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Register Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_read16 * * Description: * Read 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static uint16_t sam_read16(const uint8_t *addr) { @@ -530,13 +530,13 @@ static uint16_t sam_read16(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_read32 * * Description: * Read 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ static inline uint32_t sam_read32(const uint8_t *addr) { @@ -549,13 +549,13 @@ static inline uint32_t sam_read32(const uint8_t *addr) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_write16 * * Description: * Write 16-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void sam_write16(uint16_t memval, uint8_t *addr) @@ -570,13 +570,13 @@ static void sam_write16(uint16_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_write32 * * Description: * Write 32-bit little endian data * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void sam_write32(uint32_t memval, uint8_t *addr) @@ -591,13 +591,13 @@ static void sam_write32(uint32_t memval, uint8_t *addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_swap16 * * Description: * Swap bytes on a 16-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint16_t sam_swap16(uint16_t value) @@ -606,13 +606,13 @@ static uint16_t sam_swap16(uint16_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_swap32 * * Description: * Swap bytes on a 32-bit value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ENDIAN_BIG static uint32_t sam_swap32(uint32_t value) @@ -622,13 +622,13 @@ static uint32_t sam_swap32(uint32_t value) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_printreg * * Description: * Print the contents of a SAMA5 EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_printreg(volatile uint32_t *regaddr, uint32_t regval, @@ -638,14 +638,14 @@ static void sam_printreg(volatile uint32_t *regaddr, uint32_t regval, } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_checkreg * * Description: * Check if it is time to output debug information for accesses to a SAMA5 * EHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) @@ -703,13 +703,13 @@ static void sam_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool iswri } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_getreg * * Description: * Get the contents of an SAMA5 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static uint32_t sam_getreg(volatile uint32_t *regaddr) @@ -730,13 +730,13 @@ static inline uint32_t sam_getreg(volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_putreg * * Description: * Set the contents of an SAMA5 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_putreg(uint32_t regval, volatile uint32_t *regaddr) @@ -756,7 +756,7 @@ static inline void sam_putreg(uint32_t regval, volatile uint32_t *regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: ehci_wait_usbsts * * Description: @@ -764,7 +764,7 @@ static inline void sam_putreg(uint32_t regval, volatile uint32_t *regaddr) * value, (2) for a timeout to occur, or (3) a error to occur. Return * a value to indicate which terminated the wait. * - *******************************************************************************/ + ****************************************************************************/ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, unsigned int delay) @@ -806,17 +806,17 @@ static int ehci_wait_usbsts(uint32_t maskbits, uint32_t donebits, return (regval == donebits) ? OK : -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Semaphores - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_takesem * * Description: * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void sam_takesem(sem_t *sem) { @@ -832,10 +832,10 @@ static void sam_takesem(sem_t *sem) } } -/******************************************************************************* +/**************************************************************************** * Allocators - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_qh_alloc * * Description: @@ -843,7 +843,7 @@ static void sam_takesem(sem_t *sem) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qh_s *sam_qh_alloc(void) { @@ -861,7 +861,7 @@ static struct sam_qh_s *sam_qh_alloc(void) return qh; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_free * * Description: @@ -869,7 +869,7 @@ static struct sam_qh_s *sam_qh_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void sam_qh_free(struct sam_qh_s *qh) { @@ -881,7 +881,7 @@ static void sam_qh_free(struct sam_qh_s *qh) g_ehci.qhfree = entry; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_alloc * * Description: @@ -890,7 +890,7 @@ static void sam_qh_free(struct sam_qh_s *qh) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qtd_s *sam_qtd_alloc(void) { @@ -908,7 +908,7 @@ static struct sam_qtd_s *sam_qtd_alloc(void) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_free * * Description: @@ -917,7 +917,7 @@ static struct sam_qtd_s *sam_qtd_alloc(void) * * Assumption: Caller holds the exclsem * - *******************************************************************************/ + ****************************************************************************/ static void sam_qtd_free(struct sam_qtd_s *qtd) { @@ -929,11 +929,11 @@ static void sam_qtd_free(struct sam_qtd_s *qtd) g_ehci.qtdfree = entry; } -/******************************************************************************* +/**************************************************************************** * List Management - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_foreach * * Description: @@ -941,7 +941,7 @@ static void sam_qtd_free(struct sam_qtd_s *qtd) * handler for each QH structure in the list (including the one at the head * of the list). * - *******************************************************************************/ + ****************************************************************************/ static int sam_qh_foreach(struct sam_qh_s *qh, uint32_t **bp, foreach_qh_t handler, void *arg) @@ -1013,14 +1013,14 @@ static int sam_qh_foreach(struct sam_qh_s *qh, uint32_t **bp, foreach_qh_t handl return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_foreach * * Description: * Give a Queue Head (QH) instance, call the handler for each qTD structure * in the queue. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_foreach(struct sam_qh_s *qh, foreach_qtd_t handler, void *arg) { @@ -1094,14 +1094,14 @@ static int sam_qtd_foreach(struct sam_qh_s *qh, foreach_qtd_t handler, void *arg return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_discard * * Description: * This is a sam_qtd_foreach callback. It simply unlinks the QTD, updates * the back pointer, and frees the QTD structure. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_discard(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -1120,7 +1120,7 @@ static int sam_qtd_discard(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_discard * * Description: @@ -1130,7 +1130,7 @@ static int sam_qtd_discard(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) * The QH structure itself has already been unlinked from whatever list it * may have been in. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qh_discard(struct sam_qh_s *qh) { @@ -1152,18 +1152,18 @@ static int sam_qh_discard(struct sam_qh_s *qh) return ret; } -/******************************************************************************* +/**************************************************************************** * Cache Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_invalidate * * Description: * This is a callback from sam_qtd_foreach. It simply invalidates D-cache for * address range of the qTD entry. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static int sam_qtd_invalidate(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) @@ -1178,13 +1178,13 @@ static int sam_qtd_invalidate(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_invalidate * * Description: * Invalidate the Queue Head and all qTD entries in the queue. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static int sam_qh_invalidate(struct sam_qh_s *qh) @@ -1200,14 +1200,14 @@ static int sam_qh_invalidate(struct sam_qh_s *qh) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_flush * * Description: * This is a callback from sam_qtd_foreach. It simply flushes D-cache for * address range of the qTD entry. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_flush(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -1229,13 +1229,13 @@ static int sam_qtd_flush(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_flush * * Description: * Invalidate the Queue Head and all qTD entries in the queue. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qh_flush(struct sam_qh_s *qh) { @@ -1259,17 +1259,17 @@ static int sam_qh_flush(struct sam_qh_s *qh) return sam_qtd_foreach(qh, sam_qtd_flush, NULL); } -/******************************************************************************* +/**************************************************************************** * Endpoint Transfer Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_print * * Description: * Print the context of one qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_qtd_print(struct sam_qtd_s *qtd) @@ -1284,13 +1284,13 @@ static void sam_qtd_print(struct sam_qtd_s *qtd) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_print * * Description: * Print the context of one QH * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_qh_print(struct sam_qh_s *qh) @@ -1326,14 +1326,14 @@ static void sam_qh_print(struct sam_qh_s *qh) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_dump * * Description: * This is a sam_qtd_foreach callout function. It dumps the context of one * qTD * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static int sam_qtd_dump(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) @@ -1343,14 +1343,14 @@ static int sam_qtd_dump(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_dump * * Description: * This is a sam_qh_foreach callout function. It dumps a QH structure and * all of the qTD structures linked to the QH. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static int sam_qh_dump(struct sam_qh_s *qh, uint32_t **bp, void *arg) @@ -1360,14 +1360,14 @@ static int sam_qh_dump(struct sam_qh_s *qh, uint32_t **bp, void *arg) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_ehci_speed * * Description: * Map a speed enumeration value per Chapter 9 of the USB specification to the * speed enumeration required in the EHCI queue head. * - *******************************************************************************/ + ****************************************************************************/ static inline uint8_t sam_ehci_speed(uint8_t usbspeed) { @@ -1375,7 +1375,7 @@ static inline uint8_t sam_ehci_speed(uint8_t usbspeed) return g_ehci_speed[usbspeed]; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ioc_setup * * Description: @@ -1386,7 +1386,7 @@ static inline uint8_t sam_ehci_speed(uint8_t usbspeed) * * Assumption: The caller holds tex EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static int sam_ioc_setup(struct sam_rhport_s *rhport, struct sam_epinfo_s *epinfo) { @@ -1423,7 +1423,7 @@ static int sam_ioc_setup(struct sam_rhport_s *rhport, struct sam_epinfo_s *epinf return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ioc_wait * * Description: @@ -1432,7 +1432,7 @@ static int sam_ioc_setup(struct sam_rhport_s *rhport, struct sam_epinfo_s *epinf * Assumption: The caller does *NOT* hold the EHCI exclsem. That would cause * a deadlock when the bottom-half, worker thread needs to take the semaphore. * - *******************************************************************************/ + ****************************************************************************/ static int sam_ioc_wait(struct sam_epinfo_s *epinfo) { @@ -1446,7 +1446,7 @@ static int sam_ioc_wait(struct sam_epinfo_s *epinfo) return epinfo->result; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_enqueue * * Description: @@ -1454,7 +1454,7 @@ static int sam_ioc_wait(struct sam_epinfo_s *epinfo) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static void sam_qh_enqueue(struct sam_qh_s *qhead, struct sam_qh_s *qh) { @@ -1487,13 +1487,13 @@ static void sam_qh_enqueue(struct sam_qh_s *qhead, struct sam_qh_s *qh) (uintptr_t)&qhead->hw + sizeof(struct ehci_qh_s)); } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_create * * Description: * Create a new Queue Head (QH) * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qh_s *sam_qh_create(struct sam_rhport_s *rhport, struct sam_epinfo_s *epinfo) @@ -1624,13 +1624,13 @@ static struct sam_qh_s *sam_qh_create(struct sam_rhport_s *rhport, return qh; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_addbpl * * Description: * Add a buffer pointer list to a qTD. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_addbpl(struct sam_qtd_s *qtd, const void *buffer, size_t buflen) { @@ -1704,13 +1704,13 @@ static int sam_qtd_addbpl(struct sam_qtd_s *qtd, const void *buffer, size_t bufl return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_setupphase * * Description: * Create a SETUP phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qtd_s *sam_qtd_setupphase(struct sam_epinfo_s *epinfo, const struct usb_ctrlreq_s *req) @@ -1771,13 +1771,13 @@ static struct sam_qtd_s *sam_qtd_setupphase(struct sam_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_dataphase * * Description: * Create a data transfer or SET data phase qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qtd_s *sam_qtd_dataphase(struct sam_epinfo_s *epinfo, void *buffer, int buflen, @@ -1839,13 +1839,13 @@ static struct sam_qtd_s *sam_qtd_dataphase(struct sam_epinfo_s *epinfo, return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_statusphase * * Description: * Create a STATUS phase request qTD. * - *******************************************************************************/ + ****************************************************************************/ static struct sam_qtd_s *sam_qtd_statusphase(uint32_t tokenbits) { @@ -1888,7 +1888,7 @@ static struct sam_qtd_s *sam_qtd_statusphase(uint32_t tokenbits) return qtd; } -/******************************************************************************* +/**************************************************************************** * Name: sam_async_setup * * Description: @@ -1906,7 +1906,7 @@ static struct sam_qtd_s *sam_qtd_statusphase(uint32_t tokenbits) * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ static int sam_async_setup(struct sam_rhport_s *rhport, struct sam_epinfo_s *epinfo, @@ -2140,7 +2140,7 @@ errout_with_qh: return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_intr_setup * * Description: @@ -2186,7 +2186,7 @@ errout_with_qh: * Zero (OK) is returned on success; a negated errno value is return on * any failure. * - *******************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_USBHOST_INT_DISABLE static int sam_intr_setup(struct sam_rhport_s *rhport, @@ -2278,7 +2278,7 @@ errout_with_qh: } #endif /* CONFIG_USBHOST_INT_DISABLE */ -/******************************************************************************* +/**************************************************************************** * Name: sam_transfer_wait * * Description: @@ -2295,7 +2295,7 @@ errout_with_qh: * plus the size of the data (which could be short); For bulk transfers, this * will be the number of data bytes transfers (which could be short). * - *******************************************************************************/ + ****************************************************************************/ static ssize_t sam_transfer_wait(struct sam_epinfo_s *epinfo) { @@ -2357,7 +2357,7 @@ static ssize_t sam_transfer_wait(struct sam_epinfo_s *epinfo) return epinfo->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ioc_async_setup * * Description: @@ -2375,7 +2375,7 @@ static ssize_t sam_transfer_wait(struct sam_epinfo_s *epinfo) * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static inline int sam_ioc_async_setup(struct sam_rhport_s *rhport, @@ -2411,7 +2411,7 @@ static inline int sam_ioc_async_setup(struct sam_rhport_s *rhport, } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_asynch_completion * * Description: @@ -2428,7 +2428,7 @@ static inline int sam_ioc_async_setup(struct sam_rhport_s *rhport, * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void sam_asynch_completion(struct sam_epinfo_s *epinfo) @@ -2466,11 +2466,11 @@ static void sam_asynch_completion(struct sam_epinfo_s *epinfo) } #endif -/******************************************************************************* +/**************************************************************************** * EHCI Interrupt Handling - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_ioccheck * * Description: @@ -2478,7 +2478,7 @@ static void sam_asynch_completion(struct sam_epinfo_s *epinfo) * qTD in the asynchronous queue. It removes all of the qTD structures that * are no longer active. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_ioccheck(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -2517,7 +2517,7 @@ static int sam_qtd_ioccheck(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_ioccheck * * Description: @@ -2526,7 +2526,7 @@ static int sam_qtd_ioccheck(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) * remove all of the structures that are no longer active. if all of the * qTD structures are removed, then QH itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qh_ioccheck(struct sam_qh_s *qh, uint32_t **bp, void *arg) { @@ -2676,14 +2676,14 @@ static int sam_qh_ioccheck(struct sam_qh_s *qh, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qtd_cancel * * Description: * This function is a sam_qtd_foreach() callback function. It removes each * qTD attached to a QH. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qtd_cancel(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) { @@ -2713,7 +2713,7 @@ static int sam_qtd_cancel(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_qh_cancel * * Description: @@ -2722,7 +2722,7 @@ static int sam_qtd_cancel(struct sam_qtd_s *qtd, uint32_t **bp, void *arg) * and remove all of the structures that are no longer active. Then QH * itself will also be removed. * - *******************************************************************************/ + ****************************************************************************/ static int sam_qh_cancel(struct sam_qh_s *qh, uint32_t **bp, void *arg) { @@ -2786,7 +2786,7 @@ static int sam_qh_cancel(struct sam_qh_s *qh, uint32_t **bp, void *arg) return 1; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ioc_bottomhalf * * Description: @@ -2802,7 +2802,7 @@ static int sam_qh_cancel(struct sam_qh_s *qh, uint32_t **bp, void *arg) * * Assumptions: The caller holds the EHCI exclsem * - *******************************************************************************/ + ****************************************************************************/ static inline void sam_ioc_bottomhalf(void) { @@ -2868,7 +2868,7 @@ static inline void sam_ioc_bottomhalf(void) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_portsc_bottomhalf * * Description: @@ -2888,7 +2888,7 @@ static inline void sam_ioc_bottomhalf(void) * bits (including: Force port resume, over-current change, enable/disable * change and connect status change)." * - *******************************************************************************/ + ****************************************************************************/ static inline void sam_portsc_bottomhalf(void) { @@ -2990,7 +2990,7 @@ static inline void sam_portsc_bottomhalf(void) } } -/******************************************************************************* +/**************************************************************************** * Name: sam_syserr_bottomhalf * * Description: @@ -3001,7 +3001,7 @@ static inline void sam_portsc_bottomhalf(void) * error occurs, the Host Controller clears the Run/Stop bit in the Command * register to prevent further execution of the scheduled TDs." * - *******************************************************************************/ + ****************************************************************************/ static inline void sam_syserr_bottomhalf(void) { @@ -3009,7 +3009,7 @@ static inline void sam_syserr_bottomhalf(void) PANIC(); } -/******************************************************************************* +/**************************************************************************** * Name: sam_async_advance_bottomhalf * * Description: @@ -3021,7 +3021,7 @@ static inline void sam_syserr_bottomhalf(void) * register. This status bit indicates the assertion of that interrupt * source." * - *******************************************************************************/ + ****************************************************************************/ static inline void sam_async_advance_bottomhalf(void) { @@ -3030,13 +3030,13 @@ static inline void sam_async_advance_bottomhalf(void) /* REVISIT: Could remove all tagged QH entries here */ } -/******************************************************************************* +/**************************************************************************** * Name: sam_ehci_bottomhalf * * Description: * EHCI "Bottom Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static void sam_ehci_bottomhalf(FAR void *arg) { @@ -3164,13 +3164,13 @@ static void sam_ehci_bottomhalf(FAR void *arg) sam_putreg(EHCI_HANDLED_INTS, &HCOR->usbintr); } -/******************************************************************************* +/**************************************************************************** * Name: sam_ehci_tophalf * * Description: * EHCI "Top Half" interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int sam_ehci_tophalf(int irq, FAR void *context) { @@ -3222,7 +3222,7 @@ static int sam_ehci_tophalf(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_uhphs_interrupt * * Description: @@ -3230,7 +3230,7 @@ static int sam_ehci_tophalf(int irq, FAR void *context) * owns the interrupt and provides the interrupting event to both the OHCI and * EHCI controllers. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_OHCI static int sam_uhphs_interrupt(int irq, FAR void *context) @@ -3248,10 +3248,10 @@ static int sam_uhphs_interrupt(int irq, FAR void *context) } #endif -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_wait * * Description: @@ -3274,7 +3274,7 @@ static int sam_uhphs_interrupt(int irq, FAR void *context) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3346,7 +3346,7 @@ static int sam_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: sam_enumerate * * Description: @@ -3372,7 +3372,7 @@ static int sam_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_rh_enumerate(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s *hport) @@ -3801,7 +3801,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_alloc * * Description: @@ -3831,7 +3831,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -3854,7 +3854,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_free * * Description: @@ -3875,7 +3875,7 @@ static int sam_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -3963,7 +3963,7 @@ static int sam_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ctrlin and sam_ctrlout * * Description: @@ -3996,7 +3996,7 @@ static int sam_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4068,7 +4068,7 @@ static int sam_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return sam_ctrlin(drvr, ep0, req, (uint8_t *)buffer); } -/******************************************************************************* +/**************************************************************************** * Name: sam_transfer * * Description: @@ -4104,7 +4104,7 @@ static int sam_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t sam_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4175,7 +4175,7 @@ errout_with_sem: return (ssize_t)ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_asynch * * Description: @@ -4208,7 +4208,7 @@ errout_with_sem: * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int sam_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4517,7 +4517,7 @@ static int sam_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_disconnect * * Description: @@ -4540,7 +4540,7 @@ static int sam_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void sam_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4549,10 +4549,10 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_reset * * Description: @@ -4592,7 +4592,7 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Called during the initialization of the EHCI. * - *******************************************************************************/ + ****************************************************************************/ static int sam_reset(void) { @@ -4666,10 +4666,10 @@ static int sam_reset(void) return (regval & EHCI_USBCMD_HCRESET) != 0 ? -ETIMEDOUT : OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: sam_ehci_initialize * * Description: @@ -4692,7 +4692,7 @@ static int sam_reset(void) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller) { diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 273568dde18..39db1a99efb 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/sama5/sam_ohci.c * * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -75,9 +75,9 @@ #ifdef CONFIG_SAMA5_OHCI -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* Pre-requisites */ @@ -207,9 +207,9 @@ #define RHPNDX(rh) ((rh)->hport.hport.port) #define RHPORT(rh) (RHPNDX(rh)+1) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* This structure contains one endpoint list. The main reason for the existence * of this structure is to contain the sem_t value associated with the ED. It * doesn't work well within the ED itself because then the semaphore counter @@ -335,9 +335,9 @@ struct sam_list_s /* Variable length buffer data follows */ }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -463,9 +463,9 @@ static int sam_connect(struct usbhost_driver_s *drvr, static void sam_disconnect(struct usbhost_driver_s *drvr, struct usbhost_hubport_s *hport); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global @@ -505,21 +505,21 @@ static struct sam_gtd_s g_tdalloc[SAMA5_OHCI_NTDS] static uint8_t g_bufalloc[SAM_BUFALLOC] __attribute__ ((aligned (SAMA5_DMA_ALIGN))); -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_printreg * * Description: * Print the contents of an SAMA5 OHCI register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_OHCI_REGDEBUG static void sam_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -528,13 +528,13 @@ static void sam_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_checkreg * * Description: * Get the contents of an SAMA5 OHCI register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_OHCI_REGDEBUG static void sam_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -592,13 +592,13 @@ static void sam_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_getreg * * Description: * Get the contents of an SAMA5 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_OHCI_REGDEBUG static uint32_t sam_getreg(uint32_t addr) @@ -614,13 +614,13 @@ static uint32_t sam_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_putreg * * Description: * Set the contents of an SAMA5 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_OHCI_REGDEBUG static void sam_putreg(uint32_t val, uint32_t addr) @@ -642,7 +642,7 @@ static void sam_putreg(uint32_t val, uint32_t addr) * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void sam_takesem(sem_t *sem) { @@ -664,7 +664,7 @@ static void sam_takesem(sem_t *sem) * Description: * Get a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ static inline uint16_t sam_getle16(const uint8_t *val) { @@ -677,7 +677,7 @@ static inline uint16_t sam_getle16(const uint8_t *val) * Description: * Put a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static void sam_putle16(uint8_t *dest, uint16_t val) @@ -687,13 +687,13 @@ static void sam_putle16(uint8_t *dest, uint16_t val) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_edalloc * * Description: * Allocate an endpoint descriptor by removing it from the free list * - *******************************************************************************/ + ****************************************************************************/ static struct sam_ed_s *sam_edalloc(void) { @@ -710,13 +710,13 @@ static struct sam_ed_s *sam_edalloc(void) return ed; } -/******************************************************************************* +/**************************************************************************** * Name: sam_edfree * * Description: * Free an endpoint descriptor by returning to the free list * - *******************************************************************************/ + ****************************************************************************/ static inline void sam_edfree(struct sam_ed_s *ed) { @@ -728,7 +728,7 @@ static inline void sam_edfree(struct sam_ed_s *ed) g_edfree = entry; } -/******************************************************************************* +/**************************************************************************** * Name: sam_tdalloc * * Description: @@ -740,7 +740,7 @@ static inline void sam_edfree(struct sam_ed_s *ed) * handler * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ static struct sam_gtd_s *sam_tdalloc(void) { @@ -762,7 +762,7 @@ static struct sam_gtd_s *sam_tdalloc(void) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_tdfree * * Description: @@ -772,7 +772,7 @@ static struct sam_gtd_s *sam_tdalloc(void) * - Only called from the WDH interrupt handler (and during initialization). * - Interrupts are disabled in any case. * - *******************************************************************************/ + ****************************************************************************/ static void sam_tdfree(struct sam_gtd_s *td) { @@ -783,7 +783,7 @@ static void sam_tdfree(struct sam_gtd_s *td) g_tdfree = tdfree; } -/******************************************************************************* +/**************************************************************************** * Name: sam_tballoc * * Description: @@ -793,7 +793,7 @@ static void sam_tdfree(struct sam_gtd_s *td) * - Never called from an interrupt handler. * - Protection from re-entrance must be assured by the caller * - *******************************************************************************/ + ****************************************************************************/ static uint8_t *sam_tballoc(void) { @@ -806,13 +806,13 @@ static uint8_t *sam_tballoc(void) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_tbfree * * Description: * Return an request/descriptor transfer buffer to the free list * - *******************************************************************************/ + ****************************************************************************/ static void sam_tbfree(uint8_t *buffer) { @@ -825,13 +825,13 @@ static void sam_tbfree(uint8_t *buffer) } } -/******************************************************************************* +/**************************************************************************** * Name: sam_addctrled * * Description: * Helper function to add an ED to the control list. * - *******************************************************************************/ + ****************************************************************************/ static int sam_addctrled(struct sam_ed_s *ed) { @@ -866,13 +866,13 @@ static int sam_addctrled(struct sam_ed_s *ed) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_remctrled * * Description: * Helper function remove an ED from the control list. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_remctrled(struct sam_ed_s *ed) { @@ -942,13 +942,13 @@ static inline int sam_remctrled(struct sam_ed_s *ed) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_addbulked * * Description: * Helper function to add an ED to the bulk list. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_addbulked(struct sam_ed_s *ed) { @@ -987,13 +987,13 @@ static inline int sam_addbulked(struct sam_ed_s *ed) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_rembulked * * Description: * Helper function remove an ED from the bulk list. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_rembulked(struct sam_ed_s *ed) { @@ -1067,13 +1067,13 @@ static inline int sam_rembulked(struct sam_ed_s *ed) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_getinterval * * Description: * Convert the endpoint polling interval into a HCCA table increment * - *******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_USBHOST_INT_DISABLE) || !defined(CONFIG_USBHOST_ISOC_DISABLE) static unsigned int sam_getinterval(uint8_t interval) @@ -1106,14 +1106,14 @@ static unsigned int sam_getinterval(uint8_t interval) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_setinttab * * Description: * Set the interrupt table to the selected value using the provided interval * and offset. * - *******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_USBHOST_INT_DISABLE) || !defined(CONFIG_USBHOST_ISOC_DISABLE) static void sam_setinttab(uint32_t value, unsigned int interval, unsigned int offset) @@ -1135,7 +1135,7 @@ static void sam_setinttab(uint32_t value, unsigned int interval, unsigned int of } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_addinted * * Description: @@ -1153,7 +1153,7 @@ static void sam_setinttab(uint32_t value, unsigned int interval, unsigned int of * 1. The minimum support polling rate is 2MS, and * 2. Some devices may get polled at a much higher rate than they request. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_addinted(const struct usbhost_epdesc_s *epdesc, struct sam_ed_s *ed) @@ -1254,7 +1254,7 @@ static inline int sam_addinted(const struct usbhost_epdesc_s *epdesc, #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_reminted * * Description: @@ -1272,7 +1272,7 @@ static inline int sam_addinted(const struct usbhost_epdesc_s *epdesc, * 1. The minimum support polling rate is 2MS, and * 2. Some devices may get polled at a much higher rate than they request. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_reminted(struct sam_ed_s *ed) { @@ -1409,13 +1409,13 @@ static inline int sam_reminted(struct sam_ed_s *ed) #endif } -/******************************************************************************* +/**************************************************************************** * Name: sam_addisoced * * Description: * Helper functions to add an ED to the periodic table. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_addisoced(const struct usbhost_epdesc_s *epdesc, struct sam_ed_s *ed) @@ -1427,13 +1427,13 @@ static inline int sam_addisoced(const struct usbhost_epdesc_s *epdesc, } -/******************************************************************************* +/**************************************************************************** * Name: sam_remisoced * * Description: * Helper functions to remove an ED from the periodic table. * - *******************************************************************************/ + ****************************************************************************/ static inline int sam_remisoced(struct sam_ed_s *ed) { @@ -1443,14 +1443,14 @@ static inline int sam_remisoced(struct sam_ed_s *ed) return -ENOSYS; } -/******************************************************************************* +/**************************************************************************** * Name: sam_enqueuetd * * Description: * Enqueue a transfer descriptor. Notice that this function only supports * queue on TD per ED. * - *******************************************************************************/ + ****************************************************************************/ static int sam_enqueuetd(struct sam_rhport_s *rhport, struct sam_eplist_s *eplist, struct sam_ed_s *ed, uint32_t dirpid, uint32_t toggle, @@ -1531,7 +1531,7 @@ static int sam_enqueuetd(struct sam_rhport_s *rhport, struct sam_eplist_s *eplis return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ep0enqueue * * Description: @@ -1544,7 +1544,7 @@ static int sam_enqueuetd(struct sam_rhport_s *rhport, struct sam_eplist_s *eplis * Returned Values: * None * - *******************************************************************************/ + ****************************************************************************/ static int sam_ep0enqueue(struct sam_rhport_s *rhport) { @@ -1616,7 +1616,7 @@ static int sam_ep0enqueue(struct sam_rhport_s *rhport) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ep0dequeue * * Description: @@ -1630,7 +1630,7 @@ static int sam_ep0enqueue(struct sam_rhport_s *rhport) * Returned Values: * None * - *******************************************************************************/ + ****************************************************************************/ static void sam_ep0dequeue(struct sam_eplist_s *ep0) { @@ -1727,7 +1727,7 @@ static void sam_ep0dequeue(struct sam_eplist_s *ep0) ep0->tail = NULL; } -/******************************************************************************* +/**************************************************************************** * Name: sam_wdhwait * * Description: @@ -1736,7 +1736,7 @@ static void sam_ep0dequeue(struct sam_eplist_s *ep0) * We do this to minimize race conditions. This logic would have to be * expanded if we want to have more than one packet in flight at a time! * - *******************************************************************************/ + ****************************************************************************/ static int sam_wdhwait(struct sam_rhport_s *rhport, struct sam_ed_s *ed, uint8_t *buffer, uint16_t buflen) @@ -1773,7 +1773,7 @@ static int sam_wdhwait(struct sam_rhport_s *rhport, struct sam_ed_s *ed, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_wdhasynch * * Description: @@ -1782,7 +1782,7 @@ static int sam_wdhwait(struct sam_rhport_s *rhport, struct sam_ed_s *ed, * transfer). We do this to minimize race conditions. This logic would have * to be expanded if we want to have more than one packet in flight at a time! * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int sam_wdhasynch(struct sam_rhport_s *rhport, struct sam_ed_s *ed, @@ -1820,7 +1820,7 @@ static int sam_wdhasynch(struct sam_rhport_s *rhport, struct sam_ed_s *ed, } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_ctrltd * * Description: @@ -1832,7 +1832,7 @@ static int sam_wdhasynch(struct sam_rhport_s *rhport, struct sam_ed_s *ed, * These are blocking methods; these functions will not return until the * control transfer has completed. * - *******************************************************************************/ + ****************************************************************************/ static int sam_ctrltd(struct sam_rhport_s *rhport, struct sam_eplist_s *eplist, uint32_t dirpid, uint8_t *buffer, size_t buflen) @@ -1926,13 +1926,13 @@ static int sam_ctrltd(struct sam_rhport_s *rhport, struct sam_eplist_s *eplist, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_rhsc_bottomhalf * * Description: * OHCI root hub status change interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static void sam_rhsc_bottomhalf(void) { @@ -2074,13 +2074,13 @@ static void sam_rhsc_bottomhalf(void) } } -/******************************************************************************* +/**************************************************************************** * Name: sam_wdh_bottomhalf * * Description: * OHCI write done head interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static void sam_wdh_bottomhalf(void) { @@ -2224,7 +2224,7 @@ static void sam_wdh_bottomhalf(void) } } -/******************************************************************************* +/**************************************************************************** * Name: sam_ohci_bottomhalf * * Description: @@ -2234,7 +2234,7 @@ static void sam_wdh_bottomhalf(void) * disabled when this function is scheduled so no further interrupts can * occur until this work re-enables OHCI interrupts * - *******************************************************************************/ + ****************************************************************************/ static void sam_ohci_bottomhalf(void *arg) { @@ -2301,11 +2301,11 @@ static void sam_ohci_bottomhalf(void *arg) sam_givesem(&g_ohci.exclsem); } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_wait * * Description: @@ -2328,7 +2328,7 @@ static void sam_ohci_bottomhalf(void *arg) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_wait(struct usbhost_connection_s *conn, struct usbhost_hubport_s **hport) @@ -2416,7 +2416,7 @@ static int sam_wait(struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: sam_enumerate * * Description: @@ -2442,7 +2442,7 @@ static int sam_wait(struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_rh_enumerate(struct usbhost_connection_s *conn, struct usbhost_hubport_s *hport) @@ -2894,7 +2894,7 @@ static int sam_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_alloc * * Description: @@ -2924,7 +2924,7 @@ static int sam_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_alloc(struct usbhost_driver_s *drvr, uint8_t **buffer, size_t *maxlen) @@ -2947,7 +2947,7 @@ static int sam_alloc(struct usbhost_driver_s *drvr, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_free * * Description: @@ -2968,7 +2968,7 @@ static int sam_alloc(struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_free(struct usbhost_driver_s *drvr, uint8_t *buffer) { @@ -3053,7 +3053,7 @@ static int sam_iofree(struct usbhost_driver_s *drvr, uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ctrlin and sam_ctrlout * * Description: @@ -3087,7 +3087,7 @@ static int sam_iofree(struct usbhost_driver_s *drvr, uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_ctrlin(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, const struct usb_ctrlreq_s *req, @@ -3183,7 +3183,7 @@ static int sam_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_transfer_common * * Description: @@ -3207,7 +3207,7 @@ static int sam_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int sam_transfer_common(struct sam_rhport_s *rhport, struct sam_eplist_s *eplist, @@ -3267,7 +3267,7 @@ static int sam_transfer_common(struct sam_rhport_s *rhport, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_transfer * * Description: @@ -3302,7 +3302,7 @@ static int sam_transfer_common(struct sam_rhport_s *rhport, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t sam_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, uint8_t *buffer, size_t buflen) @@ -3425,7 +3425,7 @@ errout: return (ssize_t)ret; } -/******************************************************************************* +/**************************************************************************** * Name: sam_asynch_completion * * Description: @@ -3443,7 +3443,7 @@ errout: * Assumptions: * - Called from the interrupt level * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void sam_asynch_completion(struct sam_eplist_s *eplist) @@ -3522,7 +3522,7 @@ static void sam_asynch_completion(struct sam_eplist_s *eplist) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_asynch * * Description: @@ -3555,7 +3555,7 @@ static void sam_asynch_completion(struct sam_eplist_s *eplist) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int sam_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -3807,7 +3807,7 @@ static int sam_connect(struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_disconnect * * Description: @@ -3830,7 +3830,7 @@ static int sam_connect(struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void sam_disconnect(struct usbhost_driver_s *drvr, struct usbhost_hubport_s *hport) @@ -3858,11 +3858,11 @@ static void sam_disconnect(struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_ohci_initialize * * Description: @@ -3885,7 +3885,7 @@ static void sam_disconnect(struct usbhost_driver_s *drvr, * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ struct usbhost_connection_s *sam_ohci_initialize(int controller) { @@ -4157,7 +4157,7 @@ struct usbhost_connection_s *sam_ohci_initialize(int controller) return &g_ohciconn; } -/******************************************************************************* +/**************************************************************************** * Name: sam_ohci_tophalf * * Description: @@ -4165,7 +4165,7 @@ struct usbhost_connection_s *sam_ohci_initialize(int controller) * EHCI will manage the common UHPHS interrupt and will forward the interrupt * event to this function. * - *******************************************************************************/ + ****************************************************************************/ int sam_ohci_tophalf(int irq, void *context) { diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c index d45a12c406c..99764c8c81f 100644 --- a/arch/arm/src/sama5/sam_twi.c +++ b/arch/arm/src/sama5/sam_twi.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/sama5/sam_twi.c * * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. @@ -40,11 +40,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -74,9 +74,9 @@ #if defined(CONFIG_SAMA5_TWI0) || defined(CONFIG_SAMA5_TWI1) || \ defined(CONFIG_SAMA5_TWI2) || defined(CONFIG_SAMA5_TWI3) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_SAMA5_TWI0_FREQUENCY @@ -138,9 +138,9 @@ # define i2cllvdbg(x...) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Invariant attributes of a TWI bus */ struct twi_attr_s @@ -185,9 +185,9 @@ struct twi_dev_s #endif }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Low-level helper functions */ @@ -262,9 +262,9 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency); static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_TWI0 static const struct twi_attr_s g_twi0attr = @@ -505,7 +505,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * I2C transfer helper functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_wait * * Description: @@ -514,7 +514,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * Assumptions: * Interrupts are disabled * - *******************************************************************************/ + ****************************************************************************/ static int twi_wait(struct twi_dev_s *priv, unsigned int size) { @@ -557,13 +557,13 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size) return priv->result; } -/******************************************************************************* +/**************************************************************************** * Name: twi_wakeup * * Description: * A terminal event has occurred. Wake-up the waiting thread * - *******************************************************************************/ + ****************************************************************************/ static void twi_wakeup(struct twi_dev_s *priv, int result) { @@ -581,13 +581,13 @@ static void twi_wakeup(struct twi_dev_s *priv, int result) twi_givesem(&priv->waitsem); } -/******************************************************************************* +/**************************************************************************** * Name: twi_interrupt * * Description: * The TWI Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int twi_interrupt(struct twi_dev_s *priv) { @@ -734,7 +734,7 @@ static int twi3_interrupt(int irq, FAR void *context) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_timeout * * Description: @@ -743,7 +743,7 @@ static int twi3_interrupt(int irq, FAR void *context) * Assumptions: * Called from the timer interrupt handler with interrupts disabled. * - *******************************************************************************/ + ****************************************************************************/ static void twi_timeout(int argc, uint32_t arg, ...) { @@ -753,13 +753,13 @@ static void twi_timeout(int argc, uint32_t arg, ...) twi_wakeup(priv, -ETIMEDOUT); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startread * * Description: * Start the next read message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -791,13 +791,13 @@ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWI_CR_OFFSET, TWI_CR_START); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startwrite * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -824,13 +824,13 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWI_IER_OFFSET, TWI_INT_TXRDY | TWI_INT_ERRORS); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startmessage * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -844,17 +844,17 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) } } -/******************************************************************************* +/**************************************************************************** * I2C device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -874,13 +874,13 @@ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -902,14 +902,14 @@ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: twi_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuflen) { @@ -960,14 +960,14 @@ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuf return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) { @@ -1018,12 +1018,12 @@ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_writeread * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_WRITEREAD static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, @@ -1095,12 +1095,12 @@ static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_setownaddress * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) @@ -1110,12 +1110,12 @@ static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_registercallback * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_registercallback((FAR struct i2c_dev_s *dev, @@ -1126,7 +1126,7 @@ static int twi_registercallback((FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_transfer * * Description: @@ -1136,7 +1136,7 @@ static int twi_registercallback((FAR struct i2c_dev_s *dev, * Returned Value: * Returns zero on success; a negated errno value on failure. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRANSFER static int twi_transfer(FAR struct i2c_dev_s *dev, @@ -1196,9 +1196,9 @@ static int twi_transfer(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: twi_enableclk @@ -1227,13 +1227,13 @@ static void twi_enableclk(struct twi_dev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) { @@ -1287,7 +1287,7 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_initialize * * Description: @@ -1295,7 +1295,7 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) * repeatable initialization after either (1) the one-time initialization, or * (2) after each bus reset. * - *******************************************************************************/ + ****************************************************************************/ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) { @@ -1384,17 +1384,17 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialize a TWI device for I2C operation * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int bus) { @@ -1512,13 +1512,13 @@ errout_with_irq: return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialize an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s *dev) { diff --git a/arch/arm/src/sama5/sam_udphs.c b/arch/arm/src/sama5/sam_udphs.c index dc89075c26c..0c31311f884 100644 --- a/arch/arm/src/sama5/sam_udphs.c +++ b/arch/arm/src/sama5/sam_udphs.c @@ -660,13 +660,13 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = /**************************************************************************** * Register Operations ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_printreg * * Description: * Print the contents of a SAMA5 UDPHS register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_UDPHS_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -675,14 +675,14 @@ static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_checkreg * * Description: * Check if it is time to output debug information for accesses to a SAMA5 * UDPHS register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_UDPHS_REGDEBUG static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -740,13 +740,13 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_getreg * * Description: * Get the contents of an SAMA5 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_UDPHS_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) @@ -767,13 +767,13 @@ static inline uint32_t sam_getreg(uintptr_t regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_putreg * * Description: * Set the contents of an SAMA5 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMA5_UDPHS_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) diff --git a/arch/arm/src/samdl/sam_lowputc.c b/arch/arm/src/samdl/sam_lowputc.c index fcc512279d7..3b5aff5fb15 100644 --- a/arch/arm/src/samdl/sam_lowputc.c +++ b/arch/arm/src/samdl/sam_lowputc.c @@ -291,7 +291,7 @@ sam_pad_configure(const struct sam_usart_config_s * const config) * This configures the SERCOM as a USART, but does not configure USART * interrupts or enable the USART. * - *****************************************************************************/ + ****************************************************************************/ #ifdef SAMDL_HAVE_USART int sam_usart_internal(const struct sam_usart_config_s * const config) @@ -398,7 +398,7 @@ void sam_lowsetup(void) * This configures the SERCOM as a USART, but does not configure USART * interrupts or enable the USART. * - *****************************************************************************/ + ****************************************************************************/ #ifdef SAMDL_HAVE_USART int sam_usart_initialize(const struct sam_usart_config_s * const config) @@ -428,7 +428,7 @@ int sam_usart_initialize(const struct sam_usart_config_s * const config) * Reset the USART SERCOM. This restores all SERCOM register to the * initial state and disables the SERCOM. * - *****************************************************************************/ + ****************************************************************************/ #ifdef SAMDL_HAVE_USART void sam_usart_reset(const struct sam_usart_config_s * const config) @@ -457,7 +457,7 @@ void sam_usart_reset(const struct sam_usart_config_s * const config) * Description: * Output one character to the USART using a simple polling method. * - *****************************************************************************/ + ****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE void sam_lowputc(uint32_t ch) diff --git a/arch/arm/src/samv7/sam_twihs.c b/arch/arm/src/samv7/sam_twihs.c index 9f1009653cb..9b6957767ef 100644 --- a/arch/arm/src/samv7/sam_twihs.c +++ b/arch/arm/src/samv7/sam_twihs.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/samv7/sam_twihs.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -40,11 +40,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -74,9 +74,9 @@ #if defined(CONFIG_SAMV7_TWIHS0) || defined(CONFIG_SAMV7_TWIHS1) || \ defined(CONFIG_SAMV7_TWIHS2) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_SAMV7_TWIHS0_FREQUENCY @@ -135,9 +135,9 @@ # define i2cllvdbg(x...) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Invariant attributes of a TWIHS bus */ struct twi_attr_s @@ -183,9 +183,9 @@ struct twi_dev_s #endif }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Low-level helper functions */ @@ -257,9 +257,9 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency); static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMV7_TWIHS0 static const struct twi_attr_s g_twi0attr = @@ -485,7 +485,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * I2C transfer helper functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_wait * * Description: @@ -494,7 +494,7 @@ static inline void twi_putrel(struct twi_dev_s *priv, unsigned int offset, * Assumptions: * Interrupts are disabled * - *******************************************************************************/ + ****************************************************************************/ static int twi_wait(struct twi_dev_s *priv, unsigned int size) { @@ -537,13 +537,13 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size) return priv->result; } -/******************************************************************************* +/**************************************************************************** * Name: twi_wakeup * * Description: * A terminal event has occurred. Wake-up the waiting thread * - *******************************************************************************/ + ****************************************************************************/ static void twi_wakeup(struct twi_dev_s *priv, int result) { @@ -561,13 +561,13 @@ static void twi_wakeup(struct twi_dev_s *priv, int result) twi_givesem(&priv->waitsem); } -/******************************************************************************* +/**************************************************************************** * Name: twi_interrupt * * Description: * The TWIHS Interrupt Handler * - *******************************************************************************/ + ****************************************************************************/ static int twi_interrupt(struct twi_dev_s *priv) { @@ -761,7 +761,7 @@ static int twi2_interrupt(int irq, FAR void *context) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_timeout * * Description: @@ -770,7 +770,7 @@ static int twi2_interrupt(int irq, FAR void *context) * Assumptions: * Called from the timer interrupt handler with interrupts disabled. * - *******************************************************************************/ + ****************************************************************************/ static void twi_timeout(int argc, uint32_t arg, ...) { @@ -780,13 +780,13 @@ static void twi_timeout(int argc, uint32_t arg, ...) twi_wakeup(priv, -ETIMEDOUT); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startread * * Description: * Start the next read message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -818,13 +818,13 @@ static void twi_startread(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWIHS_CR_OFFSET, TWIHS_CR_START); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startwrite * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -851,13 +851,13 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) twi_putrel(priv, SAM_TWIHS_IER_OFFSET, TWIHS_INT_TXRDY | TWIHS_INT_ERRORS); } -/******************************************************************************* +/**************************************************************************** * Name: twi_startmessage * * Description: * Start the next write message * - *******************************************************************************/ + ****************************************************************************/ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) { @@ -871,17 +871,17 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) } } -/******************************************************************************* +/**************************************************************************** * I2C device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: twi_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) { @@ -901,13 +901,13 @@ static uint32_t twi_setfrequency(FAR struct i2c_dev_s *dev, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_setaddress * * Description: * Set the I2C slave address for a subsequent read/write * - *******************************************************************************/ + ****************************************************************************/ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) { @@ -929,14 +929,14 @@ static int twi_setaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: twi_write * * Description: * Send a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuflen) { @@ -987,14 +987,14 @@ static int twi_write(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, int wbuf return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_read * * Description: * Receive a block of data on I2C using the previously selected I2C * frequency and slave address. * - *******************************************************************************/ + ****************************************************************************/ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) { @@ -1045,12 +1045,12 @@ static int twi_read(FAR struct i2c_dev_s *dev, uint8_t *rbuffer, int rbuflen) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: twi_writeread * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_WRITEREAD static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, @@ -1122,12 +1122,12 @@ static int twi_writeread(FAR struct i2c_dev_s *dev, const uint8_t *wbuffer, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_setownaddress * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) @@ -1137,12 +1137,12 @@ static int twi_setownaddress(FAR struct i2c_dev_s *dev, int addr, int nbits) } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_registercallback * * Description: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_SLAVE static int twi_registercallback((FAR struct i2c_dev_s *dev, @@ -1153,7 +1153,7 @@ static int twi_registercallback((FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Name: twi_transfer * * Description: @@ -1163,7 +1163,7 @@ static int twi_registercallback((FAR struct i2c_dev_s *dev, * Returned Value: * Returns zero on success; a negated errno value on failure. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_I2C_TRANSFER static int twi_transfer(FAR struct i2c_dev_s *dev, @@ -1223,9 +1223,9 @@ static int twi_transfer(FAR struct i2c_dev_s *dev, } #endif -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: twi_enableclk @@ -1254,13 +1254,13 @@ static void twi_enableclk(struct twi_dev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_setfrequency * * Description: * Set the frequency for the next transfer * - *******************************************************************************/ + ****************************************************************************/ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) { @@ -1314,7 +1314,7 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) return actual; } -/******************************************************************************* +/**************************************************************************** * Name: twi_hw_initialize * * Description: @@ -1322,7 +1322,7 @@ static uint32_t twi_hw_setfrequency(struct twi_dev_s *priv, uint32_t frequency) * repeatable initialization after either (1) the one-time initialization, or * (2) after each bus reset. * - *******************************************************************************/ + ****************************************************************************/ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) { @@ -1411,17 +1411,17 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_i2cinitialize * * Description: * Initialize a TWIHS device for I2C operation * - *******************************************************************************/ + ****************************************************************************/ struct i2c_dev_s *up_i2cinitialize(int bus) { @@ -1535,13 +1535,13 @@ errout_with_irq: return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: up_i2cuninitalize * * Description: * Uninitialize an I2C device * - *******************************************************************************/ + ****************************************************************************/ int up_i2cuninitialize(FAR struct i2c_dev_s *dev) { diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c index d912c400e29..ac95a437950 100644 --- a/arch/arm/src/samv7/sam_usbdevhs.c +++ b/arch/arm/src/samv7/sam_usbdevhs.c @@ -709,13 +709,13 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = /**************************************************************************** * Register Operations ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: sam_printreg * * Description: * Print the contents of a SAMV7 USBHS register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMV7_USBHS_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -724,14 +724,14 @@ static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_checkreg * * Description: * Check if it is time to output debug information for accesses to a SAMV7 * USBHS register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMV7_USBHS_REGDEBUG static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) @@ -789,13 +789,13 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_getreg * * Description: * Get the contents of an SAMV7 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMV7_USBHS_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) @@ -816,13 +816,13 @@ static inline uint32_t sam_getreg(uintptr_t regaddr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: sam_putreg * * Description: * Set the contents of an SAMV7 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SAMV7_USBHS_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index 3368ca8b984..0e72ead540b 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -1077,7 +1077,7 @@ static void adc_rccreset(struct stm32_dev_s *priv, bool reset) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: adc_power_down_idle * * Description : Enables or disables power down during the idle phase. @@ -1091,7 +1091,7 @@ static void adc_rccreset(struct stm32_dev_s *priv, bool reset) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_STM32L15XX static void adc_power_down_idle(FAR struct stm32_dev_s *priv, bool pdi_high) @@ -1118,7 +1118,7 @@ static void adc_power_down_idle(FAR struct stm32_dev_s *priv, bool pdi_high) } #endif -/******************************************************************************* +/**************************************************************************** * Name: adc_power_down_delay * * Description : Enables or disables power down during the delay phase. @@ -1132,7 +1132,7 @@ static void adc_power_down_idle(FAR struct stm32_dev_s *priv, bool pdi_high) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_STM32L15XX static void adc_power_down_delay(FAR struct stm32_dev_s *priv, bool pdd_high) @@ -1159,7 +1159,7 @@ static void adc_power_down_delay(FAR struct stm32_dev_s *priv, bool pdd_high) } #endif -/******************************************************************************* +/**************************************************************************** * Name: adc_dels_after_conversion * * Description : Defines the length of the delay which is applied @@ -1173,7 +1173,7 @@ static void adc_power_down_delay(FAR struct stm32_dev_s *priv, bool pdd_high) * * Returned Value: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_STM32L15XX static void adc_dels_after_conversion(FAR struct stm32_dev_s *priv, @@ -1190,7 +1190,7 @@ static void adc_dels_after_conversion(FAR struct stm32_dev_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: adc_select_ch_bank * * Description : Selects the bank of channels to be converted @@ -1204,7 +1204,7 @@ static void adc_dels_after_conversion(FAR struct stm32_dev_s *priv, * * Returned Value: * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_STM32L15XX static void adc_select_ch_bank(FAR struct stm32_dev_s *priv, bool chb_selected) @@ -1228,7 +1228,7 @@ static void adc_select_ch_bank(FAR struct stm32_dev_s *priv, bool chb_selected) } #endif -/******************************************************************************* +/**************************************************************************** * Name: adc_enable * * Description : Enables or disables the specified ADC peripheral. @@ -1242,7 +1242,7 @@ static void adc_select_ch_bank(FAR struct stm32_dev_s *priv, bool chb_selected) * * Returned Value: * - *******************************************************************************/ + ****************************************************************************/ static void adc_enable(FAR struct stm32_dev_s *priv, bool enable) { @@ -2693,7 +2693,7 @@ static int adc123_interrupt(int irq, void *context) * Public Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: adc_change_sample_time * * Description : Changes sample times for specified channels. This method @@ -2712,7 +2712,7 @@ static int adc123_interrupt(int irq, void *context) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_STM32L15XX void stm32_adcchange_sample_time(FAR struct adc_dev_s *dev, diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index 2b619637b5d..f9d510821b0 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/arm/src/stm32/stm32_dma2d.c * * Copyright (C) 2014-2015 Marco Krahl. All rights reserved. @@ -34,11 +34,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -63,9 +63,9 @@ #include "chip/stm32_ccm.h" #include "stm32_dma2d.h" -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* output, foreground and background layer */ @@ -158,9 +158,9 @@ # error "Enable CONFIG_STM32_CCMEXCLUDE from the heap allocation" #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ /* DMA2D General layer information */ @@ -275,9 +275,9 @@ static const uintptr_t stm32_cmar_layer_t[DMA2D_NLAYERS - 1] = STM32_DMA2D_BGCMAR }; -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ /* Private functions */ @@ -348,9 +348,9 @@ static int stm32_dma2dblend(FAR struct dma2d_layer_s *dest, static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, FAR const struct ltdc_area_s *area, uint32_t color); -/****************************************************************************** +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ /* Remember the layer references for alloc/deallocation */ @@ -384,15 +384,15 @@ static struct stm32_interrupt_s g_interrupt = .sem = &g_semirq }; -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_control * * Description: @@ -477,7 +477,7 @@ static int stm32_dma2dirq(int irq, void *context) return OK; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_waitforirq * * Description: @@ -522,7 +522,7 @@ static int stm32_dma2d_waitforirq(void) #ifdef CONFIG_STM32_DMA2D_L8 -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_loadclut * * Description: @@ -568,7 +568,7 @@ static int stm32_dma2d_loadclut(uintptr_t pfcreg) } #endif -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_start * * Description: @@ -610,7 +610,7 @@ static int stm32_dma2d_start(void) return ret; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_memaddress * * Description: @@ -622,7 +622,7 @@ static int stm32_dma2d_start(void) * Return: * memory address * - *****************************************************************************/ + ****************************************************************************/ static uint32_t stm32_dma2d_memaddress(FAR const struct stm32_dma2d_s *layer, fb_coord_t xpos, fb_coord_t ypos) @@ -636,7 +636,7 @@ static uint32_t stm32_dma2d_memaddress(FAR const struct stm32_dma2d_s *layer, return ((uint32_t) pinfo->fbmem) + offset; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lineoffset * * Description: @@ -648,7 +648,7 @@ static uint32_t stm32_dma2d_memaddress(FAR const struct stm32_dma2d_s *layer, * Return: * line offset * - *****************************************************************************/ + ****************************************************************************/ static fb_coord_t stm32_dma2d_lineoffset(FAR const struct stm32_dma2d_s *layer, FAR const struct ltdc_area_s *area) @@ -659,7 +659,7 @@ static fb_coord_t stm32_dma2d_lineoffset(FAR const struct stm32_dma2d_s *layer, return layer->vinfo.xres - area->xres; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_pixelformat * * Description: @@ -673,7 +673,7 @@ static fb_coord_t stm32_dma2d_lineoffset(FAR const struct stm32_dma2d_s *layer, * On success - OK * On error - -EINVAL * - *****************************************************************************/ + ****************************************************************************/ static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) { @@ -718,7 +718,7 @@ static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) return OK; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_bpp * * Description: @@ -732,7 +732,7 @@ static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) * On success - OK * On error - -EINVAL * - *****************************************************************************/ + ****************************************************************************/ static int stm32_dma2d_bpp(uint8_t fmt, uint8_t *bpp) { @@ -763,7 +763,7 @@ static int stm32_dma2d_bpp(uint8_t fmt, uint8_t *bpp) return OK; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lfreelid * * Description: @@ -773,7 +773,7 @@ static int stm32_dma2d_bpp(uint8_t fmt, uint8_t *bpp) * The number of the free layer * -1 if no free layer is available * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2d_lfreelid(void) { @@ -790,7 +790,7 @@ static int stm32_dma2d_lfreelid(void) return -1; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lalloc * * Description: @@ -799,7 +799,7 @@ static int stm32_dma2d_lfreelid(void) * Return: * A new allocated layer structure or NULL on error. * - ******************************************************************************/ + ****************************************************************************/ static FAR struct stm32_dma2d_s * stm32_dma2d_lalloc(void) { @@ -823,7 +823,7 @@ static FAR struct stm32_dma2d_s * stm32_dma2d_lalloc(void) return layer; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lfree * * Description: @@ -832,7 +832,7 @@ static FAR struct stm32_dma2d_s * stm32_dma2d_lalloc(void) * Input Parameters: * A previous allocated layer structure * - ******************************************************************************/ + ****************************************************************************/ static void stm32_dma2d_lfree(FAR struct stm32_dma2d_s *layer) { @@ -853,13 +853,13 @@ static void stm32_dma2d_lfree(FAR struct stm32_dma2d_s *layer) } } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_llayerscleanup * * Description: * Cleanup all allocated layers * - ******************************************************************************/ + ****************************************************************************/ static void stm32_dma2d_llayerscleanup(void) { @@ -879,7 +879,7 @@ static void stm32_dma2d_llayerscleanup(void) } } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lvalidate * * Description: @@ -888,7 +888,7 @@ static void stm32_dma2d_llayerscleanup(void) * Return: * true if validates otherwise false * - ******************************************************************************/ + ****************************************************************************/ static inline bool stm32_dma2d_lvalidate(FAR const struct stm32_dma2d_s *layer) { @@ -921,7 +921,7 @@ static bool stm32_dma2d_lvalidatesize(FAR const struct stm32_dma2d_s *layer, area->xres * area->yres); } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_linit * * Description: @@ -930,7 +930,7 @@ static bool stm32_dma2d_lvalidatesize(FAR const struct stm32_dma2d_s *layer, * Parameter: * * - ******************************************************************************/ + ****************************************************************************/ static void stm32_dma2d_linit(FAR struct stm32_dma2d_s *layer, int lid, uint8_t fmt) @@ -968,7 +968,7 @@ static void stm32_dma2d_linit(FAR struct stm32_dma2d_s *layer, layer->lock = &g_lock; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lfifo * * Description: @@ -992,7 +992,7 @@ static void stm32_dma2d_lfifo(FAR const struct stm32_dma2d_s *layer, int lid, putreg32(stm32_dma2d_lineoffset(layer, area), stm32_or_layer_t[lid]); } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lcolor * * Description: @@ -1010,7 +1010,7 @@ static void stm32_dma2d_lcolor(FAR const struct stm32_dma2d_s *layer, putreg32(color, stm32_color_layer_t[lid]); } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_llnr * * Description: @@ -1034,7 +1034,7 @@ static void stm32_dma2d_llnr(FAR struct stm32_dma2d_s *layer, putreg32(nlrreg, STM32_DMA2D_NLR); } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_loutpfc * * Description: @@ -1067,7 +1067,7 @@ static int stm32_dma2d_loutpfc(FAR const struct stm32_dma2d_s *layer) return OK; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2d_lpfc * * Description: @@ -1147,11 +1147,11 @@ static void stm32_dma2d_lpfc(FAR const struct stm32_dma2d_s *layer, putreg32(pfccrreg, stm32_pfccr_layer_t[lid]); } -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dgetvideoinfo * * Description: @@ -1165,7 +1165,7 @@ static void stm32_dma2d_lpfc(FAR const struct stm32_dma2d_s *layer, * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetvideoinfo(FAR struct dma2d_layer_s *layer, FAR struct fb_videoinfo_s *vinfo) @@ -1187,7 +1187,7 @@ static int stm32_dma2dgetvideoinfo(FAR struct dma2d_layer_s *layer, return -ENOSYS; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dgetplaneinfo * * Description: @@ -1202,7 +1202,7 @@ static int stm32_dma2dgetvideoinfo(FAR struct dma2d_layer_s *layer, * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetplaneinfo(FAR struct dma2d_layer_s *layer, int planeno, FAR struct fb_planeinfo_s *pinfo) @@ -1224,7 +1224,7 @@ static int stm32_dma2dgetplaneinfo(FAR struct dma2d_layer_s *layer, int planeno, return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dgetlid * * Description: @@ -1238,7 +1238,7 @@ static int stm32_dma2dgetplaneinfo(FAR struct dma2d_layer_s *layer, int planeno, * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetlid(FAR struct dma2d_layer_s *layer, int *lid) { @@ -1259,7 +1259,7 @@ static int stm32_dma2dgetlid(FAR struct dma2d_layer_s *layer, int *lid) } #ifdef CONFIG_STM32_DMA2D_L8 -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dsetclut * * Description: @@ -1274,7 +1274,7 @@ static int stm32_dma2dgetlid(FAR struct dma2d_layer_s *layer, int *lid) * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, const FAR struct fb_cmap_s *cmap) @@ -1378,7 +1378,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dgetclut * * Description: @@ -1393,7 +1393,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, FAR struct fb_cmap_s *cmap) @@ -1466,7 +1466,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, } #endif -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dsetalpha * * Description: @@ -1485,7 +1485,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, * On success - OK * On error - -EINVAL * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dsetalpha(FAR struct dma2d_layer_s *layer, uint8_t alpha) { @@ -1506,7 +1506,7 @@ static int stm32_dma2dsetalpha(FAR struct dma2d_layer_s *layer, uint8_t alpha) return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dgetalpha * * Description: @@ -1520,7 +1520,7 @@ static int stm32_dma2dsetalpha(FAR struct dma2d_layer_s *layer, uint8_t alpha) * On success - OK * On error - -EINVAL * - *****************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetalpha(FAR struct dma2d_layer_s *layer, uint8_t *alpha) { @@ -1541,7 +1541,7 @@ static int stm32_dma2dgetalpha(FAR struct dma2d_layer_s *layer, uint8_t *alpha) return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dsetblendmode * * Description: @@ -1570,7 +1570,7 @@ static int stm32_dma2dgetalpha(FAR struct dma2d_layer_s *layer, uint8_t *alpha) * the constant alpha value. This is only useful for ARGB8888 * color format. * - ******************************************************************************/ + ****************************************************************************/ static int stm32_dma2dsetblendmode(FAR struct dma2d_layer_s *layer, uint32_t mode) @@ -1592,7 +1592,7 @@ static int stm32_dma2dsetblendmode(FAR struct dma2d_layer_s *layer, return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_getblendmode * * Description: @@ -1606,7 +1606,7 @@ static int stm32_dma2dsetblendmode(FAR struct dma2d_layer_s *layer, * On success - OK * On error - -EINVAL * - *****************************************************************************/ + ****************************************************************************/ static int stm32_dma2dgetblendmode(FAR struct dma2d_layer_s *layer, uint32_t *mode) @@ -1628,7 +1628,7 @@ static int stm32_dma2dgetblendmode(FAR struct dma2d_layer_s *layer, return -EINVAL; } -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dblit * * Description: @@ -1927,7 +1927,7 @@ static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: up_dma2dgetlayer * * Description: @@ -1940,7 +1940,7 @@ static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, * Reference to the dma2d layer control structure on success or Null if no * related exist. * - ******************************************************************************/ + ****************************************************************************/ FAR struct dma2d_layer_s * up_dma2dgetlayer(int lid) { @@ -1959,7 +1959,7 @@ FAR struct dma2d_layer_s * up_dma2dgetlayer(int lid) return NULL; } -/****************************************************************************** +/**************************************************************************** * Name: up_dma2dcreatelayer * * Description: @@ -1977,7 +1977,7 @@ FAR struct dma2d_layer_s * up_dma2dgetlayer(int lid) * -ENOMEM if no memory available or exceeds * CONFIG_STM32_DMA2D_NLAYERS * - ******************************************************************************/ + ****************************************************************************/ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, fb_coord_t height, @@ -2088,7 +2088,7 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, return (FAR struct dma2d_layer_s *)layer; } -/****************************************************************************** +/**************************************************************************** * Name: up_dma2dremovelayer * * Description: @@ -2101,7 +2101,7 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, * On success - OK * On error - -EINVAL * - *****************************************************************************/ + ****************************************************************************/ int up_dma2dremovelayer(FAR struct dma2d_layer_s *layer) { @@ -2133,7 +2133,7 @@ int up_dma2dremovelayer(FAR struct dma2d_layer_s *layer) return ret; } -/****************************************************************************** +/**************************************************************************** * Name: up_dma2dinitialize * * Description: @@ -2143,7 +2143,7 @@ int up_dma2dremovelayer(FAR struct dma2d_layer_s *layer) * OK - On success * An error if initializing failed. * - ******************************************************************************/ + ****************************************************************************/ int up_dma2dinitialize(void) { @@ -2207,13 +2207,13 @@ int up_dma2dinitialize(void) return OK; } -/****************************************************************************** +/**************************************************************************** * Name: up_dma2duninitialize * * Description: * Uninitialize the dma2d controller * - ******************************************************************************/ + ****************************************************************************/ void up_dma2duninitialize(void) { @@ -2236,7 +2236,7 @@ void up_dma2duninitialize(void) } #ifdef CONFIG_STM32_LTDC_INTERFACE -/****************************************************************************** +/**************************************************************************** * Name: stm32_dma2dinitltdc * * Description: @@ -2256,7 +2256,7 @@ void up_dma2duninitialize(void) * On error - NULL and errno is set to * -EINVAL if one of the parameter is invalid * - ******************************************************************************/ + ****************************************************************************/ FAR struct dma2d_layer_s * stm32_dma2dinitltdc(FAR struct stm32_ltdc_s *layer) { diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/arch/arm/src/stm32/stm32_otgfsdev.c index 1da5733f6d1..2cee02f8acb 100644 --- a/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/arch/arm/src/stm32/stm32_otgfsdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/stm32/stm32_otgfsdev.c * * Copyright (C) 2012-2014 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -64,9 +64,9 @@ #if defined(CONFIG_USBDEV) && (defined(CONFIG_STM32_OTGFS)) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_USBDEV_EP0_MAXSIZE @@ -276,9 +276,9 @@ # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Overall device state */ @@ -466,9 +466,9 @@ struct stm32_usbdev_s struct stm32_ep_s epout[STM32_NENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -647,9 +647,9 @@ static int stm32_rxfifo_flush(void); static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv); static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. */ @@ -776,21 +776,21 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = }; #endif -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_getreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t stm32_getreg(uint32_t addr) @@ -846,13 +846,13 @@ static uint32_t stm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_putreg * * Description: * Set the contents of an STM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void stm32_putreg(uint32_t val, uint32_t addr) @@ -867,13 +867,13 @@ static void stm32_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_remfirst * * Description: * Remove a request from the head of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct stm32_req_s *stm32_req_remfirst(FAR struct stm32_ep_s *privep) { @@ -893,13 +893,13 @@ static FAR struct stm32_req_s *stm32_req_remfirst(FAR struct stm32_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_addlast * * Description: * Add a request to the end of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static bool stm32_req_addlast(FAR struct stm32_ep_s *privep, FAR struct stm32_req_s *req) @@ -920,13 +920,13 @@ static bool stm32_req_addlast(FAR struct stm32_ep_s *privep, return is_empty; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0in_setupresponse * * Description: * Schedule a short transfer on Endpoint 0 (IN or OUT) * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0in_setupresponse(FAR struct stm32_usbdev_s *priv, FAR uint8_t *buf, uint32_t nbytes) @@ -949,13 +949,13 @@ static inline void stm32_ep0in_transmitzlp(FAR struct stm32_usbdev_s *priv) stm32_ep0in_setupresponse(priv, NULL, 0); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0in_activate * * Description: * Activate the endpoint 0 IN endpoint. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0in_activate(void) { @@ -987,13 +987,13 @@ static void stm32_ep0in_activate(void) stm32_putreg(regval, STM32_OTGFS_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_ctrlsetup * * Description: * Setup to receive a SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0out_ctrlsetup(FAR struct stm32_usbdev_s *priv) { @@ -1376,13 +1376,13 @@ static void stm32_epin_request(FAR struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_read * * Description: * Read packet from the RxFIFO into a read request. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_rxfifo_read(FAR struct stm32_ep_s *privep, FAR uint8_t *dest, uint16_t len) @@ -1419,13 +1419,13 @@ static void stm32_rxfifo_read(FAR struct stm32_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_discard * * Description: * Discard packet data from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) { @@ -1450,7 +1450,7 @@ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_complete * * Description: @@ -1458,7 +1458,7 @@ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) * received. It completes the read request at the head of the endpoint's * request queue. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, FAR struct stm32_ep_s *privep) @@ -1499,7 +1499,7 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, stm32_epout_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_receive * * Description: @@ -1507,7 +1507,7 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) { @@ -1557,7 +1557,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_receive * * Description: @@ -1565,7 +1565,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) { @@ -1639,7 +1639,7 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) privreq->req.xfrd += readlen; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_request * * Description: @@ -1647,7 +1647,7 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) * (2) a pending receive request completes. If there is no read in pending, * then this function will initiate the next OUT (read) operation. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, FAR struct stm32_ep_s *privep) @@ -1778,13 +1778,13 @@ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_flush * * Description: * Flush any primed descriptors from this ep * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_flush(struct stm32_ep_s *privep) { @@ -1798,13 +1798,13 @@ static void stm32_ep_flush(struct stm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_complete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_req_complete(struct stm32_ep_s *privep, int16_t result) { @@ -1838,13 +1838,13 @@ static void stm32_req_complete(struct stm32_ep_s *privep, int16_t result) privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_cancel * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void stm32_req_cancel(struct stm32_ep_s *privep, int16_t status) { @@ -1861,14 +1861,14 @@ static void stm32_req_cancel(struct stm32_ep_s *privep, int16_t status) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_findbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct stm32_ep_s *stm32_ep_findbyaddr(struct stm32_usbdev_s *priv, uint16_t eplog) @@ -1898,14 +1898,14 @@ static struct stm32_ep_s *stm32_ep_findbyaddr(struct stm32_usbdev_s *priv, return privep; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_dispatch * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_req_dispatch(struct stm32_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1932,13 +1932,13 @@ static int stm32_req_dispatch(struct stm32_usbdev_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void stm32_usbreset(struct stm32_usbdev_s *priv) { @@ -2030,13 +2030,13 @@ static void stm32_usbreset(struct stm32_usbdev_s *priv) stm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_testmode * * Description: * Select test mode * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_testmode(FAR struct stm32_usbdev_s *priv, uint16_t index) @@ -2077,14 +2077,14 @@ static inline void stm32_ep0out_testmode(FAR struct stm32_usbdev_s *priv, stm32_ep0in_transmitzlp(priv); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_stdrequest * * Description: * Handle a stanard request on EP0. Pick off the things of interest to the * USB device controller driver; pass what is left to the class driver. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_stdrequest(struct stm32_usbdev_s *priv, FAR struct stm32_ctrlreq_s *ctrlreq) @@ -2445,14 +2445,14 @@ static inline void stm32_ep0out_stdrequest(struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) { @@ -2520,14 +2520,14 @@ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) priv->ep0datlen = 0; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout * * Description: * This is part of the OUT endpoint interrupt processing. This function * handles the OUT event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) { @@ -2572,7 +2572,7 @@ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_interrupt * * Description: @@ -2583,7 +2583,7 @@ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) * corresponding OTGFS DOEPINTx register to determine the exact cause of the * interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) { @@ -2706,13 +2706,13 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_runtestmode * * Description: * Execute the test mode setup by the SET FEATURE request * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin_runtestmode(FAR struct stm32_usbdev_s *priv) { @@ -2725,14 +2725,14 @@ static inline void stm32_epin_runtestmode(FAR struct stm32_usbdev_s *priv) priv->testmode = OTGFS_TESTMODE_DISABLED; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin * * Description: * This is part of the IN endpoint interrupt processing. This function * handles the IN event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin(FAR struct stm32_usbdev_s *priv, uint8_t epno) { @@ -2803,7 +2803,7 @@ static inline void stm32_epin_txfifoempty(FAR struct stm32_usbdev_s *priv, int e stm32_epin_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_interrupt * * Description: @@ -2813,7 +2813,7 @@ static inline void stm32_epin_txfifoempty(FAR struct stm32_usbdev_s *priv, int e * endpoint on which the interrupt occurred, and then read the corresponding * OTGFS DIEPINTx register to determine the exact cause of the interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) { @@ -3002,13 +3002,13 @@ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_resumeinterrupt * * Description: * Resume/remote wakeup detected interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_resumeinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3040,13 +3040,13 @@ static inline void stm32_resumeinterrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_suspendinterrupt * * Description: * USB suspend interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_suspendinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3095,14 +3095,14 @@ static inline void stm32_suspendinterrupt(FAR struct stm32_usbdev_s *priv) stm32_usbsuspend((FAR struct usbdev_s *)priv, false); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxinterrupt * * Description: * RxFIFO non-empty interrupt. This interrupt indicates that there is at * least one packet pending to be read from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3263,13 +3263,13 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) stm32_putreg(regval, STM32_OTGFS_GINTMSK); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_enuminterrupt * * Description: * Enumeration done interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3287,7 +3287,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) stm32_putreg(regval, STM32_OTGFS_GUSBCFG); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_isocininterrupt * * Description: @@ -3295,7 +3295,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) * isochronous IN transfer interrupt indicates an incomplete isochronous IN * transfer on at least one of the isochronous IN endpoints. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void stm32_isocininterrupt(FAR struct stm32_usbdev_s *priv) @@ -3360,13 +3360,13 @@ static inline void stm32_isocininterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_isocoutinterrupt * * Description: * Incomplete periodic transfer interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void stm32_isocoutinterrupt(FAR struct stm32_usbdev_s *priv) @@ -3442,13 +3442,13 @@ static inline void stm32_isocoutinterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_sessioninterrupt * * Description: * Session request/new session detected interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void stm32_sessioninterrupt(FAR struct stm32_usbdev_s *priv) @@ -3457,13 +3457,13 @@ static inline void stm32_sessioninterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_otginterrupt * * Description: * OTG interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void stm32_otginterrupt(FAR struct stm32_usbdev_s *priv) @@ -3484,13 +3484,13 @@ static inline void stm32_otginterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int stm32_usbinterrupt(int irq, FAR void *context) { @@ -3682,17 +3682,17 @@ static int stm32_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_enablegonak * * Description: * Enable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void stm32_enablegonak(FAR struct stm32_ep_s *privep) { @@ -3732,13 +3732,13 @@ static void stm32_enablegonak(FAR struct stm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: stm32_disablegonak * * Description: * Disable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) { @@ -3751,7 +3751,7 @@ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) stm32_putreg(regval, STM32_OTGFS_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_configure * * Description: @@ -3762,7 +3762,7 @@ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3846,7 +3846,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_configure * * Description: @@ -3857,7 +3857,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3944,7 +3944,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_configure * * Description: @@ -3957,7 +3957,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_configure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -3990,13 +3990,13 @@ static int stm32_ep_configure(FAR struct usbdev_ep_s *ep, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0_configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0_configure(FAR struct stm32_usbdev_s *priv) { @@ -4008,13 +4008,13 @@ static void stm32_ep0_configure(FAR struct stm32_usbdev_s *priv) CONFIG_USBDEV_EP0_MAXSIZE); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_disable * * Description: * Diable an OUT endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_disable(FAR struct stm32_ep_s *privep) { @@ -4078,13 +4078,13 @@ static void stm32_epout_disable(FAR struct stm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_disable * * Description: * Disable an IN endpoint when it will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epin_disable(FAR struct stm32_ep_s *privep) { @@ -4172,13 +4172,13 @@ static void stm32_epin_disable(FAR struct stm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_disable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) { @@ -4212,13 +4212,13 @@ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_allocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { @@ -4245,13 +4245,13 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_freereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4269,13 +4269,13 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_allocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -4290,13 +4290,13 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_freebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -4311,13 +4311,13 @@ static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_submit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4405,13 +4405,13 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_cancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4441,13 +4441,13 @@ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_setstall * * Description: * Stall an OUT endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epout_setstall(FAR struct stm32_ep_s *privep) { @@ -4513,13 +4513,13 @@ static int stm32_epout_setstall(FAR struct stm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_setstall * * Description: * Stall an IN endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epin_setstall(FAR struct stm32_ep_s *privep) { @@ -4542,13 +4542,13 @@ static int stm32_epin_setstall(FAR struct stm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_setstall * * Description: * Stall an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_setstall(FAR struct stm32_ep_s *privep) { @@ -4566,13 +4566,13 @@ static int stm32_ep_setstall(FAR struct stm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_clrstall * * Description: * Resume a stalled endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_clrstall(FAR struct stm32_ep_s *privep) { @@ -4625,13 +4625,13 @@ static int stm32_ep_clrstall(FAR struct stm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_stall * * Description: * Stall or resume an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -4655,13 +4655,13 @@ static int stm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0_stall * * Description: * Stall endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) { @@ -4671,11 +4671,11 @@ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) stm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_alloc * * Description: @@ -4689,7 +4689,7 @@ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *stm32_ep_alloc(FAR struct usbdev_s *dev, uint8_t eplog, bool in, @@ -4768,13 +4768,13 @@ static FAR struct usbdev_ep_s *stm32_ep_alloc(FAR struct usbdev_s *dev, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_free * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -4794,13 +4794,13 @@ static void stm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int stm32_getframe(struct usbdev_s *dev) { @@ -4814,13 +4814,13 @@ static int stm32_getframe(struct usbdev_s *dev) return (int)((regval & OTGFS_DSTS_SOFFN_MASK) >> OTGFS_DSTS_SOFFN_SHIFT); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_wakeup * * Description: * Exit suspend mode. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_wakeup(struct usbdev_s *dev) { @@ -4862,13 +4862,13 @@ static int stm32_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_selfpowered * * Description: * Sets/clears the device self-powered feature * - *******************************************************************************/ + ****************************************************************************/ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -4888,13 +4888,13 @@ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int stm32_pullup(struct usbdev_s *dev, bool enable) { @@ -4926,13 +4926,13 @@ static int stm32_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_setaddress * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static void stm32_setaddress(struct stm32_usbdev_s *priv, uint16_t address) { @@ -4961,13 +4961,13 @@ static void stm32_setaddress(struct stm32_usbdev_s *priv, uint16_t address) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_txfifo_flush * * Description: * Flush the specific TX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_txfifo_flush(uint32_t txfnum) { @@ -4996,13 +4996,13 @@ static int stm32_txfifo_flush(uint32_t txfnum) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_flush * * Description: * Flush the RX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_rxfifo_flush(void) { @@ -5030,13 +5030,13 @@ static int stm32_rxfifo_flush(void) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_swinitialize * * Description: * Initialize all driver data structures. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv) { @@ -5112,13 +5112,13 @@ static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hwinitialize * * Description: * Configure the OTG FS core for operation. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) { @@ -5367,11 +5367,11 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) STM32_OTGFS_GAHBCFG); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -5384,7 +5384,7 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -5477,9 +5477,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -5537,14 +5537,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -5607,7 +5607,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -5615,7 +5615,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index d717ce2eb01..e4d83b5109c 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/stm32/stm32_otgfshost.c * * Copyright (C) 2012-2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #if defined(CONFIG_USBHOST) && defined(CONFIG_STM32_OTGFS) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* * STM32 USB OTG FS Host Driver Support @@ -164,9 +164,9 @@ # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* The following enumeration represents the various states of the USB host * state machine (for debug purposes only) @@ -278,9 +278,9 @@ struct stm32_usbhost_s struct stm32_chan_s chan[STM32_MAX_TX_FIFOS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -469,9 +469,9 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv); static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv); static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global @@ -488,21 +488,21 @@ static struct usbhost_connection_s g_usbconn = .enumerate = stm32_enumerate, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_printreg * * Description: * Print the contents of an STM32xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -511,13 +511,13 @@ static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_checkreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -575,13 +575,13 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_getreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) @@ -597,13 +597,13 @@ static uint32_t stm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_putreg * * Description: * Set the contents of an STM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_putreg(uint32_t addr, uint32_t val) @@ -618,13 +618,13 @@ static void stm32_putreg(uint32_t addr, uint32_t val) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_modifyreg * * Description: * Modify selected bits of an STM32 register. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t setbits) { @@ -638,7 +638,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t set * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_takesem(sem_t *sem) { @@ -660,20 +660,20 @@ static void stm32_takesem(sem_t *sem) * Description: * Get a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ static inline uint16_t stm32_getle16(const uint8_t *val) { return (uint16_t)val[1] << 8 | (uint16_t)val[0]; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_alloc * * Description: * Allocate a channel. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_alloc(FAR struct stm32_usbhost_s *priv) { @@ -699,13 +699,13 @@ static int stm32_chan_alloc(FAR struct stm32_usbhost_s *priv) return -EBUSY; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_free * * Description: * Free a previoiusly allocated channel. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_free(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -720,13 +720,13 @@ static void stm32_chan_free(FAR struct stm32_usbhost_s *priv, int chidx) priv->chan[chidx].inuse = false; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_freeall * * Description: * Free all channels. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) { @@ -740,7 +740,7 @@ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_configure * * Description: @@ -748,7 +748,7 @@ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) * when endpoint is allocated and EP0 (only) is re-configured with the * max packet size or device address changes. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_configure(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -899,14 +899,14 @@ static void stm32_chan_configure(FAR struct stm32_usbhost_s *priv, int chidx) stm32_putreg(STM32_OTGFS_HCCHAR(chidx), regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_halt * * Description: * Halt the channel associated with 'chidx' by setting the CHannel DISable * (CHDIS) bit in in the HCCHAR register. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, enum stm32_chreason_e chreason) @@ -984,7 +984,7 @@ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, stm32_putreg(STM32_OTGFS_HCCHAR(chidx), hcchar); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_waitsetup * * Description: @@ -996,7 +996,7 @@ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * Called from a normal thread context BEFORE the transfer has been started. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1024,7 +1024,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_asynchsetup * * Description: @@ -1036,7 +1036,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, * Assumptions: * Might be called from the level of an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, @@ -1065,7 +1065,7 @@ static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_wait * * Description: @@ -1074,7 +1074,7 @@ static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, * Assumptions: * Called from a normal thread context * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1120,7 +1120,7 @@ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_wakeup * * Description: @@ -1131,7 +1131,7 @@ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, * This function is called from the transfer complete interrupt handler for * the channel. Interrupts are disabled. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1181,13 +1181,13 @@ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlchan_alloc * * Description: * Allocate and configured channels for a control pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, uint8_t epno, uint8_t funcaddr, uint8_t speed, @@ -1244,7 +1244,7 @@ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlep_alloc * * Description: @@ -1263,7 +1263,7 @@ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, FAR const struct usbhost_epdesc_s *epdesc, @@ -1377,13 +1377,13 @@ static int stm32_xfrep_alloc(FAR struct stm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_transfer_start * * Description: * Start at transfer on the select IN or OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -1567,7 +1567,7 @@ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_getframe * * Description: @@ -1575,7 +1575,7 @@ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) * when a new SOF is transmitted on the USB, and is cleared to 0 when it * reaches 0x3fff. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static inline uint16_t stm32_getframe(void) @@ -1584,13 +1584,13 @@ static inline uint16_t stm32_getframe(void) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_sendsetup * * Description: * Send an IN/OUT SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_sendsetup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1660,14 +1660,14 @@ static int stm32_ctrl_sendsetup(FAR struct stm32_usbhost_s *priv, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_senddata * * Description: * Send data in the data phase of an OUT control transfer. Or send status * in the status phase of an IN control transfer * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_senddata(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1713,14 +1713,14 @@ static int stm32_ctrl_senddata(FAR struct stm32_usbhost_s *priv, return stm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_recvdata * * Description: * Receive data in the data phase of an IN control transfer. Or receive status * in the status phase of an OUT control transfer * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_recvdata(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1754,13 +1754,13 @@ static int stm32_ctrl_recvdata(FAR struct stm32_usbhost_s *priv, return stm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_setup * * Description: * Initiate an IN transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_in_setup(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -1815,13 +1815,13 @@ static int stm32_in_setup(FAR struct stm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_transfer * * Description: * Transfer 'buflen' bytes into 'buffer' from an IN channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -1897,7 +1897,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return (ssize_t)chan->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_next * * Description: @@ -1906,7 +1906,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void stm32_in_next(FAR struct stm32_usbhost_s *priv, @@ -1962,7 +1962,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_asynch * * Description: @@ -1971,7 +1971,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, @@ -2009,13 +2009,13 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_setup * * Description: * Initiate an OUT transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_out_setup(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -2074,13 +2074,13 @@ static int stm32_out_setup(FAR struct stm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_transfer * * Description: * Transfer the 'buflen' bytes in 'buffer' through an OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -2183,7 +2183,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_next * * Description: @@ -2192,7 +2192,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void stm32_out_next(FAR struct stm32_usbhost_s *priv, @@ -2248,7 +2248,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_asynch * * Description: @@ -2257,7 +2257,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, @@ -2295,14 +2295,14 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_wrpacket * * Description: * Transfer the 'buflen' bytes in 'buffer' to the Tx FIFO associated with * 'chidx' (non-DMA). * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, FAR uint8_t *buffer, int chidx, int buflen) @@ -2335,7 +2335,7 @@ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, priv->chan[chidx].inflight += buflen; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcinisr * * Description: @@ -2352,7 +2352,7 @@ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, int chidx) @@ -2596,7 +2596,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, stm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcoutisr * * Description: @@ -2613,7 +2613,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, int chidx) @@ -2821,13 +2821,13 @@ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, stm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_connected * * Description: * Handle a connection event. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_connected(FAR struct stm32_usbhost_s *priv) { @@ -2853,13 +2853,13 @@ static void stm32_gint_connected(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_disconnected * * Description: * Handle a disconnection event. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_disconnected(FAR struct stm32_usbhost_s *priv) { @@ -2900,13 +2900,13 @@ static void stm32_gint_disconnected(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_sofisr * * Description: * USB OTG FS start-of-frame interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_OTGFS_SOFINTR static inline void stm32_gint_sofisr(FAR struct stm32_usbhost_s *priv) @@ -2920,13 +2920,13 @@ static inline void stm32_gint_sofisr(FAR struct stm32_usbhost_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_rxflvlisr * * Description: * USB OTG FS RxFIFO non-empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) { @@ -3021,13 +3021,13 @@ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGFS_GINTMSK, intmsk); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_nptxfeisr * * Description: * USB OTG FS non-periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) { @@ -3109,13 +3109,13 @@ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_ptxfeisr * * Description: * USB OTG FS periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) { @@ -3197,13 +3197,13 @@ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcisr * * Description: * USB OTG FS host channels interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcisr(FAR struct stm32_usbhost_s *priv) { @@ -3245,13 +3245,13 @@ static inline void stm32_gint_hcisr(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hprtisr * * Description: * USB OTG FS host port interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hprtisr(FAR struct stm32_usbhost_s *priv) { @@ -3378,13 +3378,13 @@ static inline void stm32_gint_hprtisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGFS_HPRT, newhprt); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_discisr * * Description: * USB OTG FS disconnect detected interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_discisr(FAR struct stm32_usbhost_s *priv) { @@ -3397,13 +3397,13 @@ static inline void stm32_gint_discisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGFS_GINTSTS, OTGFS_GINT_DISC); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_ipxfrisr * * Description: * USB OTG FS incomplete periodic interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_ipxfrisr(FAR struct stm32_usbhost_s *priv) { @@ -3422,13 +3422,13 @@ static inline void stm32_gint_ipxfrisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGFS_GINTSTS, OTGFS_GINT_IPXFR); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_isr * * Description: * USB OTG FS global interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int stm32_gint_isr(int irq, FAR void *context) { @@ -3539,7 +3539,7 @@ static int stm32_gint_isr(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_enable and stm32_gint_disable * * Description: @@ -3551,7 +3551,7 @@ static int stm32_gint_isr(int irq, FAR void *context) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_enable(void) { @@ -3575,7 +3575,7 @@ static void stm32_gint_disable(void) stm32_putreg(STM32_OTGFS_GAHBCFG, regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hostinit_enable * * Description: @@ -3587,7 +3587,7 @@ static void stm32_gint_disable(void) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_hostinit_enable(void) { @@ -3645,7 +3645,7 @@ static inline void stm32_hostinit_enable(void) stm32_putreg(STM32_OTGFS_GINTMSK, regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_txfe_enable * * Description: @@ -3665,7 +3665,7 @@ static inline void stm32_hostinit_enable(void) * Called from user task context. Interrupts must be disabled to assure * exclusive access to the GINTMSK register. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -3702,11 +3702,11 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_wait * * Description: @@ -3729,7 +3729,7 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3790,7 +3790,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_enumerate * * Description: @@ -3816,7 +3816,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_rh_enumerate(FAR struct stm32_usbhost_s *priv, FAR struct usbhost_connection_s *conn, @@ -4098,7 +4098,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_alloc * * Description: @@ -4128,7 +4128,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -4152,7 +4152,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_free * * Description: @@ -4173,7 +4173,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -4264,7 +4264,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlin and stm32_ctrlout * * Description: @@ -4297,7 +4297,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4471,7 +4471,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_transfer * * Description: @@ -4507,7 +4507,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4539,7 +4539,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep return nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_asynch * * Description: @@ -4572,7 +4572,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4745,7 +4745,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_disconnect * * Description: @@ -4768,7 +4768,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4777,10 +4777,10 @@ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: stm32_portreset * * Description: @@ -4798,7 +4798,7 @@ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) { @@ -4817,7 +4817,7 @@ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) up_mdelay(20); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_flush_txfifos * * Description: @@ -4829,7 +4829,7 @@ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_flush_txfifos(uint32_t txfnum) { @@ -4857,7 +4857,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_flush_rxfifo * * Description: @@ -4869,7 +4869,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_flush_rxfifo(void) { @@ -4896,7 +4896,7 @@ static void stm32_flush_rxfifo(void) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_vbusdrive * * Description: @@ -4909,7 +4909,7 @@ static void stm32_flush_rxfifo(void) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) { @@ -4939,7 +4939,7 @@ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) up_mdelay(200); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_host_initialize * * Description: @@ -4954,7 +4954,7 @@ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5028,7 +5028,7 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) stm32_hostinit_enable(); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_sw_initialize * * Description: @@ -5040,7 +5040,7 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5109,7 +5109,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hw_initialize * * Description: @@ -5121,7 +5121,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * Returned Value: * Zero on success; a negated errno value on failure. * - *******************************************************************************/ + ****************************************************************************/ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5196,11 +5196,11 @@ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_otgfshost_initialize * * Description: @@ -5223,7 +5223,7 @@ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *stm32_otgfshost_initialize(int controller) { diff --git a/arch/arm/src/stm32/stm32_otghsdev.c b/arch/arm/src/stm32/stm32_otghsdev.c index 86979fd3ed8..a69d4a7cd11 100644 --- a/arch/arm/src/stm32/stm32_otghsdev.c +++ b/arch/arm/src/stm32/stm32_otghsdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/stm32/stm32_otghsdev.c * * Copyright (C) 2012-2014 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -64,9 +64,9 @@ #if defined(CONFIG_USBDEV) && (defined(CONFIG_STM32_OTGHS)) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ #ifndef CONFIG_USBDEV_EP0_MAXSIZE @@ -276,9 +276,9 @@ # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* Overall device state */ @@ -466,9 +466,9 @@ struct stm32_usbdev_s struct stm32_ep_s epout[STM32_NENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -647,9 +647,9 @@ static int stm32_rxfifo_flush(void); static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv); static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. */ @@ -776,21 +776,21 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = }; #endif -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_getreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static uint32_t stm32_getreg(uint32_t addr) @@ -846,13 +846,13 @@ static uint32_t stm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_putreg * * Description: * Set the contents of an STM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) static void stm32_putreg(uint32_t val, uint32_t addr) @@ -867,13 +867,13 @@ static void stm32_putreg(uint32_t val, uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_remfirst * * Description: * Remove a request from the head of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct stm32_req_s *stm32_req_remfirst(FAR struct stm32_ep_s *privep) { @@ -893,13 +893,13 @@ static FAR struct stm32_req_s *stm32_req_remfirst(FAR struct stm32_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_addlast * * Description: * Add a request to the end of an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static bool stm32_req_addlast(FAR struct stm32_ep_s *privep, FAR struct stm32_req_s *req) @@ -920,13 +920,13 @@ static bool stm32_req_addlast(FAR struct stm32_ep_s *privep, return is_empty; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0in_setupresponse * * Description: * Schedule a short transfer on Endpoint 0 (IN or OUT) * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0in_setupresponse(FAR struct stm32_usbdev_s *priv, FAR uint8_t *buf, uint32_t nbytes) @@ -949,13 +949,13 @@ static inline void stm32_ep0in_transmitzlp(FAR struct stm32_usbdev_s *priv) stm32_ep0in_setupresponse(priv, NULL, 0); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0in_activate * * Description: * Activate the endpoint 0 IN endpoint. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0in_activate(void) { @@ -987,13 +987,13 @@ static void stm32_ep0in_activate(void) stm32_putreg(regval, STM32_OTGHS_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_ctrlsetup * * Description: * Setup to receive a SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0out_ctrlsetup(FAR struct stm32_usbdev_s *priv) { @@ -1376,13 +1376,13 @@ static void stm32_epin_request(FAR struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_read * * Description: * Read packet from the RxFIFO into a read request. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_rxfifo_read(FAR struct stm32_ep_s *privep, FAR uint8_t *dest, uint16_t len) @@ -1419,13 +1419,13 @@ static void stm32_rxfifo_read(FAR struct stm32_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_discard * * Description: * Discard packet data from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) { @@ -1450,7 +1450,7 @@ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_complete * * Description: @@ -1458,7 +1458,7 @@ static void stm32_rxfifo_discard(FAR struct stm32_ep_s *privep, int len) * received. It completes the read request at the head of the endpoint's * request queue. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, FAR struct stm32_ep_s *privep) @@ -1499,7 +1499,7 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, stm32_epout_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_receive * * Description: @@ -1507,7 +1507,7 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) { @@ -1557,7 +1557,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_receive * * Description: @@ -1565,7 +1565,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) * data is available in the endpoint's RxFIFO. This function will simply * copy the incoming data into pending request's data buffer. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) { @@ -1639,7 +1639,7 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) privreq->req.xfrd += readlen; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_request * * Description: @@ -1647,7 +1647,7 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) * (2) a pending receive request completes. If there is no read in pending, * then this function will initiate the next OUT (read) operation. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, FAR struct stm32_ep_s *privep) @@ -1778,13 +1778,13 @@ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_flush * * Description: * Flush any primed descriptors from this ep * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_flush(struct stm32_ep_s *privep) { @@ -1798,13 +1798,13 @@ static void stm32_ep_flush(struct stm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_complete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_req_complete(struct stm32_ep_s *privep, int16_t result) { @@ -1838,13 +1838,13 @@ static void stm32_req_complete(struct stm32_ep_s *privep, int16_t result) privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_cancel * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void stm32_req_cancel(struct stm32_ep_s *privep, int16_t status) { @@ -1861,14 +1861,14 @@ static void stm32_req_cancel(struct stm32_ep_s *privep, int16_t status) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_findbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct stm32_ep_s *stm32_ep_findbyaddr(struct stm32_usbdev_s *priv, uint16_t eplog) @@ -1898,14 +1898,14 @@ static struct stm32_ep_s *stm32_ep_findbyaddr(struct stm32_usbdev_s *priv, return privep; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_req_dispatch * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_req_dispatch(struct stm32_usbdev_s *priv, const struct usb_ctrlreq_s *ctrl) @@ -1932,13 +1932,13 @@ static int stm32_req_dispatch(struct stm32_usbdev_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void stm32_usbreset(struct stm32_usbdev_s *priv) { @@ -2030,13 +2030,13 @@ static void stm32_usbreset(struct stm32_usbdev_s *priv) stm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_testmode * * Description: * Select test mode * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_testmode(FAR struct stm32_usbdev_s *priv, uint16_t index) @@ -2077,14 +2077,14 @@ static inline void stm32_ep0out_testmode(FAR struct stm32_usbdev_s *priv, stm32_ep0in_transmitzlp(priv); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_stdrequest * * Description: * Handle a stanard request on EP0. Pick off the things of interest to the * USB device controller driver; pass what is left to the class driver. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_stdrequest(struct stm32_usbdev_s *priv, FAR struct stm32_ctrlreq_s *ctrlreq) @@ -2445,14 +2445,14 @@ static inline void stm32_ep0out_stdrequest(struct stm32_usbdev_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0out_setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) { @@ -2520,14 +2520,14 @@ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) priv->ep0datlen = 0; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout * * Description: * This is part of the OUT endpoint interrupt processing. This function * handles the OUT event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) { @@ -2572,7 +2572,7 @@ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_interrupt * * Description: @@ -2583,7 +2583,7 @@ static inline void stm32_epout(FAR struct stm32_usbdev_s *priv, uint8_t epno) * corresponding OTGHS DOEPINTx register to determine the exact cause of the * interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) { @@ -2706,13 +2706,13 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_runtestmode * * Description: * Execute the test mode setup by the SET FEATURE request * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin_runtestmode(FAR struct stm32_usbdev_s *priv) { @@ -2725,14 +2725,14 @@ static inline void stm32_epin_runtestmode(FAR struct stm32_usbdev_s *priv) priv->testmode = OTGHS_TESTMODE_DISABLED; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin * * Description: * This is part of the IN endpoint interrupt processing. This function * handles the IN event for a single endpoint. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin(FAR struct stm32_usbdev_s *priv, uint8_t epno) { @@ -2803,7 +2803,7 @@ static inline void stm32_epin_txfifoempty(FAR struct stm32_usbdev_s *priv, int e stm32_epin_request(priv, privep); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_interrupt * * Description: @@ -2813,7 +2813,7 @@ static inline void stm32_epin_txfifoempty(FAR struct stm32_usbdev_s *priv, int e * endpoint on which the interrupt occurred, and then read the corresponding * OTGHS DIEPINTx register to determine the exact cause of the interrupt. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) { @@ -3002,13 +3002,13 @@ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_resumeinterrupt * * Description: * Resume/remote wakeup detected interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_resumeinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3040,13 +3040,13 @@ static inline void stm32_resumeinterrupt(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_suspendinterrupt * * Description: * USB suspend interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_suspendinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3095,14 +3095,14 @@ static inline void stm32_suspendinterrupt(FAR struct stm32_usbdev_s *priv) stm32_usbsuspend((FAR struct usbdev_s *)priv, false); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxinterrupt * * Description: * RxFIFO non-empty interrupt. This interrupt indicates that there is at * least one packet pending to be read from the RxFIFO. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3263,13 +3263,13 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) stm32_putreg(regval, STM32_OTGHS_GINTMSK); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_enuminterrupt * * Description: * Enumeration done interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) { @@ -3287,7 +3287,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) stm32_putreg(regval, STM32_OTGHS_GUSBCFG); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_isocininterrupt * * Description: @@ -3295,7 +3295,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) * isochronous IN transfer interrupt indicates an incomplete isochronous IN * transfer on at least one of the isochronous IN endpoints. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void stm32_isocininterrupt(FAR struct stm32_usbdev_s *priv) @@ -3360,13 +3360,13 @@ static inline void stm32_isocininterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_isocoutinterrupt * * Description: * Incomplete periodic transfer interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_ISOCHRONOUS static inline void stm32_isocoutinterrupt(FAR struct stm32_usbdev_s *priv) @@ -3442,13 +3442,13 @@ static inline void stm32_isocoutinterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_sessioninterrupt * * Description: * Session request/new session detected interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void stm32_sessioninterrupt(FAR struct stm32_usbdev_s *priv) @@ -3457,13 +3457,13 @@ static inline void stm32_sessioninterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_otginterrupt * * Description: * OTG interrupt * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_VBUSSENSING static inline void stm32_otginterrupt(FAR struct stm32_usbdev_s *priv) @@ -3484,13 +3484,13 @@ static inline void stm32_otginterrupt(FAR struct stm32_usbdev_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_usbinterrupt * * Description: * USB interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int stm32_usbinterrupt(int irq, FAR void *context) { @@ -3682,17 +3682,17 @@ static int stm32_usbinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Endpoint operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_enablegonak * * Description: * Enable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void stm32_enablegonak(FAR struct stm32_ep_s *privep) { @@ -3732,13 +3732,13 @@ static void stm32_enablegonak(FAR struct stm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: stm32_disablegonak * * Description: * Disable global OUT NAK mode * - *******************************************************************************/ + ****************************************************************************/ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) { @@ -3751,7 +3751,7 @@ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) stm32_putreg(regval, STM32_OTGHS_DCTL); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_configure * * Description: @@ -3762,7 +3762,7 @@ static void stm32_disablegonak(FAR struct stm32_ep_s *privep) * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3846,7 +3846,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_configure * * Description: @@ -3857,7 +3857,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, * eptype - The type of the endpoint * maxpacket - The max packet size of the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, uint16_t maxpacket) @@ -3944,7 +3944,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_configure * * Description: @@ -3957,7 +3957,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_configure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, @@ -3990,13 +3990,13 @@ static int stm32_ep_configure(FAR struct usbdev_ep_s *ep, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0_configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0_configure(FAR struct stm32_usbdev_s *priv) { @@ -4008,13 +4008,13 @@ static void stm32_ep0_configure(FAR struct stm32_usbdev_s *priv) CONFIG_USBDEV_EP0_MAXSIZE); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_disable * * Description: * Diable an OUT endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epout_disable(FAR struct stm32_ep_s *privep) { @@ -4078,13 +4078,13 @@ static void stm32_epout_disable(FAR struct stm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_disable * * Description: * Disable an IN endpoint when it will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static void stm32_epin_disable(FAR struct stm32_ep_s *privep) { @@ -4172,13 +4172,13 @@ static void stm32_epin_disable(FAR struct stm32_ep_s *privep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_disable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) { @@ -4212,13 +4212,13 @@ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_allocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { @@ -4245,13 +4245,13 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_freereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4269,13 +4269,13 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_allocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -4290,13 +4290,13 @@ static void *stm32_ep_allocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_freebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -4311,13 +4311,13 @@ static void stm32_ep_freebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_submit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4405,13 +4405,13 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_cancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) { @@ -4441,13 +4441,13 @@ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epout_setstall * * Description: * Stall an OUT endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epout_setstall(FAR struct stm32_ep_s *privep) { @@ -4513,13 +4513,13 @@ static int stm32_epout_setstall(FAR struct stm32_ep_s *privep) #endif } -/******************************************************************************* +/**************************************************************************** * Name: stm32_epin_setstall * * Description: * Stall an IN endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_epin_setstall(FAR struct stm32_ep_s *privep) { @@ -4542,13 +4542,13 @@ static int stm32_epin_setstall(FAR struct stm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_setstall * * Description: * Stall an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_setstall(FAR struct stm32_ep_s *privep) { @@ -4566,13 +4566,13 @@ static int stm32_ep_setstall(FAR struct stm32_ep_s *privep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_clrstall * * Description: * Resume a stalled endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_clrstall(FAR struct stm32_ep_s *privep) { @@ -4625,13 +4625,13 @@ static int stm32_ep_clrstall(FAR struct stm32_ep_s *privep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_stall * * Description: * Stall or resume an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -4655,13 +4655,13 @@ static int stm32_ep_stall(FAR struct usbdev_ep_s *ep, bool resume) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0_stall * * Description: * Stall endpoint 0 * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) { @@ -4671,11 +4671,11 @@ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) stm32_ep0out_ctrlsetup(priv); } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_alloc * * Description: @@ -4689,7 +4689,7 @@ static void stm32_ep0_stall(FAR struct stm32_usbdev_s *priv) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *stm32_ep_alloc(FAR struct usbdev_s *dev, uint8_t eplog, bool in, @@ -4768,13 +4768,13 @@ static FAR struct usbdev_ep_s *stm32_ep_alloc(FAR struct usbdev_s *dev, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep_free * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void stm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -4794,13 +4794,13 @@ static void stm32_ep_free(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int stm32_getframe(struct usbdev_s *dev) { @@ -4814,13 +4814,13 @@ static int stm32_getframe(struct usbdev_s *dev) return (int)((regval & OTGHS_DSTS_SOFFN_MASK) >> OTGHS_DSTS_SOFFN_SHIFT); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_wakeup * * Description: * Exit suspend mode. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_wakeup(struct usbdev_s *dev) { @@ -4862,13 +4862,13 @@ static int stm32_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_selfpowered * * Description: * Sets/clears the device self-powered feature * - *******************************************************************************/ + ****************************************************************************/ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -4888,13 +4888,13 @@ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int stm32_pullup(struct usbdev_s *dev, bool enable) { @@ -4926,13 +4926,13 @@ static int stm32_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_setaddress * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static void stm32_setaddress(struct stm32_usbdev_s *priv, uint16_t address) { @@ -4961,13 +4961,13 @@ static void stm32_setaddress(struct stm32_usbdev_s *priv, uint16_t address) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_txfifo_flush * * Description: * Flush the specific TX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_txfifo_flush(uint32_t txfnum) { @@ -4996,13 +4996,13 @@ static int stm32_txfifo_flush(uint32_t txfnum) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_rxfifo_flush * * Description: * Flush the RX fifo. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_rxfifo_flush(void) { @@ -5030,13 +5030,13 @@ static int stm32_rxfifo_flush(void) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_swinitialize * * Description: * Initialize all driver data structures. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv) { @@ -5112,13 +5112,13 @@ static void stm32_swinitialize(FAR struct stm32_usbdev_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hwinitialize * * Description: * Configure the OTG HS core for operation. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) { @@ -5356,11 +5356,11 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) STM32_OTGHS_GAHBCFG); } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -5373,7 +5373,7 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -5466,9 +5466,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbhsuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -5526,14 +5526,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -5596,7 +5596,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -5604,7 +5604,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 3d7340ca904..3a909597ceb 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/stm32/stm32_otghshost.c * * Copyright (C) 2012-2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -69,9 +69,9 @@ #if defined(CONFIG_USBHOST) && defined(CONFIG_STM32_OTGHS) -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* * STM32 USB OTG HS Host Driver Support @@ -164,9 +164,9 @@ # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* The following enumeration represents the various states of the USB host * state machine (for debug purposes only) @@ -278,9 +278,9 @@ struct stm32_usbhost_s struct stm32_chan_s chan[STM32_MAX_TX_FIFOS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Register operations ********************************************************/ @@ -469,9 +469,9 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv); static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv); static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* In this driver implementation, support is provided for only a single a single * USB device. All status information can be simply retained in a single global @@ -488,21 +488,21 @@ static struct usbhost_connection_s g_usbconn = .enumerate = stm32_enumerate, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_printreg * * Description: * Print the contents of an STM32xx register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -511,13 +511,13 @@ static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_checkreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -575,13 +575,13 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_getreg * * Description: * Get the contents of an STM32 register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) @@ -597,13 +597,13 @@ static uint32_t stm32_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_putreg * * Description: * Set the contents of an STM32 register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_putreg(uint32_t addr, uint32_t val) @@ -618,13 +618,13 @@ static void stm32_putreg(uint32_t addr, uint32_t val) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_modifyreg * * Description: * Modify selected bits of an STM32 register. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t setbits) { @@ -638,7 +638,7 @@ static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits, uint32_t set * This is just a wrapper to handle the annoying behavior of semaphore * waits that return due to the receipt of a signal. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_takesem(sem_t *sem) { @@ -660,20 +660,20 @@ static void stm32_takesem(sem_t *sem) * Description: * Get a (possibly unaligned) 16-bit little endian value. * - *******************************************************************************/ + ****************************************************************************/ static inline uint16_t stm32_getle16(const uint8_t *val) { return (uint16_t)val[1] << 8 | (uint16_t)val[0]; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_alloc * * Description: * Allocate a channel. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_alloc(FAR struct stm32_usbhost_s *priv) { @@ -699,13 +699,13 @@ static int stm32_chan_alloc(FAR struct stm32_usbhost_s *priv) return -EBUSY; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_free * * Description: * Free a previoiusly allocated channel. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_free(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -720,13 +720,13 @@ static void stm32_chan_free(FAR struct stm32_usbhost_s *priv, int chidx) priv->chan[chidx].inuse = false; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_freeall * * Description: * Free all channels. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) { @@ -740,7 +740,7 @@ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_configure * * Description: @@ -748,7 +748,7 @@ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) * when endpoint is allocated and EP0 (only) is re-configured with the * max packet size or device address changes. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_configure(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -899,14 +899,14 @@ static void stm32_chan_configure(FAR struct stm32_usbhost_s *priv, int chidx) stm32_putreg(STM32_OTGHS_HCCHAR(chidx), regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_halt * * Description: * Halt the channel associated with 'chidx' by setting the CHannel DISable * (CHDIS) bit in in the HCCHAR register. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, enum stm32_chreason_e chreason) @@ -984,7 +984,7 @@ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, stm32_putreg(STM32_OTGHS_HCCHAR(chidx), hcchar); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_waitsetup * * Description: @@ -996,7 +996,7 @@ static void stm32_chan_halt(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * Called from a normal thread context BEFORE the transfer has been started. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1024,7 +1024,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_asynchsetup * * Description: @@ -1036,7 +1036,7 @@ static int stm32_chan_waitsetup(FAR struct stm32_usbhost_s *priv, * Assumptions: * Might be called from the level of an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, @@ -1065,7 +1065,7 @@ static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_wait * * Description: @@ -1074,7 +1074,7 @@ static int stm32_chan_asynchsetup(FAR struct stm32_usbhost_s *priv, * Assumptions: * Called from a normal thread context * - *******************************************************************************/ + ****************************************************************************/ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1120,7 +1120,7 @@ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_chan_wakeup * * Description: @@ -1131,7 +1131,7 @@ static int stm32_chan_wait(FAR struct stm32_usbhost_s *priv, * This function is called from the transfer complete interrupt handler for * the channel. Interrupts are disabled. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_chan_s *chan) @@ -1181,13 +1181,13 @@ static void stm32_chan_wakeup(FAR struct stm32_usbhost_s *priv, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlchan_alloc * * Description: * Allocate and configured channels for a control pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, uint8_t epno, uint8_t funcaddr, uint8_t speed, @@ -1244,7 +1244,7 @@ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlep_alloc * * Description: @@ -1263,7 +1263,7 @@ static int stm32_ctrlchan_alloc(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, FAR const struct usbhost_epdesc_s *epdesc, @@ -1377,13 +1377,13 @@ static int stm32_xfrep_alloc(FAR struct stm32_usbhost_s *priv, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_transfer_start * * Description: * Start at transfer on the select IN or OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -1567,7 +1567,7 @@ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_getframe * * Description: @@ -1575,7 +1575,7 @@ static void stm32_transfer_start(FAR struct stm32_usbhost_s *priv, int chidx) * when a new SOF is transmitted on the USB, and is cleared to 0 when it * reaches 0x3fff. * - *******************************************************************************/ + ****************************************************************************/ #if 0 /* Not used */ static inline uint16_t stm32_getframe(void) @@ -1584,13 +1584,13 @@ static inline uint16_t stm32_getframe(void) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_sendsetup * * Description: * Send an IN/OUT SETUP packet. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_sendsetup(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1660,14 +1660,14 @@ static int stm32_ctrl_sendsetup(FAR struct stm32_usbhost_s *priv, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_senddata * * Description: * Send data in the data phase of an OUT control transfer. Or send status * in the status phase of an IN control transfer * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_senddata(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1713,14 +1713,14 @@ static int stm32_ctrl_senddata(FAR struct stm32_usbhost_s *priv, return stm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrl_recvdata * * Description: * Receive data in the data phase of an IN control transfer. Or receive status * in the status phase of an OUT control transfer * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrl_recvdata(FAR struct stm32_usbhost_s *priv, FAR struct stm32_ctrlinfo_s *ep0, @@ -1754,13 +1754,13 @@ static int stm32_ctrl_recvdata(FAR struct stm32_usbhost_s *priv, return stm32_chan_wait(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_setup * * Description: * Initiate an IN transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_in_setup(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -1815,13 +1815,13 @@ static int stm32_in_setup(FAR struct stm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_transfer * * Description: * Transfer 'buflen' bytes into 'buffer' from an IN channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -1897,7 +1897,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return (ssize_t)chan->xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_next * * Description: @@ -1906,7 +1906,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void stm32_in_next(FAR struct stm32_usbhost_s *priv, @@ -1962,7 +1962,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_in_asynch * * Description: @@ -1971,7 +1971,7 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, @@ -2009,13 +2009,13 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_setup * * Description: * Initiate an OUT transfer on an bulk, interrupt, or isochronous pipe. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_out_setup(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -2074,13 +2074,13 @@ static int stm32_out_setup(FAR struct stm32_usbhost_s *priv, int chidx) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_transfer * * Description: * Transfer the 'buflen' bytes in 'buffer' through an OUT channel. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, FAR uint8_t *buffer, size_t buflen) @@ -2183,7 +2183,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return xfrd; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_next * * Description: @@ -2192,7 +2192,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, * Assumptions: * This function is always called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static void stm32_out_next(FAR struct stm32_usbhost_s *priv, @@ -2248,7 +2248,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_out_asynch * * Description: @@ -2257,7 +2257,7 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, * Assumptions: * This function is never called from an interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, @@ -2295,14 +2295,14 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_wrpacket * * Description: * Transfer the 'buflen' bytes in 'buffer' to the Tx FIFO associated with * 'chidx' (non-DMA). * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, FAR uint8_t *buffer, int chidx, int buflen) @@ -2335,7 +2335,7 @@ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, priv->chan[chidx].inflight += buflen; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcinisr * * Description: @@ -2352,7 +2352,7 @@ static void stm32_gint_wrpacket(FAR struct stm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, int chidx) @@ -2596,7 +2596,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, stm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcoutisr * * Description: @@ -2613,7 +2613,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, * * EBUSY in the result field indicates that the transfer has not completed. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, int chidx) @@ -2821,13 +2821,13 @@ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, stm32_chan_wakeup(priv, chan); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_connected * * Description: * Handle a connection event. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_connected(FAR struct stm32_usbhost_s *priv) { @@ -2853,13 +2853,13 @@ static void stm32_gint_connected(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_disconnected * * Description: * Handle a disconnection event. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_disconnected(FAR struct stm32_usbhost_s *priv) { @@ -2900,13 +2900,13 @@ static void stm32_gint_disconnected(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_sofisr * * Description: * USB OTG HS start-of-frame interrupt handler * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32_OTGHS_SOFINTR static inline void stm32_gint_sofisr(FAR struct stm32_usbhost_s *priv) @@ -2920,13 +2920,13 @@ static inline void stm32_gint_sofisr(FAR struct stm32_usbhost_s *priv) } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_rxflvlisr * * Description: * USB OTG HS RxFIFO non-empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) { @@ -3021,13 +3021,13 @@ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGHS_GINTMSK, intmsk); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_nptxfeisr * * Description: * USB OTG HS non-periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) { @@ -3109,13 +3109,13 @@ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_ptxfeisr * * Description: * USB OTG HS periodic TxFIFO empty interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) { @@ -3197,13 +3197,13 @@ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hcisr * * Description: * USB OTG HS host channels interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hcisr(FAR struct stm32_usbhost_s *priv) { @@ -3245,13 +3245,13 @@ static inline void stm32_gint_hcisr(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_hprtisr * * Description: * USB OTG HS host port interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_hprtisr(FAR struct stm32_usbhost_s *priv) { @@ -3378,13 +3378,13 @@ static inline void stm32_gint_hprtisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGHS_HPRT, newhprt); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_discisr * * Description: * USB OTG HS disconnect detected interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_discisr(FAR struct stm32_usbhost_s *priv) { @@ -3397,13 +3397,13 @@ static inline void stm32_gint_discisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGHS_GINTSTS, OTGHS_GINT_DISC); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_ipxfrisr * * Description: * USB OTG HS incomplete periodic interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_gint_ipxfrisr(FAR struct stm32_usbhost_s *priv) { @@ -3422,13 +3422,13 @@ static inline void stm32_gint_ipxfrisr(FAR struct stm32_usbhost_s *priv) stm32_putreg(STM32_OTGHS_GINTSTS, OTGHS_GINT_IPXFR); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_isr * * Description: * USB OTG HS global interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int stm32_gint_isr(int irq, FAR void *context) { @@ -3539,7 +3539,7 @@ static int stm32_gint_isr(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_gint_enable and stm32_gint_disable * * Description: @@ -3551,7 +3551,7 @@ static int stm32_gint_isr(int irq, FAR void *context) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void stm32_gint_enable(void) { @@ -3575,7 +3575,7 @@ static void stm32_gint_disable(void) stm32_putreg(STM32_OTGHS_GAHBCFG, regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hostinit_enable * * Description: @@ -3587,7 +3587,7 @@ static void stm32_gint_disable(void) * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_hostinit_enable(void) { @@ -3645,7 +3645,7 @@ static inline void stm32_hostinit_enable(void) stm32_putreg(STM32_OTGHS_GINTMSK, regval); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_txfe_enable * * Description: @@ -3665,7 +3665,7 @@ static inline void stm32_hostinit_enable(void) * Called from user task context. Interrupts must be disabled to assure * exclusive access to the GINTMSK register. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) { @@ -3702,11 +3702,11 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * USB Host Controller Operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_wait * * Description: @@ -3729,7 +3729,7 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_wait(FAR struct usbhost_connection_s *conn, FAR struct usbhost_hubport_s **hport) @@ -3790,7 +3790,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_enumerate * * Description: @@ -3816,7 +3816,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, * Assumptions: * This function will *not* be called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_rh_enumerate(FAR struct stm32_usbhost_s *priv, FAR struct usbhost_connection_s *conn, @@ -4098,7 +4098,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_alloc * * Description: @@ -4128,7 +4128,7 @@ static int stm32_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, FAR uint8_t **buffer, FAR size_t *maxlen) @@ -4152,7 +4152,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_free * * Description: @@ -4173,7 +4173,7 @@ static int stm32_alloc(FAR struct usbhost_driver_s *drvr, * Assumptions: * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_free(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) { @@ -4264,7 +4264,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ctrlin and stm32_ctrlout * * Description: @@ -4297,7 +4297,7 @@ static int stm32_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer) * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static int stm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, FAR const struct usb_ctrlreq_s *req, @@ -4471,7 +4471,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, return -ETIMEDOUT; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_transfer * * Description: @@ -4507,7 +4507,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, FAR uint8_t *buffer, size_t buflen) @@ -4539,7 +4539,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep return nbytes; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_asynch * * Description: @@ -4572,7 +4572,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep * - Called from a single thread so no mutual exclusion is required. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBHOST_ASYNCH static int stm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, @@ -4745,7 +4745,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, } #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_disconnect * * Description: @@ -4768,7 +4768,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, * - Only a single class bound to a single device is supported. * - Never called from an interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_hubport_s *hport) @@ -4777,10 +4777,10 @@ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, hport->devclass = NULL; } -/******************************************************************************* +/**************************************************************************** * Initialization - *******************************************************************************/ -/******************************************************************************* + ****************************************************************************/ +/**************************************************************************** * Name: stm32_portreset * * Description: @@ -4798,7 +4798,7 @@ static void stm32_disconnect(FAR struct usbhost_driver_s *drvr, * Returned Value: * None * - *******************************************************************************/ + ****************************************************************************/ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) { @@ -4817,7 +4817,7 @@ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) up_mdelay(20); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_flush_txfifos * * Description: @@ -4829,7 +4829,7 @@ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_flush_txfifos(uint32_t txfnum) { @@ -4857,7 +4857,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_flush_rxfifo * * Description: @@ -4869,7 +4869,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_flush_rxfifo(void) { @@ -4896,7 +4896,7 @@ static void stm32_flush_rxfifo(void) up_udelay(3); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_vbusdrive * * Description: @@ -4909,7 +4909,7 @@ static void stm32_flush_rxfifo(void) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) { @@ -4939,7 +4939,7 @@ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) up_mdelay(200); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_host_initialize * * Description: @@ -4954,7 +4954,7 @@ static void stm32_vbusdrive(FAR struct stm32_usbhost_s *priv, bool state) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5028,7 +5028,7 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) stm32_hostinit_enable(); } -/******************************************************************************* +/**************************************************************************** * Name: stm32_sw_initialize * * Description: @@ -5040,7 +5040,7 @@ static void stm32_host_initialize(FAR struct stm32_usbhost_s *priv) * Returned Value: * None. * - *******************************************************************************/ + ****************************************************************************/ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5109,7 +5109,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) } } -/******************************************************************************* +/**************************************************************************** * Name: stm32_hw_initialize * * Description: @@ -5121,7 +5121,7 @@ static inline void stm32_sw_initialize(FAR struct stm32_usbhost_s *priv) * Returned Value: * Zero on success; a negated errno value on failure. * - *******************************************************************************/ + ****************************************************************************/ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) { @@ -5196,11 +5196,11 @@ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_otghshost_initialize * * Description: @@ -5223,7 +5223,7 @@ static inline int stm32_hw_initialize(FAR struct stm32_usbhost_s *priv) * - Class drivers should be initialized prior to calling this function. * Otherwise, there is a race condition if the device is already connected. * - *******************************************************************************/ + ****************************************************************************/ FAR struct usbhost_connection_s *stm32_otghshost_initialize(int controller) { diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index b2a48800fd2..0a82446b295 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/arch/arm/src/stm32/stm32_usbdev.c @@ -1324,7 +1324,7 @@ static void stm32_epwrite(struct stm32_usbdev_s *priv, * Description: * Handle the ep0 state on writes. * - *****************************************************************************/ + ****************************************************************************/ inline static int stm32_wrrequest_ep0(struct stm32_usbdev_s *priv, struct stm32_ep_s *privep) @@ -1438,7 +1438,7 @@ static int stm32_wrrequest(struct stm32_usbdev_s *priv, struct stm32_ep_s *prive return OK; } -/******************************************************************************* +/**************************************************************************** * Name: stm32_ep0_rdrequest * * Description: @@ -1446,7 +1446,7 @@ static int stm32_wrrequest(struct stm32_usbdev_s *priv, struct stm32_ep_s *prive * is EP0STATE_SETUP_OUT and uppon new incoming data is available in the endpoint * 0's buffer. This function will simply copy the OUT data into ep0data. * - *******************************************************************************/ + ****************************************************************************/ static inline int stm32_ep0_rdrequest(struct stm32_usbdev_s *priv) { diff --git a/arch/arm/src/tiva/tiva_adclib.c b/arch/arm/src/tiva/tiva_adclib.c index f003000edb4..9254f031287 100644 --- a/arch/arm/src/tiva/tiva_adclib.c +++ b/arch/arm/src/tiva/tiva_adclib.c @@ -44,7 +44,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This is part of revision 2.1.0.12573 of the Tiva Peripheral Driver Library. - *****************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Included Files diff --git a/arch/arm/src/tiva/tiva_adclow.c b/arch/arm/src/tiva/tiva_adclow.c index dca7e5487c9..3fe4772976e 100644 --- a/arch/arm/src/tiva/tiva_adclow.c +++ b/arch/arm/src/tiva/tiva_adclow.c @@ -44,7 +44,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This is part of revision 2.1.0.12573 of the Tiva Peripheral Driver Library. - *****************************************************************************/ + ****************************************************************************/ /* Keep in mind that for every step there should be another entry in the * CONFIG_ADC_FIFOSIZE value. diff --git a/arch/avr/src/at32uc3/at32uc3_lowconsole.c b/arch/avr/src/at32uc3/at32uc3_lowconsole.c index 86e66143b47..4e6f4240faa 100644 --- a/arch/avr/src/at32uc3/at32uc3_lowconsole.c +++ b/arch/avr/src/at32uc3/at32uc3_lowconsole.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/avr/src/at32uc3/at32uc3_lowconsole.c * * Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include #include "at32uc3_config.h" @@ -53,9 +53,9 @@ #include "at32uc3_usart.h" #include "at32uc3_pinmux.h" -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* Select USART parameters for the selected console */ @@ -81,33 +81,33 @@ # error "No CONFIG_USARTn_SERIAL_CONSOLE Setting" #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Variables - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: usart_putreg * * Description: * Write a value to a USART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_RS232_DEVICE static inline void usart_putreg(uintptr_t usart_base, unsigned int offset, uint32_t value) @@ -116,13 +116,13 @@ static inline void usart_putreg(uintptr_t usart_base, unsigned int offset, uint3 } #endif -/****************************************************************************** +/**************************************************************************** * Name: usart_getreg * * Description: * Get a value from a USART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_RS232_DEVICE static inline uint32_t usart_getreg(uintptr_t usart_base, unsigned int offset) @@ -131,13 +131,13 @@ static inline uint32_t usart_getreg(uintptr_t usart_base, unsigned int offset) } #endif -/****************************************************************************** +/**************************************************************************** * Name: usart_setbaudrate * * Description: * Configure the UART baud rate. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_RS232_DEVICE static void usart_setbaudrate(uintptr_t usart_base, uint32_t baudrate) @@ -186,17 +186,17 @@ static void usart_setbaudrate(uintptr_t usart_base, uint32_t baudrate) } #endif -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: usart_reset * * Description: * Reset a USART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_RS232_DEVICE void usart_reset(uintptr_t usart_base) @@ -223,13 +223,13 @@ void usart_reset(uintptr_t usart_base) } #endif -/****************************************************************************** +/**************************************************************************** * Name: usart_configure * * Description: * Configure a USART as a RS-232 UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_RS232_DEVICE void usart_configure(uintptr_t usart_base, uint32_t baud, unsigned int parity, @@ -290,7 +290,7 @@ void usart_configure(uintptr_t usart_base, uint32_t baud, unsigned int parity, } #endif -/****************************************************************************** +/**************************************************************************** * Name: up_consoleinit * * Description: @@ -298,7 +298,7 @@ void usart_configure(uintptr_t usart_base, uint32_t baud, unsigned int parity, * early in the initialization sequence to configure the serial console uart * (only). * - ******************************************************************************/ + ****************************************************************************/ void up_consoleinit(void) { @@ -368,13 +368,13 @@ void up_consoleinit(void) #endif } -/****************************************************************************** +/**************************************************************************** * Name: up_lowputc * * Description: * Output one byte on the serial console * - ******************************************************************************/ + ****************************************************************************/ void up_lowputc(char ch) { diff --git a/arch/avr/src/at90usb/at90usb_lowconsole.c b/arch/avr/src/at90usb/at90usb_lowconsole.c index 637793b7719..c40328ec23f 100644 --- a/arch/avr/src/at90usb/at90usb_lowconsole.c +++ b/arch/avr/src/at90usb/at90usb_lowconsole.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/avr/src/at90usb/at90usb_lowconsole.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include #include "at90usb_config.h" @@ -52,9 +52,9 @@ #include "at90usb_internal.h" -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* Baud rate settings for normal and double speed modes */ @@ -116,37 +116,37 @@ # endif #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Variables - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: usart1_reset * * Description: * Reset a USART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_USART_DEVICE void usart1_reset(void) @@ -168,13 +168,13 @@ void usart1_reset(void) } #endif -/****************************************************************************** +/**************************************************************************** * Name: usart1_configure * * Description: * Configure USART1. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_USART_DEVICE void usart1_configure(void) @@ -249,7 +249,7 @@ void usart1_configure(void) } #endif -/****************************************************************************** +/**************************************************************************** * Name: up_consoleinit * * Description: @@ -257,7 +257,7 @@ void usart1_configure(void) * early in the initialization sequence to configure the serial console uart * (only). * - ******************************************************************************/ + ****************************************************************************/ void up_consoleinit(void) { @@ -266,13 +266,13 @@ void up_consoleinit(void) #endif } -/****************************************************************************** +/**************************************************************************** * Name: up_lowputc * * Description: * Output one byte on the serial console * - ******************************************************************************/ + ****************************************************************************/ void up_lowputc(char ch) { diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index 2a26f8f26db..336ec0751e3 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * arch/arm/src/at90usb/at90usb_usbdev.c * * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include @@ -62,9 +62,9 @@ #include "up_arch.h" #include "up_internal.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* Configuration ***************************************************************/ /* PLL Settings are based on F_CPU frequency which is defined in the board.h file */ @@ -195,9 +195,9 @@ #define avr_rqempty(ep) ((ep)->head == NULL) #define avr_rqpeek(ep) ((ep)->head) -/******************************************************************************* +/**************************************************************************** * Private Types - *******************************************************************************/ + ****************************************************************************/ /* A container for a request so that the request may be retained in a list */ @@ -261,9 +261,9 @@ struct avr_usbdev_s struct avr_ep_s eplist[AVR_NENDPOINTS]; }; -/******************************************************************************* +/**************************************************************************** * Private Function Prototypes - *******************************************************************************/ + ****************************************************************************/ /* Request queue operations ****************************************************/ @@ -331,9 +331,9 @@ static int avr_wakeup(struct usbdev_s *dev); static int avr_selfpowered(struct usbdev_s *dev, bool selfpowered); static int avr_pullup(struct usbdev_s *dev, bool enable); -/******************************************************************************* +/**************************************************************************** * Private Data - *******************************************************************************/ + ****************************************************************************/ /* Since there is only a single USB interface, all status information can be * be simply retained in a single global instance. @@ -366,21 +366,21 @@ static const struct usbdev_ops_s g_devops = .pullup = avr_pullup, }; -/******************************************************************************* +/**************************************************************************** * Public Data - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: avr_rqdequeue * * Description: * Remove a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static FAR struct avr_req_s *avr_rqdequeue(FAR struct avr_ep_s *privep) { @@ -400,13 +400,13 @@ static FAR struct avr_req_s *avr_rqdequeue(FAR struct avr_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: avr_rqenqueue * * Description: * Add a request from an endpoint request queue * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_rqenqueue(FAR struct avr_ep_s *privep, FAR struct avr_req_s *req) @@ -424,13 +424,13 @@ static inline void avr_rqenqueue(FAR struct avr_ep_s *privep, } } -/******************************************************************************* +/**************************************************************************** * Name: avr_txready * * Description: * Wait for the selected endpoint to be ready for an IN (TX) transfer * - *******************************************************************************/ + ****************************************************************************/ static void avr_txready(void) { @@ -438,13 +438,13 @@ static void avr_txready(void) while (((UEINTX & (1 << TXINI)) == 0) && retries-- > 0); } -/******************************************************************************* +/**************************************************************************** * Name: avr_fifoready * * Description: * Wait for the selected endpoint FIFO to be ready * - *******************************************************************************/ + ****************************************************************************/ static int avr_fifoready(int timeout) { @@ -496,7 +496,7 @@ static int avr_fifoready(int timeout) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_ep0send * * Description: @@ -505,7 +505,7 @@ static int avr_fifoready(int timeout) * Assumptions: * - Endpoint 0 is already selected. * - *******************************************************************************/ + ****************************************************************************/ static void avr_ep0send(FAR const uint8_t *buffer, uint16_t buflen) { @@ -577,13 +577,13 @@ static void avr_ep0send(FAR const uint8_t *buffer, uint16_t buflen) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_epNsend * * Description: * Perform a TX transfer for Endpoint N * - *******************************************************************************/ + ****************************************************************************/ static inline int avr_epNsend(FAR struct avr_ep_s *privep, FAR struct avr_req_s *privreq) @@ -744,13 +744,13 @@ static inline int avr_epNsend(FAR struct avr_ep_s *privep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epNrecv * * Description: * Perform an RX transfer for Endpoint N * - *******************************************************************************/ + ****************************************************************************/ static inline int avr_epNrecv(FAR struct avr_ep_s *privep, FAR struct usbdev_req_s *req) @@ -826,7 +826,7 @@ static inline int avr_epNrecv(FAR struct avr_ep_s *privep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epINqueue * * Description: @@ -835,7 +835,7 @@ static inline int avr_epNrecv(FAR struct avr_ep_s *privep, * interrupt occurs. Thus function is also called from the requeust enqueuing * logic BUT with interrupts disabled. * - *******************************************************************************/ + ****************************************************************************/ static int avr_epINqueue(FAR struct avr_ep_s *privep) { @@ -887,7 +887,7 @@ static int avr_epINqueue(FAR struct avr_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epOUTqueue * * Description: @@ -895,7 +895,7 @@ static int avr_epINqueue(FAR struct avr_ep_s *privep) * from interrupt handling logic for an endpoint when the RXOUT endpoint * interrupt occurs. * - *******************************************************************************/ + ****************************************************************************/ static int avr_epOUTqueue(FAR struct avr_ep_s *privep) { @@ -926,13 +926,13 @@ static int avr_epOUTqueue(FAR struct avr_ep_s *privep) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: avr_reqcomplete * * Description: * Handle termination of the request at the head of the endpoint request queue. * - *******************************************************************************/ + ****************************************************************************/ static void avr_reqcomplete(FAR struct avr_ep_s *privep, FAR struct avr_req_s *privreq, int result) @@ -959,13 +959,13 @@ static void avr_reqcomplete(FAR struct avr_ep_s *privep, FAR struct avr_req_s *p privep->stalled = stalled; } -/******************************************************************************* +/**************************************************************************** * Name: avr_cancelrequests * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void avr_cancelrequests(FAR struct avr_ep_s *privep, int status) { @@ -998,13 +998,13 @@ static void avr_cancelrequests(FAR struct avr_ep_s *privep, int status) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_cancelall * * Description: * Cancel all pending requests for an endpoint * - *******************************************************************************/ + ****************************************************************************/ static void avr_cancelall(int status) { @@ -1021,14 +1021,14 @@ static void avr_cancelall(int status) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_epfindbyaddr * * Description: * Find the physical endpoint structure corresponding to a logic endpoint * address * - *******************************************************************************/ + ****************************************************************************/ static struct avr_ep_s *avr_epfindbyaddr(uint8_t epno) { @@ -1063,14 +1063,14 @@ static struct avr_ep_s *avr_epfindbyaddr(uint8_t epno) return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: avr_dispatchrequest * * Description: * Provide unhandled setup actions to the class driver. This is logically part * of the USB interrupt handler. * - *******************************************************************************/ + ****************************************************************************/ static void avr_dispatchrequest(FAR const struct usb_ctrlreq_s *ctrl) { @@ -1093,13 +1093,13 @@ static void avr_dispatchrequest(FAR const struct usb_ctrlreq_s *ctrl) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_ep0configure * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static int avr_ep0configure(void) { @@ -1139,7 +1139,7 @@ static int avr_ep0configure(void) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epreset * * Description: @@ -1148,7 +1148,7 @@ static int avr_ep0configure(void) * Input Parameters: * epno - The endpoint to be reset * - *******************************************************************************/ + ****************************************************************************/ static void avr_epreset(FAR struct avr_ep_s *privep, int status) { @@ -1172,13 +1172,13 @@ static void avr_epreset(FAR struct avr_ep_s *privep, int status) privep->stalled = false; } -/******************************************************************************* +/**************************************************************************** * Name: avr_usbreset * * Description: * Reset Usb engine * - *******************************************************************************/ + ****************************************************************************/ static void avr_usbreset(void) { @@ -1273,13 +1273,13 @@ static void avr_usbreset(void) UDIEN |= ((1 << SUSPE) | (1 << EORSTE)); } -/******************************************************************************* +/**************************************************************************** * Name: avr_usbshutdown * * Description: * Shutdown the USB interface and put the hardare in a known state * - *******************************************************************************/ + ****************************************************************************/ void avr_usbshutdown(void) { @@ -1322,13 +1322,13 @@ void avr_usbshutdown(void) USBCON &= ~(1 << OTGPADE); } -/******************************************************************************* +/**************************************************************************** * Name: avr_setaddress * * Description: * Set the devices USB address * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_setaddress(uint8_t address) { @@ -1352,14 +1352,14 @@ static inline void avr_setaddress(uint8_t address) UDADDR = ((1 << ADDEN) | address); } -/******************************************************************************* +/**************************************************************************** * Name: avr_ep0setup * * Description: * USB Ctrl EP Setup Event. This is logically part of the USB interrupt * handler. This event occurs when a setup packet is receive on EP0 OUT. * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_ep0setup(void) { @@ -1759,13 +1759,13 @@ static inline void avr_ep0setup(void) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_ep0interrupt * * Description: * USB endpoint/pipe IN interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_ep0interrupt(void) { @@ -1796,13 +1796,13 @@ static inline void avr_ep0interrupt(void) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_epNinterrupt * * Description: * USB endpoint/pipe IN interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_epNinterrupt(void) { @@ -1868,13 +1868,13 @@ static inline void avr_epNinterrupt(void) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_epinterrupt * * Description: * USB endpoint/pipe interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int avr_epinterrupt(int irq, FAR void *context) { @@ -1892,14 +1892,14 @@ static int avr_epinterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_genvbus * * Description: * A change in VBUS has been detected. Check if the device has been * connected to or disconnected from a host. * - *******************************************************************************/ + ****************************************************************************/ static void avr_genvbus(void) { @@ -1944,13 +1944,13 @@ static void avr_genvbus(void) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_gensuspend * * Description: * The USB controller has been put in suspend mode. * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_gensuspend(void) { @@ -1979,13 +1979,13 @@ static inline void avr_gensuspend(void) PLLCSR = 0; } -/******************************************************************************* +/**************************************************************************** * Name: avr_genwakeup * * Description: * Resume from suspend mode. * - *******************************************************************************/ + ****************************************************************************/ static void avr_genwakeup(void) { @@ -2011,13 +2011,13 @@ static void avr_genwakeup(void) } } -/******************************************************************************* +/**************************************************************************** * Name: avr_geneor * * Description: * Handle an end-of-reset interrupt * - *******************************************************************************/ + ****************************************************************************/ static inline void avr_geneor(void) { @@ -2052,13 +2052,13 @@ static inline void avr_geneor(void) UEIENX |= (1 << RXSTPE); } -/******************************************************************************* +/**************************************************************************** * Name: avr_geninterrupt * * Description: * USB general interrupt handler * - *******************************************************************************/ + ****************************************************************************/ static int avr_geninterrupt(int irq, FAR void *context) { @@ -2100,7 +2100,7 @@ static int avr_geninterrupt(int irq, FAR void *context) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epconfigure * * Description: @@ -2113,7 +2113,7 @@ static int avr_geninterrupt(int irq, FAR void *context) * needs to take special action when all of the endpoints have been * configured. * - *******************************************************************************/ + ****************************************************************************/ static int avr_epconfigure(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, bool last) @@ -2233,13 +2233,13 @@ static int avr_epconfigure(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epdisable * * Description: * The endpoint will no longer be used * - *******************************************************************************/ + ****************************************************************************/ static int avr_epdisable(FAR struct usbdev_ep_s *ep) { @@ -2266,13 +2266,13 @@ static int avr_epdisable(FAR struct usbdev_ep_s *ep) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epallocreq * * Description: * Allocate an I/O request * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep) { @@ -2298,13 +2298,13 @@ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep) return &privreq->req; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epfreereq * * Description: * Free an I/O request * - *******************************************************************************/ + ****************************************************************************/ static void avr_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) @@ -2323,13 +2323,13 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep, kmm_free(privreq); } -/******************************************************************************* +/**************************************************************************** * Name: avr_epallocbuffer * * Description: * Allocate an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) @@ -2344,13 +2344,13 @@ static void *avr_epallocbuffer(FAR struct usbdev_ep_s *ep, unsigned bytes) } #endif -/******************************************************************************* +/**************************************************************************** * Name: avr_epfreebuffer * * Description: * Free an I/O buffer * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USBDEV_DMA static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) @@ -2365,13 +2365,13 @@ static void avr_epfreebuffer(FAR struct usbdev_ep_s *ep, FAR void *buf) } #endif -/******************************************************************************* +/**************************************************************************** * Name: avr_epsubmit * * Description: * Submit an I/O request to the endpoint * - *******************************************************************************/ + ****************************************************************************/ static int avr_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) @@ -2469,13 +2469,13 @@ static int avr_epsubmit(FAR struct usbdev_ep_s *ep, return ret; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epcancel * * Description: * Cancel an I/O request previously sent to an endpoint * - *******************************************************************************/ + ****************************************************************************/ static int avr_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) @@ -2503,13 +2503,13 @@ static int avr_epcancel(FAR struct usbdev_ep_s *ep, return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_epstall * * Description: * Stall or resume and endpoint * - *******************************************************************************/ + ****************************************************************************/ static int avr_epstall(FAR struct usbdev_ep_s *ep, bool resume) { @@ -2537,11 +2537,11 @@ static int avr_epstall(FAR struct usbdev_ep_s *ep, bool resume) return OK; } -/******************************************************************************* +/**************************************************************************** * Device operations - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: avr_allocep * * Description: @@ -2555,7 +2555,7 @@ static int avr_epstall(FAR struct usbdev_ep_s *ep, bool resume) * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} * - *******************************************************************************/ + ****************************************************************************/ static FAR struct usbdev_ep_s *avr_allocep(FAR struct usbdev_s *dev, uint8_t epno, bool in, @@ -2650,13 +2650,13 @@ static FAR struct usbdev_ep_s *avr_allocep(FAR struct usbdev_s *dev, return NULL; } -/******************************************************************************* +/**************************************************************************** * Name: avr_freeep * * Description: * Free the previously allocated endpoint * - *******************************************************************************/ + ****************************************************************************/ static void avr_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) { @@ -2676,13 +2676,13 @@ static void avr_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: avr_getframe * * Description: * Returns the current frame number * - *******************************************************************************/ + ****************************************************************************/ static int avr_getframe(struct usbdev_s *dev) { @@ -2692,13 +2692,13 @@ static int avr_getframe(struct usbdev_s *dev) return (int)UDFNUMH << 8 | (int)UDFNUML; } -/******************************************************************************* +/**************************************************************************** * Name: avr_wakeup * * Description: * Tries to wake up the host connected to this device * - *******************************************************************************/ + ****************************************************************************/ static int avr_wakeup(struct usbdev_s *dev) { @@ -2712,13 +2712,13 @@ static int avr_wakeup(struct usbdev_s *dev) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_selfpowered * * Description: * Sets/clears the device selfpowered feature * - *******************************************************************************/ + ****************************************************************************/ static int avr_selfpowered(struct usbdev_s *dev, bool selfpowered) { @@ -2736,13 +2736,13 @@ static int avr_selfpowered(struct usbdev_s *dev, bool selfpowered) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_pullup * * Description: * Software-controlled connect to/disconnect from USB host * - *******************************************************************************/ + ****************************************************************************/ static int avr_pullup(struct usbdev_s *dev, bool enable) { @@ -2750,11 +2750,11 @@ static int avr_pullup(struct usbdev_s *dev, bool enable) return OK; } -/******************************************************************************* +/**************************************************************************** * Public Functions - *******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: up_usbinitialize * * Description: @@ -2767,7 +2767,7 @@ static int avr_pullup(struct usbdev_s *dev, bool enable) * and P0.23 and PO.31 in PINSEL1 must be configured for Vbus and USB connect * LED. * - *******************************************************************************/ + ****************************************************************************/ void up_usbinitialize(void) { @@ -2823,9 +2823,9 @@ errout: up_usbuninitialize(); } -/******************************************************************************* +/**************************************************************************** * Name: up_usbuninitialize - *******************************************************************************/ + ****************************************************************************/ void up_usbuninitialize(void) { @@ -2856,14 +2856,14 @@ void up_usbuninitialize(void) irqrestore(flags); } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_register * * Description: * Register a USB device class driver. The class driver's bind() method will be * called to bind it to a USB device driver. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_register(struct usbdevclass_driver_s *driver) { @@ -2912,7 +2912,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) return ret; } -/******************************************************************************* +/**************************************************************************** * Name: usbdev_unregister * * Description: @@ -2920,7 +2920,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) * it will first disconnect(). The driver is also requested to unbind() and clean * up any device state, before this procedure finally returns. * - *******************************************************************************/ + ****************************************************************************/ int usbdev_unregister(struct usbdevclass_driver_s *driver) { @@ -2944,7 +2944,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) return OK; } -/******************************************************************************* +/**************************************************************************** * Name: avr_pollvbus * * Description: @@ -2955,7 +2955,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) * (especially if a relay is used to switch VBUS!). This poll is, then, * simply a failsafe to assure that VBUS connection events are never missed. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_USB_NOISYVBUS void avr_pollvbus(void) diff --git a/arch/avr/src/atmega/atmega_lowconsole.c b/arch/avr/src/atmega/atmega_lowconsole.c index a5ed1fc3452..17f1b0145fb 100644 --- a/arch/avr/src/atmega/atmega_lowconsole.c +++ b/arch/avr/src/atmega/atmega_lowconsole.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/avr/src/atmega/atmega_lowconsole.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include #include "atmega_config.h" @@ -51,9 +51,9 @@ #include "up_internal.h" #include "atmega_internal.h" -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* USART0 Baud rate settings for normal and double speed modes */ @@ -175,29 +175,29 @@ # endif #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Variables - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: usart0_reset and usart1_reset @@ -431,7 +431,7 @@ void usart1_configure(void) } #endif -/****************************************************************************** +/**************************************************************************** * Name: up_consoleinit * * Description: @@ -439,7 +439,7 @@ void usart1_configure(void) * early in the initialization sequence to configure the serial console uart * (only). * - ******************************************************************************/ + ****************************************************************************/ void up_consoleinit(void) { @@ -452,13 +452,13 @@ void up_consoleinit(void) #endif } -/****************************************************************************** +/**************************************************************************** * Name: up_lowputc * * Description: * Output one byte on the serial console * - ******************************************************************************/ + ****************************************************************************/ void up_lowputc(char ch) { diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index 32120fba1ab..6da8b8e766f 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -477,13 +477,13 @@ static void pic32mx_ethreset(struct pic32mx_driver_s *priv); * Private Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: pic32mx_printreg * * Description: * Print the contents of an PIC32MX register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mx_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -492,13 +492,13 @@ static void pic32mx_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mx_checkreg * * Description: * Get the contents of an PIC32MX register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mx_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -556,13 +556,13 @@ static void pic32mx_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mx_getreg * * Description: * Get the contents of an PIC32MX register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static uint32_t pic32mx_getreg(uint32_t addr) @@ -578,13 +578,13 @@ static uint32_t pic32mx_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mx_putreg * * Description: * Set the contents of an PIC32MX register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mx_putreg(uint32_t val, uint32_t addr) @@ -2401,7 +2401,7 @@ static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mx_showmii * * Description: @@ -2415,7 +2415,7 @@ static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac) * * Assumptions: * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_NET_REGDEBUG) && defined(PIC32MX_HAVE_PHY) static void pic32mx_showmii(uint8_t phyaddr, const char *msg) diff --git a/arch/mips/src/pic32mx/pic32mx-lowconsole.c b/arch/mips/src/pic32mx/pic32mx-lowconsole.c index c613ab3828b..4bfe0c9570a 100644 --- a/arch/mips/src/pic32mx/pic32mx-lowconsole.c +++ b/arch/mips/src/pic32mx/pic32mx-lowconsole.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/mips/src/pic32mx/pic32mx-lowconsole.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -51,9 +51,9 @@ #include "pic32mx-config.h" #include "pic32mx-internal.h" -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* Select UART parameters for the selected console */ @@ -99,33 +99,33 @@ # endif #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Variables - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_putreg * * Description: * Write a value to a UART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static inline void pic32mx_putreg(uintptr_t uart_base, unsigned int offset, @@ -135,13 +135,13 @@ static inline void pic32mx_putreg(uintptr_t uart_base, unsigned int offset, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_getreg * * Description: * Get a value from a UART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static inline uint32_t pic32mx_getreg(uintptr_t uart_base, @@ -151,7 +151,7 @@ static inline uint32_t pic32mx_getreg(uintptr_t uart_base, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_uartsetbaud * * Description: @@ -165,7 +165,7 @@ static inline uint32_t pic32mx_getreg(uintptr_t uart_base, * BRG = PBCLK / 4 / BAUD - 1 * * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static void pic32mx_uartsetbaud(uintptr_t uart_base, uint32_t baudrate) @@ -203,17 +203,17 @@ static void pic32mx_uartsetbaud(uintptr_t uart_base, uint32_t baudrate) } #endif -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_uartreset * * Description: * Reset hardware and disable Rx and Tx. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mx_uartreset(uintptr_t uart_base) @@ -226,13 +226,13 @@ void pic32mx_uartreset(uintptr_t uart_base) } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_uartconfigure * * Description: * Configure a UART as a RS-232 UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mx_uartconfigure(uintptr_t uart_base, uint32_t baudrate, @@ -316,7 +316,7 @@ void pic32mx_uartconfigure(uintptr_t uart_base, uint32_t baudrate, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mx_consoleinit * * Description: @@ -324,7 +324,7 @@ void pic32mx_uartconfigure(uintptr_t uart_base, uint32_t baudrate, * very early in the initialization sequence to configure the serial console * UART (only). * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE void pic32mx_consoleinit(void) @@ -335,13 +335,13 @@ void pic32mx_consoleinit(void) } #endif -/****************************************************************************** +/**************************************************************************** * Name: up_lowputc * * Description: * Output one byte on the serial console. * - ******************************************************************************/ + ****************************************************************************/ void up_lowputc(char ch) { diff --git a/arch/mips/src/pic32mz/pic32mz-ethernet.c b/arch/mips/src/pic32mz/pic32mz-ethernet.c index 7a0e65f0975..743cedf18af 100644 --- a/arch/mips/src/pic32mz/pic32mz-ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz-ethernet.c @@ -495,13 +495,13 @@ static void pic32mz_ethreset(struct pic32mz_driver_s *priv); * Private Functions ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: pic32mz_printreg * * Description: * Print the contents of an PIC32MZ register operation * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mz_printreg(uint32_t addr, uint32_t val, bool iswrite) @@ -510,13 +510,13 @@ static void pic32mz_printreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mz_checkreg * * Description: * Get the contents of an PIC32MZ register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mz_checkreg(uint32_t addr, uint32_t val, bool iswrite) @@ -574,13 +574,13 @@ static void pic32mz_checkreg(uint32_t addr, uint32_t val, bool iswrite) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mz_getreg * * Description: * Get the contents of an PIC32MZ register * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static uint32_t pic32mz_getreg(uint32_t addr) @@ -596,13 +596,13 @@ static uint32_t pic32mz_getreg(uint32_t addr) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mz_putreg * * Description: * Set the contents of an PIC32MZ register to a value * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET_REGDEBUG static void pic32mz_putreg(uint32_t val, uint32_t addr) @@ -2425,7 +2425,7 @@ static int pic32mz_rmmac(struct net_driver_s *dev, const uint8_t *mac) } #endif -/******************************************************************************* +/**************************************************************************** * Name: pic32mz_showmii * * Description: @@ -2439,7 +2439,7 @@ static int pic32mz_rmmac(struct net_driver_s *dev, const uint8_t *mac) * * Assumptions: * - *******************************************************************************/ + ****************************************************************************/ #if defined(CONFIG_NET_REGDEBUG) && defined(PIC32MZ_HAVE_PHY) static void pic32mz_showmii(uint8_t phyaddr, const char *msg) diff --git a/arch/mips/src/pic32mz/pic32mz-lowconsole.c b/arch/mips/src/pic32mz/pic32mz-lowconsole.c index f21b3b05543..1d677179bc8 100644 --- a/arch/mips/src/pic32mz/pic32mz-lowconsole.c +++ b/arch/mips/src/pic32mz/pic32mz-lowconsole.c @@ -1,4 +1,4 @@ -/****************************************************************************** +/**************************************************************************** * arch/mips/src/pic32mz/pic32mz-lowconsole.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -53,9 +53,9 @@ #include -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* Select UART parameters for the selected console */ @@ -101,33 +101,33 @@ # endif #endif -/****************************************************************************** +/**************************************************************************** * Private Types - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Function Prototypes - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Variables - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_putreg * * Description: * Write a value to a UART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static inline void pic32mz_putreg(uintptr_t uart_base, unsigned int offset, @@ -137,13 +137,13 @@ static inline void pic32mz_putreg(uintptr_t uart_base, unsigned int offset, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_getreg * * Description: * Get a value from a UART register * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static inline uint32_t pic32mz_getreg(uintptr_t uart_base, @@ -153,7 +153,7 @@ static inline uint32_t pic32mz_getreg(uintptr_t uart_base, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_uartsetbaud * * Description: @@ -167,7 +167,7 @@ static inline uint32_t pic32mz_getreg(uintptr_t uart_base, * BRG = PBCLK2 / 4 / BAUD - 1 * * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE static void pic32mz_uartsetbaud(uintptr_t uart_base, uint32_t baudrate) @@ -205,17 +205,17 @@ static void pic32mz_uartsetbaud(uintptr_t uart_base, uint32_t baudrate) } #endif -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_uartreset * * Description: * Reset hardware and disable Rx and Tx. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mz_uartreset(uintptr_t uart_base) @@ -228,13 +228,13 @@ void pic32mz_uartreset(uintptr_t uart_base) } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_uartconfigure * * Description: * Configure a UART as a RS-232 UART. * - ******************************************************************************/ + ****************************************************************************/ #ifdef HAVE_UART_DEVICE void pic32mz_uartconfigure(uintptr_t uart_base, uint32_t baudrate, @@ -313,7 +313,7 @@ void pic32mz_uartconfigure(uintptr_t uart_base, uint32_t baudrate, } #endif -/****************************************************************************** +/**************************************************************************** * Name: pic32mz_consoleinit * * Description: @@ -321,7 +321,7 @@ void pic32mz_uartconfigure(uintptr_t uart_base, uint32_t baudrate, * very early in the initialization sequence to configure the serial console * UART (only). * - ******************************************************************************/ + ****************************************************************************/ void pic32mz_consoleinit(void) { @@ -469,13 +469,13 @@ void pic32mz_consoleinit(void) #endif /* HAVE_UART_DEVICE */ } -/****************************************************************************** +/**************************************************************************** * Name: up_lowputc * * Description: * Output one byte on the serial console. * - ******************************************************************************/ + ****************************************************************************/ void up_lowputc(char ch) {