Skip to content

Commit

Permalink
Fix compilation with modern GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
raphnet committed Aug 23, 2014
1 parent f649f9c commit 9be75d1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
--- v1.4.3 (August 23, 2041)
- Fix compilation with modern GCC

--- v1.4.2 (July 14, 2013)
- Corrected the USB Vendor ID

Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static uchar rt_usbDeviceDescriptorSize=0;
/* The maximum number of independent reports that are supported. */
#define MAX_REPORTS 8

PROGMEM int usbDescriptorStringSerialNumber[] = {
const PROGMEM int usbDescriptorStringSerialNumber[] = {
USB_STRING_DESCRIPTOR_HEADER(4),
'1','0','0','0'
};
Expand Down
10 changes: 5 additions & 5 deletions usbdrv/usbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* 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"
Expand Down Expand Up @@ -80,7 +80,7 @@ optimizing hints:
#if USB_CFG_DESCR_PROPS_STRING_0 == 0
#undef USB_CFG_DESCR_PROPS_STRING_0
#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 */
3, /* descriptor type */
0x09, 0x04, /* language index (0x0409 = US-English) */
Expand All @@ -90,7 +90,7 @@ PROGMEM char usbDescriptorString0[] = { /* language descriptor */
#if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN
#undef USB_CFG_DESCR_PROPS_STRING_VENDOR
#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_CFG_VENDOR_NAME
};
Expand All @@ -99,7 +99,7 @@ PROGMEM int usbDescriptorStringVendor[] = {
#if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN
#undef USB_CFG_DESCR_PROPS_STRING_PRODUCT
#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_CFG_DEVICE_NAME
};
Expand All @@ -108,7 +108,7 @@ PROGMEM int usbDescriptorStringDevice[] = {
#if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN
#undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
#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_CFG_SERIAL_NUMBER
};
Expand Down
16 changes: 8 additions & 8 deletions usbdrv/usbdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* 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__
Expand Down Expand Up @@ -394,43 +394,43 @@ extern volatile schar usbRxLen;
#ifndef __ASSEMBLER__
extern
#if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
char usbDescriptorDevice[];

extern
#if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
char usbDescriptorConfiguration[];

extern
#if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
char usbDescriptorHidReport[];

extern
#if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
char usbDescriptorString0[];

extern
#if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
int usbDescriptorStringVendor[];

extern
#if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
int usbDescriptorStringDevice[];

extern
#if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM)
PROGMEM
const PROGMEM
#endif
int usbDescriptorStringSerialNumber[];

Expand Down
4 changes: 2 additions & 2 deletions usbdrv/usbdrvasm.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* 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 $
*/

/*
Expand Down Expand Up @@ -74,7 +74,7 @@ the file appropriate for the given clock rate.
# define nop2 rjmp .+0 /* jump to next instruction */

# ifndef USB_INTR_VECTOR /* default to hardware interrupt INT0 */
# define USB_INTR_VECTOR SIG_INTERRUPT0
# define USB_INTR_VECTOR INT0_vect
# endif
.text
.global USB_INTR_VECTOR
Expand Down

0 comments on commit 9be75d1

Please sign in to comment.