Commit 79af9ae1 authored by Morten Liland's avatar Morten Liland

fix

parent 39f31634
......@@ -5,68 +5,68 @@
:100040000C9451000C9451000C9451000C945100EC
:100050000C9451000C9451000C9451000C945100DC
:100060000C9451000C94510011241FBECFEFD4E02A
:10007000DEBFCDBF11E0A0E0B1E0E8E1F4E002C0F6
:10007000DEBFCDBF11E0A0E0B1E0E0E2F4E002C0FD
:1000800005900D92A234B107D9F721E0A2E4B1E0C6
:1000900001C01D92A236B207E1F70E942E010C9416
:1000A0000A020C940000EAE7F0E087E88083ACE7FE
:1000B000B0E08C91807F84608C93109244018081A9
:1000C00080648083089580917A0084FF88C0809145
:1000D0004401813009F03FC080917800909179000F
:1000E000A8E4B1E0E0914501F0E0EE0FFF1FE85B0E
:1000F000FE4F91838083ECE7F0E08081807F846015
:10010000808310924401809145018F5F83708093BA
:1001100045012D913C91119712968D919C911397C9
:10012000820F931F14962D913C911597820F931F68
:1001300016962D913C911797820F931F9093430130
:1001400080934201929582958F7089279F708927AD
:10015000809300013FC08091780090917900A0E5E4
:10016000B1E0E0914601F0E0EE0FFF1FE05BFE4FD3
:1001700091838083ECE7F0E08081807F85608083DD
:1001800081E080934401809146018F5F837080936A
:1001900046012D913C91119712968D919C91139748
:1001A000820F931F14962D913C911597820F931FE8
:1001B00016962D913C911797820F931F90934301B0
:1001C00080934201929582958F7089279F7089272D
:1001D00080934701EAE7F0E080818065808308959D
:1001E000809147010895809100010895589A599A85
:1001F0005A9A5B9A429A439A5C9A5F9A089586B19A
:1002000056B199B149B182FB882780F9441F442730
:10021000441F28E0429F800D112453FB222720F920
:1002200030E0220F331F280F94FB882780F994E0D9
:10023000899F200D1124822F089529B1322F31700A
:1002400099B19270292F230F99B19470920F89B1AF
:100250008870890F089586B1817008950E94F60014
:100260000E94C0010E9453000E9449010E94E601C1
:100270000E9463000E9466010E942B018823C1F343
:100280000E94A2010E94B5010E942B018111FCCFA6
:10029000EFCF0E941D01E82FF0E0EE0FFF1FEF5D92
:1002A000FE4F8081918190935B0180935A010E945F
:1002B000FF00E82FF0E0EE0FFF1FEF5FFE4F8081A1
:1002C000918190935901809358010895CF92DF92C4
:1002D000EF92FF92C0905A01D0905B01E12CF12C7B
:1002E0000E94F000A82FB0E0A70196010E94F00143
:1002F000BB27A92F982F872F90935F0180935E01D2
:10030000C0905801D0905901E12CF12C0E94F300CB
:10031000A82FB0E0A70196010E94F001BB27A92FEA
:10032000982F872F2091580130915901B901680FFA
:10033000791F70935D0160935C01FF90EF90DF90F7
:10034000CF9008950E94ED0180915E0190915F0130
:100350000E94CB010E942B01882321F00E94D6012C
:100360008823C1F30E94EB01089580915C01909174
:100370005D010E94CB010E94D6018823E1F308951C
:10038000559A87E087BD83E284BD88E085BD82E021
:100390008093810008952091840030918500820F20
:1003A000931F9093610180936001089520918400D0
:1003B000309185008091600190916101281B390B7B
:1003C00081E0121613060CF080E0089518BC85B584
:1003D000816085BD089518BC089586E088BD0895A4
:1003E0000E94FB01A59F900DB49F900DA49F800DCE
:1003F000911D11240895A29FB001B39FC001A39F36
:10040000700D811D1124911DB29F700D811D11244D
:08041000911D0895F894FFCF3F
:10041800FF6400C800900158022003E803B0047884
:100428000540060807D00798086009280AF00AB8A6
:100438000B02006400C8002C019001F4015802BCB2
:100448000220038403E803B004780540060807D0B7
:0204580007009B
:1000900001C01D92A236B207E1F70E9431010C9413
:1000A0000E020C940000EAE7F0E087E88083ACE7FA
:1000B000B0E080E48C938C91807F84608C9310926C
:1000C0004401808180648083089580917A0084FF58
:1000D00088C080914401813009F03FC08091780050
:1000E00090917900A8E4B1E0E0914501F0E0EE0FD5
:1000F000FF1FE85BFE4F91838083ECE7F0E0808197
:10010000807F8460808310924401809145018F5FDD
:100110008370809345012D913C91119712968D919A
:100120009C911397820F931F14962D913C911597D4
:10013000820F931F16962D913C911797820F931F54
:100140009093430180934201929582958F70892705
:100150009F708927809300013FC080917800909123
:100160007900A0E5B1E0E0914601F0E0EE0FFF1F5D
:10017000E05BFE4F91838083ECE7F0E08081807F3D
:100180008560808381E080934401809146018F5F88
:100190008370809346012D913C91119712968D9119
:1001A0009C911397820F931F14962D913C91159754
:1001B000820F931F16962D913C911797820F931FD4
:1001C0009093430180934201929582958F70892785
:1001D0009F70892780934701EAE7F0E0808180657E
:1001E00080830895809147010895809100010895CA
:1001F000589A599A5A9A5B9A429A439A5C9A5F9A89
:10020000089586B156B199B149B182FB882780F92A
:10021000441F4427441F28E0429F800D112453FBB4
:10022000222720F930E0220F331F280F94FB882764
:1002300080F994E0899F200D1124822F089529B11F
:10024000322F317099B19270292F230F99B1947088
:10025000920F89B18870890F089586B18095817059
:1002600008950E94F8000E94C3010E9453000E945A
:100270004C010E94E9010E9465000E9469010E94F0
:100280002D018823C1F30E94A5010E94B8010E949C
:100290002D018111FCCFEFCF0E941F01E82FF0E06C
:1002A000EE0FFF1FEF5DFE4F8081918190935B0108
:1002B00080935A010E940101E82FF0E0EE0FFF1F2A
:1002C000EF5FFE4F80819181909359018093580197
:1002D0000895CF92DF92EF92FF92C0905A01D09092
:1002E0005B01E12CF12C0E94F200A82FB0E0A701E5
:1002F00096010E94F401BB27A92F982F872F909376
:100300005F0180935E01C0905801D0905901E12CAB
:10031000F12C0E94F500A82FB0E0A70196010E94E1
:10032000F401BB27A92F982F872F209158013091D6
:100330005901B901680F791F70935D0160935C01E9
:10034000FF90EF90DF90CF9008950E94F20180918E
:100350005E0190915F010E94CE010E942D018823D1
:1003600021F00E94D9018823C1F30E94EF01089572
:1003700080915C0190915D010E94CE010E94D901A3
:100380008823E1F30895559A87E087BD83E284BD11
:1003900088E085BD82E080938100089520918400EB
:1003A00030918500820F931F9093610180936001CB
:1003B0000895209184003091850080916001909192
:1003C0006101281B390B81E0121613060CF080E046
:1003D000089586E088BD85B5816085BD089586E075
:1003E00088BD089518BC08950E94FF01A59F900D37
:1003F000B49F900DA49F800D911D11240895A29F7C
:10040000B001B39FC001A39F700D811D1124911DE8
:10041000B29F700D811D1124911D0895F894FFCF96
:10042000FF6400C800900158022003E803B004787C
:100430000540060807D00798086009280AF00AB89E
:100440000B02006400C8002C019001F4015802BCAA
:100450000220038403E803B004780540060807D0AF
:02046000070093
:00000001FF
This diff is collapsed.
......@@ -237,7 +237,7 @@ END GROUP
.rela.plt
*(.rela.plt)
.text 0x00000000 0x418
.text 0x00000000 0x420
*(.vectors)
.vectors 0x00000000 0x68 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/atmega168/avr5/crtatmega168.o
0x00000000 __vector_default
......@@ -325,72 +325,72 @@ END GROUP
0x000000a6 . = ALIGN (0x2)
*(.text.*)
.text.adc_init
0x000000a6 0x20 adc.o
0x000000a6 0x24 adc.o
0x000000a6 adc_init
.text.adc_update
0x000000c6 0x11a adc.o
0x000000c6 adc_update
0x000000ca 0x11a adc.o
0x000000ca adc_update
.text.adc_ontime
0x000001e0 0x6 adc.o
0x000001e0 adc_ontime
0x000001e4 0x6 adc.o
0x000001e4 adc_ontime
.text.adc_offtime
0x000001e6 0x6 adc.o
0x000001e6 adc_offtime
0x000001ea 0x6 adc.o
0x000001ea adc_offtime
.text.gpio_init
0x000001ec 0x12 gpio.o
0x000001ec gpio_init
0x000001f0 0x12 gpio.o
0x000001f0 gpio_init
.text.gpio_get_offtime
0x000001fe 0x3c gpio.o
0x000001fe gpio_get_offtime
0x00000202 0x3c gpio.o
0x00000202 gpio_get_offtime
.text.gpio_get_ontime
0x0000023a 0x1c gpio.o
0x0000023a gpio_get_ontime
0x0000023e 0x1c gpio.o
0x0000023e gpio_get_ontime
.text.gpio_get_input
0x00000256 0x6 gpio.o
0x00000256 gpio_get_input
.text.main 0x0000025c 0x36 main.o
0x0000025c main
0x0000025a 0x8 gpio.o
0x0000025a gpio_get_input
.text.main 0x00000262 0x36 main.o
0x00000262 main
.text.optic_init
0x00000292 0x3a optic.o
0x00000292 optic_init
0x00000298 0x3a optic.o
0x00000298 optic_init
.text.optic_update
0x000002cc 0x78 optic.o
0x000002cc optic_update
0x000002d2 0x78 optic.o
0x000002d2 optic_update
.text.optic_pulse
0x00000344 0x26 optic.o
0x00000344 optic_pulse
0x0000034a 0x26 optic.o
0x0000034a optic_pulse
.text.optic_deadtime_wait
0x0000036a 0x16 optic.o
0x0000036a optic_deadtime_wait
0x00000370 0x16 optic.o
0x00000370 optic_deadtime_wait
.text.timer_init
0x00000380 0x16 timer.o
0x00000380 timer_init
0x00000386 0x16 timer.o
0x00000386 timer_init
.text.timeout_start
0x00000396 0x16 timer.o
0x00000396 timeout_start
0x0000039c 0x16 timer.o
0x0000039c timeout_start
.text.timeout_done
0x000003ac 0x20 timer.o
0x000003ac timeout_done
0x000003b2 0x20 timer.o
0x000003b2 timeout_done
.text.timer_pwm_start
0x000003cc 0xa timer.o
0x000003cc timer_pwm_start
0x000003d2 0xc timer.o
0x000003d2 timer_pwm_start
.text.timer_pwm_25
0x000003d6 0x4 timer.o
0x000003d6 timer_pwm_25
0x000003de 0x6 timer.o
0x000003de timer_pwm_25
.text.timer_pwm_75
0x000003da 0x6 timer.o
0x000003da timer_pwm_75
0x000003e4 0x4 timer.o
0x000003e4 timer_pwm_75
.text.libgcc.mul
0x000003e0 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_muluhisi3.o)
0x000003e0 __muluhisi3
0x000003e8 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_muluhisi3.o)
0x000003e8 __muluhisi3
.text.libgcc.mul
0x000003f6 0x1e c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_umulhisi3.o)
0x000003f6 __umulhisi3
0x00000414 . = ALIGN (0x2)
0x000003fe 0x1e c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_umulhisi3.o)
0x000003fe __umulhisi3
0x0000041c . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000414 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
0x00000414 _exit
0x00000414 exit
.fini9 0x0000041c 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
0x0000041c _exit
0x0000041c exit
*(.fini9)
*(.fini8)
*(.fini8)
......@@ -409,11 +409,11 @@ END GROUP
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000414 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
.fini0 0x0000041c 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
*(.fini0)
0x00000418 _etext = .
0x00000420 _etext = .
.data 0x00800100 0x42 load address 0x00000418
.data 0x00800100 0x42 load address 0x00000420
0x00800100 PROVIDE (__data_start, .)
*(.data)
*(.data*)
......@@ -461,8 +461,8 @@ END GROUP
.bss.timeout 0x00800160 0x2 timer.o
*(COMMON)
0x00800162 PROVIDE (__bss_end, .)
0x00000418 __data_load_start = LOADADDR (.data)
0x0000045a __data_load_end = (__data_load_start + SIZEOF (.data))
0x00000420 __data_load_start = LOADADDR (.data)
0x00000462 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800162 0x0
[!provide] PROVIDE (__noinit_start, .)
......@@ -571,14 +571,14 @@ END GROUP
.debug_abbrev 0x00000769 0xbc optic.o
.debug_abbrev 0x00000825 0xa3 timer.o
.debug_line 0x00000000 0x729
.debug_line 0x00000000 0x72f
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0x133 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/atmega168/avr5/crtatmega168.o
.debug_line 0x00000133 0x14a adc.o
.debug_line 0x0000027d 0x14f gpio.o
.debug_line 0x000003cc 0xa8 main.o
.debug_line 0x00000474 0x164 optic.o
.debug_line 0x000005d8 0x151 timer.o
.debug_line 0x00000133 0x150 adc.o
.debug_line 0x00000283 0x14f gpio.o
.debug_line 0x000003d2 0xa8 main.o
.debug_line 0x0000047a 0x164 optic.o
.debug_line 0x000005de 0x151 timer.o
.debug_frame 0x00000000 0x1b8
*(.debug_frame)
......@@ -588,19 +588,19 @@ END GROUP
.debug_frame 0x000000cc 0x68 optic.o
.debug_frame 0x00000134 0x84 timer.o
.debug_str 0x00000000 0x548
.debug_str 0x00000000 0x57a
*(.debug_str)
.debug_str 0x00000000 0x208 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/atmega168/avr5/crtatmega168.o
.debug_str 0x00000208 0x1d7 adc.o
0x20b (size before relaxing)
.debug_str 0x000003df 0x4d gpio.o
0x18a (size before relaxing)
.debug_str 0x0000042c 0x64 main.o
0x1c6 (size before relaxing)
.debug_str 0x00000490 0x94 optic.o
0x25a (size before relaxing)
.debug_str 0x00000524 0x24 timer.o
0x1c7 (size before relaxing)
.debug_str 0x00000208 0x209 adc.o
0x23d (size before relaxing)
.debug_str 0x00000411 0x4d gpio.o
0x1bc (size before relaxing)
.debug_str 0x0000045e 0x64 main.o
0x1f8 (size before relaxing)
.debug_str 0x000004c2 0x94 optic.o
0x28c (size before relaxing)
.debug_str 0x00000556 0x24 timer.o
0x1f9 (size before relaxing)
.debug_loc 0x00000000 0x16d
*(.debug_loc)
......
......@@ -6,68 +6,68 @@ S11300300C9451000C9451000C9451000C945100F8
S11300400C9451000C9451000C9451000C945100E8
S11300500C9451000C9451000C9451000C945100D8
S11300600C9451000C94510011241FBECFEFD4E026
S1130070DEBFCDBF11E0A0E0B1E0E8E1F4E002C0F2
S1130070DEBFCDBF11E0A0E0B1E0E0E2F4E002C0F9
S113008005900D92A234B107D9F721E0A2E4B1E0C2
S113009001C01D92A236B207E1F70E942E010C9412
S11300A00A020C940000EAE7F0E087E88083ACE7FA
S11300B0B0E08C91807F84608C93109244018081A5
S11300C080648083089580917A0084FF88C0809141
S11300D04401813009F03FC080917800909179000B
S11300E0A8E4B1E0E0914501F0E0EE0FFF1FE85B0A
S11300F0FE4F91838083ECE7F0E08081807F846011
S1130100808310924401809145018F5F83708093B6
S113011045012D913C91119712968D919C911397C5
S1130120820F931F14962D913C911597820F931F64
S113013016962D913C911797820F931F909343012C
S113014080934201929582958F7089279F708927A9
S1130150809300013FC08091780090917900A0E5E0
S1130160B1E0E0914601F0E0EE0FFF1FE05BFE4FCF
S113017091838083ECE7F0E08081807F85608083D9
S113018081E080934401809146018F5F8370809366
S113019046012D913C91119712968D919C91139744
S11301A0820F931F14962D913C911597820F931FE4
S11301B016962D913C911797820F931F90934301AC
S11301C080934201929582958F7089279F70892729
S11301D080934701EAE7F0E0808180658083089599
S11301E0809147010895809100010895589A599A81
S11301F05A9A5B9A429A439A5C9A5F9A089586B196
S113020056B199B149B182FB882780F9441F44272C
S1130210441F28E0429F800D112453FB222720F91C
S113022030E0220F331F280F94FB882780F994E0D5
S1130230899F200D1124822F089529B1322F317006
S113024099B19270292F230F99B19470920F89B1AB
S11302508870890F089586B1817008950E94F60010
S11302600E94C0010E9453000E9449010E94E601BD
S11302700E9463000E9466010E942B018823C1F33F
S11302800E94A2010E94B5010E942B018111FCCFA2
S1130290EFCF0E941D01E82FF0E0EE0FFF1FEF5D8E
S11302A0FE4F8081918190935B0180935A010E945B
S11302B0FF00E82FF0E0EE0FFF1FEF5FFE4F80819D
S11302C0918190935901809358010895CF92DF92C0
S11302D0EF92FF92C0905A01D0905B01E12CF12C77
S11302E00E94F000A82FB0E0A70196010E94F0013F
S11302F0BB27A92F982F872F90935F0180935E01CE
S1130300C0905801D0905901E12CF12C0E94F300C7
S1130310A82FB0E0A70196010E94F001BB27A92FE6
S1130320982F872F2091580130915901B901680FF6
S1130330791F70935D0160935C01FF90EF90DF90F3
S1130340CF9008950E94ED0180915E0190915F012C
S11303500E94CB010E942B01882321F00E94D60128
S11303608823C1F30E94EB01089580915C01909170
S11303705D010E94CB010E94D6018823E1F3089518
S1130380559A87E087BD83E284BD88E085BD82E01D
S11303908093810008952091840030918500820F1C
S11303A0931F9093610180936001089520918400CC
S11303B0309185008091600190916101281B390B77
S11303C081E0121613060CF080E0089518BC85B580
S11303D0816085BD089518BC089586E088BD0895A0
S11303E00E94FB01A59F900DB49F900DA49F800DCA
S11303F0911D11240895A29FB001B39FC001A39F32
S1130400700D811D1124911DB29F700D811D112449
S10B0410911D0895F894FFCF3B
S1130418FF6400C800900158022003E803B0047880
S11304280540060807D00798086009280AF00AB8A2
S11304380B02006400C8002C019001F4015802BCAE
S11304480220038403E803B004780540060807D0B3
S1050458070097
S113009001C01D92A236B207E1F70E9431010C940F
S11300A00E020C940000EAE7F0E087E88083ACE7F6
S11300B0B0E080E48C938C91807F84608C93109268
S11300C04401808180648083089580917A0084FF54
S11300D088C080914401813009F03FC0809178004C
S11300E090917900A8E4B1E0E0914501F0E0EE0FD1
S11300F0FF1FE85BFE4F91838083ECE7F0E0808193
S1130100807F8460808310924401809145018F5FD9
S11301108370809345012D913C91119712968D9196
S11301209C911397820F931F14962D913C911597D0
S1130130820F931F16962D913C911797820F931F50
S11301409093430180934201929582958F70892701
S11301509F708927809300013FC08091780090911F
S11301607900A0E5B1E0E0914601F0E0EE0FFF1F59
S1130170E05BFE4F91838083ECE7F0E08081807F39
S11301808560808381E080934401809146018F5F84
S11301908370809346012D913C91119712968D9115
S11301A09C911397820F931F14962D913C91159750
S11301B0820F931F16962D913C911797820F931FD0
S11301C09093430180934201929582958F70892781
S11301D09F70892780934701EAE7F0E0808180657A
S11301E080830895809147010895809100010895C6
S11301F0589A599A5A9A5B9A429A439A5C9A5F9A85
S1130200089586B156B199B149B182FB882780F926
S1130210441F4427441F28E0429F800D112453FBB0
S1130220222720F930E0220F331F280F94FB882760
S113023080F994E0899F200D1124822F089529B11B
S1130240322F317099B19270292F230F99B1947084
S1130250920F89B18870890F089586B18095817055
S113026008950E94F8000E94C3010E9453000E9456
S11302704C010E94E9010E9465000E9469010E94EC
S11302802D018823C1F30E94A5010E94B8010E9498
S11302902D018111FCCFEFCF0E941F01E82FF0E068
S11302A0EE0FFF1FEF5DFE4F8081918190935B0104
S11302B080935A010E940101E82FF0E0EE0FFF1F26
S11302C0EF5FFE4F80819181909359018093580193
S11302D00895CF92DF92EF92FF92C0905A01D0908E
S11302E05B01E12CF12C0E94F200A82FB0E0A701E1
S11302F096010E94F401BB27A92F982F872F909372
S11303005F0180935E01C0905801D0905901E12CA7
S1130310F12C0E94F500A82FB0E0A70196010E94DD
S1130320F401BB27A92F982F872F209158013091D2
S11303305901B901680F791F70935D0160935C01E5
S1130340FF90EF90DF90CF9008950E94F20180918A
S11303505E0190915F010E94CE010E942D018823CD
S113036021F00E94D9018823C1F30E94EF0108956E
S113037080915C0190915D010E94CE010E94D9019F
S11303808823E1F30895559A87E087BD83E284BD0D
S113039088E085BD82E080938100089520918400E7
S11303A030918500820F931F9093610180936001C7
S11303B0089520918400309185008091600190918E
S11303C06101281B390B81E0121613060CF080E042
S11303D0089586E088BD85B5816085BD089586E071
S11303E088BD089518BC08950E94FF01A59F900D33
S11303F0B49F900DA49F800D911D11240895A29F78
S1130400B001B39FC001A39F700D811D1124911DE4
S1130410B29F700D811D1124911D0895F894FFCF92
S1130420FF6400C800900158022003E803B0047878
S11304300540060807D00798086009280AF00AB89A
S11304400B02006400C8002C019001F4015802BCA6
S11304500220038403E803B004780540060807D0AB
S105046007008F
S9030000FC
......@@ -21,6 +21,9 @@ void adc_init( void )
//enable
ADCSRA = (1 << ADEN)|(7 << ADPS0); // enable and set clock to 16MHz / 128 = 125kHz
ADMUX = (1 << REFS0);
//set mux
ADMUX = (ADMUX & ~ADC_MUX_bm) | ADC_ONTIME_ADC_MUX_gc;
adc_channel_select = ADC_ONTIME_SELECT;
......
......@@ -45,5 +45,5 @@ uint8_t gpio_get_ontime( void )
uint8_t gpio_get_input( void )
{
return !!(GPIO_SIGNAL_INPUT_PIN & GPIO_SIGNAL_INPUT_PIN0_bm);
return !(GPIO_SIGNAL_INPUT_PIN & GPIO_SIGNAL_INPUT_PIN0_bm);
}
\ No newline at end of file
......@@ -45,7 +45,7 @@ uint8_t timeout_done( void )
void timer_pwm_start( void )
{
OCR0B = 0; //25%
OCR0B = 6; //25%
TCCR0B |= (1 << CS00); // Full speed!
}
......@@ -53,14 +53,14 @@ void timer_pwm_start( void )
void timer_pwm_25( void )
{
OCR0B = 0;
OCR0B = 6;
}
void timer_pwm_75( void )
{
OCR0B = 6;
OCR0B = 0;
}
......
......@@ -16,7 +16,7 @@
<Name>underp</Name>
<RootNamespace>underp</RootNamespace>
<ToolchainFlavour>Native</ToolchainFlavour>
<KeepTimersRunning>true</KeepTimersRunning>
<KeepTimersRunning>false</KeepTimersRunning>
<OverrideVtor>false</OverrideVtor>
<CacheFlash>true</CacheFlash>
<ProgFlashFromRam>true</ProgFlashFromRam>
......@@ -28,107 +28,109 @@
<eraseonlaunchrule>1</eraseonlaunchrule>
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.34.1" />
</dependencies>
</framework-data>
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.34.1" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
<avrtoolserialnumber>J41800025400</avrtoolserialnumber>
<avrtoolserialnumber>J41800025573</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E9406</avrdeviceexpectedsignature>
<com_atmel_avrdbg_tool_atmelice>
<ToolOptions>
<InterfaceProperties>
<IspClock>125000</IspClock>
</InterfaceProperties>
<InterfaceName>debugWIRE</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
<ToolNumber>J41800025400</ToolNumber>
<ToolNumber>J41800025573</ToolNumber>
<ToolName>Atmel-ICE</ToolName>
</com_atmel_avrdbg_tool_atmelice>
<avrtoolinterface>debugWIRE</avrtoolinterface>
<avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega168 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega168"</avrgcc.common.Device>
<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.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<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.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<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>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
<avrgcc.common.Device>-mmcu=atmega168 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega168"</avrgcc.common.Device>
<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.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<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.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<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>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega168 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega168"</avrgcc.common.Device>