diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsln b/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsln new file mode 100644 index 0000000..94f33c0 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Atmel Studio Solution File, Format Version 11.00 +Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "Zeitschaltung_V6", "Zeitschaltung_V6\Zeitschaltung_V6.cppproj", "{EC267909-C732-4CEF-B754-BD8CE5EBD85C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|AVR = Debug|AVR + Release|AVR = Release|AVR + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EC267909-C732-4CEF-B754-BD8CE5EBD85C}.Debug|AVR.ActiveCfg = Debug|AVR + {EC267909-C732-4CEF-B754-BD8CE5EBD85C}.Debug|AVR.Build.0 = Debug|AVR + {EC267909-C732-4CEF-B754-BD8CE5EBD85C}.Release|AVR.ActiveCfg = Release|AVR + {EC267909-C732-4CEF-B754-BD8CE5EBD85C}.Release|AVR.Build.0 = Release|AVR + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsuo b/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsuo new file mode 100644 index 0000000..a9b98ab Binary files /dev/null and b/V6/Program/rfm12_rs232/Zeitschaltung_V6.atsuo differ diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Makefile b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Makefile new file mode 100644 index 0000000..7199408 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Makefile @@ -0,0 +1,129 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +SHELL := cmd.exe +RM := rm -rf + +USER_OBJS := + +LIBS := +PROJ := + +O_SRCS := +C_SRCS := +S_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +PREPROCESSING_SRCS := +OBJS := +OBJS_AS_ARGS := +C_DEPS := +C_DEPS_AS_ARGS := +EXECUTABLES := +OUTPUT_FILE_PATH := +OUTPUT_FILE_PATH_AS_ARGS := +AVR_APP_PATH :=$$$AVR_APP_PATH$$$ +QUOTE := " +ADDITIONAL_DEPENDENCIES:= +OUTPUT_FILE_DEP:= +LIB_DEP:= + +# Every subdirectory with source files must be described here +SUBDIRS := \ +../io \ +../io/hardware \ +../comunication + + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Zeitschaltung_V6.cpp + + +PREPROCESSING_SRCS += + + +ASM_SRCS += + + +OBJS += \ +Zeitschaltung_V6.o + + +OBJS_AS_ARGS += \ +Zeitschaltung_V6.o + + +C_DEPS += \ +Zeitschaltung_V6.d + + +C_DEPS_AS_ARGS += \ +Zeitschaltung_V6.d + + +OUTPUT_FILE_PATH +=Zeitschaltung_V6.elf + +OUTPUT_FILE_PATH_AS_ARGS +=Zeitschaltung_V6.elf + +ADDITIONAL_DEPENDENCIES:= + +OUTPUT_FILE_DEP:= ./makedep.mk + +LIB_DEP+= + +# AVR32/GNU C Compiler + + + +./%.o: .././%.cpp + @echo Building file: $< + @echo Invoking: AVR8/GNU C++ Compiler : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -Os -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega16a -c -std=c++11 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" + @echo Finished building: $< + + + +# AVR32/GNU Preprocessing Assembler + + + +# AVR32/GNU Assembler + + + + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) + +$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) + @echo Building target: $@ + @echo Invoking: AVR8/GNU Linker : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Zeitschaltung_V6.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega16a + @echo Finished building target: $@ + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "Zeitschaltung_V6.elf" "Zeitschaltung_V6.hex" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "Zeitschaltung_V6.elf" "Zeitschaltung_V6.eep" || exit 0 + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "Zeitschaltung_V6.elf" > "Zeitschaltung_V6.lss" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "Zeitschaltung_V6.elf" "Zeitschaltung_V6.srec" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-size.exe" "Zeitschaltung_V6.elf" + + + + + + +# Other Targets +clean: + -$(RM) $(OBJS_AS_ARGS)$(C_DEPS_AS_ARGS) $(EXECUTABLES) + rm -rf "Zeitschaltung_V6.elf" "Zeitschaltung_V6.a" "Zeitschaltung_V6.hex" "Zeitschaltung_V6.lss" "Zeitschaltung_V6.eep" "Zeitschaltung_V6.map" "Zeitschaltung_V6.srec" + \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.d b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.d new file mode 100644 index 0000000..006b426 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.d @@ -0,0 +1,73 @@ +Zeitschaltung_V6.d Zeitschaltung_V6.o: .././Zeitschaltung_V6.cpp \ + .././peripheral.h .././io/hardware/portc.hpp \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom16a.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + .././io/Led.hpp .././io/hardware/pin.hpp .././io/uart.hpp \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h \ + .././io/Spi.hpp \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h \ + .././io/rfm12.hpp \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h + +.././peripheral.h: + +.././io/hardware/portc.hpp: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom16a.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +.././io/Led.hpp: + +.././io/hardware/pin.hpp: + +.././io/uart.hpp: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/interrupt.h: + +.././io/Spi.hpp: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: + +.././io/rfm12.hpp: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdio.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdarg.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.eep b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.eep new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.elf b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.elf new file mode 100644 index 0000000..d257abc Binary files /dev/null and b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.elf differ diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.hex b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.hex new file mode 100644 index 0000000..9f435f6 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.hex @@ -0,0 +1,135 @@ +:100000000C942B000C9453000C9453000C9453004C +:100010000C9453000C9453000C9453000C94530014 +:100020000C9453000C9453000C9453000C94530004 +:100030000C9453000C9453000C9453000C945300F4 +:100040000C9453000C9453000C9453000C945300E4 +:100050000C945300F20011241FBECFE5D4E0DEBFA4 +:10006000CDBF10E0A0E6B0E0E6E3F8E002C0059006 +:100070000D92A637B107D9F720E0A6E7B0E001C09E +:100080001D92A637B207E1F710E0C6E5D0E004C044 +:100090002297FE010E944001C435D107C9F70E9492 +:1000A000A0000C9419040C940000FC0103C05D9B9B +:1000B000FECF8CB981918111FACF0895A39A08954A +:1000C000AB9A0895282F98E080E027FF02C0A99AF4 +:1000D00001C0A998A19A880F9C998160AA9AA29AB6 +:1000E000220F00C00000AA98A29A915071F70895BB +:1000F000EF92FF921F93CF93DF9300D0CDB7DEB77F +:10010000182FAB989A830E945E008A810E94620039 +:10011000F82EE12C812F0E9462009701282BC90143 +:100120008A8399830E9460000E945E008A8199817F +:100130000F900F90DF91CF911F91FF90EF90089556 +:10014000CF93DF93CDB7DEB72A970FB6F894DEBF13 +:100150000FBECDBF88EC92E80E94780081E89AEC4F +:100160000E94780083E89AEC0E94780080E6E82EEE +:1001700080E0F82E8E010F5F1F4F18C0A89A2FEF56 +:1001800080E792E0215080409040E1F700C00000FD +:10019000A8982FEF80E792E0215080409040E1F74F +:1001A00000C0000085E690E00E945500AB980E94D8 +:1001B0005E009C9BE3CF80E090EB0E947800992743 +:1001C0009F938F93FF92EF921F930F930E9444018E +:1001D000C8010E9455000F900F900F900F900F9044 +:1001E0000F90E4CFA09AA898789483E389B988E027 +:1001F0008AB986E880BD88E690E00E945500A998FB +:10020000A19AAA98A29A0E9460000E945E00A498F7 +:10021000AC982FEF80E792E0215080409040E1F7CA +:1002200000C0000080EE90EC0E94780087ED90E81E +:100230000E9478008BEA92EC0E94780081E89AECA8 +:100240000E94780080E090EE0E94780080E098ECB8 +:100250000E94780087EF94EC0E94780080E296EA92 +:100260000E94780087E294E90E94780082E296EC8E +:100270000E94780080E698E90C947800EE0FFF1F4A +:100280000590F491E02D0994AEE0B0E0EAE4F1E0ED +:100290000C94F0030D891E8986E08C831A830983F0 +:1002A0008FEF9FE79E838D83CE014996AC016F89C6 +:1002B000788DCE0101960E946601EF81F885E00FEE +:1002C000F11F10822E96E4E00C940C04ACE0B0E038 +:1002D000ECE6F1E00C94E2037C016B018A01FC0185 +:1002E00017821682838181FFC6C188248394912C52 +:1002F0008C0E9D1EF7019381F60193FD859193FF6E +:1003000081916F01882309F4B2C1853239F493FDDC +:10031000859193FF81916F01853229F4B70190E0B7 +:100320000E945803E7CF512C312C20E02032A8F452 +:100330008B3261F028F4803251F0833271F40BC0BB +:100340008D3239F0803349F4216028C02260246066 +:1003500025C0286023C0206121C027FD27C0382F79 +:1003600030533A3078F426FF06C0FAE05F9E300D35 +:100370001124532E13C08AE0389E300D1124332EE1 +:1003800020620CC08E3221F426FD71C1206406C0AB +:100390008C3611F4206802C0883641F4F60193FDD2 +:1003A000859193FF81916F018111C0CF982F955452 +:1003B000933018F09052933028F40C5F1F4FFFE3F6 +:1003C000F9830DC0833631F0833771F0833509F03E +:1003D0005EC023C0F801808189830E5F1F4F4424D3 +:1003E0004394512C540115C03801F2E06F0E711C7A +:1003F000F801A080B18026FF03C0652D70E002C027 +:100400006FEF7FEFC5012C870E944D032C01830104 +:100410002C856FE7262E222218C03801F2E06F0EDD +:10042000711CF801A080B18026FF03C0652D70E02B +:1004300002C06FEF7FEFC5012C870E9442032C01A1 +:100440002C8550E8252E222A830123FC1CC006C0DF +:10045000B70180E290E00E9458033A94832D90E027 +:1004600048165906A8F30FC0F50127FC859127FE11 +:1004700081915F01B70190E00E94580331103A94D6 +:10048000F1E04F1A51084114510471F7EDC0843660 +:1004900011F0893641F5F80127FF07C060817181AD +:1004A000828193810C5F1F4F08C060817181882712 +:1004B00077FD8095982F0E5F1F4F4FE6B42EB22226 +:1004C00097FF09C090958095709561957F4F8F4FEC +:1004D0009F4FF0E8BF2A2AE030E0A4010E94840385 +:1004E000A82EA81843C0853731F43FEEB32EB222B0 +:1004F0002AE030E024C099EFB92EB2228F36B9F04D +:1005000020F4883509F0B3C00DC0803721F088375A +:1005100009F0ADC002C020E1B22AB4FE0BC084E0F5 +:10052000B82A08C024FF09C0E6E0BE2A06C028E0B9 +:1005300030E005C020E130E002C020E132E0F80107 +:10054000B7FE07C060817181828193810C5F1F4F6C +:1005500006C06081718180E090E00E5F1F4FA401B2 +:100560000E948403A82EA818FFE7BF22B6FE0BC086 +:100570002B2D2E7FA51450F4B4FE0AC0B2FC08C087 +:100580002B2D2E7E05C07A2C2B2D03C07A2C01C07A +:10059000752C24FF0DC0FE01EA0DF11D8081803312 +:1005A00011F4297E09C022FF06C07394739404C01D +:1005B000822F867809F0739423FD14C020FF0FC0AA +:1005C0005A2C731460F4530C5718732C08C0B701DD +:1005D00080E290E02C870E94580373942C8573145A +:1005E000B0F304C0731410F4371801C0312C24FF89 +:1005F00012C0B70180E390E02C870E9458032C853D +:1006000022FF1EC021FF03C088E590E002C088E7FA +:1006100090E0B7010CC0822F867891F021FD02C0D6 +:1006200080E201C08BE227FD8DE2B70190E00E94DD +:10063000580306C0B70180E390E00E9458035A9423 +:10064000A514C0F3AA94F401EA0DF11DB70180814D +:1006500090E00E945803A110F5CF06C0B70180E2D8 +:1006600090E00E9458033A943110F8CF43CEF7013E +:100670002681378102C02FEF3FEFC9012C96E2E1BE +:100680000C94FE03FC010590615070400110D8F7F6 +:10069000809590958E0F9F1F0895FC0161507040CA +:1006A00001900110D8F7809590958E0F9F1F0895A7 +:1006B0000F931F93CF93DF938C01EB018B8181FD0F +:1006C00003C00FEF1FEF1AC082FF0DC02E813F81C4 +:1006D0008C819D812817390764F4E881F9810193A1 +:1006E000F983E88306C0E885F985802F0995892B71 +:1006F00041F78E819F8101969F838E83C801DF9190 +:10070000CF911F910F910895FA01AA27283051F136 +:10071000203181F1E8946F936E7F6E5F7F4F8F4F32 +:100720009F4FAF4FB1E03ED0B4E03CD0670F781F91 +:10073000891F9A1FA11D680F791F8A1F911DA11D76 +:100740006A0F711D811D911DA11D20D009F46894AF +:100750003F912AE0269F11243019305D3193DEF657 +:10076000CF010895462F4770405D4193B3E00FD00D +:10077000C9F7F6CF462F4F70405D4A3318F0495DF8 +:1007800031FD4052419302D0A9F7EACFB4E0A695DB +:100790009795879577956795BA95C9F700976105FD +:1007A000710508959B01AC010A2E06945795479553 +:1007B00037952795BA95C9F7620F731F841F951F48 +:1007C000A01D08952F923F924F925F926F927F9259 +:1007D0008F929F92AF92BF92CF92DF92EF92FF9251 +:1007E0000F931F93CF93DF93CDB7DEB7CA1BDB0BFD +:1007F0000FB6F894DEBF0FBECDBF09942A883988A2 +:1008000048885F846E847D848C849B84AA84B984A8 +:10081000C884DF80EE80FD800C811B81AA81B981B4 +:10082000CE0FD11D0FB6F894DEBF0FBECDBFED01C8 +:060830000895F894FFCFCB +:1008360025303458200D0A005561727420646F6E9D +:0608460065210D0A00000F +:00000001FF diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.lss b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.lss new file mode 100644 index 0000000..0bbca02 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.lss @@ -0,0 +1,1352 @@ + +Zeitschaltung_V6.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 00000836 00000000 00000000 00000074 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .data 00000016 00800060 00000836 000008aa 2**0 + CONTENTS, ALLOC, LOAD, DATA + 2 .stab 00000c84 00000000 00000000 000008c0 2**2 + CONTENTS, READONLY, DEBUGGING + 3 .stabstr 000001aa 00000000 00000000 00001544 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .comment 0000002f 00000000 00000000 000016ee 2**0 + CONTENTS, READONLY + 5 .debug_aranges 000000b0 00000000 00000000 0000171d 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_info 0000250c 00000000 00000000 000017cd 2**0 + CONTENTS, READONLY, DEBUGGING + 7 .debug_abbrev 00000801 00000000 00000000 00003cd9 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_line 00000861 00000000 00000000 000044da 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_frame 00000168 00000000 00000000 00004d3c 2**2 + CONTENTS, READONLY, DEBUGGING + 10 .debug_str 0000128b 00000000 00000000 00004ea4 2**0 + CONTENTS, READONLY, DEBUGGING + 11 .debug_loc 00000891 00000000 00000000 0000612f 2**0 + CONTENTS, READONLY, DEBUGGING + 12 .debug_ranges 00000070 00000000 00000000 000069c0 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 0c 94 2b 00 jmp 0x56 ; 0x56 <__ctors_end> + 4: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 8: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 10: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 14: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 18: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 1c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 20: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 24: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 28: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 2c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 30: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 34: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 38: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 3c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 40: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 44: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 48: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 4c: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + 50: 0c 94 53 00 jmp 0xa6 ; 0xa6 <__bad_interrupt> + +00000054 <__ctors_start>: + 54: f2 00 .word 0x00f2 ; ???? + +00000056 <__ctors_end>: + 56: 11 24 eor r1, r1 + 58: 1f be out 0x3f, r1 ; 63 + 5a: cf e5 ldi r28, 0x5F ; 95 + 5c: d4 e0 ldi r29, 0x04 ; 4 + 5e: de bf out 0x3e, r29 ; 62 + 60: cd bf out 0x3d, r28 ; 61 + +00000062 <__do_copy_data>: + 62: 10 e0 ldi r17, 0x00 ; 0 + 64: a0 e6 ldi r26, 0x60 ; 96 + 66: b0 e0 ldi r27, 0x00 ; 0 + 68: e6 e3 ldi r30, 0x36 ; 54 + 6a: f8 e0 ldi r31, 0x08 ; 8 + 6c: 02 c0 rjmp .+4 ; 0x72 <__do_copy_data+0x10> + 6e: 05 90 lpm r0, Z+ + 70: 0d 92 st X+, r0 + 72: a6 37 cpi r26, 0x76 ; 118 + 74: b1 07 cpc r27, r17 + 76: d9 f7 brne .-10 ; 0x6e <__do_copy_data+0xc> + +00000078 <__do_clear_bss>: + 78: 20 e0 ldi r18, 0x00 ; 0 + 7a: a6 e7 ldi r26, 0x76 ; 118 + 7c: b0 e0 ldi r27, 0x00 ; 0 + 7e: 01 c0 rjmp .+2 ; 0x82 <.do_clear_bss_start> + +00000080 <.do_clear_bss_loop>: + 80: 1d 92 st X+, r1 + +00000082 <.do_clear_bss_start>: + 82: a6 37 cpi r26, 0x76 ; 118 + 84: b2 07 cpc r27, r18 + 86: e1 f7 brne .-8 ; 0x80 <.do_clear_bss_loop> + +00000088 <__do_global_ctors>: + 88: 10 e0 ldi r17, 0x00 ; 0 + 8a: c6 e5 ldi r28, 0x56 ; 86 + 8c: d0 e0 ldi r29, 0x00 ; 0 + 8e: 04 c0 rjmp .+8 ; 0x98 <__do_global_ctors+0x10> + 90: 22 97 sbiw r28, 0x02 ; 2 + 92: fe 01 movw r30, r28 + 94: 0e 94 40 01 call 0x280 ; 0x280 <__tablejump__> + 98: c4 35 cpi r28, 0x54 ; 84 + 9a: d1 07 cpc r29, r17 + 9c: c9 f7 brne .-14 ; 0x90 <__do_global_ctors+0x8> + 9e: 0e 94 a0 00 call 0x140 ; 0x140
+ a2: 0c 94 19 04 jmp 0x832 ; 0x832 <_exit> + +000000a6 <__bad_interrupt>: + a6: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +000000aa <_ZN4UartILm9600EE4sendEPKc.isra.5>: + Uart() { + sei(); + init(); + send("Uart done!\r\n"); + } + void send(const char *text) { + aa: fc 01 movw r30, r24 + ac: 03 c0 rjmp .+6 ; 0xb4 <_ZN4UartILm9600EE4sendEPKc.isra.5+0xa> + UBRRL = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt + UCSRB = /*(1< + UDR = c; + b2: 8c b9 out 0x0c, r24 ; 12 + sei(); + init(); + send("Uart done!\r\n"); + } + void send(const char *text) { + while (*text) + b4: 81 91 ld r24, Z+ + b6: 81 11 cpse r24, r1 + b8: fa cf rjmp .-12 ; 0xae <_ZN4UartILm9600EE4sendEPKc.isra.5+0x4> + { + uart_putchar(*text); + text++; + } + } + ba: 08 95 ret + +000000bc <_ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7>: + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + bc: a3 9a sbi 0x14, 3 ; 20 + be: 08 95 ret + +000000c0 <_ZN6avrlib3pinINS_5portcELh3EE3setEb.part.9>: +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + c0: ab 9a sbi 0x15, 3 ; 21 + c2: 08 95 ret + +000000c4 <_ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17>: + } + void init_spi() { + SPCR = (1< + ce: a9 9a sbi 0x15, 1 ; 21 + d0: 01 c0 rjmp .+2 ; 0xd4 <_ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17+0x10> + d2: a9 98 cbi 0x15, 1 ; 21 + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + d4: a1 9a sbi 0x14, 1 ; 20 + mosi::make_high(); + } + else { + mosi::make_low(); + } + datain <<= 1; + d6: 88 0f add r24, r24 + if(miso::read()) { + d8: 9c 99 sbic 0x13, 4 ; 19 + datain |= 1; + da: 81 60 ori r24, 0x01 ; 1 +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + dc: aa 9a sbi 0x15, 2 ; 21 + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + de: a2 9a sbi 0x14, 2 ; 20 + } + sck::make_high(); + data<<=1; + e0: 22 0f add r18, r18 + #else + //round up by default + __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); + #endif + + __builtin_avr_delay_cycles(__ticks_dc); + e2: 00 c0 rjmp .+0 ; 0xe4 <_ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17+0x20> + e4: 00 00 nop +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + e6: aa 98 cbi 0x15, 2 ; 21 + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + e8: a2 9a sbi 0x14, 2 ; 20 + ea: 91 50 subi r25, 0x01 ; 1 + SPCR = (1< + data<<=1; + _delay_us(0.3); + sck::make_low(); + } + return datain; + } + ee: 08 95 ret + +000000f0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19>: + this->send(0x8208); // TX off + _delay_ms(100); + } + private: + Spi s; + uint16_t send(uint16_t wert) { + f0: ef 92 push r14 + f2: ff 92 push r15 + f4: 1f 93 push r17 + f6: cf 93 push r28 + f8: df 93 push r29 + fa: 00 d0 rcall .+0 ; 0xfc <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19+0xc> + fc: cd b7 in r28, 0x3d ; 61 + fe: de b7 in r29, 0x3e ; 62 + 100: 18 2f mov r17, r24 +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + 102: ab 98 cbi 0x15, 3 ; 21 + 104: 9a 83 std Y+2, r25 ; 0x02 + 106: 0e 94 5e 00 call 0xbc ; 0xbc <_ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7> + } + uint8_t send(uint8_t data) { + if(mode == 0) { + return this->send_hard(data); + } + return this->send_soft(data); + 10a: 8a 81 ldd r24, Y+2 ; 0x02 + 10c: 0e 94 62 00 call 0xc4 ; 0xc4 <_ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17> + s.CSOn(); + uint16_t werti = s.send((uint8_t)(wert >> 8)) << 8; + 110: f8 2e mov r15, r24 + 112: e1 2c mov r14, r1 + 114: 81 2f mov r24, r17 + 116: 0e 94 62 00 call 0xc4 ; 0xc4 <_ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17> + werti |= s.send((uint8_t)wert); + 11a: 97 01 movw r18, r14 + 11c: 28 2b or r18, r24 + 11e: c9 01 movw r24, r18 + 120: 8a 83 std Y+2, r24 ; 0x02 + 122: 99 83 std Y+1, r25 ; 0x01 + 124: 0e 94 60 00 call 0xc0 ; 0xc0 <_ZN6avrlib3pinINS_5portcELh3EE3setEb.part.9> + 128: 0e 94 5e 00 call 0xbc ; 0xbc <_ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7> + s.CSOff(); + return werti; + } + 12c: 8a 81 ldd r24, Y+2 ; 0x02 + 12e: 99 81 ldd r25, Y+1 ; 0x01 + 130: 0f 90 pop r0 + 132: 0f 90 pop r0 + 134: df 91 pop r29 + 136: cf 91 pop r28 + 138: 1f 91 pop r17 + 13a: ff 90 pop r15 + 13c: ef 90 pop r14 + 13e: 08 95 ret + +00000140
: + +ledclass l; +uartclass text; +rfm12class r; + +int main(void) { + 140: cf 93 push r28 + 142: df 93 push r29 + 144: cd b7 in r28, 0x3d ; 61 + 146: de b7 in r29, 0x3e ; 62 + 148: 2a 97 sbiw r28, 0x0a ; 10 + 14a: 0f b6 in r0, 0x3f ; 63 + 14c: f8 94 cli + 14e: de bf out 0x3e, r29 ; 62 + 150: 0f be out 0x3f, r0 ; 63 + 152: cd bf out 0x3d, r28 ; 61 + s.CSOn(); + while(s.has_data()); // wait until FIFO ready + } + + void beginasyncrx() { + this->send(0x82C8); // RX on + 154: 88 ec ldi r24, 0xC8 ; 200 + 156: 92 e8 ldi r25, 0x82 ; 130 + 158: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xCA81); // set FIFO mode + 15c: 81 e8 ldi r24, 0x81 ; 129 + 15e: 9a ec ldi r25, 0xCA ; 202 + 160: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xCA83); // enable FIFO + 164: 83 e8 ldi r24, 0x83 ; 131 + 166: 9a ec ldi r25, 0xCA ; 202 + 168: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + _delay_ms(100); + text.send("\r\n"); + } + uint8_t data = r.rxbyte(); + char t[10]; + sprintf(t, "%04X \r\n", data); + 16c: 80 e6 ldi r24, 0x60 ; 96 + 16e: e8 2e mov r14, r24 + 170: 80 e0 ldi r24, 0x00 ; 0 + 172: f8 2e mov r15, r24 + 174: 8e 01 movw r16, r28 + 176: 0f 5f subi r16, 0xFF ; 255 + 178: 1f 4f sbci r17, 0xFF ; 255 + 17a: 18 c0 rjmp .+48 ; 0x1ac + 17c: a8 9a sbi 0x15, 0 ; 21 + #else + //round up by default + __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); + #endif + + __builtin_avr_delay_cycles(__ticks_dc); + 17e: 2f ef ldi r18, 0xFF ; 255 + 180: 80 e7 ldi r24, 0x70 ; 112 + 182: 92 e0 ldi r25, 0x02 ; 2 + 184: 21 50 subi r18, 0x01 ; 1 + 186: 80 40 sbci r24, 0x00 ; 0 + 188: 90 40 sbci r25, 0x00 ; 0 + 18a: e1 f7 brne .-8 ; 0x184 + 18c: 00 c0 rjmp .+0 ; 0x18e + 18e: 00 00 nop + 190: a8 98 cbi 0x15, 0 ; 21 + 192: 2f ef ldi r18, 0xFF ; 255 + 194: 80 e7 ldi r24, 0x70 ; 112 + 196: 92 e0 ldi r25, 0x02 ; 2 + 198: 21 50 subi r18, 0x01 ; 1 + 19a: 80 40 sbci r24, 0x00 ; 0 + 19c: 90 40 sbci r25, 0x00 ; 0 + 19e: e1 f7 brne .-8 ; 0x198 + 1a0: 00 c0 rjmp .+0 ; 0x1a2 + 1a2: 00 00 nop + while(r.hasdata()) { + l.on(); + _delay_ms(100); + l.off(); + _delay_ms(100); + text.send("\r\n"); + 1a4: 85 e6 ldi r24, 0x65 ; 101 + 1a6: 90 e0 ldi r25, 0x00 ; 0 + 1a8: 0e 94 55 00 call 0xaa ; 0xaa <_ZN4UartILm9600EE4sendEPKc.isra.5> + 1ac: ab 98 cbi 0x15, 3 ; 21 + 1ae: 0e 94 5e 00 call 0xbc ; 0xbc <_ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7> + +int main(void) { + r.beginasyncrx(); + while(1) + { + while(r.hasdata()) { + 1b2: 9c 9b sbis 0x13, 4 ; 19 + 1b4: e3 cf rjmp .-58 ; 0x17c + s.CSOn(); + return s.has_data(); + } + + uint8_t rxbyte() { + return this->send(0xB000); + 1b6: 80 e0 ldi r24, 0x00 ; 0 + 1b8: 90 eb ldi r25, 0xB0 ; 176 + 1ba: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + +ledclass l; +uartclass text; +rfm12class r; + +int main(void) { + 1be: 99 27 eor r25, r25 + _delay_ms(100); + text.send("\r\n"); + } + uint8_t data = r.rxbyte(); + char t[10]; + sprintf(t, "%04X \r\n", data); + 1c0: 9f 93 push r25 + 1c2: 8f 93 push r24 + 1c4: ff 92 push r15 + 1c6: ef 92 push r14 + 1c8: 1f 93 push r17 + 1ca: 0f 93 push r16 + 1cc: 0e 94 44 01 call 0x288 ; 0x288 + text.send(t); + 1d0: c8 01 movw r24, r16 + 1d2: 0e 94 55 00 call 0xaa ; 0xaa <_ZN4UartILm9600EE4sendEPKc.isra.5> +uartclass text; +rfm12class r; + +int main(void) { + r.beginasyncrx(); + while(1) + 1d6: 0f 90 pop r0 + 1d8: 0f 90 pop r0 + 1da: 0f 90 pop r0 + 1dc: 0f 90 pop r0 + 1de: 0f 90 pop r0 + 1e0: 0f 90 pop r0 + 1e2: e4 cf rjmp .-56 ; 0x1ac + +000001e4 <_GLOBAL__sub_I_l>: + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + 1e4: a0 9a sbi 0x14, 0 ; 20 +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + 1e6: a8 98 cbi 0x15, 0 ; 21 + +template +class Uart { + public: + Uart() { + sei(); + 1e8: 78 94 sei + void send(uint8_t wert) { + uart_putchar(wert); + } + private: + void init() { + UBRRL = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt + 1ea: 83 e3 ldi r24, 0x33 ; 51 + 1ec: 89 b9 out 0x09, r24 ; 9 + UCSRB = /*(1< + 1fe: a9 98 cbi 0x15, 1 ; 21 + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + 200: a1 9a sbi 0x14, 1 ; 20 +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + 202: aa 98 cbi 0x15, 2 ; 21 + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + 204: a2 9a sbi 0x14, 2 ; 20 + 206: 0e 94 60 00 call 0xc0 ; 0xc0 <_ZN6avrlib3pinINS_5portcELh3EE3setEb.part.9> + 20a: 0e 94 5e 00 call 0xbc ; 0xbc <_ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7> + 20e: a4 98 cbi 0x14, 4 ; 20 +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + 210: ac 98 cbi 0x15, 4 ; 21 + 212: 2f ef ldi r18, 0xFF ; 255 + 214: 80 e7 ldi r24, 0x70 ; 112 + 216: 92 e0 ldi r25, 0x02 ; 2 + 218: 21 50 subi r18, 0x01 ; 1 + 21a: 80 40 sbci r24, 0x00 ; 0 + 21c: 90 40 sbci r25, 0x00 ; 0 + 21e: e1 f7 brne .-8 ; 0x218 <_GLOBAL__sub_I_l+0x34> + 220: 00 c0 rjmp .+0 ; 0x222 <_GLOBAL__sub_I_l+0x3e> + 222: 00 00 nop + return werti; + } + void init(void) { + _delay_ms(100); + + this->send(0xC0E0); // AVR CLK: 10MHz + 224: 80 ee ldi r24, 0xE0 ; 224 + 226: 90 ec ldi r25, 0xC0 ; 192 + 228: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0x80D7); // Enable FIFO + 22c: 87 ed ldi r24, 0xD7 ; 215 + 22e: 90 e8 ldi r25, 0x80 ; 128 + 230: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xC2AB); // Data Filter: internal + 234: 8b ea ldi r24, 0xAB ; 171 + 236: 92 ec ldi r25, 0xC2 ; 194 + 238: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xCA81); // Set FIFO mode + 23c: 81 e8 ldi r24, 0x81 ; 129 + 23e: 9a ec ldi r25, 0xCA ; 202 + 240: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xE000); // disable wakeuptimer + 244: 80 e0 ldi r24, 0x00 ; 0 + 246: 90 ee ldi r25, 0xE0 ; 224 + 248: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xC800); // disable low duty cycle + 24c: 80 e0 ldi r24, 0x00 ; 0 + 24e: 98 ec ldi r25, 0xC8 ; 200 + 250: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->send(0xC4F7); // AFC settings: autotuning: -10kHz...+7,5kHz + 254: 87 ef ldi r24, 0xF7 ; 247 + 256: 94 ec ldi r25, 0xC4 ; 196 + 258: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + if( freq < 96 ) { // 430,2400MHz + this->send( 0xA000 | 96 ); + } else if( freq > 3903 ) { // 439,7575MHz + this->send( 0xA000 | 3903 ); + } + this->send( 0xA000 | freq ); + 25c: 80 e2 ldi r24, 0x20 ; 32 + 25e: 96 ea ldi r25, 0xA6 ; 166 + 260: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + this->setbandwidth(); // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm + this->setbaud(); // 19200 baud + this->setpower(); // 1mW Ausgangsleistung, 120kHz Frequenzshift + } + void setbandwidth() { + this->send( 0x9400 | ( ( bandwidth & 7 ) << 5 ) | ( ( gain & 3 ) << 3 ) | ( drssi & 7 ) ); + 264: 87 e2 ldi r24, 0x27 ; 39 + 266: 94 e9 ldi r25, 0x94 ; 148 + 268: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + return; + } + if (baud < 5400) { // Baudrate= 344827,58621/(R+1)/(1+CS*7) + this->send(0xC680 | ( ( 43104 / baud ) - 1 ) ); + } else { + this->send(0xC600 | ( ( 344828UL / baud ) - 1 ) ); + 26c: 82 e2 ldi r24, 0x22 ; 34 + 26e: 96 ec ldi r25, 0xC6 ; 198 + 270: 0e 94 78 00 call 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + } + } + void setpower() { + this->send( 0x9800 | ( power & 7 ) | ( ( mod & 15 ) << 4 ) ); + 274: 80 e6 ldi r24, 0x60 ; 96 + 276: 98 e9 ldi r25, 0x98 ; 152 + 278: 0c 94 78 00 jmp 0xf0 ; 0xf0 <_ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19> + +0000027c <__tablejump2__>: + 27c: ee 0f add r30, r30 + 27e: ff 1f adc r31, r31 + +00000280 <__tablejump__>: + 280: 05 90 lpm r0, Z+ + 282: f4 91 lpm r31, Z + 284: e0 2d mov r30, r0 + 286: 09 94 ijmp + +00000288 : + 288: ae e0 ldi r26, 0x0E ; 14 + 28a: b0 e0 ldi r27, 0x00 ; 0 + 28c: ea e4 ldi r30, 0x4A ; 74 + 28e: f1 e0 ldi r31, 0x01 ; 1 + 290: 0c 94 f0 03 jmp 0x7e0 ; 0x7e0 <__prologue_saves__+0x1c> + 294: 0d 89 ldd r16, Y+21 ; 0x15 + 296: 1e 89 ldd r17, Y+22 ; 0x16 + 298: 86 e0 ldi r24, 0x06 ; 6 + 29a: 8c 83 std Y+4, r24 ; 0x04 + 29c: 1a 83 std Y+2, r17 ; 0x02 + 29e: 09 83 std Y+1, r16 ; 0x01 + 2a0: 8f ef ldi r24, 0xFF ; 255 + 2a2: 9f e7 ldi r25, 0x7F ; 127 + 2a4: 9e 83 std Y+6, r25 ; 0x06 + 2a6: 8d 83 std Y+5, r24 ; 0x05 + 2a8: ce 01 movw r24, r28 + 2aa: 49 96 adiw r24, 0x19 ; 25 + 2ac: ac 01 movw r20, r24 + 2ae: 6f 89 ldd r22, Y+23 ; 0x17 + 2b0: 78 8d ldd r23, Y+24 ; 0x18 + 2b2: ce 01 movw r24, r28 + 2b4: 01 96 adiw r24, 0x01 ; 1 + 2b6: 0e 94 66 01 call 0x2cc ; 0x2cc + 2ba: ef 81 ldd r30, Y+7 ; 0x07 + 2bc: f8 85 ldd r31, Y+8 ; 0x08 + 2be: e0 0f add r30, r16 + 2c0: f1 1f adc r31, r17 + 2c2: 10 82 st Z, r1 + 2c4: 2e 96 adiw r28, 0x0e ; 14 + 2c6: e4 e0 ldi r30, 0x04 ; 4 + 2c8: 0c 94 0c 04 jmp 0x818 ; 0x818 <__epilogue_restores__+0x1c> + +000002cc : + 2cc: ac e0 ldi r26, 0x0C ; 12 + 2ce: b0 e0 ldi r27, 0x00 ; 0 + 2d0: ec e6 ldi r30, 0x6C ; 108 + 2d2: f1 e0 ldi r31, 0x01 ; 1 + 2d4: 0c 94 e2 03 jmp 0x7c4 ; 0x7c4 <__prologue_saves__> + 2d8: 7c 01 movw r14, r24 + 2da: 6b 01 movw r12, r22 + 2dc: 8a 01 movw r16, r20 + 2de: fc 01 movw r30, r24 + 2e0: 17 82 std Z+7, r1 ; 0x07 + 2e2: 16 82 std Z+6, r1 ; 0x06 + 2e4: 83 81 ldd r24, Z+3 ; 0x03 + 2e6: 81 ff sbrs r24, 1 + 2e8: c6 c1 rjmp .+908 ; 0x676 <__stack+0x217> + 2ea: 88 24 eor r8, r8 + 2ec: 83 94 inc r8 + 2ee: 91 2c mov r9, r1 + 2f0: 8c 0e add r8, r28 + 2f2: 9d 1e adc r9, r29 + 2f4: f7 01 movw r30, r14 + 2f6: 93 81 ldd r25, Z+3 ; 0x03 + 2f8: f6 01 movw r30, r12 + 2fa: 93 fd sbrc r25, 3 + 2fc: 85 91 lpm r24, Z+ + 2fe: 93 ff sbrs r25, 3 + 300: 81 91 ld r24, Z+ + 302: 6f 01 movw r12, r30 + 304: 88 23 and r24, r24 + 306: 09 f4 brne .+2 ; 0x30a + 308: b2 c1 rjmp .+868 ; 0x66e <__stack+0x20f> + 30a: 85 32 cpi r24, 0x25 ; 37 + 30c: 39 f4 brne .+14 ; 0x31c + 30e: 93 fd sbrc r25, 3 + 310: 85 91 lpm r24, Z+ + 312: 93 ff sbrs r25, 3 + 314: 81 91 ld r24, Z+ + 316: 6f 01 movw r12, r30 + 318: 85 32 cpi r24, 0x25 ; 37 + 31a: 29 f4 brne .+10 ; 0x326 + 31c: b7 01 movw r22, r14 + 31e: 90 e0 ldi r25, 0x00 ; 0 + 320: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 324: e7 cf rjmp .-50 ; 0x2f4 + 326: 51 2c mov r5, r1 + 328: 31 2c mov r3, r1 + 32a: 20 e0 ldi r18, 0x00 ; 0 + 32c: 20 32 cpi r18, 0x20 ; 32 + 32e: a8 f4 brcc .+42 ; 0x35a + 330: 8b 32 cpi r24, 0x2B ; 43 + 332: 61 f0 breq .+24 ; 0x34c + 334: 28 f4 brcc .+10 ; 0x340 + 336: 80 32 cpi r24, 0x20 ; 32 + 338: 51 f0 breq .+20 ; 0x34e + 33a: 83 32 cpi r24, 0x23 ; 35 + 33c: 71 f4 brne .+28 ; 0x35a + 33e: 0b c0 rjmp .+22 ; 0x356 + 340: 8d 32 cpi r24, 0x2D ; 45 + 342: 39 f0 breq .+14 ; 0x352 + 344: 80 33 cpi r24, 0x30 ; 48 + 346: 49 f4 brne .+18 ; 0x35a + 348: 21 60 ori r18, 0x01 ; 1 + 34a: 28 c0 rjmp .+80 ; 0x39c + 34c: 22 60 ori r18, 0x02 ; 2 + 34e: 24 60 ori r18, 0x04 ; 4 + 350: 25 c0 rjmp .+74 ; 0x39c + 352: 28 60 ori r18, 0x08 ; 8 + 354: 23 c0 rjmp .+70 ; 0x39c + 356: 20 61 ori r18, 0x10 ; 16 + 358: 21 c0 rjmp .+66 ; 0x39c + 35a: 27 fd sbrc r18, 7 + 35c: 27 c0 rjmp .+78 ; 0x3ac + 35e: 38 2f mov r19, r24 + 360: 30 53 subi r19, 0x30 ; 48 + 362: 3a 30 cpi r19, 0x0A ; 10 + 364: 78 f4 brcc .+30 ; 0x384 + 366: 26 ff sbrs r18, 6 + 368: 06 c0 rjmp .+12 ; 0x376 + 36a: fa e0 ldi r31, 0x0A ; 10 + 36c: 5f 9e mul r5, r31 + 36e: 30 0d add r19, r0 + 370: 11 24 eor r1, r1 + 372: 53 2e mov r5, r19 + 374: 13 c0 rjmp .+38 ; 0x39c + 376: 8a e0 ldi r24, 0x0A ; 10 + 378: 38 9e mul r3, r24 + 37a: 30 0d add r19, r0 + 37c: 11 24 eor r1, r1 + 37e: 33 2e mov r3, r19 + 380: 20 62 ori r18, 0x20 ; 32 + 382: 0c c0 rjmp .+24 ; 0x39c + 384: 8e 32 cpi r24, 0x2E ; 46 + 386: 21 f4 brne .+8 ; 0x390 + 388: 26 fd sbrc r18, 6 + 38a: 71 c1 rjmp .+738 ; 0x66e <__stack+0x20f> + 38c: 20 64 ori r18, 0x40 ; 64 + 38e: 06 c0 rjmp .+12 ; 0x39c + 390: 8c 36 cpi r24, 0x6C ; 108 + 392: 11 f4 brne .+4 ; 0x398 + 394: 20 68 ori r18, 0x80 ; 128 + 396: 02 c0 rjmp .+4 ; 0x39c + 398: 88 36 cpi r24, 0x68 ; 104 + 39a: 41 f4 brne .+16 ; 0x3ac + 39c: f6 01 movw r30, r12 + 39e: 93 fd sbrc r25, 3 + 3a0: 85 91 lpm r24, Z+ + 3a2: 93 ff sbrs r25, 3 + 3a4: 81 91 ld r24, Z+ + 3a6: 6f 01 movw r12, r30 + 3a8: 81 11 cpse r24, r1 + 3aa: c0 cf rjmp .-128 ; 0x32c + 3ac: 98 2f mov r25, r24 + 3ae: 95 54 subi r25, 0x45 ; 69 + 3b0: 93 30 cpi r25, 0x03 ; 3 + 3b2: 18 f0 brcs .+6 ; 0x3ba + 3b4: 90 52 subi r25, 0x20 ; 32 + 3b6: 93 30 cpi r25, 0x03 ; 3 + 3b8: 28 f4 brcc .+10 ; 0x3c4 + 3ba: 0c 5f subi r16, 0xFC ; 252 + 3bc: 1f 4f sbci r17, 0xFF ; 255 + 3be: ff e3 ldi r31, 0x3F ; 63 + 3c0: f9 83 std Y+1, r31 ; 0x01 + 3c2: 0d c0 rjmp .+26 ; 0x3de + 3c4: 83 36 cpi r24, 0x63 ; 99 + 3c6: 31 f0 breq .+12 ; 0x3d4 + 3c8: 83 37 cpi r24, 0x73 ; 115 + 3ca: 71 f0 breq .+28 ; 0x3e8 + 3cc: 83 35 cpi r24, 0x53 ; 83 + 3ce: 09 f0 breq .+2 ; 0x3d2 + 3d0: 5e c0 rjmp .+188 ; 0x48e <__stack+0x2f> + 3d2: 23 c0 rjmp .+70 ; 0x41a + 3d4: f8 01 movw r30, r16 + 3d6: 80 81 ld r24, Z + 3d8: 89 83 std Y+1, r24 ; 0x01 + 3da: 0e 5f subi r16, 0xFE ; 254 + 3dc: 1f 4f sbci r17, 0xFF ; 255 + 3de: 44 24 eor r4, r4 + 3e0: 43 94 inc r4 + 3e2: 51 2c mov r5, r1 + 3e4: 54 01 movw r10, r8 + 3e6: 15 c0 rjmp .+42 ; 0x412 + 3e8: 38 01 movw r6, r16 + 3ea: f2 e0 ldi r31, 0x02 ; 2 + 3ec: 6f 0e add r6, r31 + 3ee: 71 1c adc r7, r1 + 3f0: f8 01 movw r30, r16 + 3f2: a0 80 ld r10, Z + 3f4: b1 80 ldd r11, Z+1 ; 0x01 + 3f6: 26 ff sbrs r18, 6 + 3f8: 03 c0 rjmp .+6 ; 0x400 + 3fa: 65 2d mov r22, r5 + 3fc: 70 e0 ldi r23, 0x00 ; 0 + 3fe: 02 c0 rjmp .+4 ; 0x404 + 400: 6f ef ldi r22, 0xFF ; 255 + 402: 7f ef ldi r23, 0xFF ; 255 + 404: c5 01 movw r24, r10 + 406: 2c 87 std Y+12, r18 ; 0x0c + 408: 0e 94 4d 03 call 0x69a ; 0x69a + 40c: 2c 01 movw r4, r24 + 40e: 83 01 movw r16, r6 + 410: 2c 85 ldd r18, Y+12 ; 0x0c + 412: 6f e7 ldi r22, 0x7F ; 127 + 414: 26 2e mov r2, r22 + 416: 22 22 and r2, r18 + 418: 18 c0 rjmp .+48 ; 0x44a + 41a: 38 01 movw r6, r16 + 41c: f2 e0 ldi r31, 0x02 ; 2 + 41e: 6f 0e add r6, r31 + 420: 71 1c adc r7, r1 + 422: f8 01 movw r30, r16 + 424: a0 80 ld r10, Z + 426: b1 80 ldd r11, Z+1 ; 0x01 + 428: 26 ff sbrs r18, 6 + 42a: 03 c0 rjmp .+6 ; 0x432 + 42c: 65 2d mov r22, r5 + 42e: 70 e0 ldi r23, 0x00 ; 0 + 430: 02 c0 rjmp .+4 ; 0x436 + 432: 6f ef ldi r22, 0xFF ; 255 + 434: 7f ef ldi r23, 0xFF ; 255 + 436: c5 01 movw r24, r10 + 438: 2c 87 std Y+12, r18 ; 0x0c + 43a: 0e 94 42 03 call 0x684 ; 0x684 + 43e: 2c 01 movw r4, r24 + 440: 2c 85 ldd r18, Y+12 ; 0x0c + 442: 50 e8 ldi r21, 0x80 ; 128 + 444: 25 2e mov r2, r21 + 446: 22 2a or r2, r18 + 448: 83 01 movw r16, r6 + 44a: 23 fc sbrc r2, 3 + 44c: 1c c0 rjmp .+56 ; 0x486 <__stack+0x27> + 44e: 06 c0 rjmp .+12 ; 0x45c + 450: b7 01 movw r22, r14 + 452: 80 e2 ldi r24, 0x20 ; 32 + 454: 90 e0 ldi r25, 0x00 ; 0 + 456: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 45a: 3a 94 dec r3 + 45c: 83 2d mov r24, r3 + 45e: 90 e0 ldi r25, 0x00 ; 0 + 460: 48 16 cp r4, r24 + 462: 59 06 cpc r5, r25 + 464: a8 f3 brcs .-22 ; 0x450 + 466: 0f c0 rjmp .+30 ; 0x486 <__stack+0x27> + 468: f5 01 movw r30, r10 + 46a: 27 fc sbrc r2, 7 + 46c: 85 91 lpm r24, Z+ + 46e: 27 fe sbrs r2, 7 + 470: 81 91 ld r24, Z+ + 472: 5f 01 movw r10, r30 + 474: b7 01 movw r22, r14 + 476: 90 e0 ldi r25, 0x00 ; 0 + 478: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 47c: 31 10 cpse r3, r1 + 47e: 3a 94 dec r3 + 480: f1 e0 ldi r31, 0x01 ; 1 + 482: 4f 1a sub r4, r31 + 484: 51 08 sbc r5, r1 + 486: 41 14 cp r4, r1 + 488: 51 04 cpc r5, r1 + 48a: 71 f7 brne .-36 ; 0x468 <__stack+0x9> + 48c: ed c0 rjmp .+474 ; 0x668 <__stack+0x209> + 48e: 84 36 cpi r24, 0x64 ; 100 + 490: 11 f0 breq .+4 ; 0x496 <__stack+0x37> + 492: 89 36 cpi r24, 0x69 ; 105 + 494: 41 f5 brne .+80 ; 0x4e6 <__stack+0x87> + 496: f8 01 movw r30, r16 + 498: 27 ff sbrs r18, 7 + 49a: 07 c0 rjmp .+14 ; 0x4aa <__stack+0x4b> + 49c: 60 81 ld r22, Z + 49e: 71 81 ldd r23, Z+1 ; 0x01 + 4a0: 82 81 ldd r24, Z+2 ; 0x02 + 4a2: 93 81 ldd r25, Z+3 ; 0x03 + 4a4: 0c 5f subi r16, 0xFC ; 252 + 4a6: 1f 4f sbci r17, 0xFF ; 255 + 4a8: 08 c0 rjmp .+16 ; 0x4ba <__stack+0x5b> + 4aa: 60 81 ld r22, Z + 4ac: 71 81 ldd r23, Z+1 ; 0x01 + 4ae: 88 27 eor r24, r24 + 4b0: 77 fd sbrc r23, 7 + 4b2: 80 95 com r24 + 4b4: 98 2f mov r25, r24 + 4b6: 0e 5f subi r16, 0xFE ; 254 + 4b8: 1f 4f sbci r17, 0xFF ; 255 + 4ba: 4f e6 ldi r20, 0x6F ; 111 + 4bc: b4 2e mov r11, r20 + 4be: b2 22 and r11, r18 + 4c0: 97 ff sbrs r25, 7 + 4c2: 09 c0 rjmp .+18 ; 0x4d6 <__stack+0x77> + 4c4: 90 95 com r25 + 4c6: 80 95 com r24 + 4c8: 70 95 com r23 + 4ca: 61 95 neg r22 + 4cc: 7f 4f sbci r23, 0xFF ; 255 + 4ce: 8f 4f sbci r24, 0xFF ; 255 + 4d0: 9f 4f sbci r25, 0xFF ; 255 + 4d2: f0 e8 ldi r31, 0x80 ; 128 + 4d4: bf 2a or r11, r31 + 4d6: 2a e0 ldi r18, 0x0A ; 10 + 4d8: 30 e0 ldi r19, 0x00 ; 0 + 4da: a4 01 movw r20, r8 + 4dc: 0e 94 84 03 call 0x708 ; 0x708 <__ultoa_invert> + 4e0: a8 2e mov r10, r24 + 4e2: a8 18 sub r10, r8 + 4e4: 43 c0 rjmp .+134 ; 0x56c <__stack+0x10d> + 4e6: 85 37 cpi r24, 0x75 ; 117 + 4e8: 31 f4 brne .+12 ; 0x4f6 <__stack+0x97> + 4ea: 3f ee ldi r19, 0xEF ; 239 + 4ec: b3 2e mov r11, r19 + 4ee: b2 22 and r11, r18 + 4f0: 2a e0 ldi r18, 0x0A ; 10 + 4f2: 30 e0 ldi r19, 0x00 ; 0 + 4f4: 24 c0 rjmp .+72 ; 0x53e <__stack+0xdf> + 4f6: 99 ef ldi r25, 0xF9 ; 249 + 4f8: b9 2e mov r11, r25 + 4fa: b2 22 and r11, r18 + 4fc: 8f 36 cpi r24, 0x6F ; 111 + 4fe: b9 f0 breq .+46 ; 0x52e <__stack+0xcf> + 500: 20 f4 brcc .+8 ; 0x50a <__stack+0xab> + 502: 88 35 cpi r24, 0x58 ; 88 + 504: 09 f0 breq .+2 ; 0x508 <__stack+0xa9> + 506: b3 c0 rjmp .+358 ; 0x66e <__stack+0x20f> + 508: 0d c0 rjmp .+26 ; 0x524 <__stack+0xc5> + 50a: 80 37 cpi r24, 0x70 ; 112 + 50c: 21 f0 breq .+8 ; 0x516 <__stack+0xb7> + 50e: 88 37 cpi r24, 0x78 ; 120 + 510: 09 f0 breq .+2 ; 0x514 <__stack+0xb5> + 512: ad c0 rjmp .+346 ; 0x66e <__stack+0x20f> + 514: 02 c0 rjmp .+4 ; 0x51a <__stack+0xbb> + 516: 20 e1 ldi r18, 0x10 ; 16 + 518: b2 2a or r11, r18 + 51a: b4 fe sbrs r11, 4 + 51c: 0b c0 rjmp .+22 ; 0x534 <__stack+0xd5> + 51e: 84 e0 ldi r24, 0x04 ; 4 + 520: b8 2a or r11, r24 + 522: 08 c0 rjmp .+16 ; 0x534 <__stack+0xd5> + 524: 24 ff sbrs r18, 4 + 526: 09 c0 rjmp .+18 ; 0x53a <__stack+0xdb> + 528: e6 e0 ldi r30, 0x06 ; 6 + 52a: be 2a or r11, r30 + 52c: 06 c0 rjmp .+12 ; 0x53a <__stack+0xdb> + 52e: 28 e0 ldi r18, 0x08 ; 8 + 530: 30 e0 ldi r19, 0x00 ; 0 + 532: 05 c0 rjmp .+10 ; 0x53e <__stack+0xdf> + 534: 20 e1 ldi r18, 0x10 ; 16 + 536: 30 e0 ldi r19, 0x00 ; 0 + 538: 02 c0 rjmp .+4 ; 0x53e <__stack+0xdf> + 53a: 20 e1 ldi r18, 0x10 ; 16 + 53c: 32 e0 ldi r19, 0x02 ; 2 + 53e: f8 01 movw r30, r16 + 540: b7 fe sbrs r11, 7 + 542: 07 c0 rjmp .+14 ; 0x552 <__stack+0xf3> + 544: 60 81 ld r22, Z + 546: 71 81 ldd r23, Z+1 ; 0x01 + 548: 82 81 ldd r24, Z+2 ; 0x02 + 54a: 93 81 ldd r25, Z+3 ; 0x03 + 54c: 0c 5f subi r16, 0xFC ; 252 + 54e: 1f 4f sbci r17, 0xFF ; 255 + 550: 06 c0 rjmp .+12 ; 0x55e <__stack+0xff> + 552: 60 81 ld r22, Z + 554: 71 81 ldd r23, Z+1 ; 0x01 + 556: 80 e0 ldi r24, 0x00 ; 0 + 558: 90 e0 ldi r25, 0x00 ; 0 + 55a: 0e 5f subi r16, 0xFE ; 254 + 55c: 1f 4f sbci r17, 0xFF ; 255 + 55e: a4 01 movw r20, r8 + 560: 0e 94 84 03 call 0x708 ; 0x708 <__ultoa_invert> + 564: a8 2e mov r10, r24 + 566: a8 18 sub r10, r8 + 568: ff e7 ldi r31, 0x7F ; 127 + 56a: bf 22 and r11, r31 + 56c: b6 fe sbrs r11, 6 + 56e: 0b c0 rjmp .+22 ; 0x586 <__stack+0x127> + 570: 2b 2d mov r18, r11 + 572: 2e 7f andi r18, 0xFE ; 254 + 574: a5 14 cp r10, r5 + 576: 50 f4 brcc .+20 ; 0x58c <__stack+0x12d> + 578: b4 fe sbrs r11, 4 + 57a: 0a c0 rjmp .+20 ; 0x590 <__stack+0x131> + 57c: b2 fc sbrc r11, 2 + 57e: 08 c0 rjmp .+16 ; 0x590 <__stack+0x131> + 580: 2b 2d mov r18, r11 + 582: 2e 7e andi r18, 0xEE ; 238 + 584: 05 c0 rjmp .+10 ; 0x590 <__stack+0x131> + 586: 7a 2c mov r7, r10 + 588: 2b 2d mov r18, r11 + 58a: 03 c0 rjmp .+6 ; 0x592 <__stack+0x133> + 58c: 7a 2c mov r7, r10 + 58e: 01 c0 rjmp .+2 ; 0x592 <__stack+0x133> + 590: 75 2c mov r7, r5 + 592: 24 ff sbrs r18, 4 + 594: 0d c0 rjmp .+26 ; 0x5b0 <__stack+0x151> + 596: fe 01 movw r30, r28 + 598: ea 0d add r30, r10 + 59a: f1 1d adc r31, r1 + 59c: 80 81 ld r24, Z + 59e: 80 33 cpi r24, 0x30 ; 48 + 5a0: 11 f4 brne .+4 ; 0x5a6 <__stack+0x147> + 5a2: 29 7e andi r18, 0xE9 ; 233 + 5a4: 09 c0 rjmp .+18 ; 0x5b8 <__stack+0x159> + 5a6: 22 ff sbrs r18, 2 + 5a8: 06 c0 rjmp .+12 ; 0x5b6 <__stack+0x157> + 5aa: 73 94 inc r7 + 5ac: 73 94 inc r7 + 5ae: 04 c0 rjmp .+8 ; 0x5b8 <__stack+0x159> + 5b0: 82 2f mov r24, r18 + 5b2: 86 78 andi r24, 0x86 ; 134 + 5b4: 09 f0 breq .+2 ; 0x5b8 <__stack+0x159> + 5b6: 73 94 inc r7 + 5b8: 23 fd sbrc r18, 3 + 5ba: 14 c0 rjmp .+40 ; 0x5e4 <__stack+0x185> + 5bc: 20 ff sbrs r18, 0 + 5be: 0f c0 rjmp .+30 ; 0x5de <__stack+0x17f> + 5c0: 5a 2c mov r5, r10 + 5c2: 73 14 cp r7, r3 + 5c4: 60 f4 brcc .+24 ; 0x5de <__stack+0x17f> + 5c6: 53 0c add r5, r3 + 5c8: 57 18 sub r5, r7 + 5ca: 73 2c mov r7, r3 + 5cc: 08 c0 rjmp .+16 ; 0x5de <__stack+0x17f> + 5ce: b7 01 movw r22, r14 + 5d0: 80 e2 ldi r24, 0x20 ; 32 + 5d2: 90 e0 ldi r25, 0x00 ; 0 + 5d4: 2c 87 std Y+12, r18 ; 0x0c + 5d6: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 5da: 73 94 inc r7 + 5dc: 2c 85 ldd r18, Y+12 ; 0x0c + 5de: 73 14 cp r7, r3 + 5e0: b0 f3 brcs .-20 ; 0x5ce <__stack+0x16f> + 5e2: 04 c0 rjmp .+8 ; 0x5ec <__stack+0x18d> + 5e4: 73 14 cp r7, r3 + 5e6: 10 f4 brcc .+4 ; 0x5ec <__stack+0x18d> + 5e8: 37 18 sub r3, r7 + 5ea: 01 c0 rjmp .+2 ; 0x5ee <__stack+0x18f> + 5ec: 31 2c mov r3, r1 + 5ee: 24 ff sbrs r18, 4 + 5f0: 12 c0 rjmp .+36 ; 0x616 <__stack+0x1b7> + 5f2: b7 01 movw r22, r14 + 5f4: 80 e3 ldi r24, 0x30 ; 48 + 5f6: 90 e0 ldi r25, 0x00 ; 0 + 5f8: 2c 87 std Y+12, r18 ; 0x0c + 5fa: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 5fe: 2c 85 ldd r18, Y+12 ; 0x0c + 600: 22 ff sbrs r18, 2 + 602: 1e c0 rjmp .+60 ; 0x640 <__stack+0x1e1> + 604: 21 ff sbrs r18, 1 + 606: 03 c0 rjmp .+6 ; 0x60e <__stack+0x1af> + 608: 88 e5 ldi r24, 0x58 ; 88 + 60a: 90 e0 ldi r25, 0x00 ; 0 + 60c: 02 c0 rjmp .+4 ; 0x612 <__stack+0x1b3> + 60e: 88 e7 ldi r24, 0x78 ; 120 + 610: 90 e0 ldi r25, 0x00 ; 0 + 612: b7 01 movw r22, r14 + 614: 0c c0 rjmp .+24 ; 0x62e <__stack+0x1cf> + 616: 82 2f mov r24, r18 + 618: 86 78 andi r24, 0x86 ; 134 + 61a: 91 f0 breq .+36 ; 0x640 <__stack+0x1e1> + 61c: 21 fd sbrc r18, 1 + 61e: 02 c0 rjmp .+4 ; 0x624 <__stack+0x1c5> + 620: 80 e2 ldi r24, 0x20 ; 32 + 622: 01 c0 rjmp .+2 ; 0x626 <__stack+0x1c7> + 624: 8b e2 ldi r24, 0x2B ; 43 + 626: 27 fd sbrc r18, 7 + 628: 8d e2 ldi r24, 0x2D ; 45 + 62a: b7 01 movw r22, r14 + 62c: 90 e0 ldi r25, 0x00 ; 0 + 62e: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 632: 06 c0 rjmp .+12 ; 0x640 <__stack+0x1e1> + 634: b7 01 movw r22, r14 + 636: 80 e3 ldi r24, 0x30 ; 48 + 638: 90 e0 ldi r25, 0x00 ; 0 + 63a: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 63e: 5a 94 dec r5 + 640: a5 14 cp r10, r5 + 642: c0 f3 brcs .-16 ; 0x634 <__stack+0x1d5> + 644: aa 94 dec r10 + 646: f4 01 movw r30, r8 + 648: ea 0d add r30, r10 + 64a: f1 1d adc r31, r1 + 64c: b7 01 movw r22, r14 + 64e: 80 81 ld r24, Z + 650: 90 e0 ldi r25, 0x00 ; 0 + 652: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 656: a1 10 cpse r10, r1 + 658: f5 cf rjmp .-22 ; 0x644 <__stack+0x1e5> + 65a: 06 c0 rjmp .+12 ; 0x668 <__stack+0x209> + 65c: b7 01 movw r22, r14 + 65e: 80 e2 ldi r24, 0x20 ; 32 + 660: 90 e0 ldi r25, 0x00 ; 0 + 662: 0e 94 58 03 call 0x6b0 ; 0x6b0 + 666: 3a 94 dec r3 + 668: 31 10 cpse r3, r1 + 66a: f8 cf rjmp .-16 ; 0x65c <__stack+0x1fd> + 66c: 43 ce rjmp .-890 ; 0x2f4 + 66e: f7 01 movw r30, r14 + 670: 26 81 ldd r18, Z+6 ; 0x06 + 672: 37 81 ldd r19, Z+7 ; 0x07 + 674: 02 c0 rjmp .+4 ; 0x67a <__stack+0x21b> + 676: 2f ef ldi r18, 0xFF ; 255 + 678: 3f ef ldi r19, 0xFF ; 255 + 67a: c9 01 movw r24, r18 + 67c: 2c 96 adiw r28, 0x0c ; 12 + 67e: e2 e1 ldi r30, 0x12 ; 18 + 680: 0c 94 fe 03 jmp 0x7fc ; 0x7fc <__epilogue_restores__> + +00000684 : + 684: fc 01 movw r30, r24 + 686: 05 90 lpm r0, Z+ + 688: 61 50 subi r22, 0x01 ; 1 + 68a: 70 40 sbci r23, 0x00 ; 0 + 68c: 01 10 cpse r0, r1 + 68e: d8 f7 brcc .-10 ; 0x686 + 690: 80 95 com r24 + 692: 90 95 com r25 + 694: 8e 0f add r24, r30 + 696: 9f 1f adc r25, r31 + 698: 08 95 ret + +0000069a : + 69a: fc 01 movw r30, r24 + 69c: 61 50 subi r22, 0x01 ; 1 + 69e: 70 40 sbci r23, 0x00 ; 0 + 6a0: 01 90 ld r0, Z+ + 6a2: 01 10 cpse r0, r1 + 6a4: d8 f7 brcc .-10 ; 0x69c + 6a6: 80 95 com r24 + 6a8: 90 95 com r25 + 6aa: 8e 0f add r24, r30 + 6ac: 9f 1f adc r25, r31 + 6ae: 08 95 ret + +000006b0 : + 6b0: 0f 93 push r16 + 6b2: 1f 93 push r17 + 6b4: cf 93 push r28 + 6b6: df 93 push r29 + 6b8: 8c 01 movw r16, r24 + 6ba: eb 01 movw r28, r22 + 6bc: 8b 81 ldd r24, Y+3 ; 0x03 + 6be: 81 fd sbrc r24, 1 + 6c0: 03 c0 rjmp .+6 ; 0x6c8 + 6c2: 0f ef ldi r16, 0xFF ; 255 + 6c4: 1f ef ldi r17, 0xFF ; 255 + 6c6: 1a c0 rjmp .+52 ; 0x6fc + 6c8: 82 ff sbrs r24, 2 + 6ca: 0d c0 rjmp .+26 ; 0x6e6 + 6cc: 2e 81 ldd r18, Y+6 ; 0x06 + 6ce: 3f 81 ldd r19, Y+7 ; 0x07 + 6d0: 8c 81 ldd r24, Y+4 ; 0x04 + 6d2: 9d 81 ldd r25, Y+5 ; 0x05 + 6d4: 28 17 cp r18, r24 + 6d6: 39 07 cpc r19, r25 + 6d8: 64 f4 brge .+24 ; 0x6f2 + 6da: e8 81 ld r30, Y + 6dc: f9 81 ldd r31, Y+1 ; 0x01 + 6de: 01 93 st Z+, r16 + 6e0: f9 83 std Y+1, r31 ; 0x01 + 6e2: e8 83 st Y, r30 + 6e4: 06 c0 rjmp .+12 ; 0x6f2 + 6e6: e8 85 ldd r30, Y+8 ; 0x08 + 6e8: f9 85 ldd r31, Y+9 ; 0x09 + 6ea: 80 2f mov r24, r16 + 6ec: 09 95 icall + 6ee: 89 2b or r24, r25 + 6f0: 41 f7 brne .-48 ; 0x6c2 + 6f2: 8e 81 ldd r24, Y+6 ; 0x06 + 6f4: 9f 81 ldd r25, Y+7 ; 0x07 + 6f6: 01 96 adiw r24, 0x01 ; 1 + 6f8: 9f 83 std Y+7, r25 ; 0x07 + 6fa: 8e 83 std Y+6, r24 ; 0x06 + 6fc: c8 01 movw r24, r16 + 6fe: df 91 pop r29 + 700: cf 91 pop r28 + 702: 1f 91 pop r17 + 704: 0f 91 pop r16 + 706: 08 95 ret + +00000708 <__ultoa_invert>: + 708: fa 01 movw r30, r20 + 70a: aa 27 eor r26, r26 + 70c: 28 30 cpi r18, 0x08 ; 8 + 70e: 51 f1 breq .+84 ; 0x764 <__ultoa_invert+0x5c> + 710: 20 31 cpi r18, 0x10 ; 16 + 712: 81 f1 breq .+96 ; 0x774 <__ultoa_invert+0x6c> + 714: e8 94 clt + 716: 6f 93 push r22 + 718: 6e 7f andi r22, 0xFE ; 254 + 71a: 6e 5f subi r22, 0xFE ; 254 + 71c: 7f 4f sbci r23, 0xFF ; 255 + 71e: 8f 4f sbci r24, 0xFF ; 255 + 720: 9f 4f sbci r25, 0xFF ; 255 + 722: af 4f sbci r26, 0xFF ; 255 + 724: b1 e0 ldi r27, 0x01 ; 1 + 726: 3e d0 rcall .+124 ; 0x7a4 <__ultoa_invert+0x9c> + 728: b4 e0 ldi r27, 0x04 ; 4 + 72a: 3c d0 rcall .+120 ; 0x7a4 <__ultoa_invert+0x9c> + 72c: 67 0f add r22, r23 + 72e: 78 1f adc r23, r24 + 730: 89 1f adc r24, r25 + 732: 9a 1f adc r25, r26 + 734: a1 1d adc r26, r1 + 736: 68 0f add r22, r24 + 738: 79 1f adc r23, r25 + 73a: 8a 1f adc r24, r26 + 73c: 91 1d adc r25, r1 + 73e: a1 1d adc r26, r1 + 740: 6a 0f add r22, r26 + 742: 71 1d adc r23, r1 + 744: 81 1d adc r24, r1 + 746: 91 1d adc r25, r1 + 748: a1 1d adc r26, r1 + 74a: 20 d0 rcall .+64 ; 0x78c <__ultoa_invert+0x84> + 74c: 09 f4 brne .+2 ; 0x750 <__ultoa_invert+0x48> + 74e: 68 94 set + 750: 3f 91 pop r19 + 752: 2a e0 ldi r18, 0x0A ; 10 + 754: 26 9f mul r18, r22 + 756: 11 24 eor r1, r1 + 758: 30 19 sub r19, r0 + 75a: 30 5d subi r19, 0xD0 ; 208 + 75c: 31 93 st Z+, r19 + 75e: de f6 brtc .-74 ; 0x716 <__ultoa_invert+0xe> + 760: cf 01 movw r24, r30 + 762: 08 95 ret + 764: 46 2f mov r20, r22 + 766: 47 70 andi r20, 0x07 ; 7 + 768: 40 5d subi r20, 0xD0 ; 208 + 76a: 41 93 st Z+, r20 + 76c: b3 e0 ldi r27, 0x03 ; 3 + 76e: 0f d0 rcall .+30 ; 0x78e <__ultoa_invert+0x86> + 770: c9 f7 brne .-14 ; 0x764 <__ultoa_invert+0x5c> + 772: f6 cf rjmp .-20 ; 0x760 <__ultoa_invert+0x58> + 774: 46 2f mov r20, r22 + 776: 4f 70 andi r20, 0x0F ; 15 + 778: 40 5d subi r20, 0xD0 ; 208 + 77a: 4a 33 cpi r20, 0x3A ; 58 + 77c: 18 f0 brcs .+6 ; 0x784 <__ultoa_invert+0x7c> + 77e: 49 5d subi r20, 0xD9 ; 217 + 780: 31 fd sbrc r19, 1 + 782: 40 52 subi r20, 0x20 ; 32 + 784: 41 93 st Z+, r20 + 786: 02 d0 rcall .+4 ; 0x78c <__ultoa_invert+0x84> + 788: a9 f7 brne .-22 ; 0x774 <__ultoa_invert+0x6c> + 78a: ea cf rjmp .-44 ; 0x760 <__ultoa_invert+0x58> + 78c: b4 e0 ldi r27, 0x04 ; 4 + 78e: a6 95 lsr r26 + 790: 97 95 ror r25 + 792: 87 95 ror r24 + 794: 77 95 ror r23 + 796: 67 95 ror r22 + 798: ba 95 dec r27 + 79a: c9 f7 brne .-14 ; 0x78e <__ultoa_invert+0x86> + 79c: 00 97 sbiw r24, 0x00 ; 0 + 79e: 61 05 cpc r22, r1 + 7a0: 71 05 cpc r23, r1 + 7a2: 08 95 ret + 7a4: 9b 01 movw r18, r22 + 7a6: ac 01 movw r20, r24 + 7a8: 0a 2e mov r0, r26 + 7aa: 06 94 lsr r0 + 7ac: 57 95 ror r21 + 7ae: 47 95 ror r20 + 7b0: 37 95 ror r19 + 7b2: 27 95 ror r18 + 7b4: ba 95 dec r27 + 7b6: c9 f7 brne .-14 ; 0x7aa <__ultoa_invert+0xa2> + 7b8: 62 0f add r22, r18 + 7ba: 73 1f adc r23, r19 + 7bc: 84 1f adc r24, r20 + 7be: 95 1f adc r25, r21 + 7c0: a0 1d adc r26, r0 + 7c2: 08 95 ret + +000007c4 <__prologue_saves__>: + 7c4: 2f 92 push r2 + 7c6: 3f 92 push r3 + 7c8: 4f 92 push r4 + 7ca: 5f 92 push r5 + 7cc: 6f 92 push r6 + 7ce: 7f 92 push r7 + 7d0: 8f 92 push r8 + 7d2: 9f 92 push r9 + 7d4: af 92 push r10 + 7d6: bf 92 push r11 + 7d8: cf 92 push r12 + 7da: df 92 push r13 + 7dc: ef 92 push r14 + 7de: ff 92 push r15 + 7e0: 0f 93 push r16 + 7e2: 1f 93 push r17 + 7e4: cf 93 push r28 + 7e6: df 93 push r29 + 7e8: cd b7 in r28, 0x3d ; 61 + 7ea: de b7 in r29, 0x3e ; 62 + 7ec: ca 1b sub r28, r26 + 7ee: db 0b sbc r29, r27 + 7f0: 0f b6 in r0, 0x3f ; 63 + 7f2: f8 94 cli + 7f4: de bf out 0x3e, r29 ; 62 + 7f6: 0f be out 0x3f, r0 ; 63 + 7f8: cd bf out 0x3d, r28 ; 61 + 7fa: 09 94 ijmp + +000007fc <__epilogue_restores__>: + 7fc: 2a 88 ldd r2, Y+18 ; 0x12 + 7fe: 39 88 ldd r3, Y+17 ; 0x11 + 800: 48 88 ldd r4, Y+16 ; 0x10 + 802: 5f 84 ldd r5, Y+15 ; 0x0f + 804: 6e 84 ldd r6, Y+14 ; 0x0e + 806: 7d 84 ldd r7, Y+13 ; 0x0d + 808: 8c 84 ldd r8, Y+12 ; 0x0c + 80a: 9b 84 ldd r9, Y+11 ; 0x0b + 80c: aa 84 ldd r10, Y+10 ; 0x0a + 80e: b9 84 ldd r11, Y+9 ; 0x09 + 810: c8 84 ldd r12, Y+8 ; 0x08 + 812: df 80 ldd r13, Y+7 ; 0x07 + 814: ee 80 ldd r14, Y+6 ; 0x06 + 816: fd 80 ldd r15, Y+5 ; 0x05 + 818: 0c 81 ldd r16, Y+4 ; 0x04 + 81a: 1b 81 ldd r17, Y+3 ; 0x03 + 81c: aa 81 ldd r26, Y+2 ; 0x02 + 81e: b9 81 ldd r27, Y+1 ; 0x01 + 820: ce 0f add r28, r30 + 822: d1 1d adc r29, r1 + 824: 0f b6 in r0, 0x3f ; 63 + 826: f8 94 cli + 828: de bf out 0x3e, r29 ; 62 + 82a: 0f be out 0x3f, r0 ; 63 + 82c: cd bf out 0x3d, r28 ; 61 + 82e: ed 01 movw r28, r26 + 830: 08 95 ret + +00000832 <_exit>: + 832: f8 94 cli + +00000834 <__stop_program>: + 834: ff cf rjmp .-2 ; 0x834 <__stop_program> diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.map b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.map new file mode 100644 index 0000000..99393bb --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.map @@ -0,0 +1,588 @@ +Archive member included because of file (symbol) + +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o (exit) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + Zeitschaltung_V6.o (__do_copy_data) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + Zeitschaltung_V6.o (__do_clear_bss) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + Zeitschaltung_V6.o (__do_global_ctors) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) (__tablejump__) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + Zeitschaltung_V6.o (sprintf) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) (vfprintf) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) (strnlen_P) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) (strnlen) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) (fputc) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) (__ultoa_invert) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) (__prologue_saves__) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) (__epilogue_restores__) + +Discarded input sections + + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + .text 0x00000000 0x0 Zeitschaltung_V6.o + .bss 0x00000000 0x3 Zeitschaltung_V6.o + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00020000 xr +data 0x00800060 0x0000ffa0 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000400 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +user_signatures 0x00850000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o +LOAD Zeitschaltung_V6.o +START GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libm.a +END GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libm.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0x836 + *(.vectors) + .vectors 0x00000000 0x54 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + 0x00000000 __vector_default + 0x00000000 __vectors + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + 0x00000054 . = ALIGN (0x2) + 0x00000054 __trampolines_start = . + *(.trampolines) + .trampolines 0x00000054 0x0 linker stubs + *(.trampolines*) + 0x00000054 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x00000054 __ctors_start = . + *(.ctors) + .ctors 0x00000054 0x2 Zeitschaltung_V6.o + 0x00000056 __ctors_end = . + 0x00000056 __dtors_start = . + *(.dtors) + 0x00000056 __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x00000056 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + 0x00000056 __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x00000056 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x00000062 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + 0x00000062 __do_copy_data + .init4 0x00000078 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + 0x00000078 __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + .init6 0x00000088 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + 0x00000088 __do_global_ctors + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x0000009e 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + *(.init9) + *(.text) + .text 0x000000a6 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + 0x000000a6 __vector_1 + 0x000000a6 __vector_12 + 0x000000a6 __bad_interrupt + 0x000000a6 __vector_6 + 0x000000a6 __vector_3 + 0x000000a6 __vector_11 + 0x000000a6 __vector_13 + 0x000000a6 __vector_17 + 0x000000a6 __vector_19 + 0x000000a6 __vector_7 + 0x000000a6 __vector_5 + 0x000000a6 __vector_4 + 0x000000a6 __vector_9 + 0x000000a6 __vector_2 + 0x000000a6 __vector_15 + 0x000000a6 __vector_8 + 0x000000a6 __vector_14 + 0x000000a6 __vector_10 + 0x000000a6 __vector_16 + 0x000000a6 __vector_18 + 0x000000a6 __vector_20 + 0x000000aa . = ALIGN (0x2) + *(.text.*) + .text._ZN4UartILm9600EE4sendEPKc.isra.5 + 0x000000aa 0x12 Zeitschaltung_V6.o + .text._ZN6avrlib3pinINS_5portcELh3EE6outputEb.part.7 + 0x000000bc 0x4 Zeitschaltung_V6.o + .text._ZN6avrlib3pinINS_5portcELh3EE3setEb.part.9 + 0x000000c0 0x4 Zeitschaltung_V6.o + .text._ZN3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EE9send_softEh.isra.17 + 0x000000c4 0x2c Zeitschaltung_V6.o + .text._ZN5Rfm12I3SpiIN6avrlib5portcELi3ELi4ELi1ELi2ELi1EELh1ELh0ELh7ELm433920ELj9600ELh0ELh6EE4sendEj.isra.19 + 0x000000f0 0x50 Zeitschaltung_V6.o + .text.startup.main + 0x00000140 0xa4 Zeitschaltung_V6.o + 0x00000140 main + .text.startup._GLOBAL__sub_I_l + 0x000001e4 0x98 Zeitschaltung_V6.o + .text.libgcc 0x0000027c 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + 0x0000027c __tablejump2__ + 0x00000280 __tablejump__ + .text.avr-libc + 0x00000288 0x44 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + 0x00000288 sprintf + .text.avr-libc + 0x000002cc 0x3b8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + 0x000002cc vfprintf + .text.avr-libc + 0x00000684 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + 0x00000684 strnlen_P + .text.avr-libc + 0x0000069a 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + 0x0000069a strnlen + .text.avr-libc + 0x000006b0 0x58 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + 0x000006b0 fputc + .text.avr-libc + 0x00000708 0xbc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + 0x00000708 __ultoa_invert + .text.libgcc.prologue + 0x000007c4 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + 0x000007c4 __prologue_saves__ + .text.libgcc.prologue + 0x000007fc 0x36 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + 0x000007fc __epilogue_restores__ + 0x00000832 . = ALIGN (0x2) + *(.fini9) + .fini9 0x00000832 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + 0x00000832 _exit + 0x00000832 exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x00000832 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + *(.fini0) + 0x00000836 _etext = . + +.data 0x00800060 0x16 load address 0x00000836 + 0x00800060 PROVIDE (__data_start, .) + *(.data) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + .data 0x00800060 0x0 Zeitschaltung_V6.o + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_copy_data.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_prologue.o) + .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_epilogue.o) + *(.data*) + *(.rodata) + *(.rodata*) + .rodata.str1.1 + 0x00800060 0x15 Zeitschaltung_V6.o + 0x18 (size before relaxing) + *(.gnu.linkonce.d*) + 0x00800076 . = ALIGN (0x2) + *fill* 0x00800075 0x1 + 0x00800076 _edata = . + 0x00800076 PROVIDE (__data_end, .) + +.bss 0x00800076 0x0 + 0x00800076 PROVIDE (__bss_start, .) + *(.bss) + *(.bss*) + *(COMMON) + 0x00800076 PROVIDE (__bss_end, .) + 0x00000836 __data_load_start = LOADADDR (.data) + 0x0000084c __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x00800076 0x0 + 0x00800076 PROVIDE (__noinit_start, .) + *(.noinit*) + 0x00800076 PROVIDE (__noinit_end, .) + 0x00800076 _end = . + 0x00800076 PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab 0x00000000 0xc84 + *(.stab) + .stab 0x00000000 0x6cc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + .stab 0x000006cc 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen_P.o) + 0xa8 (size before relaxing) + .stab 0x00000768 0x9c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(strnlen.o) + 0xa8 (size before relaxing) + .stab 0x00000804 0x480 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(ultoa_invert.o) + 0x48c (size before relaxing) + +.stabstr 0x00000000 0x1aa + *(.stabstr) + .stabstr 0x00000000 0x1aa c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm16a.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x00000000 0x2f + *(.comment) + .comment 0x00000000 0x2f Zeitschaltung_V6.o + 0x30 (size before relaxing) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .comment 0x00000000 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges 0x00000000 0xb0 + *(.debug_aranges) + .debug_aranges + 0x00000000 0x50 Zeitschaltung_V6.o + .debug_aranges + 0x00000050 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_aranges + 0x00000070 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_aranges + 0x00000090 0x20 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x00000000 0x250c + *(.debug_info) + .debug_info 0x00000000 0x1c4b Zeitschaltung_V6.o + .debug_info 0x00001c4b 0x204 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_info 0x00001e4f 0x549 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_info 0x00002398 0x174 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + *(.gnu.linkonce.wi.*) + +.debug_abbrev 0x00000000 0x801 + *(.debug_abbrev) + .debug_abbrev 0x00000000 0x410 Zeitschaltung_V6.o + .debug_abbrev 0x00000410 0x12a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_abbrev 0x0000053a 0x1d6 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_abbrev 0x00000710 0xf1 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_line 0x00000000 0x861 + *(.debug_line) + .debug_line 0x00000000 0x33b Zeitschaltung_V6.o + .debug_line 0x0000033b 0x14e c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_line 0x00000489 0x2fe c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_line 0x00000787 0xda c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_frame 0x00000000 0x168 + *(.debug_frame) + .debug_frame 0x00000000 0xb4 Zeitschaltung_V6.o + .debug_frame 0x000000b4 0x30 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_frame 0x000000e4 0x4c c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_frame 0x00000130 0x38 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_str 0x00000000 0x128b + *(.debug_str) + .debug_str 0x00000000 0x10e2 Zeitschaltung_V6.o + 0x1146 (size before relaxing) + .debug_str 0x000010e2 0xa3 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + 0x127 (size before relaxing) + .debug_str 0x00001185 0xb9 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + 0x198 (size before relaxing) + .debug_str 0x0000123e 0x4d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + 0xf8 (size before relaxing) + +.debug_loc 0x00000000 0x891 + *(.debug_loc) + .debug_loc 0x00000000 0x260 Zeitschaltung_V6.o + .debug_loc 0x00000260 0x21 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_loc 0x00000281 0x51d c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_loc 0x0000079e 0xf3 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_macinfo + *(.debug_macinfo) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges 0x00000000 0x70 + *(.debug_ranges) + .debug_ranges 0x00000000 0x40 Zeitschaltung_V6.o + .debug_ranges 0x00000040 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(sprintf.o) + .debug_ranges 0x00000050 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(vfprintf_std.o) + .debug_ranges 0x00000060 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(fputc.o) + +.debug_macro + *(.debug_macro) +OUTPUT(Zeitschaltung_V6.elf elf32-avr) +LOAD linker stubs diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.srec b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.srec new file mode 100644 index 0000000..8d49c9c --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/Zeitschaltung_V6.srec @@ -0,0 +1,136 @@ +S01800005A656974736368616C74756E675F56362E73726563BC +S11300000C942B000C9453000C9453000C94530048 +S11300100C9453000C9453000C9453000C94530010 +S11300200C9453000C9453000C9453000C94530000 +S11300300C9453000C9453000C9453000C945300F0 +S11300400C9453000C9453000C9453000C945300E0 +S11300500C945300F20011241FBECFE5D4E0DEBFA0 +S1130060CDBF10E0A0E6B0E0E6E3F8E002C0059002 +S11300700D92A637B107D9F720E0A6E7B0E001C09A +S11300801D92A637B207E1F710E0C6E5D0E004C040 +S11300902297FE010E944001C435D107C9F70E948E +S11300A0A0000C9419040C940000FC0103C05D9B97 +S11300B0FECF8CB981918111FACF0895A39A089546 +S11300C0AB9A0895282F98E080E027FF02C0A99AF0 +S11300D001C0A998A19A880F9C998160AA9AA29AB2 +S11300E0220F00C00000AA98A29A915071F70895B7 +S11300F0EF92FF921F93CF93DF9300D0CDB7DEB77B +S1130100182FAB989A830E945E008A810E94620035 +S1130110F82EE12C812F0E9462009701282BC9013F +S11301208A8399830E9460000E945E008A8199817B +S11301300F900F90DF91CF911F91FF90EF90089552 +S1130140CF93DF93CDB7DEB72A970FB6F894DEBF0F +S11301500FBECDBF88EC92E80E94780081E89AEC4B +S11301600E94780083E89AEC0E94780080E6E82EEA +S113017080E0F82E8E010F5F1F4F18C0A89A2FEF52 +S113018080E792E0215080409040E1F700C00000F9 +S1130190A8982FEF80E792E0215080409040E1F74B +S11301A000C0000085E690E00E945500AB980E94D4 +S11301B05E009C9BE3CF80E090EB0E94780099273F +S11301C09F938F93FF92EF921F930F930E9444018A +S11301D0C8010E9455000F900F900F900F900F9040 +S11301E00F90E4CFA09AA898789483E389B988E023 +S11301F08AB986E880BD88E690E00E945500A998F7 +S1130200A19AAA98A29A0E9460000E945E00A498F3 +S1130210AC982FEF80E792E0215080409040E1F7C6 +S113022000C0000080EE90EC0E94780087ED90E81A +S11302300E9478008BEA92EC0E94780081E89AECA4 +S11302400E94780080E090EE0E94780080E098ECB4 +S11302500E94780087EF94EC0E94780080E296EA8E +S11302600E94780087E294E90E94780082E296EC8A +S11302700E94780080E698E90C947800EE0FFF1F46 +S11302800590F491E02D0994AEE0B0E0EAE4F1E0E9 +S11302900C94F0030D891E8986E08C831A830983EC +S11302A08FEF9FE79E838D83CE014996AC016F89C2 +S11302B0788DCE0101960E946601EF81F885E00FEA +S11302C0F11F10822E96E4E00C940C04ACE0B0E034 +S11302D0ECE6F1E00C94E2037C016B018A01FC0181 +S11302E017821682838181FFC6C188248394912C4E +S11302F08C0E9D1EF7019381F60193FD859193FF6A +S113030081916F01882309F4B2C1853239F493FDD8 +S1130310859193FF81916F01853229F4B70190E0B3 +S11303200E945803E7CF512C312C20E02032A8F44E +S11303308B3261F028F4803251F0833271F40BC0B7 +S11303408D3239F0803349F4216028C02260246062 +S113035025C0286023C0206121C027FD27C0382F75 +S113036030533A3078F426FF06C0FAE05F9E300D31 +S11303701124532E13C08AE0389E300D1124332EDD +S113038020620CC08E3221F426FD71C1206406C0A7 +S11303908C3611F4206802C0883641F4F60193FDCE +S11303A0859193FF81916F018111C0CF982F95544E +S11303B0933018F09052933028F40C5F1F4FFFE3F2 +S11303C0F9830DC0833631F0833771F0833509F03A +S11303D05EC023C0F801808189830E5F1F4F4424CF +S11303E04394512C540115C03801F2E06F0E711C76 +S11303F0F801A080B18026FF03C0652D70E002C023 +S11304006FEF7FEFC5012C870E944D032C01830100 +S11304102C856FE7262E222218C03801F2E06F0ED9 +S1130420711CF801A080B18026FF03C0652D70E027 +S113043002C06FEF7FEFC5012C870E9442032C019D +S11304402C8550E8252E222A830123FC1CC006C0DB +S1130450B70180E290E00E9458033A94832D90E023 +S113046048165906A8F30FC0F50127FC859127FE0D +S113047081915F01B70190E00E94580331103A94D2 +S1130480F1E04F1A51084114510471F7EDC084365C +S113049011F0893641F5F80127FF07C060817181A9 +S11304A0828193810C5F1F4F08C06081718188270E +S11304B077FD8095982F0E5F1F4F4FE6B42EB22222 +S11304C097FF09C090958095709561957F4F8F4FE8 +S11304D09F4FF0E8BF2A2AE030E0A4010E94840381 +S11304E0A82EA81843C0853731F43FEEB32EB222AC +S11304F02AE030E024C099EFB92EB2228F36B9F049 +S113050020F4883509F0B3C00DC0803721F0883756 +S113051009F0ADC002C020E1B22AB4FE0BC084E0F1 +S1130520B82A08C024FF09C0E6E0BE2A06C028E0B5 +S113053030E005C020E130E002C020E132E0F80103 +S1130540B7FE07C060817181828193810C5F1F4F68 +S113055006C06081718180E090E00E5F1F4FA401AE +S11305600E948403A82EA818FFE7BF22B6FE0BC082 +S11305702B2D2E7FA51450F4B4FE0AC0B2FC08C083 +S11305802B2D2E7E05C07A2C2B2D03C07A2C01C076 +S1130590752C24FF0DC0FE01EA0DF11D808180330E +S11305A011F4297E09C022FF06C07394739404C019 +S11305B0822F867809F0739423FD14C020FF0FC0A6 +S11305C05A2C731460F4530C5718732C08C0B701D9 +S11305D080E290E02C870E94580373942C85731456 +S11305E0B0F304C0731410F4371801C0312C24FF85 +S11305F012C0B70180E390E02C870E9458032C8539 +S113060022FF1EC021FF03C088E590E002C088E7F6 +S113061090E0B7010CC0822F867891F021FD02C0D2 +S113062080E201C08BE227FD8DE2B70190E00E94D9 +S1130630580306C0B70180E390E00E9458035A941F +S1130640A514C0F3AA94F401EA0DF11DB701808149 +S113065090E00E945803A110F5CF06C0B70180E2D4 +S113066090E00E9458033A943110F8CF43CEF7013A +S11306702681378102C02FEF3FEFC9012C96E2E1BA +S11306800C94FE03FC010590615070400110D8F7F2 +S1130690809590958E0F9F1F0895FC0161507040C6 +S11306A001900110D8F7809590958E0F9F1F0895A3 +S11306B00F931F93CF93DF938C01EB018B8181FD0B +S11306C003C00FEF1FEF1AC082FF0DC02E813F81C0 +S11306D08C819D812817390764F4E881F98101939D +S11306E0F983E88306C0E885F985802F0995892B6D +S11306F041F78E819F8101969F838E83C801DF918C +S1130700CF911F910F910895FA01AA27283051F132 +S1130710203181F1E8946F936E7F6E5F7F4F8F4F2E +S11307209F4FAF4FB1E03ED0B4E03CD0670F781F8D +S1130730891F9A1FA11D680F791F8A1F911DA11D72 +S11307406A0F711D811D911DA11D20D009F46894AB +S11307503F912AE0269F11243019305D3193DEF653 +S1130760CF010895462F4770405D4193B3E00FD009 +S1130770C9F7F6CF462F4F70405D4A3318F0495DF4 +S113078031FD4052419302D0A9F7EACFB4E0A695D7 +S11307909795879577956795BA95C9F700976105F9 +S11307A0710508959B01AC010A2E0694579547954F +S11307B037952795BA95C9F7620F731F841F951F44 +S11307C0A01D08952F923F924F925F926F927F9255 +S11307D08F929F92AF92BF92CF92DF92EF92FF924D +S11307E00F931F93CF93DF93CDB7DEB7CA1BDB0BF9 +S11307F00FB6F894DEBF0FBECDBF09942A8839889E +S113080048885F846E847D848C849B84AA84B984A4 +S1130810C884DF80EE80FD800C811B81AA81B981B0 +S1130820CE0FD11D0FB6F894DEBF0FBECDBFED01C4 +S10908300895F894FFCFC7 +S113083625303458200D0A005561727420646F6E99 +S109084665210D0A00000B +S9030000FC diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/comunication/.gitignore b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/comunication/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/io/hardware/.gitignore b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/io/hardware/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/makedep.mk b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/makedep.mk new file mode 100644 index 0000000..a5d6ddc --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Debug/makedep.mk @@ -0,0 +1,6 @@ +################################################################################ +# Automatically-generated file. Do not edit or delete the file +################################################################################ + +Zeitschaltung_V6.cpp + diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/FastDelegate.h b/V6/Program/rfm12_rs232/Zeitschaltung_V6/FastDelegate.h new file mode 100644 index 0000000..d9136f8 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/FastDelegate.h @@ -0,0 +1,2036 @@ +// +// Efficient delegates in C++ that generate only two lines of asm code! +// Documentation is found at http://www.codeproject.com/cpp/FastDelegate.asp +// +// - Don Clugston, Mar 2004. +// Major contributions were made by Jody Hagins. +// +// +// Adapted for WinAVR by Lauri Kirikal, Mar 2007. +// +// History: +// 24-Apr-04 1.0 * Submitted to CodeProject. +// 28-Apr-04 1.1 * Prevent most unsafe uses of evil static function hack. +// * Improved syntax for horrible_cast (thanks Paul Bludov). +// * Tested on Metrowerks MWCC and Intel ICL (IA32) +// * Compiled, but not run, on Comeau C++ and Intel Itanium ICL. +// 27-Jun-04 1.2 * Now works on Borland C++ Builder 5.5 +// * Now works on /clr "managed C++" code on VC7, VC7.1 +// * Comeau C++ now compiles without warnings. +// * Prevent the virtual inheritance case from being used on +// VC6 and earlier, which generate incorrect code. +// * Improved warning and error messages. Non-standard hacks +// now have compile-time checks to make them safer. +// * implicit_cast used instead of static_cast in many cases. +// * If calling a const member function, a const class pointer can be used. +// * MakeDelegate() global helper function added to simplify pass-by-value. +// * Added fastdelegate.Clear() +// 16-Jul-04 1.2.1* Workaround for gcc bug (const member function pointers in templates) +// 30-Oct-04 1.3 * Support for (non-void) return values. +// * No more workarounds in client code! +// MSVC and Intel now use a clever hack invented by John Dlugosz: +// - The FASTDELEGATEDECLARE workaround is no longer necessary. +// - No more warning messages for VC6 +// * Less use of macros. Error messages should be more comprehensible. +// * Added include guards +// * Added FastDelegate::Empty() to test if invocation is safe (Thanks Neville Franks). +// * Now tested on VS 2005 Express Beta, PGI C++ +// 24-Dec-04 1.4 * Added DelegateMemento, to allow collections of disparate delegates. +// * <,>,<=,>= comparison operators to allow storage in ordered containers. +// * Substantial reduction of code size, especially the 'Closure' class. +// * Standardised all the compiler-specific workarounds. +// * MFP conversion now works for CodePlay (but not yet supported in the full code). +// * Now compiles without warnings on _any_ supported compiler, including BCC 5.5.1 +// * New syntax: FastDelegate< int (char *, double) >. +// 14-Feb-05 1.4.1* Now treats =0 as equivalent to .Clear(), ==0 as equivalent to .Empty(). (Thanks elfric). +// * Now tested on Intel ICL for AMD64, VS2005 Beta for AMD64 and Itanium. +// 30-Mar-05 1.5 * Safebool idiom: "if (dg)" is now equivalent to "if (!dg.Empty())" +// * Fully supported by CodePlay VectorC +// * Bugfix for Metrowerks: Empty() was buggy because a valid MFP can be 0 on MWCC! +// * More optimal assignment,== and != operators for static function pointers. + +/* + Minor Changes For AVR C++ Lib Compatibility + + STARTS ... +*/ +#ifndef __AVR_CPP_DELEGATE_H__ +#define __AVR_CPP_DELEGATE_H__ + +#if !(defined(EXCLUDE_FAST_DELEGATE) && defined(EXCLUDE_MULTI_DELEGATE) && defined(EXLUDE_DATA_DELEGATE)) + +#ifndef __cplusplus +#error "Delegate.h needs C++ compiler." +#else + +/* + Header file memory.h is missing in WinAVR. + Needed functions are defined in string.h + + Lauri Kirikal +*/ +#ifdef __AVR__ +#include +#else +#include // to allow <,> comparisons +#endif + +/* + ... ENDS + + Lauri Kirikal +*/ + +//////////////////////////////////////////////////////////////////////////////// +// Configuration options +// +//////////////////////////////////////////////////////////////////////////////// + +// Uncomment the following #define for optimally-sized delegates. +// In this case, the generated asm code is almost identical to the code you'd get +// if the compiler had native support for delegates. +// It will not work on systems where sizeof(dataptr) < sizeof(codeptr). +// Thus, it will not work for DOS compilers using the medium model. +// It will also probably fail on some DSP systems. +#define FASTDELEGATE_USESTATICFUNCTIONHACK + +// Uncomment the next line to allow function declarator syntax. +// It is automatically enabled for those compilers where it is known to work. +//#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX + +//////////////////////////////////////////////////////////////////////////////// +// Compiler identification for workarounds +// +//////////////////////////////////////////////////////////////////////////////// + +// Compiler identification. It's not easy to identify Visual C++ because +// many vendors fraudulently define Microsoft's identifiers. +#if defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__VECTOR_C) && !defined(__ICL) && !defined(__BORLANDC__) +#define FASTDLGT_ISMSVC + +#if (_MSC_VER <1300) // Many workarounds are required for VC6. +#define FASTDLGT_VC6 +#pragma warning(disable:4786) // disable this ridiculous warning +#endif + +#endif + +// Does the compiler uses Microsoft's member function pointer structure? +// If so, it needs special treatment. +// Metrowerks CodeWarrior, Intel, and CodePlay fraudulently define Microsoft's +// identifier, _MSC_VER. We need to filter Metrowerks out. +#if defined(_MSC_VER) && !defined(__MWERKS__) +#define FASTDLGT_MICROSOFT_MFP + +#if !defined(__VECTOR_C) +// CodePlay doesn't have the __single/multi/virtual_inheritance keywords +#define FASTDLGT_HASINHERITANCE_KEYWORDS +#endif +#endif + +// Does it allow function declarator syntax? The following compilers are known to work: +#if defined(FASTDLGT_ISMSVC) && (_MSC_VER >=1310) // VC 7.1 +#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX +#endif + +// Gcc(2.95+), and versions of Digital Mars, Intel and Comeau in common use. +#if defined (__DMC__) || defined(__GNUC__) || defined(__ICL) || defined(__COMO__) +#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX +#endif + +// It works on Metrowerks MWCC 3.2.2. From boost.Config it should work on earlier ones too. +#if defined (__MWERKS__) +#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX +#endif + +#ifdef __GNUC__ // Workaround GCC bug #8271 + // At present, GCC doesn't recognize constness of MFPs in templates +#define FASTDELEGATE_GCC_BUG_8271 +#endif + + + +//////////////////////////////////////////////////////////////////////////////// +// General tricks used in this code +// +// (a) Error messages are generated by typdefing an array of negative size to +// generate compile-time errors. +// (b) Warning messages on MSVC are generated by declaring unused variables, and +// enabling the "variable XXX is never used" warning. +// (c) Unions are used in a few compiler-specific cases to perform illegal casts. +// (d) For Microsoft and Intel, when adjusting the 'this' pointer, it's cast to +// (char *) first to ensure that the correct number of *bytes* are added. +// +//////////////////////////////////////////////////////////////////////////////// +// Helper templates +// +//////////////////////////////////////////////////////////////////////////////// + +/* + namespace names modified: + fastdelegate -> CppDelegate + detail -> Internal + + Lauri Kirikal +*/ + +namespace CppDelegate { +namespace Internal { // we'll hide the implementation details in a nested namespace. + +// implicit_cast< > +// I believe this was originally going to be in the C++ standard but +// was left out by accident. It's even milder than static_cast. +// I use it instead of static_cast<> to emphasize that I'm not doing +// anything nasty. +// Usage is identical to static_cast<> +template +inline OutputClass implicit_cast(InputClass input){ + return input; +} + +// horrible_cast< > +// This is truly evil. It completely subverts C++'s type system, allowing you +// to cast from any class to any other class. Technically, using a union +// to perform the cast is undefined behaviour (even in C). But we can see if +// it is OK by checking that the union is the same size as each of its members. +// horrible_cast<> should only be used for compiler-specific workarounds. +// Usage is identical to reinterpret_cast<>. + +// This union is declared outside the horrible_cast because BCC 5.5.1 +// can't inline a function with a nested class, and gives a warning. +template +union horrible_union{ + OutputClass out; + InputClass in; +}; + +template +inline OutputClass horrible_cast(const InputClass input){ + horrible_union u; + // Cause a compile-time error if in, out and u are not the same size. + // If the compile fails here, it means the compiler has peculiar + // unions which would prevent the cast from working. + typedef int ERROR_CantUseHorrible_cast[sizeof(InputClass)==sizeof(u) + && sizeof(InputClass)==sizeof(OutputClass) ? 1 : -1]; + u.in = input; + return u.out; +} + +//////////////////////////////////////////////////////////////////////////////// +// Workarounds +// +//////////////////////////////////////////////////////////////////////////////// + +// Backwards compatibility: This macro used to be necessary in the virtual inheritance +// case for Intel and Microsoft. Now it just forward-declares the class. +#define FASTDELEGATEDECLARE(CLASSNAME) class CLASSNAME; + +// Prevent use of the static function hack with the DOS medium model. +#ifdef __MEDIUM__ +#undef FASTDELEGATE_USESTATICFUNCTIONHACK +#endif + +// DefaultVoid - a workaround for 'void' templates in VC6. +// +// (1) VC6 and earlier do not allow 'void' as a default template argument. +// (2) They also doesn't allow you to return 'void' from a function. +// +// Workaround for (1): Declare a dummy type 'DefaultVoid' which we use +// when we'd like to use 'void'. We convert it into 'void' and back +// using the templates DefaultVoidToVoid<> and VoidToDefaultVoid<>. +// Workaround for (2): On VC6, the code for calling a void function is +// identical to the code for calling a non-void function in which the +// return value is never used, provided the return value is returned +// in the EAX register, rather than on the stack. +// This is true for most fundamental types such as int, enum, void *. +// Const void * is the safest option since it doesn't participate +// in any automatic conversions. But on a 16-bit compiler it might +// cause extra code to be generated, so we disable it for all compilers +// except for VC6 (and VC5). +#ifdef FASTDLGT_VC6 +// VC6 workaround +typedef const void * DefaultVoid; +#else +// On any other compiler, just use a normal void. +typedef void DefaultVoid; +#endif + +// Translate from 'DefaultVoid' to 'void'. +// Everything else is unchanged +template +struct DefaultVoidToVoid { typedef T type; }; + +template <> +struct DefaultVoidToVoid { typedef void type; }; + +// Translate from 'void' into 'DefaultVoid' +// Everything else is unchanged +template +struct VoidToDefaultVoid { typedef T type; }; + +template <> +struct VoidToDefaultVoid { typedef DefaultVoid type; }; + + + +//////////////////////////////////////////////////////////////////////////////// +// Fast Delegates, part 1: +// +// Conversion of member function pointer to a standard form +// +//////////////////////////////////////////////////////////////////////////////// + +// GenericClass is a fake class, ONLY used to provide a type. +// It is vitally important that it is never defined, so that the compiler doesn't +// think it can optimize the invocation. For example, Borland generates simpler +// code if it knows the class only uses single inheritance. + +// Compilers using Microsoft's structure need to be treated as a special case. +#ifdef FASTDLGT_MICROSOFT_MFP + +#ifdef FASTDLGT_HASINHERITANCE_KEYWORDS + // For Microsoft and Intel, we want to ensure that it's the most efficient type of MFP + // (4 bytes), even when the /vmg option is used. Declaring an empty class + // would give 16 byte pointers in this case.... + class __single_inheritance GenericClass; +#endif + // ...but for Codeplay, an empty class *always* gives 4 byte pointers. + // If compiled with the /clr option ("managed C++"), the JIT compiler thinks + // it needs to load GenericClass before it can call any of its functions, + // (compiles OK but crashes at runtime!), so we need to declare an + // empty class to make it happy. + // Codeplay and VC4 can't cope with the unknown_inheritance case either. + class GenericClass {}; +#else + class GenericClass; +#endif + +// The size of a single inheritance member function pointer. +const int SINGLE_MEMFUNCPTR_SIZE = sizeof(void (GenericClass::*)()); + +// SimplifyMemFunc< >::Convert() +// +// A template function that converts an arbitrary member function pointer into the +// simplest possible form of member function pointer, using a supplied 'this' pointer. +// According to the standard, this can be done legally with reinterpret_cast<>. +// For (non-standard) compilers which use member function pointers which vary in size +// depending on the class, we need to use knowledge of the internal structure of a +// member function pointer, as used by the compiler. Template specialization is used +// to distinguish between the sizes. Because some compilers don't support partial +// template specialisation, I use full specialisation of a wrapper struct. + +// general case -- don't know how to convert it. Force a compile failure +template +struct SimplifyMemFunc { + template + inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, + GenericMemFuncType &bound_func) { + // Unsupported member function type -- force a compile failure. + // (it's illegal to have a array with negative size). + typedef char ERROR_Unsupported_member_function_pointer_on_this_compiler[N-100]; + return 0; + } +}; + +// For compilers where all member func ptrs are the same size, everything goes here. +// For non-standard compilers, only single_inheritance classes go here. +template <> +struct SimplifyMemFunc { + template + inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, + GenericMemFuncType &bound_func) { +#if defined __DMC__ + // Digital Mars doesn't allow you to cast between abitrary PMF's, + // even though the standard says you can. The 32-bit compiler lets you + // static_cast through an int, but the DOS compiler doesn't. + bound_func = horrible_cast(function_to_bind); +#else + bound_func = reinterpret_cast(function_to_bind); +#endif + return reinterpret_cast(pthis); + } +}; + +//////////////////////////////////////////////////////////////////////////////// +// Fast Delegates, part 1b: +// +// Workarounds for Microsoft and Intel +// +//////////////////////////////////////////////////////////////////////////////// + + +// Compilers with member function pointers which violate the standard (MSVC, Intel, Codeplay), +// need to be treated as a special case. +#ifdef FASTDLGT_MICROSOFT_MFP + +/* + ... ERASED for shorter compiling time ... + + Lauri Kirikal +*/ + +#error "MSVC, Intel, Codeplay compilers support erased from this file." + +#endif // MS/Intel hacks + +} // namespace Internal + +//////////////////////////////////////////////////////////////////////////////// +// Fast Delegates, part 2: +// +// Define the delegate storage, and cope with static functions +// +//////////////////////////////////////////////////////////////////////////////// + +// DelegateMemento -- an opaque structure which can hold an arbitary delegate. +// It knows nothing about the calling convention or number of arguments used by +// the function pointed to. +// It supplies comparison operators so that it can be stored in STL collections. +// It cannot be set to anything other than null, nor invoked directly: +// it must be converted to a specific delegate. + +// Implementation: +// There are two possible implementations: the Safe method and the Evil method. +// DelegateMemento - Safe version +// +// This implementation is standard-compliant, but a bit tricky. +// A static function pointer is stored inside the class. +// Here are the valid values: +// +-- Static pointer --+--pThis --+-- pMemFunc-+-- Meaning------+ +// | 0 | 0 | 0 | Empty | +// | !=0 |(dontcare)| Invoker | Static function| +// | 0 | !=0 | !=0* | Method call | +// +--------------------+----------+------------+----------------+ +// * For Metrowerks, this can be 0. (first virtual function in a +// single_inheritance class). +// When stored stored inside a specific delegate, the 'dontcare' entries are replaced +// with a reference to the delegate itself. This complicates the = and == operators +// for the delegate class. + +// DelegateMemento - Evil version +// +// For compilers where data pointers are at least as big as code pointers, it is +// possible to store the function pointer in the this pointer, using another +// horrible_cast. In this case the DelegateMemento implementation is simple: +// +--pThis --+-- pMemFunc-+-- Meaning---------------------+ +// | 0 | 0 | Empty | +// | !=0 | !=0* | Static function or method call| +// +----------+------------+-------------------------------+ +// * For Metrowerks, this can be 0. (first virtual function in a +// single_inheritance class). +// Note that the Sun C++ and MSVC documentation explicitly state that they +// support static_cast between void * and function pointers. + +/* + DelegateMemento moved from CppDelegate namespace to CppDelegate::Internal namespace + + Lauri Kirikal +*/ +namespace Internal +{ +class DelegateMemento { +protected: + // the data is protected, not private, because many + // compilers have problems with template friends. + typedef void (Internal::GenericClass::*GenericMemFuncType)(); // arbitrary MFP. + Internal::GenericClass *m_pthis; + GenericMemFuncType m_pFunction; + +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + typedef void (*GenericFuncPtr)(); // arbitrary code pointer + GenericFuncPtr m_pStaticFunction; +#endif + +public: +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + DelegateMemento() : m_pthis(0), m_pFunction(0), m_pStaticFunction(0) {}; + void Clear() { + m_pthis=0; m_pFunction=0; m_pStaticFunction=0; + } +#else + DelegateMemento() : m_pthis(0), m_pFunction(0) {}; + void Clear() { m_pthis=0; m_pFunction=0; } +#endif +public: +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + inline bool IsEqual (const DelegateMemento &x) const{ + // We have to cope with the static function pointers as a special case + if (m_pFunction!=x.m_pFunction) return false; + // the static function ptrs must either both be equal, or both be 0. + if (m_pStaticFunction!=x.m_pStaticFunction) return false; + if (m_pStaticFunction!=0) return m_pthis==x.m_pthis; + else return true; + } +#else // Evil Method + inline bool IsEqual (const DelegateMemento &x) const{ + return m_pthis==x.m_pthis && m_pFunction==x.m_pFunction; + } +#endif + // Provide a strict weak ordering for DelegateMementos. + inline bool IsLess(const DelegateMemento &right) const { + // deal with static function pointers first +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + if (m_pStaticFunction !=0 || right.m_pStaticFunction!=0) + return m_pStaticFunction < right.m_pStaticFunction; +#endif + if (m_pthis !=right.m_pthis) return m_pthis < right.m_pthis; + // There are no ordering operators for member function pointers, + // but we can fake one by comparing each byte. The resulting ordering is + // arbitrary (and compiler-dependent), but it permits storage in ordered STL containers. + return memcmp(&m_pFunction, &right.m_pFunction, sizeof(m_pFunction)) < 0; + + } + // BUGFIX (Mar 2005): + // We can't just compare m_pFunction because on Metrowerks, + // m_pFunction can be zero even if the delegate is not empty! + inline bool operator ! () const // Is it bound to anything? + { return m_pthis==0 && m_pFunction==0; } + inline bool Empty() const // Is it bound to anything? + { return m_pthis==0 && m_pFunction==0; } +public: + DelegateMemento & operator = (const DelegateMemento &right) { + SetMementoFrom(right); + return *this; + } + inline bool operator <(const DelegateMemento &right) { + return IsLess(right); + } + inline bool operator >(const DelegateMemento &right) { + return right.IsLess(*this); + } + DelegateMemento (const DelegateMemento &right) : + m_pthis(right.m_pthis), m_pFunction(right.m_pFunction) +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + , m_pStaticFunction (right.m_pStaticFunction) +#endif + {} +protected: + void SetMementoFrom(const DelegateMemento &right) { + m_pFunction = right.m_pFunction; + m_pthis = right.m_pthis; +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + m_pStaticFunction = right.m_pStaticFunction; +#endif + } +}; +} // namespace Internal + +// ClosurePtr<> +// +// A private wrapper class that adds function signatures to DelegateMemento. +// It's the class that does most of the actual work. +// The signatures are specified by: +// GenericMemFunc: must be a type of GenericClass member function pointer. +// StaticFuncPtr: must be a type of function pointer with the same signature +// as GenericMemFunc. +// UnvoidStaticFuncPtr: is the same as StaticFuncPtr, except on VC6 +// where it never returns void (returns DefaultVoid instead). + +// An outer class, FastDelegateN<>, handles the invoking and creates the +// necessary typedefs. +// This class does everything else. + +namespace Internal { + +template < class GenericMemFunc, class StaticFuncPtr, class UnvoidStaticFuncPtr> +class ClosurePtr : public DelegateMemento { +public: + // These functions are for setting the delegate to a member function. + + // Here's the clever bit: we convert an arbitrary member function into a + // standard form. XMemFunc should be a member function of class X, but I can't + // enforce that here. It needs to be enforced by the wrapper class. + template < class X, class XMemFunc > + inline void bindmemfunc(X *pthis, XMemFunc function_to_bind ) { + m_pthis = SimplifyMemFunc< sizeof(function_to_bind) > + ::Convert(pthis, function_to_bind, m_pFunction); +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + m_pStaticFunction = 0; +#endif + } + // For const member functions, we only need a const class pointer. + // Since we know that the member function is const, it's safe to + // remove the const qualifier from the 'this' pointer with a const_cast. + // VC6 has problems if we just overload 'bindmemfunc', so we give it a different name. + template < class X, class XMemFunc> + inline void bindconstmemfunc(const X *pthis, XMemFunc function_to_bind) { + m_pthis= SimplifyMemFunc< sizeof(function_to_bind) > + ::Convert(const_cast(pthis), function_to_bind, m_pFunction); +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + m_pStaticFunction = 0; +#endif + } +#ifdef FASTDELEGATE_GCC_BUG_8271 // At present, GCC doesn't recognize constness of MFPs in templates + template < class X, class XMemFunc> + inline void bindmemfunc(const X *pthis, XMemFunc function_to_bind) { + bindconstmemfunc(pthis, function_to_bind); +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + m_pStaticFunction = 0; +#endif + } +#endif + // These functions are required for invoking the stored function + inline GenericClass *GetClosureThis() const { return m_pthis; } + inline GenericMemFunc GetClosureMemPtr() const { return reinterpret_cast(m_pFunction); } + +// There are a few ways of dealing with static function pointers. +// There's a standard-compliant, but tricky method. +// There's also a straightforward hack, that won't work on DOS compilers using the +// medium memory model. It's so evil that I can't recommend it, but I've +// implemented it anyway because it produces very nice asm code. + +#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + +// ClosurePtr<> - Safe version +// +// This implementation is standard-compliant, but a bit tricky. +// I store the function pointer inside the class, and the delegate then +// points to itself. Whenever the delegate is copied, these self-references +// must be transformed, and this complicates the = and == operators. +public: + // The next two functions are for operator ==, =, and the copy constructor. + // We may need to convert the m_pthis pointers, so that + // they remain as self-references. + template< class DerivedClass > + inline void CopyFrom (DerivedClass *pParent, const DelegateMemento &x) { + SetMementoFrom(x); + if (m_pStaticFunction!=0) { + // transform self references... + m_pthis=reinterpret_cast(pParent); + } + } + // For static functions, the 'static_function_invoker' class in the parent + // will be called. The parent then needs to call GetStaticFunction() to find out + // the actual function to invoke. + template < class DerivedClass, class ParentInvokerSig > + inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker, + StaticFuncPtr function_to_bind ) { + if (function_to_bind==0) { // cope with assignment to 0 + m_pFunction=0; + } else { + bindmemfunc(pParent, static_function_invoker); + } + m_pStaticFunction=reinterpret_cast(function_to_bind); + } + inline UnvoidStaticFuncPtr GetStaticFunction() const { + return reinterpret_cast(m_pStaticFunction); + } +#else + +// ClosurePtr<> - Evil version +// +// For compilers where data pointers are at least as big as code pointers, it is +// possible to store the function pointer in the this pointer, using another +// horrible_cast. Invocation isn't any faster, but it saves 4 bytes, and +// speeds up comparison and assignment. If C++ provided direct language support +// for delegates, they would produce asm code that was almost identical to this. +// Note that the Sun C++ and MSVC documentation explicitly state that they +// support static_cast between void * and function pointers. + + template + inline void CopyFrom (DerivedClass *pParent, const DelegateMemento &right) { + SetMementoFrom(right); + } + // For static functions, the 'static_function_invoker' class in the parent + // will be called. The parent then needs to call GetStaticFunction() to find out + // the actual function to invoke. + // ******** EVIL, EVIL CODE! ******* + template + inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker, + StaticFuncPtr function_to_bind) { + if (function_to_bind==0) { // cope with assignment to 0 + m_pFunction=0; + } else { + // We'll be ignoring the 'this' pointer, but we need to make sure we pass + // a valid value to bindmemfunc(). + bindmemfunc(pParent, static_function_invoker); + } + + // WARNING! Evil hack. We store the function in the 'this' pointer! + // Ensure that there's a compilation failure if function pointers + // and data pointers have different sizes. + // If you get this error, you need to #undef FASTDELEGATE_USESTATICFUNCTIONHACK. + typedef int ERROR_CantUseEvilMethod[sizeof(GenericClass *)==sizeof(function_to_bind) ? 1 : -1]; + m_pthis = horrible_cast(function_to_bind); + // MSVC, SunC++ and DMC accept the following (non-standard) code: + // m_pthis = static_cast(static_cast(function_to_bind)); + // BCC32, Comeau and DMC accept this method. MSVC7.1 needs __int64 instead of long + // m_pthis = reinterpret_cast(reinterpret_cast(function_to_bind)); + } + // ******** EVIL, EVIL CODE! ******* + // This function will be called with an invalid 'this' pointer!! + // We're just returning the 'this' pointer, converted into + // a function pointer! + inline UnvoidStaticFuncPtr GetStaticFunction() const { + // Ensure that there's a compilation failure if function pointers + // and data pointers have different sizes. + // If you get this error, you need to #undef FASTDELEGATE_USESTATICFUNCTIONHACK. + typedef int ERROR_CantUseEvilMethod[sizeof(UnvoidStaticFuncPtr)==sizeof(this) ? 1 : -1]; + return horrible_cast(this); + } +#endif // !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) + + // Does the closure contain this static function? + inline bool IsEqualToStaticFuncPtr(StaticFuncPtr funcptr){ + if (funcptr==0) return Empty(); + // For the Evil method, if it doesn't actually contain a static function, this will return an arbitrary + // value that is not equal to any valid function pointer. + else return funcptr==reinterpret_cast(GetStaticFunction()); + } +}; + + +} // namespace Internal + +//////////////////////////////////////////////////////////////////////////////// +// Fast Delegates, part 3: +// +// Wrapper classes to ensure type safety +// +//////////////////////////////////////////////////////////////////////////////// + + +// Once we have the member function conversion templates, it's easy to make the +// wrapper classes. So that they will work with as many compilers as possible, +// the classes are of the form +// FastDelegate3 +// They can cope with any combination of parameters. The max number of parameters +// allowed is 8, but it is trivial to increase this limit. +// Note that we need to treat const member functions seperately. +// All this class does is to enforce type safety, and invoke the delegate with +// the correct list of parameters. + +// Because of the weird rule about the class of derived member function pointers, +// you sometimes need to apply a downcast to the 'this' pointer. +// This is the reason for the use of "implicit_cast(pthis)" in the code below. +// If CDerivedClass is derived from CBaseClass, but doesn't override SimpleVirtualFunction, +// without this trick you'd need to write: +// MyDelegate(static_cast(&d), &CDerivedClass::SimpleVirtualFunction); +// but with the trick you can write +// MyDelegate(&d, &CDerivedClass::SimpleVirtualFunction); + +// RetType is the type the compiler uses in compiling the template. For VC6, +// it cannot be void. DesiredRetType is the real type which is returned from +// all of the functions. It can be void. + +// Implicit conversion to "bool" is achieved using the safe_bool idiom, +// using member data pointers (MDP). This allows "if (dg)..." syntax +// Because some compilers (eg codeplay) don't have a unique value for a zero +// MDP, an extra padding member is added to the SafeBool struct. +// Some compilers (eg VC6) won't implicitly convert from 0 to an MDP, so +// in that case the static function constructor is not made explicit; this +// allows "if (dg==0) ..." to compile. + + +/* + Member function names modified: + bind -> Bind + empty -> IsEmpty + clear -> Clear + + Functions GetMemento and SetMemento: public -> protected + + Lauri Kirikal +*/ + +// N=0 +template +class FastDelegate0 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(); + typedef RetType (*UnvoidStaticFunctionPtr)(); + typedef RetType (Internal::GenericClass::*GenericMemFn)(); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate0 type; + + // Construction and comparison functions + FastDelegate0() { Clear(); } + FastDelegate0(const FastDelegate0 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate0 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate0 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate0 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate0 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate0 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate0(Y *pthis, DesiredRetType (X::* function_to_bind)() ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)()) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate0(const Y *pthis, DesiredRetType (X::* function_to_bind)() const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)() const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate0(DesiredRetType (*function_to_bind)() ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)() ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)()) { + m_Closure.bindstaticfunc(this, &FastDelegate0::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType Invoke() const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(); } + inline RetType operator() () const { + return Invoke(); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear(); } +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } +private: // Invoker for static functions + RetType InvokeStaticFunction() const { + return (*(m_Closure.GetStaticFunction()))(); } +}; + +// N=1 +template +class FastDelegate1 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate1 type; + + // Construction and comparison functions + FastDelegate1() { Clear(); } + FastDelegate1(const FastDelegate1 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate1 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate1 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate1 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate1 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate1 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate1(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate1(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate1(DesiredRetType (*function_to_bind)(Param1 p1) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1)) { + m_Closure.bindstaticfunc(this, &FastDelegate1::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType Invoke(Param1 p1) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1); } + inline RetType operator() (Param1 p1) const { + return Invoke(p1); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear(); } +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1) const { + return (*(m_Closure.GetStaticFunction()))(p1); } +}; + +//N=2 +template +class FastDelegate2 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate2 type; + + // Construction and comparison functions + FastDelegate2() { Clear(); } + FastDelegate2(const FastDelegate2 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate2 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate2 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate2 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate2 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate2 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate2(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate2(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate2(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2)) { + m_Closure.bindstaticfunc(this, &FastDelegate2::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2); } +}; + +//N=3 +template +class FastDelegate3 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate3 type; + + // Construction and comparison functions + FastDelegate3() { Clear(); } + FastDelegate3(const FastDelegate3 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate3 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate3 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate3 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate3 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate3 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate3(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate3(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate3(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3)) { + m_Closure.bindstaticfunc(this, &FastDelegate3::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3); } +}; + +//N=4 +template +class FastDelegate4 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate4 type; + + // Construction and comparison functions + FastDelegate4() { Clear(); } + FastDelegate4(const FastDelegate4 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate4 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate4 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate4 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate4 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate4 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate4(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate4(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate4(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)) { + m_Closure.bindstaticfunc(this, &FastDelegate4::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4); } +}; + +//N=5 +template +class FastDelegate5 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate5 type; + + // Construction and comparison functions + FastDelegate5() { Clear(); } + FastDelegate5(const FastDelegate5 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate5 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate5 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate5 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate5 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate5 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate5(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate5(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate5(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)) { + m_Closure.bindstaticfunc(this, &FastDelegate5::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4, p5); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5); } +}; + +//N=6 +template +class FastDelegate6 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate6 type; + + // Construction and comparison functions + FastDelegate6() { Clear(); } + FastDelegate6(const FastDelegate6 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate6 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate6 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate6 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate6 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate6 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate6(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate6(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate6(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)) { + m_Closure.bindstaticfunc(this, &FastDelegate6::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4, p5, p6); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5, p6); } +}; + +//N=7 +template +class FastDelegate7 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate7 type; + + // Construction and comparison functions + FastDelegate7() { Clear(); } + FastDelegate7(const FastDelegate7 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate7 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate7 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate7 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate7 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate7 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate7(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate7(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate7(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)) { + m_Closure.bindstaticfunc(this, &FastDelegate7::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4, p5, p6, p7); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5, p6, p7); } +}; + +//N=8 +template +class FastDelegate8 { +private: + typedef typename Internal::DefaultVoidToVoid::type DesiredRetType; + typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8); + typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8); + typedef RetType (Internal::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8); + typedef Internal::ClosurePtr ClosureType; + ClosureType m_Closure; +public: + // Typedefs to aid generic programming + typedef FastDelegate8 type; + + // Construction and comparison functions + FastDelegate8() { Clear(); } + FastDelegate8(const FastDelegate8 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + void operator = (const FastDelegate8 &x) { + m_Closure.CopyFrom(this, x.m_Closure); } + bool operator ==(const FastDelegate8 &x) const { + return m_Closure.IsEqual(x.m_Closure); } + bool operator !=(const FastDelegate8 &x) const { + return !m_Closure.IsEqual(x.m_Closure); } + bool operator <(const FastDelegate8 &x) const { + return m_Closure.IsLess(x.m_Closure); } + bool operator >(const FastDelegate8 &x) const { + return x.m_Closure.IsLess(m_Closure); } + // Binding to non-const member functions + template < class X, class Y > + FastDelegate8(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)) { + m_Closure.bindmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Binding to const member functions. + template < class X, class Y > + FastDelegate8(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + template < class X, class Y > + inline void Bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const) { + m_Closure.bindconstmemfunc(Internal::implicit_cast(pthis), function_to_bind); } + // Static functions. We convert them into a member function call. + // This constructor also provides implicit conversion + FastDelegate8(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) { + Bind(function_to_bind); } + // for efficiency, prevent creation of a temporary + void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) { + Bind(function_to_bind); } + inline void Bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)) { + m_Closure.bindstaticfunc(this, &FastDelegate8::InvokeStaticFunction, + function_to_bind); } + // Invoke the delegate + RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const { + return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(p1, p2, p3, p4, p5, p6, p7, p8); } + // Implicit conversion to "bool" using the safe_bool idiom +private: + typedef struct SafeBoolStruct { + int a_data_pointer_to_this_is_0_on_buggy_compilers; + StaticFunctionPtr m_nonzero; + } UselessTypedef; + typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; +public: + operator unspecified_bool_type() const { + return IsEmpty()? 0: &SafeBoolStruct::m_nonzero; + } + // necessary to allow ==0 to work despite the safe_bool idiom + inline bool operator==(StaticFunctionPtr funcptr) { + return m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator!=(StaticFunctionPtr funcptr) { + return !m_Closure.IsEqualToStaticFuncPtr(funcptr); } + inline bool operator ! () const { // Is it bound to anything? + return !m_Closure; } + inline bool IsEmpty() const { + return !m_Closure; } + void Clear() { m_Closure.Clear();} +protected: + // Conversion to and from the DelegateMemento storage class + const Internal::DelegateMemento & GetMemento() { return m_Closure; } + void SetMemento(const Internal::DelegateMemento &any) { m_Closure.CopyFrom(this, any); } + +private: // Invoker for static functions + RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const { + return (*(m_Closure.GetStaticFunction()))(p1, p2, p3, p4, p5, p6, p7, p8); } +}; + +/* + ... part 4, part 5 ERASED ... + + And now on only AVR-specific code with GPL license + + Lauri Kirikal + */ + +/**********************************************************************************************************************\ + + C++ library for Atmel AVR microcontrollers + Copyright (C) 2007 Lauri Kirikal, Mikk Leini, MTÜ TTÜ Robotiklubi + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + See http://creativecommons.org/licenses/GPL/2.0/ + + MTÜ TTÜ Robotiklubi http://www.robotiklubi.ee robotiklubi@gmail.com + Lauri Kirikal laurikirikal@gmail.com + Mikk Leini mikk.leini@gmail.com + +\**********************************************************************************************************************/ + +#ifndef EXCLUDE_FAST_DELEGATE + typedef FastDelegate0 FastDelegate; +#endif + +#if !defined(EXCLUDE_DATA_DELEGATE) || !defined(EXCLUDE_MULTI_DELEGATE) + + namespace Internal + { + template bool AddFastDelegate(Delegate &delegate, FastDelegate &addable) + { + + if (!delegate.me) + { + delegate.me = addable; + } + else + { + if (delegate.next == NULL) + { + delegate.next = new Delegate(addable); + if (delegate.next == NULL) return false; + } + else + { + return delegate.next->Add(addable); + } + } + + return true; + + } // AddFastDelegate + + template bool AddFunction(Delegate &delegate, Function function) + { + if (!delegate.me) + { + delegate.me.Bind(function); + } + else + { + if (delegate.next == NULL) + { + delegate.next = new Delegate(function); + if (delegate.next == NULL) return false; + } + else + { + return delegate.next->Add(function); + } + } + + return true; + + } // AddFunction + + template + bool AddMemberFunction(Delegate &delegate, Object *object, MemberFunction function) + { + if (!delegate.me) + { + delegate.me.Bind(object, function); + } + else + { + if (delegate.next == NULL) + { + delegate.next = new Delegate(object, function); + if (delegate.next == NULL) return false; + } + else + { + return delegate.next->Add(object, function); + } + } + + return true; + + } // AddMemberFunction + + template bool RemoveAll(Delegate &delegate, FastDelegate &removable) + { + if (removable == delegate.me) + { + if (delegate.next == NULL) + { + delegate.me.Clear(); + } + else + { + Delegate *cutOut, *cutOutNext = delegate.next; + + while (cutOutNext->me == removable) + { + cutOut = cutOutNext; + cutOutNext = cutOut->next; + + delete cutOut; + + if (cutOutNext == NULL) + { + delegate.next = NULL; + delegate.me.Clear(); + return true; + } + } + + delegate.me = cutOutNext->me; + delegate.next = cutOutNext->next; + + delete cutOutNext; + + if (delegate.next != NULL) + delegate.next->RemoveAll(removable); + + } + } + else + { + if (delegate.next == NULL) + return false; + else + return delegate.next->RemoveAll(removable); + } + + return true; + + } // RemoveAll + + template bool Remove(Delegate &delegate, FastDelegate &removable) + { + if (removable == delegate.me) + { + if (delegate.next == NULL) + { + delegate.me.Clear(); + } + else + { + Delegate *cutOut = delegate.next; + + delegate.me = cutOut->me; + delegate.next = cutOut->next; + + delete cutOut; + } + } + else + { + if (delegate.next == NULL) + return false; + else + return delegate.next->Remove(removable); + } + + return true; + + } // Remove + + template void Clear(Delegate &delegate) + { + if (delegate.next != NULL) + { + delegate.next->Clear(); + delete delegate.next; + delegate.next = NULL; + } + delegate.me.Clear(); + + } // Clear + + } // namespace Internal + +#endif // if !defined(EXCLUDE_DATA_DELEGATE) || !defined(EXCLUDE_MULTI_DELEGATE) + +#ifndef EXCLUDE_DATA_DELEGATE + + template class DelegateController; + + template class DataDelegate + { + public: + + typedef void (*Function)(Controller &); + typedef FastDelegate1 FastDelegate; + + private: + + friend class DelegateController; + template friend bool Internal::AddFastDelegate(Delegate &delegate, FastDelegate &addable); + template friend bool Internal::AddFunction(Delegate &delegate, Function function); + template friend bool Internal::AddMemberFunction(Delegate &delegate, Object *object, MemberFunction function); + template friend bool Internal::RemoveAll(Delegate &delegate, FastDelegate &removable); + template friend bool Internal::Remove(Delegate &delegate, FastDelegate &removable); + template friend void Internal::Clear(Delegate &delegate); + + DataDelegate * next; + FastDelegate me; + + DataDelegate() : next(NULL), me() {} + DataDelegate(Function function) : next(NULL), me(function) {} + DataDelegate(const FastDelegate &_me) : next(NULL), me(_me) {} + template DataDelegate(X *object, void (Y::* function)(Controller &) ) : next(NULL), me(object, function) {} + template DataDelegate(const X *object, void (Y::* function)(Controller &) const) : next(NULL), me(object, function) {} + + void Invoke(Controller &controller) const + { + if (!me.IsEmpty() ) + { + me(controller); + if (next != NULL) next->Invoke(controller); + } + + } // OPERATOR () + + inline void operator() (Controller &controller) const { Invoke(controller); } + + public: + + inline bool Add(FastDelegate &addable) + { + return Internal::AddFastDelegate, FastDelegate>(*this, addable); + + } // Add 1 + + inline bool Add(Function function) + { + return Internal::AddFunction, Function>(*this, function); + + } // Add 2 + + template inline bool Add(X *object, void (Y::* function)(Controller &) ) + { + return Internal::AddMemberFunction, X, void (Y::*)(Controller &)>(*this, object, function); + + } // Add 3 + + template inline bool Add(const X *object, void (Y::* function)(Controller &) const) + { + return Internal::AddMemberFunction, const X, void (Y::*)(Controller &) const>(*this, object, function); + + } // Add 4 + + inline bool RemoveAll(FastDelegate &removable) + { + return Internal::RemoveAll, Function>(*this, removable); + + } // RemoveAll 1 + + inline bool RemoveAll(Function function) + { + FastDelegate removable(function); + + return RemoveAll(removable); + + } // RemoveAll 2 + + template inline bool RemoveAll(X *object, void (Y::* function)(Controller &) ) + { + FastDelegate removable(object, function); + + return RemoveAll(removable); + + } // RemoveAll 3 + + template inline bool RemoveAll(const X *object, void (Y::* function)(Controller &) const) + { + FastDelegate removable(object, function); + + return RemoveAll(removable); + + } // RemoveAll 4 + + inline bool Remove(FastDelegate &removable) + { + return Internal::Remove, FastDelegate>(*this, removable); + + } // Remove 1 + + inline bool Remove(Function function) + { + FastDelegate removable(function); + + return Remove(removable); + + } // Remove 2 + + template inline bool Remove(X *object, void (Y::* function)(Controller &) ) + { + FastDelegate removable(object, function); + + return Remove(removable); + + } // Remove 3 + + template inline bool Remove(const X *object, void (Y::* function)(Controller &) const) + { + FastDelegate removable(object, function); + + return Remove(removable); + + } // Remove 4 + + inline void Clear() { Internal::Clear >(*this); } + inline bool IsEmpty() { return !me; } + inline bool operator ! () { return IsEmpty(); } + inline bool operator += (Function function) { return Add(function); } + inline bool operator += (FastDelegate &addable) { return Add(addable); } + inline bool operator -= (Function function) { return Remove(function); } + inline bool operator -= (FastDelegate &removable) { return Remove(removable); } + + ~DataDelegate() { Clear(); } + + }; // class DataDelegate + + + template class DelegateController + { + protected: + + virtual bool Before() = 0; + virtual void After() {}; + + private: + + DataDelegate dataDelegate; + + public: + + DelegateController() : dataDelegate() {} + DataDelegate &Delegate() { return dataDelegate; } + + void Invoke() + { + if (Before() ) + { + dataDelegate(*((Derived *)this)); + After(); + } + + } // operator () + + inline void operator() () { Invoke(); } + virtual ~DelegateController() {} + + }; // class DelegateController + +#endif // ifndef EXCLUDE_DATA_DELEGATE + +#ifndef EXCLUDE_MULTI_DELEGATE + + class MultiDelegate + { + public: + + typedef void (*Function)(void); + typedef FastDelegate0<> FastDelegate; + + private: + + MultiDelegate * next; + FastDelegate me; + + template friend bool Internal::AddFastDelegate(Delegate &delegate, FastDelegate &addable); + template friend bool Internal::AddFunction(Delegate &delegate, Function function); + template friend bool Internal::AddMemberFunction(Delegate &delegate, Object *object, MemberFunction function); + template friend bool Internal::RemoveAll(Delegate &delegate, FastDelegate &removable); + template friend bool Internal::Remove(Delegate &delegate, FastDelegate &removable); + template friend void Internal::Clear(Delegate &delegate); + + public: + + MultiDelegate() : next(NULL), me() {} + MultiDelegate(Function function) : next(NULL), me(function) {} + MultiDelegate(const FastDelegate &_me) : next(NULL), me(_me) {} + template MultiDelegate(X *object, void (Y::* function)() ) : next(NULL), me(object, function) {} + template MultiDelegate(const X *object, void (Y::* function)() const) : next(NULL), me(object, function) {} + + void Invoke() const + { + if (!me.IsEmpty() ) + { + me(); + if (next != NULL) next->Invoke(); + } + + } // OPERATOR () + + inline bool Add(FastDelegate &addable) + { + return Internal::AddFastDelegate(*this, addable); + + } // Add 1 + + inline bool Add(Function function) + { + return Internal::AddFunction(*this, function); + + } // Add 2 + + template inline bool Add(X *object, void (Y::* function)() ) + { + return Internal::AddMemberFunction(*this, object, function); + + } // Add 3 + + template inline bool Add(const X *object, void (Y::* function)() const) + { + return Internal::AddMemberFunction(*this, object, function); + + } // Add 4 + + inline bool RemoveAll(FastDelegate &removable) + { + return Internal::RemoveAll(*this, removable); + + } // RemoveAll 1 + + inline bool RemoveAll(Function function) + { + FastDelegate removable(function); + + return RemoveAll(removable); + + } // RemoveAll 2 + + template inline bool RemoveAll(X *object, void (Y::* function)() ) + { + FastDelegate removable(object, function); + + return RemoveAll(removable); + + } // RemoveAll 3 + + template inline bool RemoveAll(const X *object, void (Y::* function)() const) + { + return RemoveAll(object, (void (Y::*)(void))function); + + } // RemoveAll 4 + + inline bool Remove(FastDelegate &removable) + { + return Internal::Remove(*this, removable); + + } // Remove 1 + + inline bool Remove(Function function) + { + FastDelegate removable(function); + + return Remove(removable); + + } // Remove 2 + + template inline bool Remove(X *object, void (Y::* function)() ) + { + FastDelegate removable(object, function); + + return Remove(removable); + + } // Remove 3 + + template inline bool Remove(const X *object, void (Y::* function)() const) + { + return Remove(object, (void (Y::*)(void))function); + + } // Remove 4 + + inline void Clear() { Internal::Clear(*this); } + inline bool IsEmpty() const { return !me; } + inline void operator() () const { Invoke(); } + inline bool operator ! () const { return IsEmpty(); } + inline bool operator += (Function function) { return Add(function); } + inline bool operator += (FastDelegate &addable) { return Add(addable); } + inline bool operator -= (Function function) { return Remove(function); } + inline bool operator -= (FastDelegate &removable) { return Remove(removable); } + ~MultiDelegate() { Clear(); } + + }; // class MultiDelegate + +#endif // ifndef EXCLUDE_MULTI_DELEGATE + + // clean up after ourselves... +#undef FASTDLGT_RETTYPE + +} // namespace CppDelegate + +#endif // ifdef __cplusplus +#endif // if !(defined(EXCLUDE_FAST_DELEGATE) && defined(EXCLUDE_MULTI_DELEGATE) && defined(EXLUDE_DATA_DELEGATE)) +#endif // ifndef __AVR_CPP_DELEGATE_H__ + diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Makefile b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Makefile new file mode 100644 index 0000000..ef08fe1 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Makefile @@ -0,0 +1,128 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +SHELL := cmd.exe +RM := rm -rf + +USER_OBJS := + +LIBS := +PROJ := + +O_SRCS := +C_SRCS := +S_SRCS := +S_UPPER_SRCS := +OBJ_SRCS := +ASM_SRCS := +PREPROCESSING_SRCS := +OBJS := +OBJS_AS_ARGS := +C_DEPS := +C_DEPS_AS_ARGS := +EXECUTABLES := +OUTPUT_FILE_PATH := +OUTPUT_FILE_PATH_AS_ARGS := +AVR_APP_PATH :=$$$AVR_APP_PATH$$$ +QUOTE := " +ADDITIONAL_DEPENDENCIES:= +OUTPUT_FILE_DEP:= +LIB_DEP:= + +# Every subdirectory with source files must be described here +SUBDIRS := \ +../io \ +../io/hardware + + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Zeitschaltung_V6.cpp + + +PREPROCESSING_SRCS += + + +ASM_SRCS += + + +OBJS += \ +Zeitschaltung_V6.o + + +OBJS_AS_ARGS += \ +Zeitschaltung_V6.o + + +C_DEPS += \ +Zeitschaltung_V6.d + + +C_DEPS_AS_ARGS += \ +Zeitschaltung_V6.d + + +OUTPUT_FILE_PATH +=Zeitschaltung_V6.elf + +OUTPUT_FILE_PATH_AS_ARGS +=Zeitschaltung_V6.elf + +ADDITIONAL_DEPENDENCIES:= + +OUTPUT_FILE_DEP:= ./makedep.mk + +LIB_DEP+= + +# AVR32/GNU C Compiler + + + +./%.o: .././%.cpp + @echo Building file: $< + @echo Invoking: AVR8/GNU C++ Compiler : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DNDEBUG -Os -ffunction-sections -fpack-struct -fshort-enums -Wall -Wundef -Werror -pedantic -pedantic-errors -mmcu=atmega168a -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" + @echo Finished building: $< + + + +# AVR32/GNU Preprocessing Assembler + + + +# AVR32/GNU Assembler + + + + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +# Add inputs and outputs from these tool invocations to the build variables + +# All Target +all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) + +$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) + @echo Building target: $@ + @echo Invoking: AVR8/GNU Linker : + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Zeitschaltung_V6.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega168a + @echo Finished building target: $@ + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "Zeitschaltung_V6.elf" "Zeitschaltung_V6.hex" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "Zeitschaltung_V6.elf" "Zeitschaltung_V6.eep" || exit 0 + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "Zeitschaltung_V6.elf" > "Zeitschaltung_V6.lss" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "Zeitschaltung_V6.elf" "Zeitschaltung_V6.srec" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-size.exe" "Zeitschaltung_V6.elf" + + + + + + +# Other Targets +clean: + -$(RM) $(OBJS_AS_ARGS)$(C_DEPS_AS_ARGS) $(EXECUTABLES) + rm -rf "Zeitschaltung_V6.elf" "Zeitschaltung_V6.a" "Zeitschaltung_V6.hex" "Zeitschaltung_V6.lss" "Zeitschaltung_V6.eep" "Zeitschaltung_V6.map" "Zeitschaltung_V6.srec" + \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.d b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.d new file mode 100644 index 0000000..542ec52 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.d @@ -0,0 +1,68 @@ +Zeitschaltung_V6.d Zeitschaltung_V6.o: .././Zeitschaltung_V6.cpp \ + .././config.h .././peripheral.h .././io/hardware/portd.hpp \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom168a.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom168.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iomx8.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ + .././io/hardware/portc.hpp .././io/Led.hpp .././io/hardware/pin.hpp \ + .././io/Spi.hpp .././io/../config.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h \ + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h + +.././config.h: + +.././peripheral.h: + +.././io/hardware/portd.hpp: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom168a.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom168.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iomx8.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: + +.././io/hardware/portc.hpp: + +.././io/Led.hpp: + +.././io/hardware/pin.hpp: + +.././io/Spi.hpp: + +.././io/../config.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay_basic.h: + +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/math.h: diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.eep b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.eep new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.elf b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.elf new file mode 100644 index 0000000..c667fdf Binary files /dev/null and b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.elf differ diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.hex b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.hex new file mode 100644 index 0000000..4ae8c95 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.hex @@ -0,0 +1,22 @@ +:100000000C9435000C9452000C9452000C94520045 +:100010000C9452000C9452000C9452000C94520018 +:100020000C9452000C9452000C9452000C94520008 +:100030000C9452000C9452000C9452000C945200F8 +:100040000C9452000C9452000C9452000C945200E8 +:100050000C9452000C9452000C9452000C945200D8 +:100060000C9452000C945200950011241FBECFEF47 +:10007000D4E0DEBFCDBF21E0A0E0B1E001C01D9221 +:10008000A030B207E1F710E0CAE6D0E004C0229742 +:10009000FE010E949D00C836D107C9F70E9460008A +:1000A0000C94A1000C9400005E98569A08955E9AF4 +:1000B000569A08955F98579A08955F9A579A0895A7 +:1000C0000E9457000E945A002FEF84E39CE02150C9 +:1000D00080409040E1F700C000000E9457000E945D +:1000E0005D002FEF84E39CE0215080409040E1F7D9 +:1000F00000C000000E9454000E945D002FEF84E3C6 +:100100009CE0215080409040E1F700C000000E9438 +:1001100054000E945A002FEF84E39CE0215080405D +:100120009040E1F700C00000CBCF579A569A0E944A +:1001300054000C945A00EE0FFF1F0590F491E02D2F +:060140000994F894FFCFC2 +:00000001FF diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.lss b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.lss new file mode 100644 index 0000000..1d44f46 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.lss @@ -0,0 +1,176 @@ + +Zeitschaltung_V6.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .data 00000000 00800100 00000146 000001ba 2**0 + CONTENTS, ALLOC, LOAD, DATA + 1 .text 00000146 00000000 00000000 00000074 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 .stab 000006cc 00000000 00000000 000001bc 2**2 + CONTENTS, READONLY, DEBUGGING + 3 .stabstr 00000082 00000000 00000000 00000888 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .comment 0000002f 00000000 00000000 0000090a 2**0 + CONTENTS, READONLY + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 0c 94 35 00 jmp 0x6a ; 0x6a <__ctors_end> + 4: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 8: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 10: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 14: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 18: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 1c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 20: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 24: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 28: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 2c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 30: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 34: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 38: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 3c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 40: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 44: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 48: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 4c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 50: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 54: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 58: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 5c: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 60: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + 64: 0c 94 52 00 jmp 0xa4 ; 0xa4 <__bad_interrupt> + +00000068 <__ctors_start>: + 68: 95 00 .word 0x0095 ; ???? + +0000006a <__ctors_end>: + 6a: 11 24 eor r1, r1 + 6c: 1f be out 0x3f, r1 ; 63 + 6e: cf ef ldi r28, 0xFF ; 255 + 70: d4 e0 ldi r29, 0x04 ; 4 + 72: de bf out 0x3e, r29 ; 62 + 74: cd bf out 0x3d, r28 ; 61 + +00000076 <__do_clear_bss>: + 76: 21 e0 ldi r18, 0x01 ; 1 + 78: a0 e0 ldi r26, 0x00 ; 0 + 7a: b1 e0 ldi r27, 0x01 ; 1 + 7c: 01 c0 rjmp .+2 ; 0x80 <.do_clear_bss_start> + +0000007e <.do_clear_bss_loop>: + 7e: 1d 92 st X+, r1 + +00000080 <.do_clear_bss_start>: + 80: a0 30 cpi r26, 0x00 ; 0 + 82: b2 07 cpc r27, r18 + 84: e1 f7 brne .-8 ; 0x7e <.do_clear_bss_loop> + +00000086 <__do_global_ctors>: + 86: 10 e0 ldi r17, 0x00 ; 0 + 88: ca e6 ldi r28, 0x6A ; 106 + 8a: d0 e0 ldi r29, 0x00 ; 0 + 8c: 04 c0 rjmp .+8 ; 0x96 <__do_global_ctors+0x10> + 8e: 22 97 sbiw r28, 0x02 ; 2 + 90: fe 01 movw r30, r28 + 92: 0e 94 9d 00 call 0x13a ; 0x13a <__tablejump__> + 96: c8 36 cpi r28, 0x68 ; 104 + 98: d1 07 cpc r29, r17 + 9a: c9 f7 brne .-14 ; 0x8e <__do_global_ctors+0x8> + 9c: 0e 94 60 00 call 0xc0 ; 0xc0
+ a0: 0c 94 a1 00 jmp 0x142 ; 0x142 <_exit> + +000000a4 <__bad_interrupt>: + a4: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +000000a8 <_ZN6avrlib3pinINS_5portdELh6EE8make_lowEv>: + a8: 5e 98 cbi 0x0b, 6 ; 11 + aa: 56 9a sbi 0x0a, 6 ; 10 + ac: 08 95 ret + +000000ae <_ZN6avrlib3pinINS_5portdELh6EE9make_highEv>: + ae: 5e 9a sbi 0x0b, 6 ; 11 + b0: 56 9a sbi 0x0a, 6 ; 10 + b2: 08 95 ret + +000000b4 <_ZN6avrlib3pinINS_5portdELh7EE8make_lowEv>: + b4: 5f 98 cbi 0x0b, 7 ; 11 + b6: 57 9a sbi 0x0a, 7 ; 10 + b8: 08 95 ret + +000000ba <_ZN6avrlib3pinINS_5portdELh7EE9make_highEv>: + ba: 5f 9a sbi 0x0b, 7 ; 11 + bc: 57 9a sbi 0x0a, 7 ; 10 + be: 08 95 ret + +000000c0
: + c0: 0e 94 57 00 call 0xae ; 0xae <_ZN6avrlib3pinINS_5portdELh6EE9make_highEv> + c4: 0e 94 5a 00 call 0xb4 ; 0xb4 <_ZN6avrlib3pinINS_5portdELh7EE8make_lowEv> + c8: 2f ef ldi r18, 0xFF ; 255 + ca: 84 e3 ldi r24, 0x34 ; 52 + cc: 9c e0 ldi r25, 0x0C ; 12 + ce: 21 50 subi r18, 0x01 ; 1 + d0: 80 40 sbci r24, 0x00 ; 0 + d2: 90 40 sbci r25, 0x00 ; 0 + d4: e1 f7 brne .-8 ; 0xce + d6: 00 c0 rjmp .+0 ; 0xd8 + d8: 00 00 nop + da: 0e 94 57 00 call 0xae ; 0xae <_ZN6avrlib3pinINS_5portdELh6EE9make_highEv> + de: 0e 94 5d 00 call 0xba ; 0xba <_ZN6avrlib3pinINS_5portdELh7EE9make_highEv> + e2: 2f ef ldi r18, 0xFF ; 255 + e4: 84 e3 ldi r24, 0x34 ; 52 + e6: 9c e0 ldi r25, 0x0C ; 12 + e8: 21 50 subi r18, 0x01 ; 1 + ea: 80 40 sbci r24, 0x00 ; 0 + ec: 90 40 sbci r25, 0x00 ; 0 + ee: e1 f7 brne .-8 ; 0xe8 + f0: 00 c0 rjmp .+0 ; 0xf2 + f2: 00 00 nop + f4: 0e 94 54 00 call 0xa8 ; 0xa8 <_ZN6avrlib3pinINS_5portdELh6EE8make_lowEv> + f8: 0e 94 5d 00 call 0xba ; 0xba <_ZN6avrlib3pinINS_5portdELh7EE9make_highEv> + fc: 2f ef ldi r18, 0xFF ; 255 + fe: 84 e3 ldi r24, 0x34 ; 52 + 100: 9c e0 ldi r25, 0x0C ; 12 + 102: 21 50 subi r18, 0x01 ; 1 + 104: 80 40 sbci r24, 0x00 ; 0 + 106: 90 40 sbci r25, 0x00 ; 0 + 108: e1 f7 brne .-8 ; 0x102 + 10a: 00 c0 rjmp .+0 ; 0x10c + 10c: 00 00 nop + 10e: 0e 94 54 00 call 0xa8 ; 0xa8 <_ZN6avrlib3pinINS_5portdELh6EE8make_lowEv> + 112: 0e 94 5a 00 call 0xb4 ; 0xb4 <_ZN6avrlib3pinINS_5portdELh7EE8make_lowEv> + 116: 2f ef ldi r18, 0xFF ; 255 + 118: 84 e3 ldi r24, 0x34 ; 52 + 11a: 9c e0 ldi r25, 0x0C ; 12 + 11c: 21 50 subi r18, 0x01 ; 1 + 11e: 80 40 sbci r24, 0x00 ; 0 + 120: 90 40 sbci r25, 0x00 ; 0 + 122: e1 f7 brne .-8 ; 0x11c + 124: 00 c0 rjmp .+0 ; 0x126 + 126: 00 00 nop + 128: cb cf rjmp .-106 ; 0xc0
+ +0000012a <_GLOBAL__sub_I_l>: + 12a: 57 9a sbi 0x0a, 7 ; 10 + 12c: 56 9a sbi 0x0a, 6 ; 10 + 12e: 0e 94 54 00 call 0xa8 ; 0xa8 <_ZN6avrlib3pinINS_5portdELh6EE8make_lowEv> + 132: 0c 94 5a 00 jmp 0xb4 ; 0xb4 <_ZN6avrlib3pinINS_5portdELh7EE8make_lowEv> + +00000136 <__tablejump2__>: + 136: ee 0f add r30, r30 + 138: ff 1f adc r31, r31 + +0000013a <__tablejump__>: + 13a: 05 90 lpm r0, Z+ + 13c: f4 91 lpm r31, Z + 13e: e0 2d mov r30, r0 + 140: 09 94 ijmp + +00000142 <_exit>: + 142: f8 94 cli + +00000144 <__stop_program>: + 144: ff cf rjmp .-2 ; 0x144 <__stop_program> diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.map b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.map new file mode 100644 index 0000000..655b789 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.map @@ -0,0 +1,447 @@ +Archive member included because of file (symbol) + +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o (exit) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + Zeitschaltung_V6.o (__do_clear_bss) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + Zeitschaltung_V6.o (__do_global_ctors) +c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) (__tablejump__) + +Discarded input sections + + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + .group 0x00000000 0x8 Zeitschaltung_V6.o + .group 0x00000000 0x8 Zeitschaltung_V6.o + .group 0x00000000 0x8 Zeitschaltung_V6.o + .group 0x00000000 0x8 Zeitschaltung_V6.o + .text 0x00000000 0x0 Zeitschaltung_V6.o + .bss 0x00000000 0x1 Zeitschaltung_V6.o + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .text 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.mul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.div + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.prologue + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.builtins + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + .text.libgcc.fmul + 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00020000 xr +data 0x00800060 0x0000ffa0 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000400 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +user_signatures 0x00850000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +Address of section .data set to 0x800100 +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o +LOAD Zeitschaltung_V6.o +START GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libm.a +END GROUP +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libm.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a +LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0x146 + *(.vectors) + .vectors 0x00000000 0x68 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + 0x00000000 __vector_default + 0x00000000 __vectors + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + 0x00000068 . = ALIGN (0x2) + 0x00000068 __trampolines_start = . + *(.trampolines) + .trampolines 0x00000068 0x0 linker stubs + *(.trampolines*) + 0x00000068 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x00000068 __ctors_start = . + *(.ctors) + .ctors 0x00000068 0x2 Zeitschaltung_V6.o + 0x0000006a __ctors_end = . + 0x0000006a __dtors_start = . + *(.dtors) + 0x0000006a __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x0000006a 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + 0x0000006a __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x0000006a 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x00000076 0x10 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + 0x00000076 __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + .init6 0x00000086 0x16 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + 0x00000086 __do_global_ctors + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x0000009c 0x8 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + *(.init9) + *(.text) + .text 0x000000a4 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + 0x000000a4 __vector_22 + 0x000000a4 __vector_1 + 0x000000a4 __vector_24 + 0x000000a4 __vector_12 + 0x000000a4 __bad_interrupt + 0x000000a4 __vector_6 + 0x000000a4 __vector_3 + 0x000000a4 __vector_23 + 0x000000a4 __vector_25 + 0x000000a4 __vector_11 + 0x000000a4 __vector_13 + 0x000000a4 __vector_17 + 0x000000a4 __vector_19 + 0x000000a4 __vector_7 + 0x000000a4 __vector_5 + 0x000000a4 __vector_4 + 0x000000a4 __vector_9 + 0x000000a4 __vector_2 + 0x000000a4 __vector_21 + 0x000000a4 __vector_15 + 0x000000a4 __vector_8 + 0x000000a4 __vector_14 + 0x000000a4 __vector_10 + 0x000000a4 __vector_16 + 0x000000a4 __vector_18 + 0x000000a4 __vector_20 + 0x000000a8 . = ALIGN (0x2) + *(.text.*) + .text._ZN6avrlib3pinINS_5portdELh6EE8make_lowEv + 0x000000a8 0x6 Zeitschaltung_V6.o + 0x000000a8 _ZN6avrlib3pinINS_5portdELh6EE8make_lowEv + .text._ZN6avrlib3pinINS_5portdELh6EE9make_highEv + 0x000000ae 0x6 Zeitschaltung_V6.o + 0x000000ae _ZN6avrlib3pinINS_5portdELh6EE9make_highEv + .text._ZN6avrlib3pinINS_5portdELh7EE8make_lowEv + 0x000000b4 0x6 Zeitschaltung_V6.o + 0x000000b4 _ZN6avrlib3pinINS_5portdELh7EE8make_lowEv + .text._ZN6avrlib3pinINS_5portdELh7EE9make_highEv + 0x000000ba 0x6 Zeitschaltung_V6.o + 0x000000ba _ZN6avrlib3pinINS_5portdELh7EE9make_highEv + .text.startup.main + 0x000000c0 0x6a Zeitschaltung_V6.o + 0x000000c0 main + .text.startup._GLOBAL__sub_I_l + 0x0000012a 0xc Zeitschaltung_V6.o + .text.libgcc 0x00000136 0xc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + 0x00000136 __tablejump2__ + 0x0000013a __tablejump__ + 0x00000142 . = ALIGN (0x2) + *(.fini9) + .fini9 0x00000142 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + 0x00000142 _exit + 0x00000142 exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x00000142 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + *(.fini0) + 0x00000146 _etext = . + +.data 0x00800100 0x0 load address 0x00000146 + 0x00800100 PROVIDE (__data_start, .) + *(.data) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + .data 0x00800100 0x0 Zeitschaltung_V6.o + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_exit.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_clear_bss.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_ctors.o) + .data 0x00800100 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_tablejump.o) + *(.data*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.d*) + 0x00800100 . = ALIGN (0x2) + 0x00800100 _edata = . + 0x00800100 PROVIDE (__data_end, .) + +.bss 0x00800100 0x0 + 0x00800100 PROVIDE (__bss_start, .) + *(.bss) + *(.bss*) + *(COMMON) + 0x00800100 PROVIDE (__bss_end, .) + 0x00000146 __data_load_start = LOADADDR (.data) + 0x00000146 __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x00800100 0x0 + 0x00800100 PROVIDE (__noinit_start, .) + *(.noinit*) + 0x00800100 PROVIDE (__noinit_end, .) + 0x00800100 _end = . + 0x00800100 PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab 0x00000000 0x6cc + *(.stab) + .stab 0x00000000 0x6cc c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + +.stabstr 0x00000000 0x82 + *(.stabstr) + .stabstr 0x00000000 0x82 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5/crtm168a.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x00000000 0x2f + *(.comment) + .comment 0x00000000 0x2f Zeitschaltung_V6.o + 0x30 (size before relaxing) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges + *(.debug_aranges) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info + *(.debug_info) + *(.gnu.linkonce.wi.*) + +.debug_abbrev + *(.debug_abbrev) + +.debug_line + *(.debug_line) + +.debug_frame + *(.debug_frame) + +.debug_str + *(.debug_str) + +.debug_loc + *(.debug_loc) + +.debug_macinfo + *(.debug_macinfo) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges + *(.debug_ranges) + +.debug_macro + *(.debug_macro) +OUTPUT(Zeitschaltung_V6.elf elf32-avr) +LOAD linker stubs diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.srec b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.srec new file mode 100644 index 0000000..23b0f12 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/Zeitschaltung_V6.srec @@ -0,0 +1,23 @@ +S01800005A656974736368616C74756E675F56362E73726563BC +S11300000C9435000C9452000C9452000C94520041 +S11300100C9452000C9452000C9452000C94520014 +S11300200C9452000C9452000C9452000C94520004 +S11300300C9452000C9452000C9452000C945200F4 +S11300400C9452000C9452000C9452000C945200E4 +S11300500C9452000C9452000C9452000C945200D4 +S11300600C9452000C945200950011241FBECFEF43 +S1130070D4E0DEBFCDBF21E0A0E0B1E001C01D921D +S1130080A030B207E1F710E0CAE6D0E004C022973E +S1130090FE010E949D00C836D107C9F70E94600086 +S11300A00C94A1000C9400005E98569A08955E9AF0 +S11300B0569A08955F98579A08955F9A579A0895A3 +S11300C00E9457000E945A002FEF84E39CE02150C5 +S11300D080409040E1F700C000000E9457000E9459 +S11300E05D002FEF84E39CE0215080409040E1F7D5 +S11300F000C000000E9454000E945D002FEF84E3C2 +S11301009CE0215080409040E1F700C000000E9434 +S113011054000E945A002FEF84E39CE02150804059 +S11301209040E1F700C00000CBCF579A569A0E9446 +S113013054000C945A00EE0FFF1F0590F491E02D2B +S10901400994F894FFCFBE +S9030000FC diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/io/hardware/.gitignore b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/io/hardware/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/makedep.mk b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/makedep.mk new file mode 100644 index 0000000..a5d6ddc --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Release/makedep.mk @@ -0,0 +1,6 @@ +################################################################################ +# Automatically-generated file. Do not edit or delete the file +################################################################################ + +Zeitschaltung_V6.cpp + diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cpp new file mode 100644 index 0000000..2a1cdc2 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cpp @@ -0,0 +1,46 @@ +/* + * Zeitschaltung_V6.cpp + * + * Created: 06.05.2014 23:18:58 + * Author: netz + */ +#include "peripheral.h" +#include +//#include "comunication/funk.hpp" + +/*typedef Funk< + rfm12class, //Rfm12 Funk Hardware + moveclass, //Bewegungsmelder + startclass, //Startknopf + servoclass, //Servo + ledclass //LED +> funkclass; +funkclass funk;*/ + +#include + +ledclass l; +uartclass text; +rfm12class r; + +int main(void) { + r.beginasyncrx(); + while(1) + { + while(r.hasdata()) { + l.on(); + _delay_ms(100); + l.off(); + _delay_ms(100); + text.send("\r\n"); + } + uint8_t data = r.rxbyte(); + char t[10]; + sprintf(t, "%04X \r\n", data); + text.send(t); + } +} + +/*ISR(TIMER0_OVF_vect) { + funk.timer(); +}*/ \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cppproj b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cppproj new file mode 100644 index 0000000..39392a8 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/Zeitschaltung_V6.cppproj @@ -0,0 +1,208 @@ + + + + 2.0 + 6.1 + com.Atmel.AVRGCC8.CPP + {ec267909-c732-4cef-b754-bd8ce5ebd85c} + ATmega16A + none + Executable + CPP + $(MSBuildProjectName) + .elf + $(MSBuildProjectDirectory)\$(Configuration) + Zeitschaltung_V6 + Zeitschaltung_V6 + Zeitschaltung_V6 + Native + true + false + exception_table + 0 + true + 0x20000000 + true + + 0 + + + + + + + + + + + + ISP + com.atmel.avrdbg.tool.ispmk2 + + com.atmel.avrdbg.tool.ispmk2 + AVRISP mkII + 0000000000000 + + 127.0.0.1 + 61172 + False + + + ISP + + 249000 + 1000000 + 150000 + false + false + 0 + 0 + 0 + 0 + + + + + com.atmel.avrdbg.tool.simulator + Simulator + + + + 127.0.0.1 + 61172 + False + + + + + + + True + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + True + True + + + NDEBUG + + + Optimize for size (-Os) + True + True + True + True + True + True + True + + + libm + + + <segmentname>=<address>, for example .boot=0xff + + + Zeitschaltung_V6 + .elf + Executable + + + + + True + True + True + True + True + True + + + DEBUG + + + Optimize (-O1) + True + True + Default (-g2) + True + True + True + + + DEBUG + + + Optimize for size (-Os) + True + True + Default (-g2) + True + -std=c++11 + + + libm + + + <segmentname>=<address>, for example .boot=0xff + Default (-Wa,-g) + + + + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + compile + + + + + + + + + \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/Snap.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/Snap.hpp new file mode 100644 index 0000000..bdb0f83 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/Snap.hpp @@ -0,0 +1,64 @@ +/* + * Snap.hpp + * + * Created: 10.05.2014 13:28:04 + * Author: netz + */ + + +#ifndef SNAP_H_ +#define SNAP_H_ + +class Snap { + public: + static const uint8_t DEVICE = 30; + + static const uint8_t ALL = 0; + static const uint8_t GROUP = 240; + static const uint8_t MASTER = 1; + + static const uint8_t PING = 1; + static const uint8_t SLEEP = 2; + static const uint8_t ACTIVE = 3; + static const uint8_t SETSLEEP = 4; + static const uint8_t SETACTIVE = 5; + static const uint8_t RUN = 6; + static const uint8_t SETRUN = 7; + static const uint8_t DEDECT = 8; + static const uint8_t SETDEDECT = 9; + + protected: + virtual void hook_turn() = 0; + virtual void hook_poll() = 0; + virtual void funk_begin() = 0; + virtual void funk_end() = 0; + virtual uint8_t funk_has_data() = 0; + virtual uint8_t funk_get_byte() = 0; + virtual void funk_send_packet(uint8_t addr, uint8_t from, uint8_t data) = 0; + + void wait() { + _delay_ms(10); + for(uint8_t i=0;iDEVICE;i++) { + _delay_ms(5); + } + } + void get_packet(uint8_t data[], uint8_t len){ + this->funk_begin(); + for (uint8_t i = 0; i < len; i++) + { + while(this->funk_has_data()) { + this->hook_poll(); + } + data[i] = this->funk_get_byte(); + } + this->funk_end(); + } + + void send_packet(uint8_t data) { + this->funk_send_packet(this->MASTER, this->DEVICE, data); + } +}; + + + +#endif /* SNAP_H_ */ \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/funk.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/funk.hpp new file mode 100644 index 0000000..2985c15 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/comunication/funk.hpp @@ -0,0 +1,133 @@ +/* + * funk.hpp + * + * Created: 10.05.2014 10:00:08 + * Author: netz + */ + +#ifndef FUNK_H_ +#define FUNK_H_ + +#include "Snap.hpp" + +template +class Funk : public Snap { + public: + volatile uint8_t status; + Funk() { + this->init(); + } + void timer() { + if(this->status == this->SLEEP) { + led.color(led.GREEN); + } else if(this->status == this->ACTIVE) { + led.color(led.RED); + } else if(this->status == this->RUN) { + led.color(led.YELLOW); + } + servo.timer(); + } + void worker() { + uint8_t data[3]; + this->get_packet(data, 3); + if(data[0] == ALL || data[0] == DEVICE || data[0] == GROUP) { + if(data[1] == this->MASTER) { + switch(data[2]) { + case this->PING: { + break; + } + case this->SETSLEEP: { + this->status = this->SLEEP; + break; + } + case this->SETACTIVE: { + this->status = this->ACTIVE; + break; + } + case this->SETRUN: { + this->hook_turn(); + this->send_packet(this->RUN); + return; + } + default: { + return; + } + } + this->wait(); + this->send_packet(this->status); + return; + } + } + } + private: + Input_Start st; + Input_Beweg mc; + Servo servo; + Led led; + Rfm12 rfm12; + void init() + { + led.color(led.RED); + this->status = this->SLEEP; + } + void hook_turn() + { + if(this->status == this->RUN){ + return; + } + this->status = this->RUN; + + servo.turn(servo.LEFT); + servo.on(); + this->wait(); + _delay_ms(400); + servo.turn(servo.MIDDLE); + _delay_ms(300); + servo.turn(servo.RIGHT); + _delay_ms(700); + servo.off(); + } + + void hook_poll() + { + if(this->status == this->ACTIVE) { + if(mc.is_pressed()) { + this->funk_end(); + this->hook_turn(); + this->send_packet(this->RUN); + this->funk_begin(); + } + } + if(this->status == this->SLEEP) { + if(mc.is_pressed()) { + this->funk_end(); + this->send_packet(this->DEDECT); + this->funk_begin(); + } + } + if(st.is_pressed()) { + if(this->status == this->SLEEP) { + this->status = this->RUN; + _delay_ms(15000); + this->status = this->ACTIVE; + } + } + } + void funk_begin() { + rfm12.beginasyncrx(); + } + void funk_end() { + rfm12.endasyncrx(); + } + uint8_t funk_has_data() { + return rfm12.hasdata(); + } + uint8_t funk_get_byte() { + return rfm12.rxbyte(); + } + void funk_send_packet(uint8_t addr, uint8_t from, uint8_t data) { + rfm12.txpacket(addr, from, data); + } +}; + +#endif /* FUNK_H_ */ \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Led.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Led.hpp new file mode 100644 index 0000000..2d35ae8 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Led.hpp @@ -0,0 +1,33 @@ +/* + * Led.h + * + * Created: 03.11.2013 17:11:58 + * Author: BlubbFish + */ + +#ifndef LED_H_ +#define LED_H_ + +#include "hardware/pin.hpp" + +template +class Led { + public: + Led() { + init(); + } + void on() { + led::set(); + } + void off() { + led::clear(); + } + private: + void init() { + led::make_output(); + off(); + } + const typedef avrlib::pin led; +}; + +#endif /* LED_H_ */ \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Spi.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Spi.hpp new file mode 100644 index 0000000..0dafd0c --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/Spi.hpp @@ -0,0 +1,86 @@ +/* + * Spi.h + * + * Created: 06.11.2013 15:41:34 + * Author: netz + */ + + +#ifndef SPI_H_ +#define SPI_H_ + +#include +#include +#include "hardware/pin.hpp" + +template +class Spi { + public: + Spi() { + this->init(); + } + void CSOn() { + cs::make_low(); + } + void CSOff() { + cs::make_high(); + } + uint8_t send(uint8_t data) { + if(mode == 0) { + return this->send_hard(data); + } + return this->send_soft(data); + } + uint8_t has_data() { + return !miso::read(); + } + private: + const typedef avrlib::pin cs; + const typedef avrlib::pin miso; + const typedef avrlib::pin mosi; + const typedef avrlib::pin sck; + void init() { + this->init_port(); + if(mode == 0) { + this->init_spi(); + } + } + void init_port() { + mosi::make_low(); //output und low; + sck::make_low(); //output und low; + cs::make_high(); //output und low; + miso::make_input(); //input und low; + } + void init_spi() { + SPCR = (1< + +namespace avrlib { + + template + struct pin + { + static void set(bool value = true) + { + if (value) + Port::port(Port::port() | (1< + +namespace avrlib { + + struct portb + { + static uint8_t port() { return PORTB; } + static void port(uint8_t v) { PORTB = v; } + + static uint8_t pin() { return PINB; } + static void pin(uint8_t v) { PINB = v; } + + static uint8_t dir() { return DDRB; } + static void dir(uint8_t v) { DDRB = v; } + }; + +} + +#endif diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portc.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portc.hpp new file mode 100644 index 0000000..017e95b --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portc.hpp @@ -0,0 +1,22 @@ +#ifndef AVRLIB_PORTC_HPP +#define AVRLIB_PORTC_HPP + +#include + +namespace avrlib { + + struct portc + { + static uint8_t port() { return PORTC; } + static void port(uint8_t v) { PORTC = v; } + + static uint8_t pin() { return PINC; } + static void pin(uint8_t v) { PINC = v; } + + static uint8_t dir() { return DDRC; } + static void dir(uint8_t v) { DDRC = v; } + }; + +} + +#endif diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portd.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portd.hpp new file mode 100644 index 0000000..e045ee5 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/hardware/portd.hpp @@ -0,0 +1,22 @@ +#ifndef AVRLIB_PORTD_HPP +#define AVRLIB_PORTD_HPP + +#include + +namespace avrlib { + + struct portd + { + static uint8_t port() { return PORTD; } + static void port(uint8_t v) { PORTD = v; } + + static uint8_t pin() { return PIND; } + static void pin(uint8_t v) { PIND = v; } + + static uint8_t dir() { return DDRD; } + static void dir(uint8_t v) { DDRD = v; } + }; + +} + +#endif diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/rfm12.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/rfm12.hpp new file mode 100644 index 0000000..37ab8b1 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/rfm12.hpp @@ -0,0 +1,154 @@ +/* + * rfm12.hpp + * + * Created: 08.05.2014 00:06:49 + * Author: netz + */ + + +#ifndef RFM12_H_ +#define RFM12_H_ + +template +class Rfm12 { + public: + Rfm12() { + this->init(); + } + + void ready(void) { + s.CSOn(); + while(s.has_data()); // wait until FIFO ready + } + + void beginasyncrx() { + this->send(0x82C8); // RX on + this->send(0xCA81); // set FIFO mode + this->send(0xCA83); // enable FIFO + } + + uint8_t hasdata() { + s.CSOn(); + return s.has_data(); + } + + uint8_t rxbyte() { + return this->send(0xB000); + } + + void endasyncrx() { + this->send(0x8208); // RX off + } + + void txdata(uint8_t *data, uint8_t number) { + uint8_t i; + this->send(0x8238); // TX on + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB82D); + this->ready(); + this->send(0xB8D4); + for (i=0; iready(); + this->send(0xB800|(*data++)); + } + this->ready(); + this->send(0x8208); // TX off + } + + void rxdata(uint8_t *data, uint8_t number) { + uint8_t i; + this->send(0x82C8); // RX on + this->send(0xCA81); // set FIFO mode + this->send(0xCA83); // enable FIFO + for (i=0; iready(); + *data++=this->send(0xB000); + } + this->send(0x8208); // RX off + } + + void txpacket(uint8_t addr, uint8_t from, uint8_t data) { + this->send(0x8238); // TX on + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB8AA); + this->ready(); + this->send(0xB82D); + this->ready(); + this->send(0xB8D4); + this->ready(); + this->send(0xB800|addr); + this->ready(); + this->send(0xB800|from); + this->ready(); + this->send(0xB800|data); + this->ready(); + this->send(0xB800); + this->ready(); + this->send(0x8208); // TX off + _delay_ms(100); + } + private: + Spi s; + uint16_t send(uint16_t wert) { + s.CSOn(); + uint16_t werti = s.send((uint8_t)(wert >> 8)) << 8; + werti |= s.send((uint8_t)wert); + s.CSOff(); + return werti; + } + void init(void) { + _delay_ms(100); + + this->send(0xC0E0); // AVR CLK: 10MHz + this->send(0x80D7); // Enable FIFO + this->send(0xC2AB); // Data Filter: internal + this->send(0xCA81); // Set FIFO mode + this->send(0xE000); // disable wakeuptimer + this->send(0xC800); // disable low duty cycle + this->send(0xC4F7); // AFC settings: autotuning: -10kHz...+7,5kHz + + this->setfreq(); // Sende/Empfangsfrequenz auf 433,92MHz einstellen + this->setbandwidth(); // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm + this->setbaud(); // 19200 baud + this->setpower(); // 1mW Ausgangsleistung, 120kHz Frequenzshift + } + void setbandwidth() { + this->send( 0x9400 | ( ( bandwidth & 7 ) << 5 ) | ( ( gain & 3 ) << 3 ) | ( drssi & 7 ) ); + } + void setfreq() { + uint16_t freq = (uint16_t)(((float)(frequenz-430000)/1000)/0.0025); // macro for calculating frequency value out of frequency in kHz + if( freq < 96 ) { // 430,2400MHz + this->send( 0xA000 | 96 ); + } else if( freq > 3903 ) { // 439,7575MHz + this->send( 0xA000 | 3903 ); + } + this->send( 0xA000 | freq ); + } + void setbaud() { + if (baud < 663) { + return; + } + if (baud < 5400) { // Baudrate= 344827,58621/(R+1)/(1+CS*7) + this->send(0xC680 | ( ( 43104 / baud ) - 1 ) ); + } else { + this->send(0xC600 | ( ( 344828UL / baud ) - 1 ) ); + } + } + void setpower() { + this->send( 0x9800 | ( power & 7 ) | ( ( mod & 15 ) << 4 ) ); + } +}; + +#endif /* RFM12_H_ */ \ No newline at end of file diff --git a/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/uart.hpp b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/uart.hpp new file mode 100644 index 0000000..fef3e19 --- /dev/null +++ b/V6/Program/rfm12_rs232/Zeitschaltung_V6/io/uart.hpp @@ -0,0 +1,47 @@ +/* + * Rs232.h + * + * Created: 04.11.2013 21:31:09 + * Author: netz + */ + +#ifndef RS232_H_ +#define RS232_H_ + +#include +#include + +template +class Uart { + public: + Uart() { + sei(); + init(); + send("Uart done!\r\n"); + } + void send(const char *text) { + while (*text) + { + uart_putchar(*text); + text++; + } + } + void send(uint8_t wert) { + uart_putchar(wert); + } + private: + void init() { + UBRRL = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt + UCSRB = /*(1< ledclass; + +#include "io/uart.hpp" +typedef Uart< + 9600 +> uartclass; + +#include "io/Spi.hpp" +typedef Spi< // + avrlib::portc, //Funkmodul an PORTC + PINC3, //CS Pin (nSEL) + PINC4, //MISO Pin (SDO) + PINC1, //MOSI Pin (SDI) + PINC2, //SCK Pin + 1 //0 Hardware, 1 Software +> spiclass; + +#include "io/rfm12.hpp" +typedef Rfm12< + spiclass, //SPI Hardware + 1, //Bandwidth // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm + 0, //Gain + 7, //DRRSI + 433920,//(uint16_t)RF12FREQ(433.92), // Sende/Empfangsfrequenz auf 433,92MHz einstellen + 9600, //Baudrate // 9600 baud + 0, //Power // 1mW Ausgangsleistung, 120kHz Frequenzshift + 6 //Mod +> rfm12class; + +#endif /* PERIPHERAL_H_ */ \ No newline at end of file