forked from mfulz_github/qmk_firmware
Make Low Level host demos use void pointers for the configuration descriptor, to prevent warnings when passed to the altered configuration descriptor parsing routines.
Added preprocessor checks to give a human readable error when the class drivers are used when the incompatible NO_STREAM_CALLBACKS compile time option is used.
This commit is contained in:
parent
64e5c4084f
commit
34dc7f241f
|
@ -33,7 +33,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
|
||||
/* Retrieve the entire configuration descriptor into the allocated buffer */
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
|
||||
/* Retrieve the entire configuration descriptor into the allocated buffer */
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
|
||||
/* Retrieve the entire configuration descriptor into the allocated buffer */
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
|
||||
/* Retrieve the entire configuration descriptor into the allocated buffer */
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
|
||||
/* Retrieve the entire configuration descriptor into the allocated buffer */
|
||||
|
|
|
@ -47,7 +47,7 @@ uint8_t PrinterAltSetting;
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
|
||||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/Audio.h"
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/CDC.h"
|
||||
#endif
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/HID.h"
|
||||
#endif
|
||||
|
|
|
@ -56,6 +56,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/MIDI.h"
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/MassStorage.h"
|
||||
#endif
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_HOST)
|
||||
#include "Host/Printer.h"
|
||||
#endif
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_DEVICE)
|
||||
#include "Device/RNDIS.h"
|
||||
#endif
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
/* Includes: */
|
||||
#include "../HighLevel/USBMode.h"
|
||||
|
||||
#if defined(NO_STREAM_CALLBACKS)
|
||||
#error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
|
||||
#endif
|
||||
|
||||
#if defined(USB_CAN_BE_HOST)
|
||||
#include "Host/StillImage.h"
|
||||
#endif
|
||||
|
|
|
@ -31,9 +31,16 @@
|
|||
* it directly. Updating the LUFA library is a simple folder-replacement and gives new features and bug fixes in
|
||||
* seconds each time a new release is made.
|
||||
*
|
||||
* - <b>Size:</b>
|
||||
* Not just requiring less code to make complex USB devices, LUFA (under most cases with the correct compile options)
|
||||
* requires less FLASH space than Atmel's stack, meaning more space for the user application*.
|
||||
*
|
||||
* - <b>Support:</b>
|
||||
* Since many people are now using LUFA in their own projects, you can take advantage of other's knowedge when you run
|
||||
* into difficulties or need some advice. In addition, you can also email the library author to recieve personalised
|
||||
* support when you need it (subject to author's schedule).
|
||||
*
|
||||
* <small>* Atmel Mouse Device Demo 4292 bytes, LUFA Mouse Low Level Device Demo 3336 bytes, under identical build
|
||||
* environments</small>
|
||||
*/
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
uint8_t ProcessConfigurationDescriptor(void)
|
||||
{
|
||||
uint8_t ConfigDescriptorData[512];
|
||||
uint8_t* CurrConfigLocation = ConfigDescriptorData;
|
||||
void* CurrConfigLocation = ConfigDescriptorData;
|
||||
uint16_t CurrConfigBytesRem;
|
||||
uint8_t FoundEndpoints = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue