1
0
mirror of https://github.com/raphnet/4nes4snes synced 2024-12-21 14:38:50 -05:00

Fix compilation with modern GCC

This commit is contained in:
Raphaël Assénat 2014-08-23 23:58:32 +00:00
parent f649f9cdd2
commit 9be75d17a1
5 changed files with 19 additions and 16 deletions

View File

@ -1,3 +1,6 @@
--- v1.4.3 (August 23, 2041)
- Fix compilation with modern GCC
--- v1.4.2 (July 14, 2013) --- v1.4.2 (July 14, 2013)
- Corrected the USB Vendor ID - Corrected the USB Vendor ID

2
main.c
View File

@ -37,7 +37,7 @@ static uchar rt_usbDeviceDescriptorSize=0;
/* The maximum number of independent reports that are supported. */ /* The maximum number of independent reports that are supported. */
#define MAX_REPORTS 8 #define MAX_REPORTS 8
PROGMEM int usbDescriptorStringSerialNumber[] = { const PROGMEM int usbDescriptorStringSerialNumber[] = {
USB_STRING_DESCRIPTOR_HEADER(4), USB_STRING_DESCRIPTOR_HEADER(4),
'1','0','0','0' '1','0','0','0'
}; };

View File

@ -5,7 +5,7 @@
* Tabsize: 4 * Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
* This Revision: $Id: usbdrv.c,v 1.2 2009-05-02 12:41:41 cvs Exp $ * This Revision: $Id: usbdrv.c,v 1.3 2014-08-23 23:58:32 cvs Exp $
*/ */
#include "iarcompat.h" #include "iarcompat.h"
@ -80,7 +80,7 @@ optimizing hints:
#if USB_CFG_DESCR_PROPS_STRING_0 == 0 #if USB_CFG_DESCR_PROPS_STRING_0 == 0
#undef USB_CFG_DESCR_PROPS_STRING_0 #undef USB_CFG_DESCR_PROPS_STRING_0
#define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0) #define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0)
PROGMEM char usbDescriptorString0[] = { /* language descriptor */ const PROGMEM char usbDescriptorString0[] = { /* language descriptor */
4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */ 4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */
3, /* descriptor type */ 3, /* descriptor type */
0x09, 0x04, /* language index (0x0409 = US-English) */ 0x09, 0x04, /* language index (0x0409 = US-English) */
@ -90,7 +90,7 @@ PROGMEM char usbDescriptorString0[] = { /* language descriptor */
#if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN #if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN
#undef USB_CFG_DESCR_PROPS_STRING_VENDOR #undef USB_CFG_DESCR_PROPS_STRING_VENDOR
#define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor) #define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor)
PROGMEM int usbDescriptorStringVendor[] = { const PROGMEM int usbDescriptorStringVendor[] = {
USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN), USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN),
USB_CFG_VENDOR_NAME USB_CFG_VENDOR_NAME
}; };
@ -99,7 +99,7 @@ PROGMEM int usbDescriptorStringVendor[] = {
#if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN #if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN
#undef USB_CFG_DESCR_PROPS_STRING_PRODUCT #undef USB_CFG_DESCR_PROPS_STRING_PRODUCT
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice) #define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice)
PROGMEM int usbDescriptorStringDevice[] = { const PROGMEM int usbDescriptorStringDevice[] = {
USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN), USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN),
USB_CFG_DEVICE_NAME USB_CFG_DEVICE_NAME
}; };
@ -108,7 +108,7 @@ PROGMEM int usbDescriptorStringDevice[] = {
#if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN #if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN
#undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER #undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber) #define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber)
PROGMEM int usbDescriptorStringSerialNumber[] = { const PROGMEM int usbDescriptorStringSerialNumber[] = {
USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN), USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN),
USB_CFG_SERIAL_NUMBER USB_CFG_SERIAL_NUMBER
}; };

View File

@ -5,7 +5,7 @@
* Tabsize: 4 * Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
* This Revision: $Id: usbdrv.h,v 1.2 2009-05-02 12:41:41 cvs Exp $ * This Revision: $Id: usbdrv.h,v 1.3 2014-08-23 23:58:32 cvs Exp $
*/ */
#ifndef __usbdrv_h_included__ #ifndef __usbdrv_h_included__
@ -394,43 +394,43 @@ extern volatile schar usbRxLen;
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
extern extern
#if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
char usbDescriptorDevice[]; char usbDescriptorDevice[];
extern extern
#if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
char usbDescriptorConfiguration[]; char usbDescriptorConfiguration[];
extern extern
#if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
char usbDescriptorHidReport[]; char usbDescriptorHidReport[];
extern extern
#if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
char usbDescriptorString0[]; char usbDescriptorString0[];
extern extern
#if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
int usbDescriptorStringVendor[]; int usbDescriptorStringVendor[];
extern extern
#if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
int usbDescriptorStringDevice[]; int usbDescriptorStringDevice[];
extern extern
#if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM) #if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM)
PROGMEM const PROGMEM
#endif #endif
int usbDescriptorStringSerialNumber[]; int usbDescriptorStringSerialNumber[];

View File

@ -5,7 +5,7 @@
* Tabsize: 4 * Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt) * License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
* Revision: $Id: usbdrvasm.S,v 1.2 2009-05-02 12:41:41 cvs Exp $ * Revision: $Id: usbdrvasm.S,v 1.3 2014-08-23 23:58:32 cvs Exp $
*/ */
/* /*
@ -74,7 +74,7 @@ the file appropriate for the given clock rate.
# define nop2 rjmp .+0 /* jump to next instruction */ # define nop2 rjmp .+0 /* jump to next instruction */
# ifndef USB_INTR_VECTOR /* default to hardware interrupt INT0 */ # ifndef USB_INTR_VECTOR /* default to hardware interrupt INT0 */
# define USB_INTR_VECTOR SIG_INTERRUPT0 # define USB_INTR_VECTOR INT0_vect
# endif # endif
.text .text
.global USB_INTR_VECTOR .global USB_INTR_VECTOR