arch/arm/src/stm32h7/stm32_usbhost.c: Fix nxstyle errors
error: Long line found
This commit is contained in:
parent
064c75aa92
commit
0b97979378
@ -1,4 +1,4 @@
|
|||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/stm32h7/stm32_usbhost.c
|
* arch/arm/src/stm32h7/stm32_usbhost.c
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
@ -16,11 +16,11 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*
|
*
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
@ -32,59 +32,83 @@
|
|||||||
|
|
||||||
#ifdef HAVE_USBHOST_TRACE
|
#ifdef HAVE_USBHOST_TRACE
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define TR_FMT1 false
|
#define TR_FMT1 false
|
||||||
#define TR_FMT2 true
|
#define TR_FMT2 true
|
||||||
|
|
||||||
#define TRENTRY(id,fmt1,string) {string}
|
#define TRENTRY(id,fmt1,string) {string}
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
struct stm32_usbhost_trace_s
|
struct stm32_usbhost_trace_s
|
||||||
{
|
{
|
||||||
const char *string;
|
const char *string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
|
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
|
||||||
{
|
{
|
||||||
#ifdef HAVE_USBHOST_TRACE
|
#ifdef HAVE_USBHOST_TRACE
|
||||||
|
|
||||||
TRENTRY(OTG_TRACE1_DEVDISCONN, TR_FMT1, "OTG ERROR: Host Port %d. Device disconnected\n"),
|
TRENTRY(OTG_TRACE1_DEVDISCONN, TR_FMT1,
|
||||||
TRENTRY(OTG_TRACE1_IRQATTACH, TR_FMT1, "OTG ERROR: Failed to attach IRQ\n"),
|
"OTG ERROR: Host Port %d. Device disconnected\n"),
|
||||||
TRENTRY(OTG_TRACE1_TRNSFRFAILED, TR_FMT1, "OTG ERROR: Transfer Failed. ret=%d\n"),
|
TRENTRY(OTG_TRACE1_IRQATTACH, TR_FMT1,
|
||||||
TRENTRY(OTG_TRACE1_SENDSETUP, TR_FMT1, "OTG ERROR: ctrl_sendsetup() failed with: %d\n"),
|
"OTG ERROR: Failed to attach IRQ\n"),
|
||||||
TRENTRY(OTG_TRACE1_SENDDATA, TR_FMT1, "OTG ERROR: ctrl_senddata() failed with: %d\n"),
|
TRENTRY(OTG_TRACE1_TRNSFRFAILED, TR_FMT1,
|
||||||
TRENTRY(OTG_TRACE1_RECVDATA, TR_FMT1, "OTG ERROR: ctrl_recvdata() failed with: %d\n"),
|
"OTG ERROR: Transfer Failed. ret=%d\n"),
|
||||||
|
TRENTRY(OTG_TRACE1_SENDSETUP, TR_FMT1,
|
||||||
|
"OTG ERROR: ctrl_sendsetup() failed with: %d\n"),
|
||||||
|
TRENTRY(OTG_TRACE1_SENDDATA, TR_FMT1,
|
||||||
|
"OTG ERROR: ctrl_senddata() failed with: %d\n"),
|
||||||
|
TRENTRY(OTG_TRACE1_RECVDATA, TR_FMT1,
|
||||||
|
"OTG ERROR: ctrl_recvdata() failed with: %d\n"),
|
||||||
|
|
||||||
# ifdef HAVE_USBHOST_TRACE_VERBOSE
|
# ifdef HAVE_USBHOST_TRACE_VERBOSE
|
||||||
|
|
||||||
TRENTRY(OTG_VTRACE1_CONNECTED, TR_FMT1, "OTG Host Port %d connected.\n"),
|
TRENTRY(OTG_VTRACE1_CONNECTED, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_DISCONNECTED, TR_FMT1, "OTG Host Port %d disconnected.\n"),
|
"OTG Host Port %d connected.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT, TR_FMT1, "OTG Handling Interrupt. Entry Point.\n"),
|
TRENTRY(OTG_VTRACE1_DISCONNECTED, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_SOF, TR_FMT1, "OTG Handle the start of frame interrupt.\n"),
|
"OTG Host Port %d disconnected.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_RXFLVL, TR_FMT1, "OTG Handle the RxFIFO non-empty interrupt.\n"),
|
TRENTRY(OTG_VTRACE1_GINT, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_NPTXFE, TR_FMT1, "OTG Handle the non-periodic TxFIFO empty interrupt.\n"),
|
"OTG Handling Interrupt. Entry Point.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_PTXFE, TR_FMT1, "OTG Handle the periodic TxFIFO empty interrupt.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_SOF, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HC, TR_FMT1, "OTG Handle the host channels interrupt.\n"),
|
"OTG Handle the start of frame interrupt.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT, TR_FMT1, "OTG Handle the host port interrupt.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_RXFLVL, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_POCCHNG, TR_FMT1, "OTG HPRT: Port Over-Current Change.\n"),
|
"OTG Handle the RxFIFO non-empty interrupt.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_PCDET, TR_FMT1, "OTG HPRT: Port Connect Detect.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_NPTXFE, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_PENCHNG, TR_FMT1, "OTG HPRT: Port Enable Changed.\n"),
|
"OTG Handle the non-periodic TxFIFO empty interrupt.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_LSDEV, TR_FMT1, "OTG HPRT: Low Speed Device Connected.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_PTXFE, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_FSDEV, TR_FMT1, "OTG HPRT: Full Speed Device Connected.\n"),
|
"OTG Handle the periodic TxFIFO empty interrupt.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_LSFSSW, TR_FMT1, "OTG HPRT: Host Switch: LS -> FS.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_HC, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_HPRT_FSLSSW, TR_FMT1, "OTG HPRT: Host Switch: FS -> LS.\n"),
|
"OTG Handle the host channels interrupt.\n"),
|
||||||
TRENTRY(OTG_VTRACE1_GINT_DISC, TR_FMT1, "OTG Handle the disconnect detected interrupt.\n"),
|
TRENTRY(OTG_VTRACE1_GINT_HPRT, TR_FMT1,
|
||||||
TRENTRY(OTG_VTRACE1_GINT_IPXFR, TR_FMT1, "OTG Handle the incomplete periodic transfer.\n"),
|
"OTG Handle the host port interrupt.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_POCCHNG, TR_FMT1,
|
||||||
|
"OTG HPRT: Port Over-Current Change.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_PCDET, TR_FMT1,
|
||||||
|
"OTG HPRT: Port Connect Detect.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_PENCHNG, TR_FMT1,
|
||||||
|
"OTG HPRT: Port Enable Changed.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_LSDEV, TR_FMT1,
|
||||||
|
"OTG HPRT: Low Speed Device Connected.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_FSDEV, TR_FMT1,
|
||||||
|
"OTG HPRT: Full Speed Device Connected.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_LSFSSW, TR_FMT1,
|
||||||
|
"OTG HPRT: Host Switch: LS -> FS.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_HPRT_FSLSSW, TR_FMT1,
|
||||||
|
"OTG HPRT: Host Switch: FS -> LS.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_DISC, TR_FMT1,
|
||||||
|
"OTG Handle the disconnect detected interrupt.\n"),
|
||||||
|
TRENTRY(OTG_VTRACE1_GINT_IPXFR, TR_FMT1,
|
||||||
|
"OTG Handle the incomplete periodic transfer.\n"),
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -94,44 +118,65 @@ static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_USBHOST_TRACE
|
#ifdef HAVE_USBHOST_TRACE
|
||||||
|
|
||||||
TRENTRY(OTG_TRACE2_CLIP, TR_FMT2, "OTG CLIP: chidx: %d buflen: %d\n"),
|
TRENTRY(OTG_TRACE2_CLIP, TR_FMT2,
|
||||||
|
"OTG CLIP: chidx: %d buflen: %d\n"),
|
||||||
|
|
||||||
# ifdef HAVE_USBHOST_TRACE_VERBOSE
|
# ifdef HAVE_USBHOST_TRACE_VERBOSE
|
||||||
|
|
||||||
TRENTRY(OTG_VTRACE2_CHANWAKEUP_IN, TR_FMT2, "OTG EP%d(IN) wake up with result: %d\n"),
|
TRENTRY(OTG_VTRACE2_CHANWAKEUP_IN, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANWAKEUP_OUT, TR_FMT2, "OTG EP%d(OUT) wake up with result: %d\n"),
|
"OTG EP%d(IN) wake up with result: %d\n"),
|
||||||
TRENTRY(OTG_VTRACE2_CTRLIN, TR_FMT2, "OTG CTRL_IN type: %02x req: %02x\n"),
|
TRENTRY(OTG_VTRACE2_CHANWAKEUP_OUT, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CTRLOUT, TR_FMT2, "OTG CTRL_OUT type: %02x req: %02x\n"),
|
"OTG EP%d(OUT) wake up with result: %d\n"),
|
||||||
TRENTRY(OTG_VTRACE2_INTRIN, TR_FMT2, "OTG INTR_IN chidx: %02x len: %02x\n"),
|
TRENTRY(OTG_VTRACE2_CTRLIN, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_INTROUT, TR_FMT2, "OTG INTR_OUT chidx: %02x len: %02x\n"),
|
"OTG CTRL_IN type: %02x req: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_BULKIN, TR_FMT2, "OTG BULK_IN chidx: %02x len: %02x\n"),
|
TRENTRY(OTG_VTRACE2_CTRLOUT, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_BULKOUT, TR_FMT2, "OTG BULK_OUT chidx: %02x len: %02x\n"),
|
"OTG CTRL_OUT type: %02x req: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_ISOCIN, TR_FMT2, "OTG ISOC_IN chidx: %02x len: %04d\n"),
|
TRENTRY(OTG_VTRACE2_INTRIN, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_ISOCOUT, TR_FMT2, "OTG ISOC_OUT chidx: %02x req: %02x\n"),
|
"OTG INTR_IN chidx: %02x len: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_STARTTRANSFER, TR_FMT2, "OTG Transfer chidx: %d buflen: %d\n"),
|
TRENTRY(OTG_VTRACE2_INTROUT, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_CTRL_IN, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,IN ,CTRL)\n"),
|
"OTG INTR_OUT chidx: %02x len: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_CTRL_OUT, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,OUT,CTRL)\n"),
|
TRENTRY(OTG_VTRACE2_BULKIN, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_INTR_IN, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,IN ,INTR)\n"),
|
"OTG BULK_IN chidx: %02x len: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_INTR_OUT, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,OUT,INTR)\n"),
|
TRENTRY(OTG_VTRACE2_BULKOUT, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_BULK_IN, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,IN ,BULK)\n"),
|
"OTG BULK_OUT chidx: %02x len: %02x\n"),
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_BULK_OUT, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,OUT,BULK)\n"),
|
TRENTRY(OTG_VTRACE2_ISOCIN, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_ISOC_IN, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,IN ,ISOC)\n"),
|
"OTG ISOC_IN chidx: %02x len: %04d\n"),
|
||||||
TRENTRY(OTG_VTRACE2_CHANCONF_ISOC_OUT, TR_FMT2, "OTG Channel configured. chidx: %d: (EP%d,OUT,ISOC)\n"),
|
TRENTRY(OTG_VTRACE2_ISOCOUT, TR_FMT2,
|
||||||
TRENTRY(OTG_VTRACE2_CHANHALT, TR_FMT2, "OTG Channel halted. chidx: %d, reason: %d\n"),
|
"OTG ISOC_OUT chidx: %02x req: %02x\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_STARTTRANSFER, TR_FMT2,
|
||||||
|
"OTG Transfer chidx: %d buflen: %d\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_CTRL_IN, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,IN ,CTRL)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_CTRL_OUT, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,OUT,CTRL)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_INTR_IN, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,IN ,INTR)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_INTR_OUT, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,OUT,INTR)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_BULK_IN, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,IN ,BULK)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_BULK_OUT, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,OUT,BULK)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_ISOC_IN, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,IN ,ISOC)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANCONF_ISOC_OUT, TR_FMT2,
|
||||||
|
"OTG Channel configured. chidx: %d: (EP%d,OUT,ISOC)\n"),
|
||||||
|
TRENTRY(OTG_VTRACE2_CHANHALT, TR_FMT2,
|
||||||
|
"OTG Channel halted. chidx: %d, reason: %d\n"),
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/********************************************************************************************************************
|
/****************************************************************************
|
||||||
* Name: usbhost_trformat1 and usbhost_trformat2
|
* Name: usbhost_trformat1 and usbhost_trformat2
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@ -142,7 +187,7 @@ static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
|
|||||||
* printf. The returned format is expected to handle two unsigned integer
|
* printf. The returned format is expected to handle two unsigned integer
|
||||||
* values.
|
* values.
|
||||||
*
|
*
|
||||||
********************************************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
const char *usbhost_trformat1(uint16_t id)
|
const char *usbhost_trformat1(uint16_t id)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user