Go to the documentation of this file.
23 #ifndef __usbportability_h_INCLUDED__
24 #define __usbportability_h_INCLUDED__
29 #if defined __IAR_SYSTEMS_ICC__ || defined __IAR_SYSTEMS_ASM__
32 #ifndef ENABLE_BIT_DEFINITIONS
33 # define ENABLE_BIT_DEFINITIONS 1
38 #ifndef __IAR_SYSTEMS_ASM__
42 #define __attribute__(arg)
44 #ifdef __IAR_SYSTEMS_ASM__
45 # define __ASSEMBLER__
49 # define PROGMEM __farflash
51 # define PROGMEM __flash
54 #define USB_READ_FLASH(addr) (*(PROGMEM char *)(addr))
59 #define cli() __disable_interrupt()
60 #define sei() __enable_interrupt()
61 #define wdt_reset() __watchdog_reset()
62 #define _BV(x) (1 << (x))
73 #define hi8(x) (((x)>>8) & 0xff)
84 #elif __CODEVISIONAVR__
93 #define __attribute__(arg)
95 #define PROGMEM __flash
96 #define USB_READ_FLASH(addr) (*(PROGMEM char *)(addr))
99 static inline void cli(
void)
103 static inline void sei(
void)
108 #define _delay_ms(t) delay_ms(t)
109 #define _BV(x) (1 << (x))
110 #define USB_CFG_USE_SWITCH_STATEMENT 1
113 #define endm .endmacro
114 #define nop2 rjmp .+0
122 # define _VECTOR(N) __vector_ ## N
124 # include <avr/pgmspace.h>
127 #if USB_CFG_DRIVER_FLASH_PAGE
128 # define USB_READ_FLASH(addr) pgm_read_byte_far(((long)USB_CFG_DRIVER_FLASH_PAGE << 16) | (long)(addr))
130 # define USB_READ_FLASH(addr) pgm_read_byte(addr)
135 #define nop2 rjmp .+0
141 # define PRG_RDB(addr) USB_READ_FLASH(addr)