20140509-181001

This commit is contained in:
2014-05-09 16:10:01 +00:00
parent 84d609f891
commit 78cd3d2104
28 changed files with 3221 additions and 1673 deletions
Binary file not shown.
@@ -80,7 +80,7 @@ LIB_DEP+=
./%.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 -O1 -ffunction-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega168a -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<"
$(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=atmega168a -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<"
@echo Finished building: $<
@@ -19,7 +19,8 @@ Zeitschaltung_V6.d Zeitschaltung_V6.o: .././Zeitschaltung_V6.cpp \
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/Start.hpp .././io/Spi.hpp .././io/../config.h .././io/rfm12.hpp
.././io/Input.hpp .././io/Spi.hpp .././io/../config.h .././rf12.hpp \
.././codes.h
.././config.h:
@@ -71,10 +72,12 @@ c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.876\avr8-
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/Start.hpp:
.././io/Input.hpp:
.././io/Spi.hpp:
.././io/../config.h:
.././io/rfm12.hpp:
.././rf12.hpp:
.././codes.h:
@@ -1,24 +1,93 @@
:100000000C9435000C9452000C9452000C94520045
:100010000C9452000C9452000C9452000C94520018
:100020000C9452000C9452000C9452000C94520008
:100030000C9452000C9452000C9452000C945200F8
:100040000C945F000C9452000C9452000C945200DB
:100050000C9452000C9452000C9452000C945200D8
:100060000C9452000C945200950011241FBECFEF47
:10007000D4E0DEBFCDBF21E0A0E0B1E001C01D9221
:10008000A330B207E1F710E0CAE6D0E004C022973F
:10009000FE010E94B000C836D107C9F70E94540083
:1000A0000C94B4000C9400005E98569A5F98579A8E
:1000B0004B99FACF5E9A569A5F98579AF5CF1F924E
:1000C0000F920FB60F9211242F933F938F939F930C
:1000D00084E686BD2A9A229A8FEF94E00197F1F781
:1000E00000C0000080910101882369F080E090E069
:1000F00025E12A95F1F7000001962091010130E0F9
:1001000082179307A8F32A98229A9F918F913F9183
:100110002F910F900FBE0F901F901895579A569AD7
:100120005E98569A5F98579A089582E091E00E94EF
:100130008E0010920101219A2998219A229A14BCCA
:1001400085E085BD84E686BD17BC18BC81E0809340
:100150006E00789453985B985B9A0895EE0FFF1F9A
:0C0160000590F491E02D0994F894FFCF75
:100000000C9435000C945D000C945D000C945D0024
:100010000C945D000C945D000C945D000C945D00EC
:100020000C945D000C945D000C945D000C945D00DC
:100030000C945D000C945D000C945D000C945D00CC
:100040000C9484000C945D000C945D000C945D0095
:100050000C945D000C945D000C945D000C945D00AC
:100060000C945D000C945D00700211241FBECFEF54
:10007000D4E0DEBFCDBF11E0A0E0B1E0E6EAF5E0FC
:1000800002C005900D92A230B107D9F721E0A2E09D
:10009000B1E001C01D92A730B207E1F710E0CAE657
:1000A000D0E004C02297FE010E94CD02C836D107DD
:1000B000C9F70E946A020C94D1020C940000219AA4
:1000C0000895282F98E080E027FF02C0409A01C0E1
:1000D0004098389A880F33998160419A399A220F53
:1000E00000C000004198399A915071F7089580FF3F
:1000F00002C05E9A01C05E98569A81FF02C05F9A64
:1001000001C05F98579A08951F920F920FB60F92F1
:1001100011242F933F934F935F936F937F938F930C
:100120009F93AF93BF93EF93FF93809100019091C2
:100130000101029711F481E00FC0809100019091BC
:100140000101039711F482E007C0809100019091B2
:100150000101069719F483E00E94770084E686BDCA
:100160002A9A229A8FEF94E00197F1F700C00000DD
:1001700080E090E005C025E12A95F1F700000196A6
:100180002091050130E082179307A8F32A98229A5C
:10019000FF91EF91BF91AF919F918F917F916F915F
:1001A0005F914F913F912F910F900FBE0F901F9035
:1001B000189544983C9A08950E94D900339BFECF2D
:1001C0000895EF92FF921F93CF93DF931F92CDB7C5
:1001D000DEB7182F99830E94D90089810E9461009F
:1001E000F82EE12C812F0E946100449A3C9A9701DD
:1001F000282BC9010F90DF91CF911F91FF90EF90B5
:10020000089588EC92E80E94E10081E89AEC0E944F
:10021000E10083E89AEC0C94E100CF93DF9300D0E7
:100220001F92CDB7DEB788E392E82B834A836983B8
:100230000E94E1000E94DC008AEA98EB0E94E10043
:100240000E94DC008AEA98EB0E94E1000E94DC0038
:100250008AEA98EB0E94E1000E94DC008DE298EBB4
:100260000E94E1000E94DC0084ED98EB0E94E10016
:100270000E94DC006981862F90E0986B0E94E1006B
:100280000E94DC004A81842F90E0986B0E94E1007C
:100290000E94DC002B81822F90E0986B0E94E1008D
:1002A0000E94DC0080E098EB0E94E1000E94DC00EC
:1002B00088E092E80E94E1002FEF80E792E0215071
:1002C00080409040E1F700C000000F900F900F9029
:1002D000DF91CF91089580910001909101010697DF
:1002E00009F442C086E090E0909301018093000100
:1002F000299A0E945F00109205012FEF89EF90E08C
:10030000215080409040E1F700C0000020910001A2
:10031000309101014EE161E082E091E00E940D0127
:100320002FEF83EC99E0215080409040E1F700C02E
:10033000000089E6809305012FEF82E597E02150C8
:1003400080409040E1F700C0000082ED80930501FD
:100350002FEF86E191E1215080409040E1F700C00D
:10036000000029980C945F000895809100019091FD
:100370000101039751F44A9908C088E092E80E946D
:10038000E1000E946B010E940101809100019091A7
:100390000101029779F44A990DC088E092E80E9421
:1003A000E10028E04EE161E082E091E00E940D0171
:1003B0000E9401014B9921C080910001909101019F
:1003C0000297D9F483E00E94770086E090E0909352
:1003D0000101809300012FEF81E19AE721508040D5
:1003E0009040E1F700C0000083E090E090930101AD
:1003F0008093000180E00C9477000895CF930E94D1
:10040000010102C00E94B5010E94D900339BFACFBE
:1004100080E090EB0E94E100882341F08E3131F0C2
:10042000803F09F055C002C00E94B5010E94D9006A
:10043000339BFACF80E090EB0E94E100C82F02C00E
:100440000E94B5010E94D900339BFACFC13009F058
:100450003FC080E090EB0E94E100843049F018F446
:100460008130C9F41DC0853031F08730A1F40AC055
:1004700082E090E002C083E090E0909301018093DD
:1004800000010EC088E092E80E94E1000E946B012A
:10049000CF910C94010188E092E8CF910C94E10097
:1004A00088E092E80E94E1002FEF89EF90E0215070
:1004B00080409040E1F700C00000209100013091A1
:1004C00001014EE161E082E091E0CF910C940D01D9
:1004D000CF91089582E00E9477000E94FE01FDCF37
:1004E000579A569A80E00E947700109205010E9468
:1004F0005F0029980E945F00229A14BC85E085BDA8
:1005000084E686BD17BC18BC81E080936E007894A9
:1005100053985B985B9A52985A985A9A4098389A8E
:100520004198399A449A3C9A3B9843982FEF80E738
:1005300092E0215080409040E1F700C0000080EE42
:1005400090EC0E94E10087ED90E80E94E1008BEAC8
:1005500092EC0E94E10081E89AEC0E94E10080E0C8
:1005600090EE0E94E10080E098EC0E94E10087EFAD
:1005700094EC0E94E10080E296EA0E94E10087E2AA
:1005800094E90E94E10082E296EC0E94E10080E69C
:1005900098E90C94E100EE0FFF1F0590F491E02D17
:0605A0000994F894FFCF5E
:0205A600020051
:00000001FF
File diff suppressed because it is too large Load Diff
@@ -2,6 +2,8 @@ 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(_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)
@@ -13,6 +15,7 @@ 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
.text 0x00000000 0x0 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)
@@ -27,6 +30,19 @@ Discarded input sections
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
@@ -182,7 +198,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
.rela.plt
*(.rela.plt)
.text 0x00000000 0x16c
.text 0x00000000 0x5a6
*(.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
@@ -221,69 +237,96 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
*(.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 0x00000076 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)
0x00000076 __do_copy_data
.init4 0x0000008c 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)
0x0000008c __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 0x0000009c 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)
0x0000009c __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 0x000000b2 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_18
0x000000a4 __vector_20
0x000000a8 . = ALIGN (0x2)
.text 0x000000ba 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
0x000000ba __vector_22
0x000000ba __vector_1
0x000000ba __vector_24
0x000000ba __vector_12
0x000000ba __bad_interrupt
0x000000ba __vector_6
0x000000ba __vector_3
0x000000ba __vector_23
0x000000ba __vector_25
0x000000ba __vector_11
0x000000ba __vector_13
0x000000ba __vector_17
0x000000ba __vector_19
0x000000ba __vector_7
0x000000ba __vector_5
0x000000ba __vector_4
0x000000ba __vector_9
0x000000ba __vector_2
0x000000ba __vector_21
0x000000ba __vector_15
0x000000ba __vector_8
0x000000ba __vector_14
0x000000ba __vector_10
0x000000ba __vector_18
0x000000ba __vector_20
0x000000be . = ALIGN (0x2)
*(.text.*)
.text.main 0x000000a8 0x16 Zeitschaltung_V6.o
0x000000a8 main
.text._ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2
0x000000be 0x4 Zeitschaltung_V6.o
.text._ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30
0x000000c2 0x2c Zeitschaltung_V6.o
.text._ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11
0x000000ee 0x1a Zeitschaltung_V6.o
.text.__vector_16
0x000000be 0x5e Zeitschaltung_V6.o
0x000000be __vector_16
.text._ZN3LedIN6avrlib5portdELi7ELi6EE4initEv
0x0000011c 0xe Zeitschaltung_V6.o
0x0000011c _ZN3LedIN6avrlib5portdELi7ELi6EE4initEv
.text._GLOBAL__sub_I_l
0x0000012a 0x32 Zeitschaltung_V6.o
.text.libgcc 0x0000015c 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)
0x0000015c __tablejump2__
0x00000160 __tablejump__
0x00000168 . = ALIGN (0x2)
0x00000108 0xaa Zeitschaltung_V6.o
0x00000108 __vector_16
.text._ZN6avrlib3pinINS_5portcELh4EE8make_lowEv
0x000001b2 0x6 Zeitschaltung_V6.o
0x000001b2 _ZN6avrlib3pinINS_5portcELh4EE8make_lowEv
.text._ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25
0x000001b8 0xa Zeitschaltung_V6.o
.text._ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32
0x000001c2 0x40 Zeitschaltung_V6.o
.text._ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39
0x00000202 0x18 Zeitschaltung_V6.o
.text._ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh
0x0000021a 0xbc Zeitschaltung_V6.o
0x0000021a _ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh
.text._Z4turnv
0x000002d6 0x94 Zeitschaltung_V6.o
0x000002d6 _Z4turnv
.text._Z4pollv
0x0000036a 0x92 Zeitschaltung_V6.o
0x0000036a _Z4pollv
.text._Z6recivev
0x000003fc 0xd8 Zeitschaltung_V6.o
0x000003fc _Z6recivev
.text.startup.main
0x000004d4 0xc Zeitschaltung_V6.o
0x000004d4 main
.text.startup._GLOBAL__sub_I_l
0x000004e0 0xb6 Zeitschaltung_V6.o
.text.libgcc 0x00000596 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)
0x00000596 __tablejump2__
0x0000059a __tablejump__
0x000005a2 . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000168 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)
0x00000168 _exit
0x00000168 exit
.fini9 0x000005a2 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)
0x000005a2 _exit
0x000005a2 exit
*(.fini9)
*(.fini8)
*(.fini8)
@@ -302,46 +345,50 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000168 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 0x000005a2 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)
0x0000016c _etext = .
0x000005a6 _etext = .
.data 0x00800100 0x0 load address 0x0000016c
.data 0x00800100 0x2 load address 0x000005a6
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 0x00800100 0x2 Zeitschaltung_V6.o
0x00800100 status
.data 0x00800102 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 0x00800102 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 0x00800102 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 0x00800102 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 0x00800102 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, .)
0x00800102 . = ALIGN (0x2)
0x00800102 _edata = .
0x00800102 PROVIDE (__data_end, .)
.bss 0x00800100 0x3
0x00800100 PROVIDE (__bss_start, .)
.bss 0x00800102 0x5
0x00800102 PROVIDE (__bss_start, .)
*(.bss)
.bss 0x00800100 0x3 Zeitschaltung_V6.o
0x00800100 st
0x00800101 s
0x00800102 l
.bss 0x00800102 0x5 Zeitschaltung_V6.o
0x00800102 r
0x00800103 mc
0x00800104 st
0x00800105 se
0x00800106 l
*(.bss*)
*(COMMON)
0x00800103 PROVIDE (__bss_end, .)
0x0000016c __data_load_start = LOADADDR (.data)
0x0000016c __data_load_end = (__data_load_start + SIZEOF (.data))
0x00800107 PROVIDE (__bss_end, .)
0x000005a6 __data_load_start = LOADADDR (.data)
0x000005a8 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800103 0x0
0x00800103 PROVIDE (__noinit_start, .)
.noinit 0x00800107 0x0
0x00800107 PROVIDE (__noinit_start, .)
*(.noinit*)
0x00800103 PROVIDE (__noinit_end, .)
0x00800103 _end = .
0x00800103 PROVIDE (__heap_start, .)
0x00800107 PROVIDE (__noinit_end, .)
0x00800107 _end = .
0x00800107 PROVIDE (__heap_start, .)
.eeprom 0x00810000 0x0
*(.eeprom*)
@@ -399,39 +446,39 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x38
.debug_aranges 0x00000000 0x88
*(.debug_aranges)
.debug_aranges
0x00000000 0x38 Zeitschaltung_V6.o
0x00000000 0x88 Zeitschaltung_V6.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x136b
.debug_info 0x00000000 0x3671
*(.debug_info)
.debug_info 0x00000000 0x136b Zeitschaltung_V6.o
.debug_info 0x00000000 0x3671 Zeitschaltung_V6.o
*(.gnu.linkonce.wi.*)
.debug_abbrev 0x00000000 0x38d
.debug_abbrev 0x00000000 0x4ef
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x38d Zeitschaltung_V6.o
.debug_abbrev 0x00000000 0x4ef Zeitschaltung_V6.o
.debug_line 0x00000000 0x290
.debug_line 0x00000000 0x515
*(.debug_line)
.debug_line 0x00000000 0x290 Zeitschaltung_V6.o
.debug_line 0x00000000 0x515 Zeitschaltung_V6.o
.debug_frame 0x00000000 0x74
.debug_frame 0x00000000 0x174
*(.debug_frame)
.debug_frame 0x00000000 0x74 Zeitschaltung_V6.o
.debug_frame 0x00000000 0x174 Zeitschaltung_V6.o
.debug_str 0x00000000 0xc3b
.debug_str 0x00000000 0x1ba0
*(.debug_str)
.debug_str 0x00000000 0xc3b Zeitschaltung_V6.o
0xc81 (size before relaxing)
.debug_str 0x00000000 0x1ba0 Zeitschaltung_V6.o
0x1c0a (size before relaxing)
.debug_loc 0x00000000 0xcc
.debug_loc 0x00000000 0x5d9
*(.debug_loc)
.debug_loc 0x00000000 0xcc Zeitschaltung_V6.o
.debug_loc 0x00000000 0x5d9 Zeitschaltung_V6.o
.debug_macinfo
*(.debug_macinfo)
@@ -439,9 +486,9 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
.debug_pubtypes
*(.debug_pubtypes)
.debug_ranges 0x00000000 0x28
.debug_ranges 0x00000000 0x120
*(.debug_ranges)
.debug_ranges 0x00000000 0x28 Zeitschaltung_V6.o
.debug_ranges 0x00000000 0x120 Zeitschaltung_V6.o
.debug_macro
*(.debug_macro)
@@ -1,25 +1,94 @@
S01800005A656974736368616C74756E675F56362E73726563BC
S11300000C9435000C9452000C9452000C94520041
S11300100C9452000C9452000C9452000C94520014
S11300200C9452000C9452000C9452000C94520004
S11300300C9452000C9452000C9452000C945200F4
S11300400C945F000C9452000C9452000C945200D7
S11300500C9452000C9452000C9452000C945200D4
S11300600C9452000C945200950011241FBECFEF43
S1130070D4E0DEBFCDBF21E0A0E0B1E001C01D921D
S1130080A330B207E1F710E0CAE6D0E004C022973B
S1130090FE010E94B000C836D107C9F70E9454007F
S11300A00C94B4000C9400005E98569A5F98579A8A
S11300B04B99FACF5E9A569A5F98579AF5CF1F924A
S11300C00F920FB60F9211242F933F938F939F9308
S11300D084E686BD2A9A229A8FEF94E00197F1F77D
S11300E000C0000080910101882369F080E090E065
S11300F025E12A95F1F7000001962091010130E0F5
S113010082179307A8F32A98229A9F918F913F917F
S11301102F910F900FBE0F901F901895579A569AD3
S11301205E98569A5F98579A089582E091E00E94EB
S11301308E0010920101219A2998219A229A14BCC6
S113014085E085BD84E686BD17BC18BC81E080933C
S11301506E00789453985B985B9A0895EE0FFF1F96
S10F01600590F491E02D0994F894FFCF71
S11300000C9435000C945D000C945D000C945D0020
S11300100C945D000C945D000C945D000C945D00E8
S11300200C945D000C945D000C945D000C945D00D8
S11300300C945D000C945D000C945D000C945D00C8
S11300400C9484000C945D000C945D000C945D0091
S11300500C945D000C945D000C945D000C945D00A8
S11300600C945D000C945D00700211241FBECFEF50
S1130070D4E0DEBFCDBF11E0A0E0B1E0E6EAF5E0F8
S113008002C005900D92A230B107D9F721E0A2E099
S1130090B1E001C01D92A730B207E1F710E0CAE653
S11300A0D0E004C02297FE010E94CD02C836D107D9
S11300B0C9F70E946A020C94D1020C940000219AA0
S11300C00895282F98E080E027FF02C0409A01C0DD
S11300D04098389A880F33998160419A399A220F4F
S11300E000C000004198399A915071F7089580FF3B
S11300F002C05E9A01C05E98569A81FF02C05F9A60
S113010001C05F98579A08951F920F920FB60F92ED
S113011011242F933F934F935F936F937F938F9308
S11301209F93AF93BF93EF93FF93809100019091BE
S11301300101029711F481E00FC0809100019091B8
S11301400101039711F482E007C0809100019091AE
S11301500101069719F483E00E94770084E686BDC6
S11301602A9A229A8FEF94E00197F1F700C00000D9
S113017080E090E005C025E12A95F1F700000196A2
S11301802091050130E082179307A8F32A98229A58
S1130190FF91EF91BF91AF919F918F917F916F915B
S11301A05F914F913F912F910F900FBE0F901F9031
S11301B0189544983C9A08950E94D900339BFECF29
S11301C00895EF92FF921F93CF93DF931F92CDB7C1
S11301D0DEB7182F99830E94D90089810E9461009B
S11301E0F82EE12C812F0E946100449A3C9A9701D9
S11301F0282BC9010F90DF91CF911F91FF90EF90B1
S1130200089588EC92E80E94E10081E89AEC0E944B
S1130210E10083E89AEC0C94E100CF93DF9300D0E3
S11302201F92CDB7DEB788E392E82B834A836983B4
S11302300E94E1000E94DC008AEA98EB0E94E1003F
S11302400E94DC008AEA98EB0E94E1000E94DC0034
S11302508AEA98EB0E94E1000E94DC008DE298EBB0
S11302600E94E1000E94DC0084ED98EB0E94E10012
S11302700E94DC006981862F90E0986B0E94E10067
S11302800E94DC004A81842F90E0986B0E94E10078
S11302900E94DC002B81822F90E0986B0E94E10089
S11302A00E94DC0080E098EB0E94E1000E94DC00E8
S11302B088E092E80E94E1002FEF80E792E021506D
S11302C080409040E1F700C000000F900F900F9025
S11302D0DF91CF91089580910001909101010697DB
S11302E009F442C086E090E09093010180930001FC
S11302F0299A0E945F00109205012FEF89EF90E088
S1130300215080409040E1F700C00000209100019E
S1130310309101014EE161E082E091E00E940D0123
S11303202FEF83EC99E0215080409040E1F700C02A
S1130330000089E6809305012FEF82E597E02150C4
S113034080409040E1F700C0000082ED80930501F9
S11303502FEF86E191E1215080409040E1F700C009
S1130360000029980C945F000895809100019091F9
S11303700101039751F44A9908C088E092E80E9469
S1130380E1000E946B010E940101809100019091A3
S11303900101029779F44A990DC088E092E80E941D
S11303A0E10028E04EE161E082E091E00E940D016D
S11303B00E9401014B9921C080910001909101019B
S11303C00297D9F483E00E94770086E090E090934E
S11303D00101809300012FEF81E19AE721508040D1
S11303E09040E1F700C0000083E090E090930101A9
S11303F08093000180E00C9477000895CF930E94CD
S1130400010102C00E94B5010E94D900339BFACFBA
S113041080E090EB0E94E100882341F08E3131F0BE
S1130420803F09F055C002C00E94B5010E94D90066
S1130430339BFACF80E090EB0E94E100C82F02C00A
S11304400E94B5010E94D900339BFACFC13009F054
S11304503FC080E090EB0E94E100843049F018F442
S11304608130C9F41DC0853031F08730A1F40AC051
S113047082E090E002C083E090E0909301018093D9
S113048000010EC088E092E80E94E1000E946B0126
S1130490CF910C94010188E092E8CF910C94E10093
S11304A088E092E80E94E1002FEF89EF90E021506C
S11304B080409040E1F700C000002091000130919D
S11304C001014EE161E082E091E0CF910C940D01D5
S11304D0CF91089582E00E9477000E94FE01FDCF33
S11304E0579A569A80E00E947700109205010E9464
S11304F05F0029980E945F00229A14BC85E085BDA4
S113050084E686BD17BC18BC81E080936E007894A5
S113051053985B985B9A52985A985A9A4098389A8A
S11305204198399A449A3C9A3B9843982FEF80E734
S113053092E0215080409040E1F700C0000080EE3E
S113054090EC0E94E10087ED90E80E94E1008BEAC4
S113055092EC0E94E10081E89AEC0E94E10080E0C4
S113056090EE0E94E10080E098EC0E94E10087EFA9
S113057094EC0E94E10080E296EA0E94E10087E2A6
S113058094E90E94E10082E296EC0E94E10080E698
S113059098E90C94E100EE0FFF1F0590F491E02D13
S10905A00994F894FFCF5A
S10505A602004D
S9030000FC
@@ -0,0 +1,56 @@
rf12.d rf12.o: .././rf12.c \
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 \
.././rf12.h .././global.h .././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
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:
.././rf12.h:
.././global.h:
.././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:
@@ -7,23 +7,137 @@
#include "config.h"
#include "peripheral.h"
#include <util/delay.h>
#include "codes.h"
ledclass l;
servoclass s;
//ledclass l;
servoclass se;
startclass st;
moveclass mc;
rf12class r;
int main(void)
volatile int status = SLEEP;
void turn()
{
if(status == RUN)
return;
status = RUN;
se.on();
se.turn(se.LEFT);
_delay_ms(10+DEVICE);
r.rf12_txpacket(MASTER, DEVICE, status); //r.txpacket(MASTER, DEVICE, status);
_delay_ms(400);
se.turn(se.MIDDLE);
_delay_ms(300);
se.turn(se.RIGHT);
_delay_ms(700);
se.off();
}
void poll()
{
if(status == ACTIVE) {
if(mc.is_pressed()) {
r.rf12_endasyncrx(); //r.endasyncrx();
turn();
r.rf12_beginasyncrx(); //r.beginasyncrx();
}
}
if(status == SLEEP) {
if(mc.is_pressed()) {
r.rf12_endasyncrx(); //r.endasyncrx();
r.rf12_txpacket(MASTER, DEVICE, DEDECT); //r.txpacket(MASTER, DEVICE, DEDECT);
r.rf12_beginasyncrx(); //r.beginasyncrx();
}
}
if(st.is_pressed()) {
if(status == SLEEP) {
l.color(l.YELLOW);
status = RUN;
_delay_ms(5000);
status = ACTIVE;
l.color(l.BLACK);
}
}
}
/*void resieve()
{
rf12_beginasyncrx(); //r.beginasyncrx();
while(rf12_hasdata() /r.hasdata()/) {
poll();
_delay_ms(1000);
rf12_endasyncrx(); //r.endasyncrx();
rf12_txpacket(MASTER, DEVICE, DEDECT); //r.txpacket(MASTER, DEVICE, DEDECT);
rf12_beginasyncrx(); //r.beginasyncrx();
}
l.color(l.GREEN);
}*/
void recive() {
r.rf12_beginasyncrx();
while(r.rf12_hasdata()) {
poll();
}
uint8_t addr = r.rf12_rxbyte();
if(addr == ALL || addr == DEVICE || addr == GROUP) {
while(r.rf12_hasdata()) {
poll();
}
uint8_t from = r.rf12_rxbyte();
while(r.rf12_hasdata()) {
poll();
}
if(from == MASTER) {
uint8_t data = r.rf12_rxbyte();
switch(data) {
case PING: {
break;
}
case SETSLEEP: {
status = SLEEP;
break;
}
case SETACTIVE: {
status = ACTIVE;
break;
}
case SETRUN: {
r.rf12_endasyncrx();
turn();
r.rf12_beginasyncrx();
return;
}
default:
{
r.rf12_endasyncrx();
return;
}
}
r.rf12_endasyncrx();
_delay_ms(10+DEVICE);
r.rf12_txpacket(MASTER, DEVICE, status);
return;
}
}
}
int main(void) {
l.color(l.RED);
while(1)
{
l.color(l.BLACK);
if(st.is_pressed()) {
l.color(l.GREEN);
}
recive();
}
}
ISR(TIMER0_OVF_vect) {
s.timer();
if(status == SLEEP) {
l.color(l.GREEN);
} else if(status == ACTIVE) {
l.color(l.RED);
} else if(status == RUN) {
l.color(l.YELLOW);
}
se.timer();
}
@@ -18,7 +18,8 @@
<ToolchainFlavour>Native</ToolchainFlavour>
<KeepTimersRunning>true</KeepTimersRunning>
<OverrideVtor>false</OverrideVtor>
<OverrideVtorValue>exception_table</OverrideVtorValue>
<OverrideVtorValue>
</OverrideVtorValue>
<eraseonlaunchrule>0</eraseonlaunchrule>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress>0x20000000</RamSnippetAddress>
@@ -77,43 +78,43 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGccCpp>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcccpp.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcccpp.compiler.symbols.DefSymbols>
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
<avrgcccpp.compiler.warnings.Undefined>True</avrgcccpp.compiler.warnings.Undefined>
<avrgcccpp.compiler.warnings.WarningsAsErrors>True</avrgcccpp.compiler.warnings.WarningsAsErrors>
<avrgcccpp.compiler.warnings.Pedantic>True</avrgcccpp.compiler.warnings.Pedantic>
<avrgcccpp.compiler.warnings.PedanticWarningsAsErrors>True</avrgcccpp.compiler.warnings.PedanticWarningsAsErrors>
<avrgcccpp.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcccpp.linker.libraries.Libraries>
<avrgcccpp.linker.memorysettings.Comment>&lt;segmentname&gt;=&lt;address&gt;, for example .boot=0xff</avrgcccpp.linker.memorysettings.Comment>
</AvrGccCpp>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcccpp.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcccpp.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcccpp.compiler.symbols.DefSymbols>
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
<avrgcccpp.compiler.warnings.Undefined>True</avrgcccpp.compiler.warnings.Undefined>
<avrgcccpp.compiler.warnings.WarningsAsErrors>True</avrgcccpp.compiler.warnings.WarningsAsErrors>
<avrgcccpp.compiler.warnings.Pedantic>True</avrgcccpp.compiler.warnings.Pedantic>
<avrgcccpp.compiler.warnings.PedanticWarningsAsErrors>True</avrgcccpp.compiler.warnings.PedanticWarningsAsErrors>
<avrgcccpp.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcccpp.linker.libraries.Libraries>
<avrgcccpp.linker.memorysettings.Comment>&lt;segmentname&gt;=&lt;address&gt;, for example .boot=0xff</avrgcccpp.linker.memorysettings.Comment>
</AvrGccCpp>
</ToolchainSettings>
<OutputFileName>Zeitschaltung_V6</OutputFileName>
<OutputFileExtension>.elf</OutputFileExtension>
@@ -145,7 +146,7 @@
<Value>DEBUG</Value>
</ListValues>
</avrgcccpp.compiler.symbols.DefSymbols>
<avrgcccpp.compiler.optimization.level>Optimize (-O1)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
<avrgcccpp.compiler.optimization.PackStructureMembers>True</avrgcccpp.compiler.optimization.PackStructureMembers>
<avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcccpp.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcccpp.compiler.optimization.DebugLevel>Default (-g2)</avrgcccpp.compiler.optimization.DebugLevel>
@@ -161,6 +162,9 @@
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>
<Compile Include="codes.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="config.h">
<SubType>compile</SubType>
</Compile>
@@ -188,12 +192,18 @@
<Compile Include="io\Spi.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="io\Start.hpp">
<Compile Include="io\Input.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="peripheral.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="rf12.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="rf12.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="Zeitschaltung_V6.cpp">
<SubType>compile</SubType>
</Compile>
@@ -0,0 +1,31 @@
/*
* codes.h
*
* Created: 29.03.2013 13:58:28
* Author: netz
*/
#ifndef CODES_H_
#define CODES_H_
#ifndef ALL
#define ALL 0
#define GROUP 240
#define DEVICE 30
#define MASTER 1
#endif
#ifndef PING
#define PING 1
#define SLEEP 2
#define ACTIVE 3
#define SETSLEEP 4
#define SETACTIVE 5
#define RUN 6
#define SETRUN 7
#define DEDECT 8
#define SETDEDECT 9
#endif
#endif /* CODES_H_ */
@@ -0,0 +1,33 @@
/*
* Start.hpp
*
* Created: 08.05.2014 17:55:29
* Author: netz
*/
#ifndef INPUT_H_
#define INPUT_H_
#include "hardware/pin.hpp"
template <typename Port, int input_pin>
class Input {
public:
Input() {
init();
}
uint8_t is_pressed() {
return (!input_in::read());
}
private:
void init() {
input_in::make_input();
input_in::pullup();
}
const typedef avrlib::pin<Port, input_pin> input_in;
};
#endif /* INPUT_H_ */
@@ -18,7 +18,7 @@ template <typename Port, int cspin, int misopin, int mosipin, int sckpin, int mo
class Spi {
public:
Spi() {
init();
this->init();
}
void CSOn() {
cs::make_low();
@@ -27,13 +27,13 @@ class Spi {
cs::make_high();
}
uint8_t send(uint8_t data) {
uint8_t r;
if(mode == 0) {
r = send_hard(data);
} else {
r = send_soft(data);
}
return r;
return this->send_hard(data);
}
return this->send_soft(data);
}
uint8_t has_data() {
return !miso::read();
}
private:
const typedef avrlib::pin<Port, cspin> cs;
@@ -41,20 +41,16 @@ class Spi {
const typedef avrlib::pin<Port, mosipin> mosi;
const typedef avrlib::pin<Port, sckpin> sck;
void init() {
init_port();
this->init_port();
if(mode == 0) {
init_spi();
this->init_spi();
}
}
void init_port() {
mosi::make_output();
mosi::make_low();
sck::make_output();
sck::make_low();
cs::make_output();
cs::make_high();
miso::make_input();
miso::make_low();
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<<SPE) | (1<<MSTR);
@@ -62,23 +58,22 @@ class Spi {
}
uint8_t send_soft(uint8_t data) {
uint8_t datain=0;
for (uint8_t a=8; a>0; a--) { //das Byte wird Bitweise nacheinander Gesendet MSB zuerst
datain <<= 1; //Schieben um das Richtige Bit zusetzen
sck::make_low(); // Clock auf LOW
if (data & 0x80) { //Ist Bit a in Byte gesetzt
mosi::make_high(); //Set Output High
} else {
mosi::make_low(); //Set Output Low
for (uint8_t i=0; i<8; i++)
{
if (data & 0x80) {
mosi::make_high();
}
_delay_us(1);
if(miso::read()) //Lesen des Pegels
{
else {
mosi::make_low();
}
datain <<= 1;
if(miso::read()) {
datain |= 1;
}
_delay_us(1);
sck::make_high(); // Clock auf High
_delay_us(2);
data<<=1; //Schiebe um nächstes Bit zusenden
sck::make_high();
data<<=1;
_delay_us(0.3);
sck::make_low();
}
return datain;
}
@@ -1,33 +0,0 @@
/*
* Start.hpp
*
* Created: 08.05.2014 17:55:29
* Author: netz
*/
#ifndef START_H_
#define START_H_
#include "hardware/pin.hpp"
template <typename Port, int start_pin>
class Start {
public:
Start() {
init();
}
uint8_t is_pressed() {
return (!start_in::read());
}
private:
void init() {
start_in::make_input();
start_in::pullup();
}
const typedef avrlib::pin<Port, start_pin> start_in;
};
#endif /* START_H_ */
@@ -9,22 +9,66 @@
#ifndef RFM12_H_
#define RFM12_H_
#define RF12FREQ(freq) ((freq-430.0)/0.0025)
//#define RF12FREQ(frequenz) ((frequenz-430.0)/0.0025)
template <typename spi, uint8_t bandwidth, uint8_t gain, uint8_t drssi, uint16_t freq, uint16_t baud, uint8_t power, uint8_t mod>
template <typename Spi, uint8_t bandwidth, uint8_t gain, uint8_t drssi, uint32_t freq, uint16_t baud, uint8_t power, uint8_t mod>
class Rfm12 {
public:
Rfm12() {
this->init();
init();
}
void send(uint16_t t) {
void send(uint16_t data) {
s.CSOn();
s.send((uint8_t)t>>8);
s.send((uint8_t)t);
s.send_16(data);
// s.send((uint8_t)(t >> 8));
// s.send((uint8_t)t);
s.CSOff();
}
void beginasyncrx() {
this->send(0x82C8); // RX on
this->send(0xCA81); // set FIFO mode
this->send(0xCA83); // enable FIFO
}
uint8_t hasdata() {
s.CSOn();
uint8_t ret = s.has_data();
s.CSOff();
return ret;
}
void ready(void)
{
s.CSOn();
while (!s.has_data()); // wait until FIFO ready
}
void endasyncrx() {
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;
Spi s;
void init() {
this->send(0xC0E0); // AVR CLK: 10MHz
this->send(0x80D7); // Enable FIFO
@@ -43,12 +87,13 @@ class Rfm12 {
this->send(0x9400|((bandwidth&7)<<5)|((gain&3)<<3)|(drssi&7));
}
void setfreq() {
if (freq<96) { // 430,2400MHz
freq=96;
} else if (freq>3903) { // 439,7575MHz
freq=3903;
uint16_t frequenz = (uint16_t)((freq-430000)/0.0025);
if (frequenz<96) { // 430,2400MHz
this->send(0xA000|96);
} else if (frequenz>3903) { // 439,7575MHz
this->send(0xA000|3903);
}
this->send(0xA000|freq);
this->send(0xA000|frequenz);
}
void setbaud() {
if (baud<663) {
@@ -32,25 +32,42 @@ typedef Servo< //640, 105, 210, 8 Blaue Servos
8 //Schrittweite
> servoclass;
#include "io/Start.hpp"
typedef Start<
#include "io/Input.hpp"
typedef Input<
avrlib::portd, //Startknopf an PORTD
PIND3 //Pin an dem der Startknopf hängt
> startclass;
typedef Input<
avrlib::portd, //Bewegungsmelder an PORTD
PIND2 //Pin an dem der Bewegungsmelder hängt
> moveclass;
#include "io/Spi.hpp"
typedef Spi<
typedef Spi< //<typename Port, int cspin, int misopin, int mosipin, int sckpin, int mode>
avrlib::portc, //Funkmodul an PORTC
PINC4, //CS Pin (nSEL)
PINC3, //MOSI Pin (SDO)
PINC0, //MISO Pin (SDI)
PINC1, //SCK Pin
PINC3, //MISO Pin (SDO)
PINC0, //MOSI Pin (SDI)
PINC1, //SCK Pin
1 //0 Hardware, 1 Software
> spiclass;
#include "io/rfm12.hpp"
ledclass l;
/*#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;*/
#include "rf12.hpp"
typedef Rf12<
spiclass, //SPI Hardware
1, //Bandwidth // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm
0, //Gain
@@ -59,6 +76,10 @@ typedef Rfm12<
9600, //Baudrate // 9600 baud
0, //Power // 1mW Ausgangsleistung, 120kHz Frequenzshift
6 //Mod
> rfm12class;
> rf12class;
/*extern "C" {
#include "rf12.h"
};*/
#endif /* PERIPHERAL_H_ */
@@ -0,0 +1,32 @@
/*
* rf12.h
*
* Created: 25.03.2013 00:25:08
* Author: netz
*/
#ifndef RF12_H_
#define RF12_H_
extern uint16_t rf12_trans(uint16_t wert); // transfer 1 word to/from module
extern void rf12_init(void); // initialize module
extern void rf12_setfreq(uint16_t freq); // set center frequency
extern void rf12_setbaud(uint16_t baud); // set baudrate
extern void rf12_setpower(uint8_t power, uint8_t mod); // set transmission settings
extern void rf12_setbandwidth(uint8_t bandwidth, uint8_t gain, uint8_t drssi); // set receiver settings
extern void rf12_txdata(uint8_t *data, uint8_t number); // transmit number of bytes from array
extern void rf12_rxdata(uint8_t *data, uint8_t number); // receive number of bytes into array
extern void rf12_ready(void); // wait until FIFO ready (to transmit/read data)
extern void rf12_txpacket(uint8_t addr, uint8_t from, uint8_t data); // Send two bytes over the air
extern void rf12_beginasyncrx(); // Init RX of Bytes
extern uint8_t rf12_hasdata(); // Returns 0 if Bytes are there
extern uint8_t rf12_rxbyte(); // Rx one Byte
extern void rf12_endasyncrx(); // End RX of Bytes
#define RF12FREQ(freq) ((freq-430.0)/0.0025) // macro for calculating frequency value out of frequency in MHz
#include "global.h"
#include "config.h"
#endif /* RF12_H_ */
@@ -0,0 +1,161 @@
/*
* rf12.hpp
*
* Created: 24.03.2013 23:52:52
* Author: netz
*/
#ifndef RF12_H_
#define RF12_H_
#include <avr/io.h>
//#include "rf12.h"
#include <util/delay.h>
#define RF12FREQ(freq) ((freq-430.0)/0.0025) // macro for calculating frequency value out of frequency in MHz
#include "config.h"
template <typename Spi, uint8_t bandwidth, uint8_t gain, uint8_t drssi, uint16_t freq, uint16_t baud, uint8_t power, uint8_t mod>
class Rf12 {
public:
Rf12() {
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 rf12_txdata(uint8_t *data, uint8_t number) {
uint8_t i;
this->send(0x8238); // TX on
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB82D);
rf12_ready();
this->send(0xB8D4);
for (i=0; i<number; i++)
{
rf12_ready();
this->send(0xB800|(*data++));
}
rf12_ready();
this->send(0x8208); // TX off
}
void rf12_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; i<number; i++)
{
rf12_ready();
*data++=this->send(0xB000);
}
this->send(0x8208); // RX off
}
void rf12_txpacket(uint8_t addr, uint8_t from, uint8_t data) {
this->send(0x8238); // TX on
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB8AA);
rf12_ready();
this->send(0xB82D);
rf12_ready();
this->send(0xB8D4);
rf12_ready();
this->send(0xB800|addr);
rf12_ready();
this->send(0xB800|from);
rf12_ready();
this->send(0xB800|data);
rf12_ready();
this->send(0xB800);
rf12_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() {
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 /* RF12_H_ */