From 0b87d12002f56d3db80f66d4f8ca93b93ad6c07e Mon Sep 17 00:00:00 2001 From: Christina Quast Date: Sat, 3 Jan 2015 21:49:18 +0100 Subject: [PATCH] USBDDriver.c and USBD.c with debug messages --- .../atmel_softpack_libraries/usb/device/core/USBD.c | 2 ++ .../atmel_softpack_libraries/usb/device/core/USBDDriver.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sam3s_example/atmel_softpack_libraries/usb/device/core/USBD.c b/sam3s_example/atmel_softpack_libraries/usb/device/core/USBD.c index b0d155fe..cdd668f4 100644 --- a/sam3s_example/atmel_softpack_libraries/usb/device/core/USBD.c +++ b/sam3s_example/atmel_softpack_libraries/usb/device/core/USBD.c @@ -143,6 +143,7 @@ void USBD_ResetHandler() void USBD_RequestHandler(uint8_t bEndpoint, const USBGenericRequest* pRequest) { + TRACE_DEBUG("%s\n\r", "USBD_RequestHandler"); if (bEndpoint != 0) { TRACE_WARNING("EP%d request not supported, default EP only", bEndpoint); @@ -366,6 +367,7 @@ void USBD_Init(void) /* Upper Layer Initialize */ if (USBDCallbacks_Initialized) USBDCallbacks_Initialized(); + TRACE_DEBUG("%s\n\r", ".."); } /** diff --git a/sam3s_example/atmel_softpack_libraries/usb/device/core/USBDDriver.c b/sam3s_example/atmel_softpack_libraries/usb/device/core/USBDDriver.c index 689ae1f3..02315017 100644 --- a/sam3s_example/atmel_softpack_libraries/usb/device/core/USBDDriver.c +++ b/sam3s_example/atmel_softpack_libraries/usb/device/core/USBDDriver.c @@ -36,6 +36,8 @@ * Headers *------------------------------------------------------------------------------*/ +#include + #include #include "USBDDriver.h" @@ -82,6 +84,7 @@ static void SetConfiguration(USBDDriver *pDriver, uint8_t cfgnum) const USBConfigurationDescriptor *pConfiguration; /* Use different descriptor depending on device speed */ + TRACE_DEBUG("%s\n\r", "SetConfiguration"); if (USBD_IsHighSpeed()) { @@ -229,7 +232,7 @@ static void GetDescriptor( if (USBD_IsHighSpeed()) { - TRACE_DEBUG("HS "); + TRACE_DEBUG("%s", "HS "); pDevice = pDriver->pDescriptors->pHsDevice; pConfiguration = pDriver->pDescriptors->pHsConfiguration; pQualifier = pDriver->pDescriptors->pHsQualifier; @@ -237,7 +240,7 @@ static void GetDescriptor( } else { - TRACE_DEBUG("FS "); + TRACE_DEBUG("%s", "FS "); pDevice = pDriver->pDescriptors->pFsDevice; pConfiguration = pDriver->pDescriptors->pFsConfiguration; pQualifier = pDriver->pDescriptors->pFsQualifier;