Commit 00b6b014 authored by Dean Camera's avatar Dean Camera
Browse files

Re-enable cppcheck static analysis unused function checks after adding in...

Re-enable cppcheck static analysis unused function checks after adding in special-case suppressions to the event stub functions. Add missing function prototypes to the AudioInput and AudioOutput class driver device demos.
parent 0424bd4d
...@@ -395,17 +395,6 @@ int write_usb_device(HANDLE h, void *buf, int len, int timeout) ...@@ -395,17 +395,6 @@ int write_usb_device(HANDLE h, void *buf, int len, int timeout)
return 1; return 1;
} }
void print_win32_err(void)
{
char buf[256];
DWORD err;
err = GetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
0, buf, sizeof(buf), NULL);
printf("err %ld: %s\n", err, buf);
}
static HANDLE win32_teensy_handle = NULL; static HANDLE win32_teensy_handle = NULL;
int teensy_open(void) int teensy_open(void)
......
...@@ -21,7 +21,6 @@ MESSAGE_TEMPLATE = "{file}:{line}: {severity} ({id}): {message}" ...@@ -21,7 +21,6 @@ MESSAGE_TEMPLATE = "{file}:{line}: {severity} ({id}): {message}"
# Checks to suppress so that generated warnings are discarded # Checks to suppress so that generated warnings are discarded
SUPPRESS_WARNINGS = variableScope \ SUPPRESS_WARNINGS = variableScope \
unusedFunction \
missingInclude missingInclude
# Extra paths to search for include files # Extra paths to search for include files
......
...@@ -82,6 +82,18 @@ ...@@ -82,6 +82,18 @@
void EVENT_USB_Device_Disconnect(void); void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void); void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void); void EVENT_USB_Device_ControlRequest(void);
void CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
const uint8_t Property,
const uint8_t EntityAddress,
const uint16_t Parameter,
uint16_t* const DataLength,
uint8_t* Data);
bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
const uint8_t Property,
const uint8_t EntityAddress,
const uint16_t Parameter,
uint16_t* const DataLength,
uint8_t* Data);
#endif #endif
...@@ -70,5 +70,17 @@ ...@@ -70,5 +70,17 @@
void EVENT_USB_Device_ConfigurationChanged(void); void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void); void EVENT_USB_Device_ControlRequest(void);
void CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
const uint8_t Property,
const uint8_t EntityAddress,
const uint16_t Parameter,
uint16_t* const DataLength,
uint8_t* Data);
bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
const uint8_t Property,
const uint8_t EntityAddress,
const uint16_t Parameter,
uint16_t* const DataLength,
uint8_t* Data);
#endif #endif
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
* The following are known hobbyist projects using LUFA. Most are open source, and show off interesting ways that the LUFA library * The following are known hobbyist projects using LUFA. Most are open source, and show off interesting ways that the LUFA library
* can be incorporated into many different applications. * can be incorporated into many different applications.
* *
* - Accelerometer Game Joystick: http://www.crictor.co.il/he/episodes/joystick/
* - Arcade Controller: http://fletchtronics.net/arcade-controller-made-petunia * - Arcade Controller: http://fletchtronics.net/arcade-controller-made-petunia
* - Arcade Joystick: http://jamie.lentin.co.uk/embedded/arcade-joystick/ * - Arcade Joystick: http://jamie.lentin.co.uk/embedded/arcade-joystick/
* - AttoBasic AVR BASIC interpreter: http://www.cappels.org/dproj/AttoBasic2_1/AttoBasic_2.1_with_USB_and_Arduino_support.html * - AttoBasic AVR BASIC interpreter: http://www.cappels.org/dproj/AttoBasic2_1/AttoBasic_2.1_with_USB_and_Arduino_support.html
......
...@@ -211,6 +211,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioIn ...@@ -211,6 +211,7 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioIn
return true; return true;
} }
// cppcheck-suppress unusedFunction
void Audio_Device_Event_Stub(void) void Audio_Device_Event_Stub(void)
{ {
......
...@@ -352,6 +352,7 @@ static int CDC_Device_getchar_Blocking(FILE* Stream) ...@@ -352,6 +352,7 @@ static int CDC_Device_getchar_Blocking(FILE* Stream)
} }
#endif #endif
// cppcheck-suppress unusedFunction
void CDC_Device_Event_Stub(void) void CDC_Device_Event_Stub(void)
{ {
......
...@@ -504,6 +504,7 @@ static int CDC_Host_getchar_Blocking(FILE* Stream) ...@@ -504,6 +504,7 @@ static int CDC_Host_getchar_Blocking(FILE* Stream)
} }
#endif #endif
// cppcheck-suppress unusedFunction
void CDC_Host_Event_Stub(void) void CDC_Host_Event_Stub(void)
{ {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define __INCLUDE_FROM_USB_DRIVER #define __INCLUDE_FROM_USB_DRIVER
#include "Events.h" #include "Events.h"
// cppcheck-suppress unusedFunction
void USB_Event_Stub(void) void USB_Event_Stub(void)
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment