Renamed the ATTR_ALWAYSINLINE function attribute macro to ATTR_ALWAYS_INLINE to match the style of the other function attribute macro names.
Added ATTR_ALWAYS_INLINE attribute to several inlined library functions, to ensure they are inlined in all circumstances.
Cleanups to Endpoint.h and Pipe.h. Added better documentation for the endpoint and pipe interrupts.
# make program = Download the hex file to the device, using avrdude.\r
# Please customize the avrdude settings below first!\r
#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-# have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-# have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-# (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-# (must have Atmel FLIP installed).\r
-#\r
# make doxygen = Generate DoxyGen documentation for the project (must have\r
# DoxyGen installed)\r
#\r
program: $(TARGET).hex $(TARGET).eep\r
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
\r
-flip: $(TARGET).hex\r
- batchisp -hardware usb -device $(MCU) -operation erase f\r
- batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
- dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
- copy $(TARGET).eep $(TARGET)eep.hex\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
- dfu-programmer $(MCU) reset\r
\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# make program = Download the hex file to the device, using avrdude.\r
# Please customize the avrdude settings below first!\r
#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-# have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-# have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-# (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-# (must have Atmel FLIP installed).\r
-#\r
# make doxygen = Generate DoxyGen documentation for the project (must have\r
# DoxyGen installed)\r
#\r
# Program the device. \r
program: $(TARGET).hex $(TARGET).eep\r
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
- batchisp -hardware usb -device $(MCU) -operation erase f\r
- batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
- dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
- copy $(TARGET).eep $(TARGET)eep.hex\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
- dfu-programmer $(MCU) reset\r
+ \r
+ \r
\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# make program = Download the hex file to the device, using avrdude.\r
# Please customize the avrdude settings below first!\r
#\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-# have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-# have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-# (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-# (must have Atmel FLIP installed).\r
-#\r
# make doxygen = Generate DoxyGen documentation for the project (must have\r
# DoxyGen installed)\r
#\r
program: $(TARGET).hex $(TARGET).eep\r
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
\r
-flip: $(TARGET).hex\r
- batchisp -hardware usb -device $(MCU) -operation erase f\r
- batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
- dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
- copy $(TARGET).eep $(TARGET)eep.hex\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
- batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
- batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
- dfu-programmer $(MCU) reset\r
\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
\r
Bluetooth_Device_t Bluetooth_DeviceConfiguration =\r
{\r
- Class: (DEVICE_CLASS_SERVICE_CAPTURING | DEVICE_CLASS_MAJOR_COMPUTER | DEVICE_CLASS_MINOR_COMPUTER_PALM),\r
+ Class: (DEVICE_CLASS_SERVICE_CAPTURING | DEVICE_CLASS_MAJOR_COMPUTER | DEVICE_CLASS_MINOR_COMPUTER_PALM),\r
PINCode: "0000",\r
- Name: "LUFA Bluetooth Demo"\r
+ Name: "LUFA Bluetooth Demo"\r
};\r
\r
\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
$(REMOVE) $(SRC:.c=.i)\r
$(REMOVEDIR) .dep\r
\r
+\r
doxygen:\r
@echo Generating Project Documentation...\r
@doxygen Doxygen.conf\r
@echo Documentation Generation Complete.\r
\r
+clean_doxygen:\r
+ rm -rf Documentation\r
+\r
# Create object files directory\r
$(shell mkdir $(OBJDIR) 2>/dev/null)\r
\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
@echo $(MSG_SYMBOL_TABLE) $@\r
$(NM) -n $< > $@\r
\r
+\r
+\r
# Create library from object files.\r
.SECONDARY : $(TARGET).a\r
.PRECIOUS : $(OBJ)\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ \r
\r
\r
-## Target: clean project.\r
+# Target: clean project.\r
clean: begin clean_list clean_binary end\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
*\r
* \section Sec_ChangeLogXXXXXX Version XXXXXX\r
*\r
- * - Added new BluetoothHost demo\r
+ * - Added new incomplete BluetoothHost demo\r
* - Changed AVRISP Programmer descriptors to use a newly allocated 0x204F PID value\r
* - Fixed MagStripe project configuration descriptor containing an unused (blank) endpoint descriptor\r
* - Incorporated makefile changes by Denver Gingerich to retain compatibility with stock (non-WinAVR) AVR-GCC installations\r
* - Changed stream wait timeout counter to be 16-bit, so that very long timeout periods can be set for correct communications with\r
* badly designed hosts or devices which greatly exceed the USB specification limits\r
* - Mass Storage Host demo now uses a USB_STREAM_TIMEOUT_MS of two seconds to maintain compatibility with poorly designed devices\r
+ * - Function attribute ATTR_ALWAYSINLINE renamed to ATTR_ALWAYS_INLINE to match other function attribute macro naming conventions\r
+ * - Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances\r
*\r
* \section Sec_ChangeLog090209 Version 090209\r
*\r
/** Forces the compiler to inline the specified function. When applied, the given function will be\r
* inlined under all circumstances.\r
*/\r
- #define ATTR_ALWAYSINLINE __attribute__ ((always_inline))\r
+ #define ATTR_ALWAYS_INLINE __attribute__ ((always_inline))\r
\r
/** Indicates that the specified function is pure, in that it has no side-effects other than global\r
* or parameter variable access.\r
*\r
* \return Response byte from the attached SPI device\r
*/\r
- static inline uint8_t SPI_TransferByte(const uint8_t Byte) ATTR_ALWAYSINLINE;\r
+ static inline uint8_t SPI_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline uint8_t SPI_TransferByte(const uint8_t Byte)\r
{\r
SPDR = Byte;\r
*\r
* \param Byte Byte to send through the SPI interface\r
*/\r
- static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYSINLINE;\r
+ static inline void SPI_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline void SPI_SendByte(const uint8_t Byte)\r
{\r
SPDR = Byte;\r
*\r
* \return The response byte from the attached SPI device\r
*/\r
- static inline uint8_t SPI_ReceiveByte(void) ATTR_ALWAYSINLINE ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint8_t SPI_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;\r
static inline uint8_t SPI_ReceiveByte(void)\r
{\r
SPDR = 0x00;\r
*\r
* \return Last response byte from the dataflash\r
*/\r
- static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYSINLINE;\r
+ static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline uint8_t Dataflash_TransferByte(const uint8_t Byte)\r
{\r
return SPI_TransferByte(Byte);\r
*\r
* \param Byte of data to send to the dataflash\r
*/\r
- static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYSINLINE;\r
+ static inline void Dataflash_SendByte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline void Dataflash_SendByte(const uint8_t Byte)\r
{\r
SPI_SendByte(Byte);\r
*\r
* \return Last response byte from the dataflash\r
*/\r
- static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYSINLINE ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint8_t Dataflash_ReceiveByte(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;\r
static inline uint8_t Dataflash_ReceiveByte(void)\r
{\r
return SPI_ReceiveByte();\r
/** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
* should be initialized in the OUT direction - i.e. data flows from host to device.\r
*/\r
- #define ENDPOINT_DIR_OUT 0\r
+ #define ENDPOINT_DIR_OUT (0 << EPDIR)\r
\r
/** Endpoint data direction mask for Endpoint_ConfigureEndpoint(). This indicates that the endpoint\r
* should be initialized in the IN direction - i.e. data flows from device to host.\r
*/\r
- #define ENDPOINT_DIR_IN (1 << EPDIR)\r
+ #define ENDPOINT_DIR_IN (1 << EPDIR)\r
\r
/** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates\r
* that the endpoint should have one single bank, which requires less USB FIFO memory but results\r
* in slower transfers as only one USB device (the AVR or the host) can access the endpoint's\r
* bank at the one time.\r
*/\r
- #define ENDPOINT_BANK_SINGLE 0\r
+ #define ENDPOINT_BANK_SINGLE (0 << EPBK0)\r
\r
/** Mask for the bank mode selection for the Endpoint_ConfigureEndpoint() macro. This indicates\r
* that the endpoint should have two banks, which requires more USB FIFO memory but results\r
* in faster transfers as one USB device (the AVR or the host) can access one bank while the other\r
* accesses the second bank.\r
*/\r
- #define ENDPOINT_BANK_DOUBLE (1 << EPBK0)\r
+ #define ENDPOINT_BANK_DOUBLE (1 << EPBK0)\r
\r
/** Endpoint address for the default control endpoint, which always resides in address 0. This is\r
* defined for convenience to give more readable code when used with the endpoint macros.\r
*/\r
- #define ENDPOINT_CONTROLEP 0\r
+ #define ENDPOINT_CONTROLEP 0\r
\r
/** Default size of the default control endpoint's bank, until altered by the Endpoint0Size value \r
* in the device descriptor. Not available if the FIXED_CONTROL_ENDPOINT_SIZE token is defined.\r
*/\r
#if (!defined(FIXED_CONTROL_ENDPOINT_SIZE) || defined(__DOXYGEN__))\r
- #define ENDPOINT_CONTROLEP_DEFAULT_SIZE 8\r
+ #define ENDPOINT_CONTROLEP_DEFAULT_SIZE 8\r
#endif\r
\r
/** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's\r
* numerical address in the device.\r
*/\r
- #define ENDPOINT_EPNUM_MASK 0b111\r
+ #define ENDPOINT_EPNUM_MASK 0b111\r
\r
/** Endpoint bank size mask, for masking against endpoint addresses to retrieve the endpoint's\r
* bank size in the device.\r
*/\r
- #define ENDPOINT_EPSIZE_MASK 0x7FF\r
+ #define ENDPOINT_EPSIZE_MASK 0x7FF\r
\r
/** Maximum size in bytes of a given endpoint.\r
*\r
* \param n Endpoint number, a value between 0 and (ENDPOINT_TOTAL_ENDPOINTS - 1)\r
*/ \r
- #define ENDPOINT_MAX_SIZE(n) _ENDPOINT_GET_MAXSIZE(n)\r
+ #define ENDPOINT_MAX_SIZE(n) _ENDPOINT_GET_MAXSIZE(n)\r
\r
/** Indicates if the given endpoint supports double banking.\r
*\r
* \param n Endpoint number, a value between 0 and (ENDPOINT_TOTAL_ENDPOINTS - 1)\r
*/ \r
- #define ENDPOINT_DOUBLEBANK_SUPPORTED(n) _ENDPOINT_GET_DOUBLEBANK(n)\r
+ #define ENDPOINT_DOUBLEBANK_SUPPORTED(n) _ENDPOINT_GET_DOUBLEBANK(n)\r
\r
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)\r
/** Total number of endpoints (including the default control endpoint at address 0) which may\r
* be used in the device. Different USB AVR models support different amounts of endpoints,\r
* this value reflects the maximum number of endpoints for the currently selected AVR model.\r
*/\r
- #define ENDPOINT_TOTAL_ENDPOINTS 7\r
+ #define ENDPOINT_TOTAL_ENDPOINTS 7\r
#else\r
- #define ENDPOINT_TOTAL_ENDPOINTS 5 \r
+ #define ENDPOINT_TOTAL_ENDPOINTS 5 \r
#endif\r
\r
/** Interrupt definition for the endpoint SETUP interrupt (for CONTROL type endpoints). Should be\r
*\r
* This interrupt will fire if enabled on a CONTROL type endpoint if a new control packet is\r
* received from the host.\r
+ *\r
+ * \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
+ * endpoint is selected), and will fire the common endpoint interrupt vector.\r
+ *\r
+ * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define ENDPOINT_INT_SETUP UEIENX, (1 << RXSTPE), UEINTX, (1 << RXSTPI)\r
+ #define ENDPOINT_INT_SETUP UEIENX, (1 << RXSTPE), UEINTX, (1 << RXSTPI)\r
\r
/** Interrupt definition for the endpoint IN interrupt (for INTERRUPT type endpoints). Should be\r
* used with the USB_INT_* macros located in USBInterrupt.h.\r
* This interrupt will fire if enabled on an INTERRUPT type endpoint if a the endpoint interrupt\r
* period has elapsed and the endpoint is ready for a new packet to be written to its FIFO buffer\r
* (if required).\r
+ *\r
+ * \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
+ * endpoint is selected), and will fire the common endpoint interrupt vector.\r
+ *\r
+ * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define ENDPOINT_INT_IN UEIENX, (1 << TXINE) , UEINTX, (1 << TXINI)\r
+ #define ENDPOINT_INT_IN UEIENX, (1 << TXINE) , UEINTX, (1 << TXINI)\r
\r
/** Interrupt definition for the endpoint OUT interrupt (for INTERRUPT type endpoints). Should be\r
* used with the USB_INT_* macros located in USBInterrupt.h.\r
* This interrupt will fire if enabled on an INTERRUPT type endpoint if a the endpoint interrupt\r
* period has elapsed and the endpoint is ready for a packet from the host to be read from its\r
* FIFO buffer (if received).\r
+ *\r
+ * \note This interrupt must be enabled and cleared on *each* endpoint which requires it (after the\r
+ * endpoint is selected), and will fire the common endpoint interrupt vector.\r
+ *\r
+ * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define ENDPOINT_INT_OUT UEIENX, (1 << RXOUTE), UEINTX, (1 << RXOUTI)\r
+ #define ENDPOINT_INT_OUT UEIENX, (1 << RXOUTE), UEINTX, (1 << RXOUTI)\r
\r
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER) || defined(__DOXYGEN__)\r
/** Indicates the number of bytes currently stored in the current endpoint's selected bank. */\r
- #define Endpoint_BytesInEndpoint() UEBCX\r
+ #define Endpoint_BytesInEndpoint() UEBCX\r
#else\r
- #define Endpoint_BytesInEndpoint() UEBCLX\r
+ #define Endpoint_BytesInEndpoint() UEBCLX\r
#endif\r
\r
/** Returns the endpoint address of the currently selected endpoint. This is typically used to save\r
* the currently selected endpoint number so that it can be restored after another endpoint has\r
* been manipulated.\r
*/\r
- #define Endpoint_GetCurrentEndpoint() (UENUM & ENDPOINT_EPNUM_MASK)\r
+ #define Endpoint_GetCurrentEndpoint() (UENUM & ENDPOINT_EPNUM_MASK)\r
\r
/** Selects the given endpoint number. If the address from the device descriptors is used, the\r
* value should be masked with the ENDPOINT_EPNUM_MASK constant to extract only the endpoint\r
* Any endpoint operations which do not require the endpoint number to be indicated will operate on\r
* the currently selected endpoint.\r
*/\r
- #define Endpoint_SelectEndpoint(epnum) MACROS{ UENUM = epnum; }MACROE\r
+ #define Endpoint_SelectEndpoint(epnum) MACROS{ UENUM = epnum; }MACROE\r
\r
/** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's\r
* In and Out pointers to the bank's contents.\r
*/\r
- #define Endpoint_ResetFIFO(epnum) MACROS{ UERST = (1 << epnum); UERST = 0; }MACROE\r
+ #define Endpoint_ResetFIFO(epnum) MACROS{ UERST = (1 << epnum); UERST = 0; }MACROE\r
\r
/** Enables the currently selected endpoint so that data can be sent and received through it to\r
* and from a host.\r
* \note Endpoints must first be configured properly rather than just being enabled via the\r
* Endpoint_ConfigureEndpoint() macro, which calls Endpoint_EnableEndpoint() automatically.\r
*/\r
- #define Endpoint_EnableEndpoint() MACROS{ UECONX |= (1 << EPEN); }MACROE\r
+ #define Endpoint_EnableEndpoint() MACROS{ UECONX |= (1 << EPEN); }MACROE\r
\r
/** Disables the currently selected endpoint so that data cannot be sent and received through it\r
* to and from a host.\r
*/\r
- #define Endpoint_DisableEndpoint() MACROS{ UECONX &= ~(1 << EPEN); }MACROE\r
+ #define Endpoint_DisableEndpoint() MACROS{ UECONX &= ~(1 << EPEN); }MACROE\r
\r
/** Returns true if the currently selected endpoint is enabled, false otherwise. */\r
- #define Endpoint_IsEnabled() ((UECONX & (1 << EPEN)) ? true : false)\r
+ #define Endpoint_IsEnabled() ((UECONX & (1 << EPEN)) ? true : false)\r
\r
/** Returns true if the currently selected endpoint may be read from (if data is waiting in the endpoint\r
* bank and the endpoint is an OUT direction, or if the bank is not yet full if the endpoint is an\r
* the endpoint is an OUT direction and no packet has been received, or if the endpoint is an IN\r
* direction and the endpoint bank is full.\r
*/\r
- #define Endpoint_ReadWriteAllowed() ((UEINTX & (1 << RWAL)) ? true : false)\r
+ #define Endpoint_ReadWriteAllowed() ((UEINTX & (1 << RWAL)) ? true : false)\r
\r
/** Returns true if the currently selected endpoint is configured, false otherwise. */\r
- #define Endpoint_IsConfigured() ((UESTA0X & (1 << CFGOK)) ? true : false)\r
+ #define Endpoint_IsConfigured() ((UESTA0X & (1 << CFGOK)) ? true : false)\r
\r
/** Returns a mask indicating which INTERRUPT type endpoints have interrupted - i.e. their\r
* interrupt duration has elapsed. Which endpoints have interrupted can be determined by\r
* masking the return value against (1 << {Endpoint Number}).\r
*/\r
- #define Endpoint_GetEndpointInterrupts() UEINT\r
+ #define Endpoint_GetEndpointInterrupts() UEINT\r
\r
/** Clears the endpoint interrupt flag. This clears the specified endpoint number's interrupt\r
* mask in the endpoint interrupt flag register.\r
*/\r
- #define Endpoint_ClearEndpointInterrupt(n) MACROS{ UEINT &= ~(1 << n); }MACROE\r
+ #define Endpoint_ClearEndpointInterrupt(n) MACROS{ UEINT &= ~(1 << n); }MACROE\r
\r
/** Returns true if the specified endpoint number has interrupted (valid only for INTERRUPT type\r
* endpoints), false otherwise.\r
*/\r
- #define Endpoint_HasEndpointInterrupted(n) ((UEINT & (1 << n)) ? true : false)\r
+ #define Endpoint_HasEndpointInterrupted(n) ((UEINT & (1 << n)) ? true : false)\r
\r
/** Clears the currently selected endpoint bank, and switches to the alternate bank if the currently\r
* selected endpoint is dual-banked. When cleared, this either frees the bank up for the next packet\r
* from the host (if the endpoint is of the OUT direction) or sends the packet contents to the host\r
* (if the endpoint is of the IN direction).\r
*/\r
- #define Endpoint_ClearCurrentBank() MACROS{ UEINTX &= ~(1 << FIFOCON); }MACROE\r
+ #define Endpoint_ClearCurrentBank() MACROS{ UEINTX &= ~(1 << FIFOCON); }MACROE\r
\r
/** Returns true if the current CONTROL type endpoint is ready for an IN packet, false otherwise. */\r
- #define Endpoint_IsSetupINReady() ((UEINTX & (1 << TXINI)) ? true : false)\r
+ #define Endpoint_IsSetupINReady() ((UEINTX & (1 << TXINI)) ? true : false)\r
\r
/** Returns true if the current CONTROL type endpoint is ready for an OUT packet, false otherwise. */\r
- #define Endpoint_IsSetupOUTReceived() ((UEINTX & (1 << RXOUTI)) ? true : false)\r
+ #define Endpoint_IsSetupOUTReceived() ((UEINTX & (1 << RXOUTI)) ? true : false)\r
\r
/** Returns true if the current CONTROL type endpoint is ready for a SETUP packet, false otherwise. */\r
- #define Endpoint_IsSetupReceived() ((UEINTX & (1 << RXSTPI)) ? true : false)\r
+ #define Endpoint_IsSetupReceived() ((UEINTX & (1 << RXSTPI)) ? true : false)\r
\r
/** Clears a received SETUP packet on the currently selected CONTROL type endpoint. */\r
- #define Endpoint_ClearSetupReceived() MACROS{ UEINTX &= ~(1 << RXSTPI); }MACROE\r
+ #define Endpoint_ClearSetupReceived() MACROS{ UEINTX &= ~(1 << RXSTPI); }MACROE\r
\r
/** Sends an IN packet to the host on the currently selected CONTROL type endpoint. */\r
- #define Endpoint_ClearSetupIN() MACROS{ UEINTX &= ~(1 << TXINI); }MACROE\r
+ #define Endpoint_ClearSetupIN() MACROS{ UEINTX &= ~(1 << TXINI); }MACROE\r
\r
/** Acknowedges an OUT packet to the host on the currently selected CONTROL type endpoint, freeing\r
* up the endpoint for the next packet.\r
*/\r
- #define Endpoint_ClearSetupOUT() MACROS{ UEINTX &= ~(1 << RXOUTI); }MACROE\r
+ #define Endpoint_ClearSetupOUT() MACROS{ UEINTX &= ~(1 << RXOUTI); }MACROE\r
\r
/** Stalls the current endpoint, indicating to the host that a logical problem occured with the\r
* indicated endpoint and that the current transfer sequence should be aborted. This provides a\r
* is called, or the host issues a CLEAR FEATURE request to the device for the currently selected\r
* endpoint.\r
*/\r
- #define Endpoint_StallTransaction() MACROS{ UECONX |= (1 << STALLRQ); }MACROE\r
+ #define Endpoint_StallTransaction() MACROS{ UECONX |= (1 << STALLRQ); }MACROE\r
\r
/** Clears the stall on the currently selected endpoint. */\r
- #define Endpoint_ClearStall() MACROS{ UECONX |= (1 << STALLRQC); }MACROE\r
+ #define Endpoint_ClearStall() MACROS{ UECONX |= (1 << STALLRQC); }MACROE\r
\r
/** Returns true if the currently selected endpoint is stalled, false othewise. */\r
- #define Endpoint_IsStalled() ((UECONX & (1 << STALLRQ)) ? true : false)\r
+ #define Endpoint_IsStalled() ((UECONX & (1 << STALLRQ)) ? true : false)\r
\r
/** Resets the data toggle of the currently selected endpoint. */\r
- #define Endpoint_ResetDataToggle() MACROS{ UECONX |= (1 << RSTDT); }MACROE\r
+ #define Endpoint_ResetDataToggle() MACROS{ UECONX |= (1 << RSTDT); }MACROE\r
\r
/* Enums: */\r
/** Enum for the possible error return codes of the Endpoint_WaitUntilReady function */\r
\r
/* Inline Functions: */\r
/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. */\r
- static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint8_t Endpoint_Read_Byte(void)\r
{\r
return UEDATX;\r
}\r
\r
/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints. */\r
+ static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Write_Byte(const uint8_t Byte)\r
{\r
UEDATX = Byte;\r
}\r
\r
/** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints. */\r
+ static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Discard_Byte(void)\r
{\r
uint8_t Dummy;\r
/** Reads two bytes from the currently selected endpoint's bank in little endian format, for OUT\r
* direction endpoints.\r
*/\r
- static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint16_t Endpoint_Read_Word_LE(void)\r
{\r
uint16_t Data;\r
/** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT\r
* direction endpoints.\r
*/\r
- static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint16_t Endpoint_Read_Word_BE(void)\r
{\r
uint16_t Data;\r
/** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN\r
* direction endpoints.\r
*/\r
+ static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Write_Word_LE(const uint16_t Word)\r
{\r
UEDATX = (Word & 0xFF);\r
/** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN\r
* direction endpoints.\r
*/\r
+ static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Write_Word_BE(const uint16_t Word)\r
{\r
UEDATX = (Word >> 8);\r
}\r
\r
/** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints. */\r
+ static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Discard_Word(void)\r
{\r
uint8_t Dummy;\r
/** Reads four bytes from the currently selected endpoint's bank in little endian format, for OUT\r
* direction endpoints.\r
*/\r
- static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint32_t Endpoint_Read_DWord_LE(void)\r
{\r
union\r
/** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT\r
* direction endpoints.\r
*/\r
- static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint32_t Endpoint_Read_DWord_BE(void)\r
{\r
union\r
/** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN\r
* direction endpoints.\r
*/\r
+ static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Write_DWord_LE(const uint32_t DWord)\r
{\r
- Endpoint_Write_Word_LE(DWord);\r
- Endpoint_Write_Word_LE(DWord >> 16);\r
+ UEDATX = (DWord & 0xFF);\r
+ UEDATX = (DWord >> 8);\r
+ UEDATX = (DWord >> 16);\r
+ UEDATX = (DWord >> 24);\r
}\r
\r
/** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN\r
* direction endpoints.\r
*/\r
+ static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Write_DWord_BE(const uint32_t DWord)\r
{\r
- Endpoint_Write_Word_BE(DWord >> 16);\r
- Endpoint_Write_Word_BE(DWord);\r
+ UEDATX = (DWord >> 24);\r
+ UEDATX = (DWord >> 16);\r
+ UEDATX = (DWord >> 8);\r
+ UEDATX = (DWord & 0xFF);\r
}\r
\r
/** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints. */\r
+ static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;\r
static inline void Endpoint_Discard_DWord(void)\r
{\r
uint8_t Dummy;\r
bool Endpoint_ConfigureEndpointStatic(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData);\r
\r
/* Inline Functions: */\r
- static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYSINLINE;\r
+ static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;\r
static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes)\r
{\r
if (Bytes <= 8)\r
/* Public Interface - May be used in end-application: */\r
/* Macros: */\r
/** Mask for Pipe_GetErrorFlags(), indicating that a CRC error occurred in the pipe on the received data. */\r
- #define PIPE_ERRORFLAG_CRC16 (1 << 4)\r
+ #define PIPE_ERRORFLAG_CRC16 (1 << 4)\r
\r
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware timeout error occurred in the pipe. */\r
- #define PIPE_ERRORFLAG_TIMEOUT (1 << 3)\r
+ #define PIPE_ERRORFLAG_TIMEOUT (1 << 3)\r
\r
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware PID error occurred in the pipe. */\r
- #define PIPE_ERRORFLAG_PID (1 << 2)\r
+ #define PIPE_ERRORFLAG_PID (1 << 2)\r
\r
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware data PID error occurred in the pipe. */\r
- #define PIPE_ERRORFLAG_DATAPID (1 << 1)\r
+ #define PIPE_ERRORFLAG_DATAPID (1 << 1)\r
\r
/** Mask for Pipe_GetErrorFlags(), indicating that a hardware data toggle error occurred in the pipe. */\r
- #define PIPE_ERRORFLAG_DATATGL (1 << 0)\r
+ #define PIPE_ERRORFLAG_DATATGL (1 << 0)\r
\r
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a SETUP token (for CONTROL type pipes),\r
* which will trigger a control request on the attached device when data is written to the pipe.\r
*/\r
- #define PIPE_TOKEN_SETUP (0b00 << PTOKEN0)\r
+ #define PIPE_TOKEN_SETUP (0b00 << PTOKEN0)\r
\r
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),\r
* indicating that the pipe data will flow from device to host.\r
*/\r
- #define PIPE_TOKEN_IN (0b01 << PTOKEN0)\r
+ #define PIPE_TOKEN_IN (0b01 << PTOKEN0)\r
\r
/** Token mask for Pipe_ConfigurePipe(). This sets the pipe as a IN token (for non-CONTROL type pipes),\r
* indicating that the pipe data will flow from host to device.\r
*/\r
- #define PIPE_TOKEN_OUT (0b10 << PTOKEN0)\r
+ #define PIPE_TOKEN_OUT (0b10 << PTOKEN0)\r
\r
/** Mask for the bank mode selection for the Pipe_ConfigurePipe() macro. This indicates that the pipe\r
* should have one single bank, which requires less USB FIFO memory but results in slower transfers as\r
* only one USB device (the AVR or the attached device) can access the pipe's bank at the one time.\r
*/\r
- #define PIPE_BANK_SINGLE 0\r
+ #define PIPE_BANK_SINGLE (0 << EPBK0)\r
\r
/** Mask for the bank mode selection for the Pipe_ConfigurePipe() macro. This indicates that the pipe\r
* should have two banks, which requires more USB FIFO memory but results in faster transfers as one\r
* USB device (the AVR or the attached device) can access one bank while the other accesses the second\r
* bank.\r
*/\r
- #define PIPE_BANK_DOUBLE (1 << EPBK0)\r
+ #define PIPE_BANK_DOUBLE (1 << EPBK0)\r
\r
/** Pipe address for the default control pipe, which always resides in address 0. This is\r
* defined for convenience to give more readable code when used with the pipe macros.\r
*/\r
- #define PIPE_CONTROLPIPE 0\r
+ #define PIPE_CONTROLPIPE 0\r
\r
/** Default size of the default control pipe's bank, until altered by the Endpoint0Size value \r
* in the device descriptor of the attached device.\r
*/\r
- #define PIPE_CONTROLPIPE_DEFAULT_SIZE 8\r
+ #define PIPE_CONTROLPIPE_DEFAULT_SIZE 8\r
\r
/** Pipe number mask, for masking against pipe addresses to retrieve the pipe's numerical address\r
* in the device.\r
*/\r
- #define PIPE_PIPENUM_MASK 0x07\r
+ #define PIPE_PIPENUM_MASK 0x07\r
\r
/** Total number of pipes (including the default control pipe at address 0) which may be used in\r
* the device. Different USB AVR models support different amounts of pipes, this value reflects\r
* the maximum number of pipes for the currently selected AVR model.\r
*/\r
- #define PIPE_TOTAL_PIPES 7\r
+ #define PIPE_TOTAL_PIPES 7\r
\r
/** Size in bytes of the largest pipe bank size possible in the device. Not all banks on each AVR\r
* model supports the largest bank size possible on the device; different pipe numbers support\r
* different maximum bank sizes. This value reflects the largest possible bank of any pipe on the\r
* currently selected USB AVR model.\r
*/\r
- #define PIPE_MAX_SIZE 256\r
+ #define PIPE_MAX_SIZE 256\r
\r
/** Endpoint number mask, for masking against endpoint addresses to retrieve the endpoint's\r
* numerical address in the attached device.\r
*/\r
- #define PIPE_EPNUM_MASK 0x07\r
+ #define PIPE_EPNUM_MASK 0x07\r
\r
/** Endpoint bank size mask, for masking against endpoint addresses to retrieve the endpoint's\r
* bank size in the attached device.\r
*/\r
- #define PIPE_EPSIZE_MASK 0x7FF\r
+ #define PIPE_EPSIZE_MASK 0x7FF\r
\r
/** Interrupt definition for the pipe IN interrupt (for INTERRUPT type pipes). Should be used with\r
* the USB_INT_* macros located in USBInterrupt.h.\r
* elapsed and the pipe is ready for the next packet from the attached device to be read out from its\r
* FIFO buffer (if received).\r
*\r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define PIPE_INT_IN UPIENX, (1 << RXINE) , UPINTX, (1 << RXINI)\r
+ #define PIPE_INT_IN UPIENX, (1 << RXINE) , UPINTX, (1 << RXINI)\r
\r
/** Interrupt definition for the pipe OUT interrupt (for INTERRUPT type pipes). Should be used with\r
* the USB_INT_* macros located in USBInterrupt.h.\r
* has elapsed and the pipe is ready for a packet to be written to the pipe's FIFO buffer and sent\r
* to the attached device (if required).\r
* \r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
- * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector. */\r
- #define PIPE_INT_OUT UPIENX, (1 << TXOUTE), UPINTX, (1 << TXOUTI)\r
+ * \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
+ */\r
+ #define PIPE_INT_OUT UPIENX, (1 << TXOUTE), UPINTX, (1 << TXOUTI)\r
\r
/** Interrupt definition for the pipe SETUP bank ready interrupt (for CONTROL type pipes). Should be\r
* used with the USB_INT_* macros located in USBInterrupt.h.\r
* This interrupt will fire if enabled on an CONTROL type pipe when the pipe is ready for a new\r
* control request.\r
*\r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define PIPE_INT_SETUP UPIENX, (1 << TXSTPE) , UPINTX, (1 << TXSTPI)\r
+ #define PIPE_INT_SETUP UPIENX, (1 << TXSTPE) , UPINTX, (1 << TXSTPI)\r
\r
/** Interrupt definition for the pipe error interrupt. Should be used with the USB_INT_* macros\r
* located in USBInterrupt.h.\r
* This interrupt will fire if enabled on a particular pipe if an error occurs on that pipe, such\r
* as a CRC mismatch error.\r
*\r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*\r
* \see Pipe_GetErrorFlags() for more information on the pipe errors.\r
*/\r
- #define PIPE_INT_ERROR UPIENX, (1 << PERRE), UPINTX, (1 << PERRI)\r
+ #define PIPE_INT_ERROR UPIENX, (1 << PERRE), UPINTX, (1 << PERRI)\r
\r
/** Interrupt definition for the pipe NAK received interrupt. Should be used with the USB_INT_* macros\r
* located in USBInterrupt.h.\r
* This interrupt will fire if enabled on a particular pipe if an attached device returns a NAK in\r
* response to a sent packet.\r
*\r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*\r
* \see Pipe_IsNAKReceived() for more information on pipe NAKs.\r
*/\r
- #define PIPE_INT_NAK UPIENX, (1 << NAKEDE), UPINTX, (1 << NAKEDI)\r
+ #define PIPE_INT_NAK UPIENX, (1 << NAKEDE), UPINTX, (1 << NAKEDI)\r
\r
/** Interrupt definition for the pipe STALL received interrupt. Should be used with the USB_INT_* macros\r
* located in USBInterrupt.h.\r
* This interrupt will fire if enabled on a particular pipe if an attached device returns a STALL on the\r
* currently selected pipe. This will also fire if the pipe is an isochronous pipe and a CRC error occurs.\r
*\r
- * This interrupt must be enabled on *each* pipe which requires it (after the pipe is selected), and\r
- * will fire the common pipe interrupt vector.\r
+ * \note This interrupt must be enabled and cleared on *each* pipe which requires it (after the pipe\r
+ * is selected), and will fire the common pipe interrupt vector.\r
*\r
* \see ENDPOINT_PIPE_vect for more information on the common pipe and endpoint interrupt vector.\r
*/\r
- #define PIPE_INT_STALL UPIENX, (1 << RXSTALLE), UPINTX, (1 << RXSTALLI)\r
+ #define PIPE_INT_STALL UPIENX, (1 << RXSTALLE), UPINTX, (1 << RXSTALLI)\r
\r
/** Indicates the number of bytes currently stored in the current pipe's selected bank. */\r
- #define Pipe_BytesInPipe() UPBCX\r
+ #define Pipe_BytesInPipe() UPBCX\r
\r
/** Resets the desired pipe, including the pipe banks and flags. */\r
- #define Pipe_ResetPipe(pipenum) MACROS{ UPRST = (1 << pipenum); UPRST = 0; }MACROE\r
+ #define Pipe_ResetPipe(pipenum) MACROS{ UPRST = (1 << pipenum); UPRST = 0; }MACROE\r
\r
/** Selects the given pipe number. Any pipe operations which do not require the pipe number to be\r
* indicated will operate on the currently selected pipe.\r
*/\r
- #define Pipe_SelectPipe(pipenum) MACROS{ UPNUM = pipenum; }MACROE\r
+ #define Pipe_SelectPipe(pipenum) MACROS{ UPNUM = pipenum; }MACROE\r
\r
/** Returns the pipe address of the currently selected pipe. This is typically used to save the\r
* currently selected pipe number so that it can be restored after another pipe has been manipulated.\r
*/\r
- #define Pipe_GetCurrentPipe() (UPNUM & PIPE_PIPENUM_MASK)\r
+ #define Pipe_GetCurrentPipe() (UPNUM & PIPE_PIPENUM_MASK)\r
\r
/** Enables the currently selected pipe so that data can be sent and received through it to and from\r
* an attached device.\r
* \note Pipes must first be configured properly rather than just being enabled via the\r
* Pipe_ConfigurePipe() macro, which calls Pipe_EnablePipe() automatically.\r
*/\r
- #define Pipe_EnablePipe() MACROS{ UPCONX |= (1 << PEN); }MACROE\r
+ #define Pipe_EnablePipe() MACROS{ UPCONX |= (1 << PEN); }MACROE\r
\r
/** Disables the currently selected pipe so that data cannot be sent and received through it to and\r
* from an attached device.\r
*/\r
- #define Pipe_DisablePipe() MACROS{ UPCONX &= ~(1 << PEN); }MACROE\r
+ #define Pipe_DisablePipe() MACROS{ UPCONX &= ~(1 << PEN); }MACROE\r
\r
/** Returns true if the currently selected pipe is enabled, false otherwise. */\r
- #define Pipe_IsEnabled() ((UPCONX & (1 << PEN)) ? true : false)\r
+ #define Pipe_IsEnabled() ((UPCONX & (1 << PEN)) ? true : false)\r
\r
/** Sets the token for the currently selected endpoint to one of the tokens specified by the PIPE_TOKEN_*\r
* masks. This should only be used on CONTROL type endpoints, to allow for bidirectional transfer of\r
* data during control requests.\r
*/\r
- #define Pipe_SetToken(token) MACROS{ UPCFG0X = ((UPCFG0X & ~PIPE_TOKEN_MASK) | token); }MACROE\r
+ #define Pipe_SetToken(token) MACROS{ UPCFG0X = ((UPCFG0X & ~PIPE_TOKEN_MASK) | token); }MACROE\r
\r
/** Configures the currently selected pipe to allow for an unlimited number of IN requests. */\r
- #define Pipe_SetInfiniteINRequests() MACROS{ UPCONX |= (1 << INMODE); }MACROE\r
+ #define Pipe_SetInfiniteINRequests() MACROS{ UPCONX |= (1 << INMODE); }MACROE\r
\r
/** Configures the currently selected pipe to only allow the specified number of IN requests to be\r
* accepted by the pipe before it is automatically frozen.\r
*/\r
- #define Pipe_SetFiniteINRequests(n) MACROS{ UPCONX &= ~(1 << INMODE); UPINRQX = n; }MACROE\r
+ #define Pipe_SetFiniteINRequests(n) MACROS{ UPCONX &= ~(1 << INMODE); UPINRQX = n; }MACROE\r
\r
/** Returns true if the currently selected pipe is configured, false otherwise. */\r
- #define Pipe_IsConfigured() ((UPSTAX & (1 << CFGOK)) ? true : false)\r
+ #define Pipe_IsConfigured() ((UPSTAX & (1 << CFGOK)) ? true : false)\r
\r
/** Sets the period between interrupts for an INTERRUPT type pipe to a specified number of milliseconds. */\r
- #define Pipe_SetInterruptPeriod(ms) MACROS{ UPCFG2X = ms; }MACROE\r
+ #define Pipe_SetInterruptPeriod(ms) MACROS{ UPCFG2X = ms; }MACROE\r
\r
/** Returns a mask indicating which pipe's interrupt periods have elapsed, indicating that the pipe should\r
* be serviced.\r
*/\r
- #define Pipe_GetPipeInterrupts() UPINT\r
+ #define Pipe_GetPipeInterrupts() UPINT\r
\r
/** Clears the interrupt flag for the specified pipe number. */\r
- #define Pipe_ClearPipeInterrupt(n) MACROS{ UPINT &= ~(1 << n); }MACROE\r
+ #define Pipe_ClearPipeInterrupt(n) MACROS{ UPINT &= ~(1 << n); }MACROE\r
\r
/** Returns true if the specified pipe's interrupt period has elapsed, false otherwise. */\r
- #define Pipe_HasPipeInterrupted(n) ((UPINT & (1 << n)) ? true : false)\r
+ #define Pipe_HasPipeInterrupted(n) ((UPINT & (1 << n)) ? true : false)\r
\r
/** Clears the pipe bank, and switches to the alternate bank if the currently selected pipe is\r
* dual-banked. When cleared, this either frees the bank up for the next packet from the host\r
* (if the endpoint is of the OUT direction) or sends the packet contents to the host (if the\r
* pipe is of the IN direction).\r
*/\r
- #define Pipe_ClearCurrentBank() MACROS{ UPINTX &= ~(1 << FIFOCON); }MACROE\r
+ #define Pipe_ClearCurrentBank() MACROS{ UPINTX &= ~(1 << FIFOCON); }MACROE\r
\r
/** Unfreezes the pipe, allowing it to communicate with an attached device. */\r
- #define Pipe_Unfreeze() MACROS{ UPCONX &= ~(1 << PFREEZE); }MACROE\r
+ #define Pipe_Unfreeze() MACROS{ UPCONX &= ~(1 << PFREEZE); }MACROE\r
\r
/** Freezes the pipe, preventing it from communicating with an attached device. */\r
- #define Pipe_Freeze() MACROS{ UPCONX |= (1 << PFREEZE); }MACROE\r
+ #define Pipe_Freeze() MACROS{ UPCONX |= (1 << PFREEZE); }MACROE\r
\r
/** Clears the master pipe error flag. */\r
- #define Pipe_ClearError() MACROS{ UPINTX &= ~(1 << PERRI); }MACROE\r
+ #define Pipe_ClearError() MACROS{ UPINTX &= ~(1 << PERRI); }MACROE\r
\r
/** Returns true if the master pipe error flag is set for the currently selected pipe, indicating that\r
* some sort of hardware error has occurred on the pipe.\r
*\r
* \see Pipe_GetErrorFlags() macro for information on retreiving the exact error flag.\r
*/\r
- #define Pipe_IsError() ((UPINTX & (1 << PERRI)) ? true : false)\r
+ #define Pipe_IsError() ((UPINTX & (1 << PERRI)) ? true : false)\r
\r
/** Clears all the currently selected pipe's hardware error flags, but does not clear the master error\r
* flag for the pipe. */\r
- #define Pipe_ClearErrorFlags() MACROS{ UPERRX = 0; }MACROE\r
+ #define Pipe_ClearErrorFlags() MACROS{ UPERRX = 0; }MACROE\r
\r
/** Returns a mask of the hardware error flags which have occured on the currently selected pipe. This\r
* value can then be masked against the PIPE_ERRORFLAG_* masks to determine what error has occurred.\r
*/\r
- #define Pipe_GetErrorFlags() UPERRX\r
+ #define Pipe_GetErrorFlags() UPERRX\r
\r
/** Returns true if the currently selected pipe may be read from (if data is waiting in the pipe\r
* bank and the pipe is an IN direction, or if the bank is not yet full if the pipe is an OUT\r
* is an IN direction and no packet has been received, or if the pipe is an OUT direction and the\r
* pipe bank is full.\r
*/\r
- #define Pipe_ReadWriteAllowed() ((UPINTX & (1 << RWAL)) ? true : false)\r
+ #define Pipe_ReadWriteAllowed() ((UPINTX & (1 << RWAL)) ? true : false)\r
\r
/** Clears the flag indicating that a SETUP request has been sent to the attached device from the\r
* currently selected CONTROL type pipe.\r
*/\r
- #define Pipe_ClearSetupSent() MACROS{ UPINTX &= ~(1 << TXSTPI); }MACROE\r
+ #define Pipe_ClearSetupSent() MACROS{ UPINTX &= ~(1 << TXSTPI); }MACROE\r
\r
/** Returns true if no SETUP request is currently being sent to the attached device, false otherwise. */\r
- #define Pipe_IsSetupSent() ((UPINTX & (1 << TXSTPI)) ? true : false)\r
+ #define Pipe_IsSetupSent() ((UPINTX & (1 << TXSTPI)) ? true : false)\r
\r
/** Returns true if the currently selected pipe has been stalled by the attached device, false otherwise. */\r
- #define Pipe_IsStalled() ((UPINTX & (1 << RXSTALLI)) ? true : false)\r
+ #define Pipe_IsStalled() ((UPINTX & (1 << RXSTALLI)) ? true : false)\r
\r
/** Clears the stall condition on the currently selected pipe. */\r
- #define Pipe_ClearStall() MACROS{ UPINTX &= ~(1 << RXSTALLI); }MACROE \r
+ #define Pipe_ClearStall() MACROS{ UPINTX &= ~(1 << RXSTALLI); }MACROE \r
\r
/** Returns true if an IN request has been received on the currently selected CONTROL type pipe, false\r
* otherwise.\r
*/\r
- #define Pipe_IsSetupINReceived() ((UPINTX & (1 << RXINI)) ? true : false)\r
+ #define Pipe_IsSetupINReceived() ((UPINTX & (1 << RXINI)) ? true : false)\r
\r
/** Returns true if the currently selected CONTROL type pipe is ready to send an OUT request, false\r
* otherwise.\r
*/\r
- #define Pipe_IsSetupOUTReady() ((UPINTX & (1 << TXOUTI)) ? true : false)\r
+ #define Pipe_IsSetupOUTReady() ((UPINTX & (1 << TXOUTI)) ? true : false)\r
\r
/** Acknowedges the reception of a setup IN request from the attached device on the currently selected\r
* CONTROL type endpoint, allowing for the transmission of a setup OUT packet, or the reception of\r
* another setup IN packet.\r
*/\r
- #define Pipe_ClearSetupIN() MACROS{ UPINTX &= ~(1 << RXINI); UPINTX &= ~(1 << FIFOCON); }MACROE\r
+ #define Pipe_ClearSetupIN() MACROS{ UPINTX &= ~(1 << RXINI); UPINTX &= ~(1 << FIFOCON); }MACROE\r
\r
/** Sends the currently selected CONTROL type pipe's contents to the device as a setup OUT packet. */\r
- #define Pipe_ClearSetupOUT() MACROS{ UPINTX &= ~(1 << TXOUTI); UPINTX &= ~(1 << FIFOCON); }MACROE\r
+ #define Pipe_ClearSetupOUT() MACROS{ UPINTX &= ~(1 << TXOUTI); UPINTX &= ~(1 << FIFOCON); }MACROE\r
\r
/** Returns true if the device sent a NAK (Negative Acknowedge) in response to the last sent packet on\r
* the currently selected pipe. This ocurrs when the host sends a packet to the device, but the device\r
* received, it must be cleard using Pipe_ClearNAKReceived() before the previous (or any other) packet\r
* can be re-sent.\r
*/\r
- #define Pipe_IsNAKReceived() ((UPINTX & (1 << NAKEDI)) ? true : false)\r
+ #define Pipe_IsNAKReceived() ((UPINTX & (1 << NAKEDI)) ? true : false)\r
\r
/** Clears the NAK condition on the currently selected pipe.\r
*\r
* \see Pipe_IsNAKReceived() for more details.\r
*/\r
- #define Pipe_ClearNAKReceived() MACROS{ UPINTX &= ~(1 << NAKEDI); }MACROE\r
+ #define Pipe_ClearNAKReceived() MACROS{ UPINTX &= ~(1 << NAKEDI); }MACROE\r
\r
/* Enums: */\r
/** Enum for the possible error return codes of the Pipe_WaitUntilReady function */\r
\r
/* Inline Functions: */\r
/** Reads one byte from the currently selected pipe's bank, for OUT direction pipes. */\r
- static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint8_t Pipe_Read_Byte(void)\r
{\r
return UPDATX;\r
}\r
\r
/** Writes one byte from the currently selected pipe's bank, for IN direction pipes. */\r
+ static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Write_Byte(const uint8_t Byte)\r
{\r
UPDATX = Byte;\r
}\r
\r
/** Discards one byte from the currently selected pipe's bank, for OUT direction pipes. */\r
+ static inline void Pipe_Discard_Byte(void) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Discard_Byte(void)\r
{\r
uint8_t Dummy;\r
/** Reads two bytes from the currently selected pipe's bank in little endian format, for OUT\r
* direction pipes.\r
*/\r
- static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint16_t Pipe_Read_Word_LE(void)\r
{\r
uint16_t Data;\r
/** Reads two bytes from the currently selected pipe's bank in big endian format, for OUT\r
* direction pipes.\r
*/\r
- static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint16_t Pipe_Read_Word_BE(void)\r
{\r
uint16_t Data;\r
/** Writes two bytes to the currently selected pipe's bank in little endian format, for IN\r
* direction pipes.\r
*/\r
+ static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Write_Word_LE(const uint16_t Word)\r
{\r
UPDATX = (Word & 0xFF);\r
/** Writes two bytes to the currently selected pipe's bank in big endian format, for IN\r
* direction pipes.\r
*/\r
+ static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Write_Word_BE(const uint16_t Word)\r
{\r
UPDATX = (Word >> 8);\r
}\r
\r
/** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes. */\r
+ static inline void Pipe_Ignore_Word(void) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Ignore_Word(void)\r
{\r
uint8_t Dummy;\r
/** Reads four bytes from the currently selected pipe's bank in little endian format, for OUT\r
* direction pipes.\r
*/\r
- static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint32_t Pipe_Read_DWord_LE(void)\r
{\r
union\r
/** Reads four bytes from the currently selected pipe's bank in big endian format, for OUT\r
* direction pipes.\r
*/\r
- static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT;\r
+ static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
static inline uint32_t Pipe_Read_DWord_BE(void)\r
{\r
union\r
/** Writes four bytes to the currently selected pipe's bank in little endian format, for IN\r
* direction pipes.\r
*/\r
+ static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Write_DWord_LE(const uint32_t DWord)\r
{\r
Pipe_Write_Word_LE(DWord);\r
\r
/** Writes four bytes to the currently selected pipe's bank in big endian format, for IN\r
* direction pipes.\r
- */ \r
+ */\r
+ static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Write_DWord_BE(const uint32_t DWord)\r
{\r
Pipe_Write_Word_BE(DWord >> 16);\r
} \r
\r
/** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes. */\r
+ static inline void Pipe_Ignore_DWord(void) ATTR_ALWAYS_INLINE;\r
static inline void Pipe_Ignore_DWord(void)\r
{\r
uint8_t Dummy;\r
/* Macros: */\r
#define PIPE_TOKEN_MASK (0x03 << PTOKEN0)\r
\r
- #define Pipe_AllocateMemory() MACROS{ UPCFG1X |= (1 << ALLOC); }MACROE\r
- #define Pipe_DeallocateMemory() MACROS{ UPCFG1X &= ~(1 << ALLOC); }MACROE\r
+ #define Pipe_AllocateMemory() MACROS{ UPCFG1X |= (1 << ALLOC); }MACROE\r
+ #define Pipe_DeallocateMemory() MACROS{ UPCFG1X &= ~(1 << ALLOC); }MACROE\r
\r
/* Function Prototypes: */\r
void Pipe_ClearPipes(void);\r
\r
/* Inline Functions: */\r
- static inline uint8_t Pipe_BytesToEPSizeMask(uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYSINLINE;\r
+ static inline uint8_t Pipe_BytesToEPSizeMask(uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;\r
static inline uint8_t Pipe_BytesToEPSizeMask(uint16_t Bytes)\r
{\r
if (Bytes <= 8)\r
* <b>Library Demos</b>\r
* - The USBtoSerial demo now discards all data when not connected to a host, rather than buffering it for later transmission.\r
*\r
+ * <b>Non-USB Library Components</b>\r
+ * - The ATTR_ALWAYSINLINE function attribute macro has been renamed to ATTR_ALWAYS_INLINE.\r
+ *\r
* \section Sec_Migration090209 Migrating from 081217 to 090209\r
*\r
* <b>Device Mode</b>\r
* \param DelayCounter Counter which is storing the starting tick count for a given delay.\r
*/\r
static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter)\r
- ATTR_NON_NULL_PTR_ARG(1);\r
+ ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;\r
static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter)\r
{\r
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)\r
#define MAX_DELAYCTR_COUNT 0xFFFF\r
\r
/* Inline Functions: */\r
+ static inline void Scheduler_InitScheduler(const uint8_t TotalTasks) ATTR_ALWAYS_INLINE;\r
static inline void Scheduler_InitScheduler(const uint8_t TotalTasks)\r
{\r
Scheduler_TotalTasks = TotalTasks;\r
}\r
\r
- static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN;\r
+ static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN ATTR_ALWAYS_INLINE;\r
static inline void Scheduler_GoSchedule(const uint8_t TotalTasks)\r
{\r
Scheduler_InitScheduler(TotalTasks);\r
batchisp -hardware usb -device $(MCU) -operation start reset 0\r
\r
dfu-ee: $(TARGET).hex $(TARGET).eep\r
- dfu-programmer $(MCU) erase\r
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\r
\r
+\r
# Generate avr-gdb config/init file which does the following:\r
# define the reset signal, load the target file, connect to target, and set \r
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
finish end sizebefore sizeafter gccversion \\r
build elf hex eep lss sym coff extcoff \\r
clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+gdb-config doxygen dfu flip flip-ee dfu-ee\r
batchisp -hardware usb -device $(MCU) -operation start reset 0
dfu-ee: $(TARGET).hex $(TARGET).eep
- dfu-programmer $(MCU) erase
- dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep
+ dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep
dfu-programmer $(MCU) reset
+
# Generate avr-gdb config/init file which does the following:
# define the reset signal, load the target file, connect to target, and set
# a breakpoint at main().
clean_binary:
$(REMOVE) $(TARGET).hex
-
+
clean_list:
@echo $(MSG_CLEANING)
$(REMOVE) $(TARGET).eep
+ $(REMOVE) $(TARGET)eep.hex
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
finish end sizebefore sizeafter gccversion \
build elf hex eep lss sym coff extcoff \
clean clean_list clean_binary program debug \
-gdb-config doxygen dfu flip
+gdb-config doxygen dfu flip flip-ee dfu-ee