@ -1,258 +0,0 @@
|
||||
# See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
##############################################################
|
||||
|
||||
menu.cpu=Processor
|
||||
|
||||
########################################
|
||||
## RAMBo
|
||||
########################################
|
||||
rambo.name=RAMBo
|
||||
|
||||
rambo.upload.tool=arduino:avrdude
|
||||
rambo.upload.protocol=wiring
|
||||
rambo.upload.maximum_size=258048
|
||||
rambo.upload.speed=115200
|
||||
|
||||
rambo.bootloader.low_fuses=0xFF
|
||||
rambo.bootloader.high_fuses=0xD8
|
||||
rambo.bootloader.extended_fuses=0xFD
|
||||
rambo.bootloader.path=stk500v2
|
||||
rambo.bootloader.file=stk500boot_v2_mega2560.hex
|
||||
rambo.bootloader.unlock_bits=0x3F
|
||||
rambo.bootloader.lock_bits=0x0F
|
||||
|
||||
rambo.build.mcu=atmega2560
|
||||
rambo.build.f_cpu=16000000L
|
||||
rambo.build.board=AVR_RAMBO
|
||||
rambo.build.core=arduino:arduino
|
||||
rambo.build.variant=rambo
|
||||
|
||||
########################################
|
||||
## Sanguino
|
||||
########################################
|
||||
sanguino.name=Sanguino
|
||||
|
||||
sanguino.upload.tool=arduino:avrdude
|
||||
sanguino.upload.protocol=stk500
|
||||
sanguino.upload.maximum_size=131072
|
||||
sanguino.upload.speed=57600
|
||||
|
||||
sanguino.bootloader.low_fuses=0xD6
|
||||
sanguino.bootloader.high_fuses=0xDA
|
||||
sanguino.bootloader.extended_fuses=0xFD
|
||||
sanguino.bootloader.path=atmega
|
||||
sanguino.bootloader.unlock_bits=0x3F
|
||||
sanguino.bootloader.lock_bits=0x0F
|
||||
|
||||
sanguino.build.mcu=atmega1284p
|
||||
sanguino.build.f_cpu=16000000L
|
||||
sanguino.build.board=AVR_SANGUINO
|
||||
sanguino.build.core=arduino:arduino
|
||||
sanguino.build.variant=sanguino
|
||||
|
||||
sanguino.menu.cpu.atmega644=ATmega644P
|
||||
sanguino.menu.cpu.atmega644.upload.maximum_size=63488
|
||||
sanguino.menu.cpu.atmega644.bootloader.low_fuses=0xFF
|
||||
sanguino.menu.cpu.atmega644.bootloader.high_fuses=0x9A
|
||||
sanguino.menu.cpu.atmega644.bootloader.extended_fuses=0xFF
|
||||
sanguino.menu.cpu.atmega644.bootloader.file=ATmegaBOOT_168_atmega644p.hex
|
||||
sanguino.menu.cpu.atmega644.build.mcu=atmega644p
|
||||
|
||||
sanguino.menu.cpu.atmega12848m=ATmega1284p 8MHz
|
||||
sanguino.menu.cpu.atmega12848m.upload.speed=19200
|
||||
sanguino.menu.cpu.atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
|
||||
sanguino.menu.cpu.atmega12848m.build.f_cpu=8000000L
|
||||
|
||||
sanguino.menu.cpu.atmega1284=ATmega1284p 16MHz
|
||||
sanguino.menu.cpu.atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
||||
|
||||
sanguino.menu.cpu.atmega1284m=ATmega1284p 20MHz
|
||||
sanguino.menu.cpu.atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
|
||||
sanguino.menu.cpu.atmega1284m.build.f_cpu=20000000L
|
||||
|
||||
|
||||
########################################
|
||||
## Gen7
|
||||
########################################
|
||||
|
||||
Gen7-644-16.name=Gen7 with ATmega644 and 16 MHz
|
||||
Gen7-644-16.upload.tool=
|
||||
Gen7-644-16.upload.protocol=stk500v2
|
||||
Gen7-644-16.upload.maximum_size=63488
|
||||
Gen7-644-16.upload.speed=115200
|
||||
|
||||
Gen7-644-16.bootloader.low_fuses=0xF7
|
||||
Gen7-644-16.bootloader.high_fuses=0xDC
|
||||
Gen7-644-16.bootloader.extended_fuses=0xFC
|
||||
Gen7-644-16.bootloader.path=Gen7
|
||||
Gen7-644-16.bootloader.file=bootloader-644-16MHz.hex
|
||||
Gen7-644-16.bootloader.unlock_bits=0x3F
|
||||
Gen7-644-16.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-644-16.build.mcu=atmega644
|
||||
Gen7-644-16.build.f_cpu=16000000L
|
||||
Gen7-644-16.build.board=
|
||||
Gen7-644-16.build.core=arduino
|
||||
Gen7-644-16.build.variant=gen7
|
||||
|
||||
***
|
||||
|
||||
Gen7-644-20.name=Gen7 with ATmega644 and 20 MHz
|
||||
Gen7-644-20.upload.tool=
|
||||
Gen7-644-20.upload.protocol=stk500v2
|
||||
Gen7-644-20.upload.maximum_size=63488
|
||||
Gen7-644-20.upload.speed=115200
|
||||
|
||||
Gen7-644-20.bootloader.low_fuses=0xF7
|
||||
Gen7-644-20.bootloader.high_fuses=0xDC
|
||||
Gen7-644-20.bootloader.extended_fuses=0xFC
|
||||
Gen7-644-20.bootloader.path=Gen7
|
||||
Gen7-644-20.bootloader.file=bootloader-644-20MHz.hex
|
||||
Gen7-644-20.bootloader.unlock_bits=0x3F
|
||||
Gen7-644-20.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-644-20.build.mcu=atmega644
|
||||
Gen7-644-20.build.f_cpu=20000000L
|
||||
Gen7-644-20.build.board=
|
||||
Gen7-644-20.build.core=arduino
|
||||
Gen7-644-20.build.variant=gen7
|
||||
|
||||
***
|
||||
|
||||
Gen7-644P-16.name=Gen7 with ATmega644P and 16 MHz
|
||||
Gen7-644P-16.upload.tool=
|
||||
Gen7-644P-16.upload.protocol=stk500v2
|
||||
Gen7-644P-16.upload.maximum_size=63488
|
||||
Gen7-644P-16.upload.speed=115200
|
||||
|
||||
Gen7-644P-16.bootloader.low_fuses=0xF7
|
||||
Gen7-644P-16.bootloader.high_fuses=0xDC
|
||||
Gen7-644P-16.bootloader.extended_fuses=0xFC
|
||||
Gen7-644P-16.bootloader.path=Gen7
|
||||
Gen7-644P-16.bootloader.file=bootloader-644P-16MHz.hex
|
||||
Gen7-644P-16.bootloader.unlock_bits=0x3F
|
||||
Gen7-644P-16.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-644P-16.build.mcu=atmega644p
|
||||
Gen7-644P-16.build.f_cpu=16000000L
|
||||
Gen7-644P-16.build.board=
|
||||
Gen7-644P-16.build.core=arduino
|
||||
Gen7-644P-16.build.variant=gen7
|
||||
|
||||
***
|
||||
|
||||
Gen7-644P-20.name=Gen7 with ATmega644P and 20 MHz
|
||||
Gen7-644P-20.upload.tool=
|
||||
Gen7-644P-20.upload.protocol=stk500v2
|
||||
Gen7-644P-20.upload.maximum_size=63488
|
||||
Gen7-644P-20.upload.speed=115200
|
||||
|
||||
Gen7-644P-20.bootloader.low_fuses=0xF7
|
||||
Gen7-644P-20.bootloader.high_fuses=0xDC
|
||||
Gen7-644P-20.bootloader.extended_fuses=0xFC
|
||||
Gen7-644P-20.bootloader.path=Gen7
|
||||
Gen7-644P-20.bootloader.file=bootloader-644P-20MHz.hex
|
||||
Gen7-644P-20.bootloader.unlock_bits=0x3F
|
||||
Gen7-644P-20.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-644P-20.build.mcu=atmega644p
|
||||
Gen7-644P-20.build.f_cpu=20000000L
|
||||
Gen7-644P-20.build.board=
|
||||
Gen7-644P-20.build.core=arduino
|
||||
Gen7-644P-20.build.variant=gen7
|
||||
|
||||
***
|
||||
|
||||
Gen7-1284P-16.name=Gen7 with ATmega1284P and 16 MHz
|
||||
Gen7-1284P-16.upload.tool=
|
||||
Gen7-1284P-16.upload.protocol=stk500v2
|
||||
Gen7-1284P-16.upload.maximum_size=129024
|
||||
Gen7-1284P-16.upload.speed=115200
|
||||
|
||||
Gen7-1284P-16.bootloader.low_fuses=0xF7
|
||||
Gen7-1284P-16.bootloader.high_fuses=0xDC
|
||||
Gen7-1284P-16.bootloader.extended_fuses=0xFC
|
||||
Gen7-1284P-16.bootloader.path=Gen7
|
||||
Gen7-1284P-16.bootloader.file=bootloader-1284P-16MHz.hex
|
||||
Gen7-1284P-16.bootloader.unlock_bits=0x3F
|
||||
Gen7-1284P-16.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-1284P-16.build.mcu=atmega1284p
|
||||
Gen7-1284P-16.build.f_cpu=16000000L
|
||||
Gen7-1284P-16.build.board=
|
||||
Gen7-1284P-16.build.core=arduino
|
||||
Gen7-1284P-16.build.variant=gen7
|
||||
|
||||
***
|
||||
|
||||
Gen7-1284P-20.name=Gen7 with ATmega1284P and 20 MHz
|
||||
Gen7-1284P-20.upload.tool=
|
||||
Gen7-1284P-20.upload.protocol=stk500v2
|
||||
Gen7-1284P-20.upload.maximum_size=129024
|
||||
Gen7-1284P-20.upload.speed=115200
|
||||
|
||||
Gen7-1284P-20.bootloader.low_fuses=0xF7
|
||||
Gen7-1284P-20.bootloader.high_fuses=0xDC
|
||||
Gen7-1284P-20.bootloader.extended_fuses=0xFC
|
||||
Gen7-1284P-20.bootloader.path=Gen7
|
||||
Gen7-1284P-20.bootloader.file=bootloader-1284P-20MHz.hex
|
||||
Gen7-1284P-20.bootloader.unlock_bits=0x3F
|
||||
Gen7-1284P-20.bootloader.lock_bits=0x0F
|
||||
|
||||
Gen7-1284P-20.build.mcu=atmega1284p
|
||||
Gen7-1284P-20.build.f_cpu=20000000L
|
||||
Gen7-1284P-20.build.board=
|
||||
Gen7-1284P-20.build.core=arduino
|
||||
Gen7-1284P-20.build.variant=gen7
|
||||
|
||||
########################################
|
||||
## Melzi W/ ATmega1284p 16mhz
|
||||
########################################
|
||||
|
||||
melzi1284.name=Melzi W/ ATmega1284p 16mhz
|
||||
melzi1284.upload.tool=
|
||||
melzi1284.upload.protocol=arduino
|
||||
melzi1284.upload.maximum_size=129024
|
||||
melzi1284.upload.speed=57600
|
||||
|
||||
melzi1284.bootloader.low_fuses=0xD6
|
||||
melzi1284.bootloader.high_fuses=0xD4
|
||||
melzi1284.bootloader.extended_fuses=0xFD
|
||||
melzi1284.bootloader.path=atmega644p
|
||||
melzi1284.bootloader.file=ATmegaBOOT_1284P.hex
|
||||
melzi1284.bootloader.unlock_bits=0x3F
|
||||
melzi1284.bootloader.lock_bits=0x0F
|
||||
|
||||
melzi1284.build.mcu=atmega1284p
|
||||
melzi1284.build.f_cpu=16000000L
|
||||
melzi1284.build.board=
|
||||
melzi1284.build.core=arduino
|
||||
melzi1284.build.variant=Melzi
|
||||
|
||||
########################################
|
||||
## OMC with Atmega644 at 20Mhz
|
||||
########################################
|
||||
|
||||
omc.name=OMC with Atmega644 at 20Mhz
|
||||
omc.name.upload.tool=
|
||||
omc.upload.protocol=stk500v2
|
||||
omc.upload.maximum_size=63488
|
||||
omc.upload.maximum_data_size=4096
|
||||
omc.upload.speed=115200
|
||||
|
||||
omc.bootloader.low_fuses=0xE7
|
||||
omc.bootloader.high_fuses=0xD4
|
||||
omc.bootloader.extended_fuses=0xFC
|
||||
omc.bootloader.path=OMC
|
||||
omc.bootloader.file=bootloader-644-20MHz.hex
|
||||
omc.bootloader.unlock_bits=0x3F
|
||||
omc.bootloader.lock_bits=0x0F
|
||||
|
||||
omc.build.mcu=atmega644
|
||||
omc.build.f_cpu=20000000L
|
||||
omc.build.board=AVR_OMC
|
||||
omc.build.core=arduino:arduino
|
||||
omc.build.variant=omc
|
||||
|
||||
|
@ -1,113 +0,0 @@
|
||||
:020000021000EC
|
||||
:10F8000011241FBE8FEF90E49EBF8DBF01C32F92C6
|
||||
:10F810003F924F925F926F927F928F929F92AF92A0
|
||||
:10F82000BF92CF92DF92EF92FF920F931F93DF93DD
|
||||
:10F83000CF93CDB7DEB7C252D1400FB6F894DEBF3A
|
||||
:10F840000FBECDBF44245524DD24C25EDE4F188296
|
||||
:10F85000CE51D1408824992454013AC20E9428FFF5
|
||||
:10F86000282F133059F1143028F4113081F0123060
|
||||
:10F8700000F507C0153081F1153030F1163071F701
|
||||
:10F880003DC08B3159F711E05BE1D52EE7CF8130D8
|
||||
:10F8900041F0C25EDE4F3881CE51D140831709F06E
|
||||
:10F8A00019C2D226C25EDE4F2883CE51D14012E06B
|
||||
:10F8B000D5CFF82EEE24D82613E0D0CF90E0E82A5A
|
||||
:10F8C000F92AD22614E0CACF8E3009F003C2D82616
|
||||
:10F8D00015E044245524C2CFE1E0F0E0EC0FFD1F19
|
||||
:10F8E000E40DF51D80830894411C511CD8264E144C
|
||||
:10F8F0005F0409F0B3CF720116E0B0CF8D1509F0A7
|
||||
:10F90000E9C1EAC1CC2447C08D81803311F090E079
|
||||
:10F910000AC08F81882311F49EE105C0813011F067
|
||||
:10F9200095E001C097E91A821B828D818C838E81BC
|
||||
:10F930008D839E831F8247E0E42EF12C88C11A82BA
|
||||
:10F9400068E06B8383E58C8394E59D83EBE4EE8331
|
||||
:10F9500085E38F8380E3888789878FE58A8782E3C1
|
||||
:10F960008B873BE0E32EF12C72C18A81813941F013
|
||||
:10F97000823941F0803911F48FE005C080E003C086
|
||||
:10F9800082E001C08AE01A828B8323E0E22EF12C10
|
||||
:10F990005EC1CC24C3941A8292E0E92EF12C58C1A6
|
||||
:10F9A0008D81882311F48EE128C0813011F085E02B
|
||||
:10F9B00024C087E922C01A8229E0E1E0F0E0209328
|
||||
:10F9C000570084911BC08B81803589F48C818830ED
|
||||
:10F9D00039F439E0E2E0F0E03093570084910DC053
|
||||
:10F9E00069E0E0E0F0E060935700849106C099E0A0
|
||||
:10F9F000E3E0F0E09093570084911A828B831C829D
|
||||
:10FA000084E0E82EF12C23C18A8190E0A0E0B0E0F0
|
||||
:10FA1000B82EAA24992488248B8190E0A0E0B0E03D
|
||||
:10FA2000DC0199278827882A992AAA2ABB2A8D814E
|
||||
:10FA300090E0A0E0B0E0882A992AAA2ABB2A8C810B
|
||||
:10FA400090E0A0E0B0E0BA2FA92F982F8827882A4D
|
||||
:10FA5000992AAA2ABB2A88C0EA81C05EDE4FE883C1
|
||||
:10FA6000C052D140C15EDE4F1882CF51D1408B8150
|
||||
:10FA7000A82FB0E0C15EDE4F28813981CF51D1403F
|
||||
:10FA8000A22BB32B933109F042C075016401CC0C59
|
||||
:10FA9000DD1CEE1CFF1C33E0F601E0925B003093AE
|
||||
:10FAA0005700E89507B600FCFDCF8E01055F1F4F9C
|
||||
:10FAB000F801808161810E5F1F4FA5019401220F23
|
||||
:10FAC000331F441F551F362E222490E0822993298C
|
||||
:10FAD00061E00C01F90140935B0060935700E895E9
|
||||
:10FAE00011240894811C911CA11CB11C129701F7D0
|
||||
:10FAF00085E0F601E0925B0080935700E89507B639
|
||||
:10FB000000FCFDCF81E180935700E8952DC0FE01F8
|
||||
:10FB10003B9620E030E040E050E011977D0100E0AE
|
||||
:10FB200010E00894E11CF11C011D111D6081F99980
|
||||
:10FB3000FECF1FBAC901880D991D92BD81BD60BD60
|
||||
:10FB40000FB6F894FA9AF99A0FBE2F5F3F4F4F4FB6
|
||||
:10FB50005F4F2E153F054007510711F03196E6CF54
|
||||
:10FB6000820E931EA41EB51E1A826EC09A81CE5DAF
|
||||
:10FB7000DE4F9883C252D140CF5DDE4F1882C15212
|
||||
:10FB8000D1408B81C82EDD24CF5DDE4FE881F98125
|
||||
:10FB9000C152D140CE2ADF2A1A8289818431E1F410
|
||||
:10FBA0009601BE016D5F7F4FD501C401880F991F7B
|
||||
:10FBB000AA1FBB1FABBFFC0187919691FB018083FD
|
||||
:10FBC00091836E5F7F4F0894811C911CA11CB11C16
|
||||
:10FBD0002250304049F72EC0BE016D5F7F4F20E0BC
|
||||
:10FBE00030E040E050E00894C108D108760100E020
|
||||
:10FBF00010E00894C11CD11C0894E11CF11C011DEB
|
||||
:10FC0000111DF999FECFC901880D991D92BD81BDC5
|
||||
:10FC1000F89A80B5FB018193BF012F5F3F4F4F4F93
|
||||
:10FC20005F4F2E153F054007510759F7820E931E6F
|
||||
:10FC3000A41EB51E23E0E22EF12CEC0CFD1CFB01F2
|
||||
:10FC4000108205C080EC8A8392E0E92EF12CCC244E
|
||||
:10FC50008BE10E94C7FEC25EDE4F8881CE51D1404B
|
||||
:10FC60000E94C7FE8F2D0E94C7FE8E2D0E94C7FEE8
|
||||
:10FC70008EE00E94C7FE85E1D82EC25EDE4FF8817D
|
||||
:10FC8000CE51D140DF26DE24DF243E010894611CE2
|
||||
:10FC9000711C0AC0F30111913F01812F0E94C7FE20
|
||||
:10FCA000D1260894E108F108E114F10499F78D2DAB
|
||||
:10FCB0000E94C7FECC2009F044C0C25EDE4FF8812E
|
||||
:10FCC000CE51D140FF5FC25EDE4FF883CE51D140AE
|
||||
:10FCD000EE24FF2410E0C2CD9981933109F4BCCE0B
|
||||
:10FCE0009431B0F4933009F440CE943038F491302C
|
||||
:10FCF00009F425CE923009F0A5CF04CE903109F455
|
||||
:10FD000001CE913109F445CE963009F09BCF7CCEDF
|
||||
:10FD1000983109F458CE993150F4953109F49CCEBC
|
||||
:10FD2000953108F423CF963109F08CCF1FCF9B314A
|
||||
:10FD300009F436CE9D3109F4E7CD9A3109F082CF2E
|
||||
:10FD40003ACECE5DDE4F0FB6F894DEBF0FBECDBF0C
|
||||
:10FD5000CF91DF911F910F91FF90EF90DF90CF90A7
|
||||
:10FD6000BF90AF909F908F907F906F905F904F90DB
|
||||
:10FD70003F902F9008958091C00087FFFCCF089599
|
||||
:10FD80008091C00087FFFCCF8091C6000895982F16
|
||||
:10FD90008091C00085FFFCCF9093C60008959B0121
|
||||
:10FDA000AC0197FF11C08091C00082608093C000B9
|
||||
:10FDB00050954095309521953F4F4F4F5F4F60E0F4
|
||||
:10FDC00074E284EF90E009C08091C0008D7F809341
|
||||
:10FDD000C00060E072E18AE790E00E9447FF2C5F7C
|
||||
:10FDE0003F4F4F4F5F4F83E0569547953795279587
|
||||
:10FDF0008A95D1F7215030403093C5002093C4003C
|
||||
:10FE0000089518B817B81F921F921F920895FFCF38
|
||||
:10FE100084B714BE90E083709070892B39F418B8C1
|
||||
:10FE200017B81F921F921F920895FFCF88E1809309
|
||||
:10FE3000C10060E07EE38EEF9FEF0E94CFFE0E9444
|
||||
:10FE400007FC18B817B81F921F921F920895FFCF92
|
||||
:10FE500020E030E040E050E013C02F5F3F4F4F4FB5
|
||||
:10FE60005F4F21308AE6380788E1480780E058076D
|
||||
:10FE700039F418B817B81F921F921F920895FFCF38
|
||||
:10FE80008091C00087FFE9CF0E94C0FE0895A1E2E3
|
||||
:10FE90001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F04
|
||||
:10FEA000FF1FA217B307E407F50720F0A21BB30B4F
|
||||
:10FEB000E40BF50B661F771F881F991F1A9469F7CB
|
||||
:10FEC00060957095809590959B01AC01BD01CF0127
|
||||
:02FED000089593
|
||||
:040000031000F800F1
|
||||
:00000001FF
|
@ -1,75 +0,0 @@
|
||||
:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
|
||||
:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
|
||||
:10F8200088E08093C40088E18093C100EE24FF2427
|
||||
:10F8300020E0552400E010E039E0432E9BE0292E23
|
||||
:10F84000312C2C0E3D1ECFC14150504060407040C5
|
||||
:10F8500011F43FE206C08091C00087FFF5CF3091E0
|
||||
:10F86000C600933021F1943028F4913099F0923011
|
||||
:10F87000C8F407C0953049F1953000F19630D1F5C4
|
||||
:10F8800035C03B3119F491E02BE134C03F3291F5A2
|
||||
:10F890003983BBC1313011F0351559F52327532E6B
|
||||
:10F8A00092E028C0B32FA0E0232793E023C0832F4A
|
||||
:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
|
||||
:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
|
||||
:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
|
||||
:10F8E000EA16FB0639F4D70196E004C0321709F492
|
||||
:10F8F0008CC190E044E755E962E470E0ACCF90E061
|
||||
:10F9000044C08D81803311F090E00AC08F8188233C
|
||||
:10F9100011F49EE105C0813011F099E001C096E933
|
||||
:10F920001A821B828D818C838E818D839E831F82A0
|
||||
:10F9300047E050E0F4C01A8288E08B8381E48C8336
|
||||
:10F9400086E58D8382E58E8389E48F8383E58887CE
|
||||
:10F9500080E589878FE58A8782E38B874BE050E0DB
|
||||
:10F96000DEC08A81813941F0823941F0803911F459
|
||||
:10F970008FE005C080E003C082E001C08AE01A8207
|
||||
:10F980008B8343E050E0CBC091E01A8242E050E02C
|
||||
:10F99000C7C08D81882311F48EE124C0813011F01D
|
||||
:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
|
||||
:10F9B0005700849118C08B81803579F48C81883010
|
||||
:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
|
||||
:10F9D000F0E040925700849105C0E3E0F0E04092EF
|
||||
:10F9E000570084911A828B831C8244E050E097C0B8
|
||||
:10F9F000BC80AA248D81082F10E00A291B29000F42
|
||||
:10FA0000111F1A828AC09A8088248B81682F70E027
|
||||
:10FA100068297929933109F033C0F7EF0F3F1F07A9
|
||||
:10FA200010F0A8013FC023E0F80120935700E895AB
|
||||
:10FA300007B600FCFDCFA801D1018C9111962C9145
|
||||
:10FA400011971296D22ECC2490E08C299D2921E08A
|
||||
:10FA5000FA010C0120935700E89511244E5F5F4F87
|
||||
:10FA60006250704051F725E0F80120935700E89567
|
||||
:10FA700007B600FCFDCF81E180935700E89512C0E6
|
||||
:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
|
||||
:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
|
||||
:10FAA000460F571F1A828A0138C07A8066248B81DC
|
||||
:10FAB000A82FB0E0A629B7291A828981843191F450
|
||||
:10FAC000BD019E012D5F3F4FF80185919491F90191
|
||||
:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
|
||||
:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
|
||||
:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
|
||||
:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
|
||||
:10FB1000F901108204C080EC8A8342E050E090E05A
|
||||
:10FB2000FBE1F093C6008091C00086FFFCCF80917E
|
||||
:10FB3000C00080648093C0005092C6008091C000D5
|
||||
:10FB400086FFFCCF8091C00080648093C000652F49
|
||||
:10FB50005093C6008091C00086FFFCCF8091C0000A
|
||||
:10FB600080648093C000342F4093C6008091C00011
|
||||
:10FB700086FFFCCF8091C00080648093C0008EE03F
|
||||
:10FB80008093C6008091C00086FFFCCF8091C000AA
|
||||
:10FB900080648093C00025E1252523272627FE01C8
|
||||
:10FBA000319610C030813093C6008091C00086FF2E
|
||||
:10FBB000FCCF31968091C00080648093C0002327E1
|
||||
:10FBC000415050404115510569F72093C60080917E
|
||||
:10FBD000C00086FFFCCF8091C00080648093C0008D
|
||||
:10FBE000992349F4539444E755E962E470E090E0C6
|
||||
:10FBF000A0E0B0E030CE5A9881E180935700E895BC
|
||||
:10FC000011241F921F920895FFCF9981933109F417
|
||||
:10FC1000FACE9431C8F4963009F4EACE973050F415
|
||||
:10FC2000923009F46CCE933009F49BCE913009F0F8
|
||||
:10FC300072CF81CE913109F4A7CE923108F0E1CE96
|
||||
:10FC4000903109F068CF5BCE983109F4B4CE993188
|
||||
:10FC500050F4953109F4D7CE953108F426CF96317A
|
||||
:10FC600009F059CF22CF9B3109F493CE9C3120F477
|
||||
:10FC70009A3109F050CF98CE9D3109F442CE9F328F
|
||||
:06FC800009F049CFB8CFE6
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,75 +0,0 @@
|
||||
:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
|
||||
:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
|
||||
:10F820008AE08093C40088E18093C100EE24FF2425
|
||||
:10F8300020E0552400E010E039E0432E9BE0292E23
|
||||
:10F84000312C2C0E3D1ECFC14150504060407040C5
|
||||
:10F8500011F43FE206C08091C00087FFF5CF3091E0
|
||||
:10F86000C600933021F1943028F4913099F0923011
|
||||
:10F87000C8F407C0953049F1953000F19630D1F5C4
|
||||
:10F8800035C03B3119F491E02BE134C03F3291F5A2
|
||||
:10F890003983BBC1313011F0351559F52327532E6B
|
||||
:10F8A00092E028C0B32FA0E0232793E023C0832F4A
|
||||
:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
|
||||
:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
|
||||
:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
|
||||
:10F8E000EA16FB0639F4D70196E004C0321709F492
|
||||
:10F8F0008CC190E041ED5AE363E570E0ACCF90E05D
|
||||
:10F9000044C08D81803311F090E00AC08F8188233C
|
||||
:10F9100011F49EE105C0813011F099E001C096E933
|
||||
:10F920001A821B828D818C838E818D839E831F82A0
|
||||
:10F9300047E050E0F4C01A8288E08B8381E48C8336
|
||||
:10F9400086E58D8382E58E8389E48F8383E58887CE
|
||||
:10F9500080E589878FE58A8782E38B874BE050E0DB
|
||||
:10F96000DEC08A81813941F0823941F0803911F459
|
||||
:10F970008FE005C080E003C082E001C08AE01A8207
|
||||
:10F980008B8343E050E0CBC091E01A8242E050E02C
|
||||
:10F99000C7C08D81882311F48EE124C0813011F01D
|
||||
:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
|
||||
:10F9B0005700849118C08B81803579F48C81883010
|
||||
:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
|
||||
:10F9D000F0E040925700849105C0E3E0F0E04092EF
|
||||
:10F9E000570084911A828B831C8244E050E097C0B8
|
||||
:10F9F000BC80AA248D81082F10E00A291B29000F42
|
||||
:10FA0000111F1A828AC09A8088248B81682F70E027
|
||||
:10FA100068297929933109F033C0F7EF0F3F1F07A9
|
||||
:10FA200010F0A8013FC023E0F80120935700E895AB
|
||||
:10FA300007B600FCFDCFA801D1018C9111962C9145
|
||||
:10FA400011971296D22ECC2490E08C299D2921E08A
|
||||
:10FA5000FA010C0120935700E89511244E5F5F4F87
|
||||
:10FA60006250704051F725E0F80120935700E89567
|
||||
:10FA700007B600FCFDCF81E180935700E89512C0E6
|
||||
:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
|
||||
:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
|
||||
:10FAA000460F571F1A828A0138C07A8066248B81DC
|
||||
:10FAB000A82FB0E0A629B7291A828981843191F450
|
||||
:10FAC000BD019E012D5F3F4FF80185919491F90191
|
||||
:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
|
||||
:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
|
||||
:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
|
||||
:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
|
||||
:10FB1000F901108204C080EC8A8342E050E090E05A
|
||||
:10FB2000FBE1F093C6008091C00086FFFCCF80917E
|
||||
:10FB3000C00080648093C0005092C6008091C000D5
|
||||
:10FB400086FFFCCF8091C00080648093C000652F49
|
||||
:10FB50005093C6008091C00086FFFCCF8091C0000A
|
||||
:10FB600080648093C000342F4093C6008091C00011
|
||||
:10FB700086FFFCCF8091C00080648093C0008EE03F
|
||||
:10FB80008093C6008091C00086FFFCCF8091C000AA
|
||||
:10FB900080648093C00025E1252523272627FE01C8
|
||||
:10FBA000319610C030813093C6008091C00086FF2E
|
||||
:10FBB000FCCF31968091C00080648093C0002327E1
|
||||
:10FBC000415050404115510569F72093C60080917E
|
||||
:10FBD000C00086FFFCCF8091C00080648093C0008D
|
||||
:10FBE000992349F4539441ED5AE363E570E090E0C2
|
||||
:10FBF000A0E0B0E030CE5A9881E180935700E895BC
|
||||
:10FC000011241F921F920895FFCF9981933109F417
|
||||
:10FC1000FACE9431C8F4963009F4EACE973050F415
|
||||
:10FC2000923009F46CCE933009F49BCE913009F0F8
|
||||
:10FC300072CF81CE913109F4A7CE923108F0E1CE96
|
||||
:10FC4000903109F068CF5BCE983109F4B4CE993188
|
||||
:10FC500050F4953109F4D7CE953108F426CF96317A
|
||||
:10FC600009F059CF22CF9B3109F493CE9C3120F477
|
||||
:10FC70009A3109F050CF98CE9D3109F442CE9F328F
|
||||
:06FC800009F049CFB8CFE6
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,75 +0,0 @@
|
||||
:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
|
||||
:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
|
||||
:10F8200088E08093C40088E18093C100EE24FF2427
|
||||
:10F8300020E0552400E010E039E0432E93E0292E2B
|
||||
:10F84000312C2C0E3D1ECDC14150504060407040C7
|
||||
:10F8500011F43FE206C08091C00087FFF5CF3091E0
|
||||
:10F86000C600933021F1943028F4913099F0923011
|
||||
:10F87000C8F407C0953049F1953000F19630D1F5C4
|
||||
:10F8800035C03B3119F491E02BE134C03F3291F5A2
|
||||
:10F890003983B9C1313011F0351559F52327532E6D
|
||||
:10F8A00092E028C0B32FA0E0232793E023C0832F4A
|
||||
:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
|
||||
:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
|
||||
:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
|
||||
:10F8E000EA16FB0639F4D70196E004C0321709F492
|
||||
:10F8F0008AC190E044E755E962E470E0ACCF90E063
|
||||
:10F9000044C08D81803311F090E00AC08F8188233C
|
||||
:10F9100011F49EE105C0813011F09AE001C096E932
|
||||
:10F920001A821B828D818C838E818D839E831F82A0
|
||||
:10F9300047E050E0F2C01A8288E08B8381E48C8338
|
||||
:10F9400086E58D8382E58E8389E48F8383E58887CE
|
||||
:10F9500080E589878FE58A8782E38B874BE050E0DB
|
||||
:10F96000DCC08A81813941F0823941F0803911F45B
|
||||
:10F970008FE005C080E003C082E001C08AE01A8207
|
||||
:10F980008B8343E050E0C9C091E01A8242E050E02E
|
||||
:10F99000C5C08D81882311F48EE124C0813011F01F
|
||||
:10F9A0008AE020C086E91EC01A82E1E0F0E04092C1
|
||||
:10F9B0005700849118C08B81803579F48C81883010
|
||||
:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
|
||||
:10F9D000F0E040925700849105C0E3E0F0E04092EF
|
||||
:10F9E000570084911A828B831C8244E050E095C0BA
|
||||
:10F9F000BC80AA248D81082F10E00A291B29000F42
|
||||
:10FA0000111F1A8288C09A8088248B81682F70E029
|
||||
:10FA100068297929933109F034C0F7EF0F3F1F07A8
|
||||
:10FA200010F0A80141C023E0F80120935700E895A9
|
||||
:10FA300007B600FCFDCFA801DE011B968C91119644
|
||||
:10FA40002C9111971296D22ECC2490E08C299D29CE
|
||||
:10FA500021E0FA010C0120935700E89511244E5F34
|
||||
:10FA60005F4F6250704051F725E0F8012093570036
|
||||
:10FA7000E89507B600FCFDCF81E180935700E8953B
|
||||
:10FA800013C0A801FB01DE011B9641BD52BD4F5FB3
|
||||
:10FA90005F4F8D9180BDFA9AF99AF999FECF31970F
|
||||
:10FAA000A1F7A801460F571F1A828A0134C07A8035
|
||||
:10FAB00066248B81A82FB0E0A629B7291A828981F4
|
||||
:10FAC000843181F4BD019101F80185919491F9018E
|
||||
:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
|
||||
:10FAE00099F711C0A801BD01910141BD52BD4F5F01
|
||||
:10FAF0005F4FF89A80B5F90181939F016150704082
|
||||
:10FB0000A1F70A0F1B1FAD014D5F5F4FF901108276
|
||||
:10FB100004C080EC8A8342E050E090E0FBE1F09387
|
||||
:10FB2000C6008091C00086FFFCCF8091C000806439
|
||||
:10FB30008093C0005092C6008091C00086FFFCCF29
|
||||
:10FB40008091C00080648093C000652F5093C600F0
|
||||
:10FB50008091C00086FFFCCF8091C00080648093BC
|
||||
:10FB6000C000342F4093C6008091C00086FFFCCFB8
|
||||
:10FB70008091C00080648093C0008EE08093C600B6
|
||||
:10FB80008091C00086FFFCCF8091C000806480938C
|
||||
:10FB9000C00025E1252523272627FE01319610C028
|
||||
:10FBA00030813093C6008091C00086FFFCCF319633
|
||||
:10FBB0008091C00080648093C00023274150504052
|
||||
:10FBC0004115510569F72093C6008091C00086FF5A
|
||||
:10FBD000FCCF8091C00080648093C000992349F4D9
|
||||
:10FBE000539444E755E962E470E090E0A0E0B0E0AF
|
||||
:10FBF00032CE5A9881E180935700E89511241F92E4
|
||||
:10FC00001F920895FFCF9981933109F4FCCE94316E
|
||||
:10FC1000C8F4963009F4ECCE973050F4923009F4E1
|
||||
:10FC20006ECE933009F49DCE913009F072CF83CE21
|
||||
:10FC3000913109F4A9CE923108F0E3CE903109F068
|
||||
:10FC400068CF5DCE983109F4B6CE993150F4953134
|
||||
:10FC500009F4D9CE953108F42ACF963109F059CF5D
|
||||
:10FC600026CF9B3109F495CE9C3120F49A3109F0CE
|
||||
:10FC700050CF9ACE9D3109F444CE9F3209F049CF3E
|
||||
:02FC8000B8CFFB
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,75 +0,0 @@
|
||||
:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
|
||||
:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
|
||||
:10F820008AE08093C40088E18093C100EE24FF2425
|
||||
:10F8300020E0552400E010E039E0432E93E0292E2B
|
||||
:10F84000312C2C0E3D1ECDC14150504060407040C7
|
||||
:10F8500011F43FE206C08091C00087FFF5CF3091E0
|
||||
:10F86000C600933021F1943028F4913099F0923011
|
||||
:10F87000C8F407C0953049F1953000F19630D1F5C4
|
||||
:10F8800035C03B3119F491E02BE134C03F3291F5A2
|
||||
:10F890003983B9C1313011F0351559F52327532E6D
|
||||
:10F8A00092E028C0B32FA0E0232793E023C0832F4A
|
||||
:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
|
||||
:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
|
||||
:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
|
||||
:10F8E000EA16FB0639F4D70196E004C0321709F492
|
||||
:10F8F0008AC190E041ED5AE363E570E0ACCF90E05F
|
||||
:10F9000044C08D81803311F090E00AC08F8188233C
|
||||
:10F9100011F49EE105C0813011F09AE001C096E932
|
||||
:10F920001A821B828D818C838E818D839E831F82A0
|
||||
:10F9300047E050E0F2C01A8288E08B8381E48C8338
|
||||
:10F9400086E58D8382E58E8389E48F8383E58887CE
|
||||
:10F9500080E589878FE58A8782E38B874BE050E0DB
|
||||
:10F96000DCC08A81813941F0823941F0803911F45B
|
||||
:10F970008FE005C080E003C082E001C08AE01A8207
|
||||
:10F980008B8343E050E0C9C091E01A8242E050E02E
|
||||
:10F99000C5C08D81882311F48EE124C0813011F01F
|
||||
:10F9A0008AE020C086E91EC01A82E1E0F0E04092C1
|
||||
:10F9B0005700849118C08B81803579F48C81883010
|
||||
:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
|
||||
:10F9D000F0E040925700849105C0E3E0F0E04092EF
|
||||
:10F9E000570084911A828B831C8244E050E095C0BA
|
||||
:10F9F000BC80AA248D81082F10E00A291B29000F42
|
||||
:10FA0000111F1A8288C09A8088248B81682F70E029
|
||||
:10FA100068297929933109F034C0F7EF0F3F1F07A8
|
||||
:10FA200010F0A80141C023E0F80120935700E895A9
|
||||
:10FA300007B600FCFDCFA801DE011B968C91119644
|
||||
:10FA40002C9111971296D22ECC2490E08C299D29CE
|
||||
:10FA500021E0FA010C0120935700E89511244E5F34
|
||||
:10FA60005F4F6250704051F725E0F8012093570036
|
||||
:10FA7000E89507B600FCFDCF81E180935700E8953B
|
||||
:10FA800013C0A801FB01DE011B9641BD52BD4F5FB3
|
||||
:10FA90005F4F8D9180BDFA9AF99AF999FECF31970F
|
||||
:10FAA000A1F7A801460F571F1A828A0134C07A8035
|
||||
:10FAB00066248B81A82FB0E0A629B7291A828981F4
|
||||
:10FAC000843181F4BD019101F80185919491F9018E
|
||||
:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
|
||||
:10FAE00099F711C0A801BD01910141BD52BD4F5F01
|
||||
:10FAF0005F4FF89A80B5F90181939F016150704082
|
||||
:10FB0000A1F70A0F1B1FAD014D5F5F4FF901108276
|
||||
:10FB100004C080EC8A8342E050E090E0FBE1F09387
|
||||
:10FB2000C6008091C00086FFFCCF8091C000806439
|
||||
:10FB30008093C0005092C6008091C00086FFFCCF29
|
||||
:10FB40008091C00080648093C000652F5093C600F0
|
||||
:10FB50008091C00086FFFCCF8091C00080648093BC
|
||||
:10FB6000C000342F4093C6008091C00086FFFCCFB8
|
||||
:10FB70008091C00080648093C0008EE08093C600B6
|
||||
:10FB80008091C00086FFFCCF8091C000806480938C
|
||||
:10FB9000C00025E1252523272627FE01319610C028
|
||||
:10FBA00030813093C6008091C00086FFFCCF319633
|
||||
:10FBB0008091C00080648093C00023274150504052
|
||||
:10FBC0004115510569F72093C6008091C00086FF5A
|
||||
:10FBD000FCCF8091C00080648093C000992349F4D9
|
||||
:10FBE000539441ED5AE363E570E090E0A0E0B0E0AB
|
||||
:10FBF00032CE5A9881E180935700E89511241F92E4
|
||||
:10FC00001F920895FFCF9981933109F4FCCE94316E
|
||||
:10FC1000C8F4963009F4ECCE973050F4923009F4E1
|
||||
:10FC20006ECE933009F49DCE913009F072CF83CE21
|
||||
:10FC3000913109F4A9CE923108F0E3CE903109F068
|
||||
:10FC400068CF5DCE983109F4B6CE993150F4953134
|
||||
:10FC500009F4D9CE953108F42ACF963109F059CF5D
|
||||
:10FC600026CF9B3109F495CE9C3120F49A3109F0CE
|
||||
:10FC700050CF9ACE9D3109F444CE9F3209F049CF3E
|
||||
:02FC8000B8CFFB
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,75 +0,0 @@
|
||||
:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
|
||||
:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
|
||||
:10F820008AE08093C40088E18093C100EE24FF2425
|
||||
:10F8300020E0552400E010E039E0432E9BE0292E23
|
||||
:10F84000312C2C0E3D1ECFC14150504060407040C5
|
||||
:10F8500011F43FE206C08091C00087FFF5CF3091E0
|
||||
:10F86000C600933021F1943028F4913099F0923011
|
||||
:10F87000C8F407C0953049F1953000F19630D1F5C4
|
||||
:10F8800035C03B3119F491E02BE134C03F3291F5A2
|
||||
:10F890003983BBC1313011F0351559F52327532E6B
|
||||
:10F8A00092E028C0B32FA0E0232793E023C0832F4A
|
||||
:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
|
||||
:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
|
||||
:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
|
||||
:10F8E000EA16FB0639F4D70196E004C0321709F492
|
||||
:10F8F0008CC190E041ED5AE363E570E0ACCF90E05D
|
||||
:10F9000044C08D81803311F090E00AC08F8188233C
|
||||
:10F9100011F49EE105C0813011F099E001C096E933
|
||||
:10F920001A821B828D818C838E818D839E831F82A0
|
||||
:10F9300047E050E0F4C01A8288E08B8381E48C8336
|
||||
:10F9400086E58D8382E58E8389E48F8383E58887CE
|
||||
:10F9500080E589878FE58A8782E38B874BE050E0DB
|
||||
:10F96000DEC08A81813941F0823941F0803911F459
|
||||
:10F970008FE005C080E003C082E001C08AE01A8207
|
||||
:10F980008B8343E050E0CBC091E01A8242E050E02C
|
||||
:10F99000C7C08D81882311F48EE124C0813011F01D
|
||||
:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
|
||||
:10F9B0005700849118C08B81803579F48C81883010
|
||||
:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
|
||||
:10F9D000F0E040925700849105C0E3E0F0E04092EF
|
||||
:10F9E000570084911A828B831C8244E050E097C0B8
|
||||
:10F9F000BC80AA248D81082F10E00A291B29000F42
|
||||
:10FA0000111F1A828AC09A8088248B81682F70E027
|
||||
:10FA100068297929933109F033C0F7EF0F3F1F07A9
|
||||
:10FA200010F0A8013FC023E0F80120935700E895AB
|
||||
:10FA300007B600FCFDCFA801D1018C9111962C9145
|
||||
:10FA400011971296D22ECC2490E08C299D2921E08A
|
||||
:10FA5000FA010C0120935700E89511244E5F5F4F87
|
||||
:10FA60006250704051F725E0F80120935700E89567
|
||||
:10FA700007B600FCFDCF81E180935700E89512C0E6
|
||||
:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
|
||||
:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
|
||||
:10FAA000460F571F1A828A0138C07A8066248B81DC
|
||||
:10FAB000A82FB0E0A629B7291A828981843191F450
|
||||
:10FAC000BD019E012D5F3F4FF80185919491F90191
|
||||
:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
|
||||
:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
|
||||
:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
|
||||
:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
|
||||
:10FB1000F901108204C080EC8A8342E050E090E05A
|
||||
:10FB2000FBE1F093C6008091C00086FFFCCF80917E
|
||||
:10FB3000C00080648093C0005092C6008091C000D5
|
||||
:10FB400086FFFCCF8091C00080648093C000652F49
|
||||
:10FB50005093C6008091C00086FFFCCF8091C0000A
|
||||
:10FB600080648093C000342F4093C6008091C00011
|
||||
:10FB700086FFFCCF8091C00080648093C0008EE03F
|
||||
:10FB80008093C6008091C00086FFFCCF8091C000AA
|
||||
:10FB900080648093C00025E1252523272627FE01C8
|
||||
:10FBA000319610C030813093C6008091C00086FF2E
|
||||
:10FBB000FCCF31968091C00080648093C0002327E1
|
||||
:10FBC000415050404115510569F72093C60080917E
|
||||
:10FBD000C00086FFFCCF8091C00080648093C0008D
|
||||
:10FBE000992349F4539441ED5AE363E570E090E0C2
|
||||
:10FBF000A0E0B0E030CE5A9881E180935700E895BC
|
||||
:10FC000011241F921F920895FFCF9981933109F417
|
||||
:10FC1000FACE9431C8F4963009F4EACE973050F415
|
||||
:10FC2000923009F46CCE933009F49BCE913009F0F8
|
||||
:10FC300072CF81CE913109F4A7CE923108F0E1CE96
|
||||
:10FC4000903109F068CF5BCE983109F4B4CE993188
|
||||
:10FC500050F4953109F4D7CE953108F426CF96317A
|
||||
:10FC600009F059CF22CF9B3109F493CE9C3120F477
|
||||
:10FC70009A3109F050CF98CE9D3109F442CE9F328F
|
||||
:06FC800009F049CFB8CFE6
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,130 +0,0 @@
|
||||
:020000021000EC
|
||||
:10F000000C9446F80C9465F80C9465F80C9465F82B
|
||||
:10F010000C9465F80C9465F80C9465F80C9465F8FC
|
||||
:10F020000C9465F80C9465F80C9465F80C9465F8EC
|
||||
:10F030000C9465F80C9465F80C9465F80C9465F8DC
|
||||
:10F040000C9465F80C9465F80C9465F80C9465F8CC
|
||||
:10F050000C9465F80C9465F80C9465F80C9465F8BC
|
||||
:10F060000C9465F80C9465F80C9465F80C9465F8AC
|
||||
:10F070000C9465F80C9465F80C9465F80C9465F89C
|
||||
:10F080000C9465F80C9465F80C9465F811241FBE77
|
||||
:10F09000CFEFD0E4DEBFCDBF11E0A0E0B1E0E8EDFE
|
||||
:10F0A000F7EF01E00BBF02C007900D92A230B1074D
|
||||
:10F0B000D9F712E0A2E0B1E001C01D92AD30B10776
|
||||
:10F0C000E1F70E947EF90C94EAFB0C9400F8909111
|
||||
:10F0D0000201913019F0923041F008959091C000F2
|
||||
:10F0E00095FFFCCF8093C60008959091C80095FFCE
|
||||
:10F0F000FCCF8093CE0008951F93982F95959595FA
|
||||
:10F1000095959595905D182F1F701A304CF4105DF1
|
||||
:10F11000892F0E9467F8812F0E9467F81F91089538
|
||||
:10F12000195A892F0E9467F8812F0E9467F81F9152
|
||||
:10F130000895EF92FF920F931F9380910201813007
|
||||
:10F1400069F1823031F080E01F910F91FF90EF90D4
|
||||
:10F150000895EE24FF2487018091C80087FD17C021
|
||||
:10F160000894E11CF11C011D111D81E4E81682E4E4
|
||||
:10F17000F8068FE0080780E0180770F3E0910401BB
|
||||
:10F18000F091050109958091C80087FFE9CF809132
|
||||
:10F19000CE001F910F91FF90EF900895EE24FF2471
|
||||
:10F1A00087018091C00087FD17C00894E11CF11C05
|
||||
:10F1B000011D111D81E4E81682E4F8068FE00807BE
|
||||
:10F1C00080E0180770F3E0910401F09105010995C2
|
||||
:10F1D0008091C00087FFE9CF8091C6001F910F91F9
|
||||
:10F1E000FF90EF9008951F930E9499F8182F0E94A6
|
||||
:10F1F00067F8113634F410330CF01053812F1F913F
|
||||
:10F2000008951755812F1F9108951F930E94F3F8B9
|
||||
:10F21000182F0E94F3F81295107F810F1F91089507
|
||||
:10F2200020910201882339F0213031F0223061F041
|
||||
:10F2300081508823C9F708959091C00097FFFCCFB3
|
||||
:10F240009091C6008150F5CF9091C80097FFFCCFF8
|
||||
:10F250009091CE008150EDCF1F93182F0E9499F806
|
||||
:10F26000803281F0809103018F5F809303018530AC
|
||||
:10F2700011F01F910895E0910401F09105010995A5
|
||||
:10F280001F91089584E10E9467F8812F0E9467F81A
|
||||
:10F2900080E10E9467F8EDCF0E9499F8803271F00A
|
||||
:10F2A000809103018F5F80930301853009F00895F9
|
||||
:10F2B000E0910401F09105010995089584E10E940F
|
||||
:10F2C00067F880E10E9467F8089515C0289A2FEF2B
|
||||
:10F2D00031EE44E0215030404040E1F700C00000F2
|
||||
:10F2E00028982FEF31EE44E0215030404040E1F7C4
|
||||
:10F2F00000C000008150882349F70895EF92FF92E3
|
||||
:10F300000F931F93CF93DF93000081E0809302015E
|
||||
:10F3100080E18093C4001092C5001092C00086E086
|
||||
:10F320008093C20088E18093C100209A81E00E940E
|
||||
:10F3300065F90E9499F88033B1F18133B9F18034D5
|
||||
:10F3400009F454C0813409F45AC0823409F469C004
|
||||
:10F35000853409F46CC0803531F1823521F1813575
|
||||
:10F3600011F1853509F469C0863509F471C0843618
|
||||
:10F3700009F47AC0843709F4E1C0853709F43FC144
|
||||
:10F38000863709F44AC0809103018F5F809303019F
|
||||
:10F39000853079F6E0910401F091050109950E940C
|
||||
:10F3A00099F8803351F60E944CF9C3CF0E9499F826
|
||||
:10F3B000803249F784E10E9467F881E40E9467F88F
|
||||
:10F3C00086E50E9467F882E50E9467F880E20E9465
|
||||
:10F3D00067F889E40E9467F883E50E9467F880E592
|
||||
:10F3E0000E9467F880E10E9467F8A3CF0E9499F815
|
||||
:10F3F0008638C8F20E9499F80E944CF99ACF0E9470
|
||||
:10F4000099F8803809F414C1813809F415C182389B
|
||||
:10F4100009F416C1883909F407C180E00E942CF96B
|
||||
:10F4200088CF84E10E9410F90E944CF982CF85E0D8
|
||||
:10F430000E9410F90E944CF97CCF0E9499F88093A9
|
||||
:10F4400006010E9499F8809307010E944CF971CF40
|
||||
:10F450000E9499F8803309F405C183E00E9410F9F5
|
||||
:10F4600080E00E942CF965CF0E9499F880930902F0
|
||||
:10F470000E9499F88093080280910C028E7F8093FD
|
||||
:10F480000C020E9499F8853409F4FDC080910802AD
|
||||
:10F49000909109020097A1F068E0E62E61E0F62E57
|
||||
:10F4A00000E010E00E9499F8F70181937F010F5F5F
|
||||
:10F4B0001F4F80910802909109020817190790F3D5
|
||||
:10F4C0000E9499F8803209F05ECF80910C0280FF93
|
||||
:10F4D000ECC08091060190910701880F991F9093CD
|
||||
:10F4E000070180930601209108023091090221153D
|
||||
:10F4F0003105E9F048E0E42E41E0F42E00E010E0B0
|
||||
:10F50000F70161917F010E94DCFB809106019091DF
|
||||
:10F510000701019690930701809306010F5F1F4F2B
|
||||
:10F5200020910802309109020217130748F384E181
|
||||
:10F530000E9467F880E10E9467F8FBCE0E9499F86C
|
||||
:10F54000809309020E9499F8809308028091060135
|
||||
:10F550009091070197FDA3C020910C022D7F20936D
|
||||
:10F560000C02880F991F90930701809306010E9457
|
||||
:10F5700099F8853409F48DC080910C028E7F8093B8
|
||||
:10F580000C020E9499F8803209F0D3CE84E10E94E7
|
||||
:10F5900067F88091080290910902009709F440C031
|
||||
:10F5A00000E010E0809106019091070116C0FC0177
|
||||
:10F5B00084910E9467F8809106019091070101965D
|
||||
:10F5C00090930701809306010F5F1F4F209108025F
|
||||
:10F5D000309109020217130718F520910C0220FD43
|
||||
:10F5E00033C021FFE4CFA0E0B0E080509040AF4FA7
|
||||
:10F5F000BF4FABBFFC0187910E9467F8DCCF0E9430
|
||||
:10F6000099F8803209F0BFCE84E10E9467F88EE15C
|
||||
:10F610000E9467F887E90E9467F885E00E9467F812
|
||||
:10F6200080E10E9467F885CE83E00E942CF981CEAC
|
||||
:10F6300082E00E942CF97DCE81E00E942CF979CEE7
|
||||
:10F6400080E10E942CF975CE0E94D4FB0E9467F8DD
|
||||
:10F650008091060190910701019690930701809394
|
||||
:10F660000601B2CF0E9499F80E9499F8082F0E94D3
|
||||
:10F6700099F8002309F48BC0013009F48CC085E0AF
|
||||
:10F680000E942CF956CE80910C02816080930C026E
|
||||
:10F69000FDCE80910C02816080930C0272CF20918C
|
||||
:10F6A0000C02226020930C025CCF8091070187FD41
|
||||
:10F6B00076C010920B0280E08BBF80910601909182
|
||||
:10F6C0000701880F991F909307018093060180918D
|
||||
:10F6D000080280FF09C080910802909109020196FA
|
||||
:10F6E0009093090280930802F894F999FECF1127AC
|
||||
:10F6F000E0910601F0910701C8E0D1E08091080295
|
||||
:10F7000090910902103091F400915700017001307E
|
||||
:10F71000D9F303E000935700E8950091570001707A
|
||||
:10F720000130D9F301E100935700E8950990199051
|
||||
:10F730000091570001700130D9F301E000935700A8
|
||||
:10F74000E8951395103898F0112700915700017033
|
||||
:10F750000130D9F305E000935700E8950091570078
|
||||
:10F7600001700130D9F301E100935700E89532961A
|
||||
:10F77000029709F0C7CF103011F00296E5CF11249F
|
||||
:10F7800084E10E9467F880E10E9467F8D2CD8EE1A3
|
||||
:10F790000E942CF9CECD87E90E942CF9CACDF1E068
|
||||
:10F7A000F0930B0281E088CFF999FECF92BD81BD25
|
||||
:10F7B000F89A992780B50895262FF999FECF1FBA98
|
||||
:10F7C00092BD81BD20BD0FB6F894FA9AF99A0FBE8A
|
||||
:08F7D00001960895F894FFCFA3
|
||||
:02F7D8008000AF
|
||||
:040000031000F000F9
|
||||
:00000001FF
|
@ -1,130 +0,0 @@
|
||||
:020000021000EC
|
||||
:10F000000C9446F80C9465F80C9465F80C9465F82B
|
||||
:10F010000C9465F80C9465F80C9465F80C9465F8FC
|
||||
:10F020000C9465F80C9465F80C9465F80C9465F8EC
|
||||
:10F030000C9465F80C9465F80C9465F80C9465F8DC
|
||||
:10F040000C9465F80C9465F80C9465F80C9465F8CC
|
||||
:10F050000C9465F80C9465F80C9465F80C9465F8BC
|
||||
:10F060000C9465F80C9465F80C9465F80C9465F8AC
|
||||
:10F070000C9465F80C9465F80C9465F80C9465F89C
|
||||
:10F080000C9465F80C9465F80C9465F811241FBE77
|
||||
:10F09000CFEFD0E4DEBFCDBF11E0A0E0B1E0E8EDFE
|
||||
:10F0A000F7EF01E00BBF02C007900D92A230B1074D
|
||||
:10F0B000D9F712E0A2E0B1E001C01D92AD30B10776
|
||||
:10F0C000E1F70E947EF90C94EAFB0C9400F8909111
|
||||
:10F0D0000201913019F0923041F008959091C000F2
|
||||
:10F0E00095FFFCCF8093C60008959091C80095FFCE
|
||||
:10F0F000FCCF8093CE0008951F93982F95959595FA
|
||||
:10F1000095959595905D182F1F701A304CF4105DF1
|
||||
:10F11000892F0E9467F8812F0E9467F81F91089538
|
||||
:10F12000195A892F0E9467F8812F0E9467F81F9152
|
||||
:10F130000895EF92FF920F931F9380910201813007
|
||||
:10F1400069F1823031F080E01F910F91FF90EF90D4
|
||||
:10F150000895EE24FF2487018091C80087FD17C021
|
||||
:10F160000894E11CF11C011D111D81E2E81681EAE1
|
||||
:10F17000F80687E0080780E0180770F3E0910401C3
|
||||
:10F18000F091050109958091C80087FFE9CF809132
|
||||
:10F19000CE001F910F91FF90EF900895EE24FF2471
|
||||
:10F1A00087018091C00087FD17C00894E11CF11C05
|
||||
:10F1B000011D111D81E2E81681EAF80687E00807C3
|
||||
:10F1C00080E0180770F3E0910401F09105010995C2
|
||||
:10F1D0008091C00087FFE9CF8091C6001F910F91F9
|
||||
:10F1E000FF90EF9008951F930E9499F8182F0E94A6
|
||||
:10F1F00067F8113634F410330CF01053812F1F913F
|
||||
:10F2000008951755812F1F9108951F930E94F3F8B9
|
||||
:10F21000182F0E94F3F81295107F810F1F91089507
|
||||
:10F2200020910201882339F0213031F0223061F041
|
||||
:10F2300081508823C9F708959091C00097FFFCCFB3
|
||||
:10F240009091C6008150F5CF9091C80097FFFCCFF8
|
||||
:10F250009091CE008150EDCF1F93182F0E9499F806
|
||||
:10F26000803281F0809103018F5F809303018530AC
|
||||
:10F2700011F01F910895E0910401F09105010995A5
|
||||
:10F280001F91089584E10E9467F8812F0E9467F81A
|
||||
:10F2900080E10E9467F8EDCF0E9499F8803271F00A
|
||||
:10F2A000809103018F5F80930301853009F00895F9
|
||||
:10F2B000E0910401F09105010995089584E10E940F
|
||||
:10F2C00067F880E10E9467F8089515C0289A2FEF2B
|
||||
:10F2D00030E742E0215030404040E1F700C00000FC
|
||||
:10F2E00028982FEF30E742E0215030404040E1F7CE
|
||||
:10F2F00000C000008150882349F70895EF92FF92E3
|
||||
:10F300000F931F93CF93DF93000081E0809302015E
|
||||
:10F3100089E18093C4001092C5001092C00086E07D
|
||||
:10F320008093C20088E18093C100209A81E00E940E
|
||||
:10F3300065F90E9499F88033B1F18133B9F18034D5
|
||||
:10F3400009F454C0813409F45AC0823409F469C004
|
||||
:10F35000853409F46CC0803531F1823521F1813575
|
||||
:10F3600011F1853509F469C0863509F471C0843618
|
||||
:10F3700009F47AC0843709F4E1C0853709F43FC144
|
||||
:10F38000863709F44AC0809103018F5F809303019F
|
||||
:10F39000853079F6E0910401F091050109950E940C
|
||||
:10F3A00099F8803351F60E944CF9C3CF0E9499F826
|
||||
:10F3B000803249F784E10E9467F881E40E9467F88F
|
||||
:10F3C00086E50E9467F882E50E9467F880E20E9465
|
||||
:10F3D00067F889E40E9467F883E50E9467F880E592
|
||||
:10F3E0000E9467F880E10E9467F8A3CF0E9499F815
|
||||
:10F3F0008638C8F20E9499F80E944CF99ACF0E9470
|
||||
:10F4000099F8803809F414C1813809F415C182389B
|
||||
:10F4100009F416C1883909F407C180E00E942CF96B
|
||||
:10F4200088CF84E10E9410F90E944CF982CF85E0D8
|
||||
:10F430000E9410F90E944CF97CCF0E9499F88093A9
|
||||
:10F4400006010E9499F8809307010E944CF971CF40
|
||||
:10F450000E9499F8803309F405C183E00E9410F9F5
|
||||
:10F4600080E00E942CF965CF0E9499F880930902F0
|
||||
:10F470000E9499F88093080280910C028E7F8093FD
|
||||
:10F480000C020E9499F8853409F4FDC080910802AD
|
||||
:10F49000909109020097A1F068E0E62E61E0F62E57
|
||||
:10F4A00000E010E00E9499F8F70181937F010F5F5F
|
||||
:10F4B0001F4F80910802909109020817190790F3D5
|
||||
:10F4C0000E9499F8803209F05ECF80910C0280FF93
|
||||
:10F4D000ECC08091060190910701880F991F9093CD
|
||||
:10F4E000070180930601209108023091090221153D
|
||||
:10F4F0003105E9F048E0E42E41E0F42E00E010E0B0
|
||||
:10F50000F70161917F010E94DCFB809106019091DF
|
||||
:10F510000701019690930701809306010F5F1F4F2B
|
||||
:10F5200020910802309109020217130748F384E181
|
||||
:10F530000E9467F880E10E9467F8FBCE0E9499F86C
|
||||
:10F54000809309020E9499F8809308028091060135
|
||||
:10F550009091070197FDA3C020910C022D7F20936D
|
||||
:10F560000C02880F991F90930701809306010E9457
|
||||
:10F5700099F8853409F48DC080910C028E7F8093B8
|
||||
:10F580000C020E9499F8803209F0D3CE84E10E94E7
|
||||
:10F5900067F88091080290910902009709F440C031
|
||||
:10F5A00000E010E0809106019091070116C0FC0177
|
||||
:10F5B00084910E9467F8809106019091070101965D
|
||||
:10F5C00090930701809306010F5F1F4F209108025F
|
||||
:10F5D000309109020217130718F520910C0220FD43
|
||||
:10F5E00033C021FFE4CFA0E0B0E080509040AF4FA7
|
||||
:10F5F000BF4FABBFFC0187910E9467F8DCCF0E9430
|
||||
:10F6000099F8803209F0BFCE84E10E9467F88EE15C
|
||||
:10F610000E9467F887E90E9467F885E00E9467F812
|
||||
:10F6200080E10E9467F885CE83E00E942CF981CEAC
|
||||
:10F6300082E00E942CF97DCE81E00E942CF979CEE7
|
||||
:10F6400080E10E942CF975CE0E94D4FB0E9467F8DD
|
||||
:10F650008091060190910701019690930701809394
|
||||
:10F660000601B2CF0E9499F80E9499F8082F0E94D3
|
||||
:10F6700099F8002309F48BC0013009F48CC085E0AF
|
||||
:10F680000E942CF956CE80910C02816080930C026E
|
||||
:10F69000FDCE80910C02816080930C0272CF20918C
|
||||
:10F6A0000C02226020930C025CCF8091070187FD41
|
||||
:10F6B00076C010920B0280E08BBF80910601909182
|
||||
:10F6C0000701880F991F909307018093060180918D
|
||||
:10F6D000080280FF09C080910802909109020196FA
|
||||
:10F6E0009093090280930802F894F999FECF1127AC
|
||||
:10F6F000E0910601F0910701C8E0D1E08091080295
|
||||
:10F7000090910902103091F400915700017001307E
|
||||
:10F71000D9F303E000935700E8950091570001707A
|
||||
:10F720000130D9F301E100935700E8950990199051
|
||||
:10F730000091570001700130D9F301E000935700A8
|
||||
:10F74000E8951395103898F0112700915700017033
|
||||
:10F750000130D9F305E000935700E8950091570078
|
||||
:10F7600001700130D9F301E100935700E89532961A
|
||||
:10F77000029709F0C7CF103011F00296E5CF11249F
|
||||
:10F7800084E10E9467F880E10E9467F8D2CD8EE1A3
|
||||
:10F790000E942CF9CECD87E90E942CF9CACDF1E068
|
||||
:10F7A000F0930B0281E088CFF999FECF92BD81BD25
|
||||
:10F7B000F89A992780B50895262FF999FECF1FBA98
|
||||
:10F7C00092BD81BD20BD0FB6F894FA9AF99A0FBE8A
|
||||
:08F7D00001960895F894FFCFA3
|
||||
:02F7D8008000AF
|
||||
:040000031000F000F9
|
||||
:00000001FF
|
@ -1,126 +0,0 @@
|
||||
:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
|
||||
:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
|
||||
:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
|
||||
:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
|
||||
:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
|
||||
:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
|
||||
:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
|
||||
:10F870000C945B7C0C945B7C0C945B7C11241FBE11
|
||||
:10F88000CFEFD0E1DEBFCDBF11E0A0E0B1E0EAEA0A
|
||||
:10F89000FFEF02C005900D92A230B107D9F712E038
|
||||
:10F8A000A2E0B1E001C01D92AD30B107E1F70E94C6
|
||||
:10F8B000747D0C94D37F0C94007C90910201913064
|
||||
:10F8C00019F0923041F008959091C00095FFFCCF5F
|
||||
:10F8D0008093C60008959091C80095FFFCCF809357
|
||||
:10F8E000CE0008951F93982F95959595959595958C
|
||||
:10F8F000905D182F1F701A304CF4105D892F0E94F4
|
||||
:10F900005D7C812F0E945D7C1F910895195A892F7B
|
||||
:10F910000E945D7C812F0E945D7C1F910895EF9273
|
||||
:10F92000FF920F931F9380910201813069F1823021
|
||||
:10F9300031F080E01F910F91FF90EF900895EE2439
|
||||
:10F94000FF2487018091C80087FD17C00894E11C3F
|
||||
:10F95000F11C011D111D81E4E81682E4F8068FE018
|
||||
:10F96000080780E0180770F3E0910401F0910501A9
|
||||
:10F9700009958091C80087FFE9CF8091CE001F9143
|
||||
:10F980000F91FF90EF900895EE24FF24870180915E
|
||||
:10F99000C00087FD17C00894E11CF11C011D111D5A
|
||||
:10F9A00081E4E81682E4F8068FE0080780E0180793
|
||||
:10F9B00070F3E0910401F091050109958091C00078
|
||||
:10F9C00087FFE9CF8091C6001F910F91FF90EF90C4
|
||||
:10F9D00008951F930E948F7C182F0E945D7C113622
|
||||
:10F9E00034F410330CF01053812F1F9108951755E4
|
||||
:10F9F000812F1F9108951F930E94E97C182F0E9468
|
||||
:10FA0000E97C1295107F810F1F91089520910201CA
|
||||
:10FA1000882339F0213031F0223061F08150882381
|
||||
:10FA2000C9F708959091C00097FFFCCF9091C60050
|
||||
:10FA30008150F5CF9091C80097FFFCCF9091CE00F8
|
||||
:10FA40008150EDCF1F93182F0E948F7C803281F060
|
||||
:10FA5000809103018F5F80930301853011F01F9126
|
||||
:10FA60000895E0910401F091050109951F91089511
|
||||
:10FA700084E10E945D7C812F0E945D7C80E10E9478
|
||||
:10FA80005D7CEDCF0E948F7C803271F0809103010C
|
||||
:10FA90008F5F80930301853009F00895E0910401A0
|
||||
:10FAA000F09105010995089584E10E945D7C80E153
|
||||
:10FAB0000E945D7C089515C0289A2FEF31EE44E036
|
||||
:10FAC000215030404040E1F700C0000028982FEF5F
|
||||
:10FAD00031EE44E0215030404040E1F700C00000EA
|
||||
:10FAE0008150882349F70895EF92FF920F931F9357
|
||||
:10FAF000CF93DF93000081E08093020180E1809347
|
||||
:10FB0000C4001092C5001092C00086E08093C2002D
|
||||
:10FB100088E18093C100209A81E00E945B7D0E9471
|
||||
:10FB20008F7C8033B1F18133B9F1803409F454C052
|
||||
:10FB3000813409F45AC0823409F469C0853409F467
|
||||
:10FB40006CC0803531F1823521F1813511F1853577
|
||||
:10FB500009F469C0863509F471C0843609F47AC0A5
|
||||
:10FB6000843709F4E1C0853709F439C1863709F4CF
|
||||
:10FB70004AC0809103018F5F80930301853079F63D
|
||||
:10FB8000E0910401F091050109950E948F7C80337A
|
||||
:10FB900051F60E94427DC3CF0E948F7C803249F78C
|
||||
:10FBA00084E10E945D7C81E40E945D7C86E50E9488
|
||||
:10FBB0005D7C82E50E945D7C80E20E945D7C89E440
|
||||
:10FBC0000E945D7C83E50E945D7C80E50E945D7CF7
|
||||
:10FBD00080E10E945D7CA3CF0E948F7C8638C8F2B2
|
||||
:10FBE0000E948F7C0E94427D9ACF0E948F7C803839
|
||||
:10FBF00009F40EC1813809F40FC1823809F410C12B
|
||||
:10FC0000883909F401C180E00E94227D88CF84E117
|
||||
:10FC10000E94067D0E94427D82CF85E00E94067D83
|
||||
:10FC20000E94427D7CCF0E948F7C809306010E94BF
|
||||
:10FC30008F7C809307010E94427D71CF0E948F7C50
|
||||
:10FC4000803309F4F1C083E00E94067D80E00E94C9
|
||||
:10FC5000227D65CF0E948F7C809309020E948F7C59
|
||||
:10FC60008093080280910C028E7F80930C020E9488
|
||||
:10FC70008F7C853409F4E9C08091080290910902D3
|
||||
:10FC80000097A1F068E0E62E61E0F62E00E010E0BB
|
||||
:10FC90000E948F7CF70181937F010F5F1F4F80913E
|
||||
:10FCA0000802909109020817190790F30E948F7CAF
|
||||
:10FCB000803209F05ECF80910C0280FFE5C0809118
|
||||
:10FCC000060190910701880F991F90930701809377
|
||||
:10FCD0000601209108023091090221153105E9F051
|
||||
:10FCE00048E0E42E41E0F42E00E010E0F7016191DD
|
||||
:10FCF0007F010E94C57F80910601909107010196C6
|
||||
:10FD000090930701809306010F5F1F4F2091080217
|
||||
:10FD1000309109020217130748F384E10E945D7CC9
|
||||
:10FD200080E10E945D7CFBCE0E948F7C8093090263
|
||||
:10FD30000E948F7C809308028091060190910701B8
|
||||
:10FD400097FD9CC020910C022D7F20930C02880F00
|
||||
:10FD5000991F90930701809306010E948F7C853440
|
||||
:10FD600009F486C080910C028E7F80930C020E9461
|
||||
:10FD70008F7C803209F0D3CE84E10E945D7C20919B
|
||||
:10FD800008023091090221153105D1F100E010E09F
|
||||
:10FD900080910601909107010CC041FF5CC0019663
|
||||
:10FDA00090930701809306010F5F1F4F02171307FF
|
||||
:10FDB00038F540910C0240FFF0CF0E94BD7F0E94B9
|
||||
:10FDC0005D7C809106019091070101969093070157
|
||||
:10FDD000809306012091080230910902E5CF0E942C
|
||||
:10FDE0008F7C803209F0C5CE84E10E945D7C8EE17B
|
||||
:10FDF0000E945D7C86E90E945D7C8AE00E945D7CB9
|
||||
:10FE000080E10E945D7C8BCE83E00E94227D87CEC4
|
||||
:10FE100082E00E94227D83CE81E00E94227D7FCEFF
|
||||
:10FE200080E10E94227D7BCE0E948F7C0E948F7C8D
|
||||
:10FE3000082F0E948F7C002309F497C0013009F439
|
||||
:10FE400098C08AE00E94227D6ACE80910C02816077
|
||||
:10FE500080930C0211CFFC0184910E945D7C209163
|
||||
:10FE6000080230910902809106019091070197CF15
|
||||
:10FE700080910C02816080930C0279CF20910C025A
|
||||
:10FE8000226020930C0263CF80910701880F880BBA
|
||||
:10FE9000817080930B028091060190910701880F79
|
||||
:10FEA000991F90930701809306018091080280FFBB
|
||||
:10FEB00009C080910802909109020196909309026D
|
||||
:10FEC00080930802F894F999FECF1127E09106017A
|
||||
:10FED000F0910701C8E0D1E08091080290910902F9
|
||||
:10FEE000103091F40091570001700130D9F303E014
|
||||
:10FEF00000935700E8950091570001700130D9F345
|
||||
:10FF000001E100935700E89509901990009157007E
|
||||
:10FF100001700130D9F301E000935700E895139583
|
||||
:10FF2000103898F011270091570001700130D9F373
|
||||
:10FF300005E000935700E8950091570001700130EB
|
||||
:10FF4000D9F301E100935700E8953296029709F042
|
||||
:10FF5000C7CF103011F00296E5CF112484E10E9442
|
||||
:10FF60005D7C80E10E945D7CDACD8EE10E94227D85
|
||||
:10FF7000D6CD86E90E94227DD2CDF999FECF92BDE1
|
||||
:10FF800081BDF89A992780B50895262FF999FECF5B
|
||||
:10FF90001FBA92BD81BD20BD0FB6F894FA9AF99AA6
|
||||
:0AFFA0000FBE01960895F894FFCFFC
|
||||
:02FFAA008000D5
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,254 +0,0 @@
|
||||
# Makefile for ATmegaBOOT
|
||||
# E.Lins, 18.7.2005
|
||||
# $Id$
|
||||
#
|
||||
# Instructions
|
||||
#
|
||||
# To make bootloader .hex file:
|
||||
# make diecimila
|
||||
# make lilypad
|
||||
# make ng
|
||||
# etc...
|
||||
#
|
||||
# To burn bootloader .hex file:
|
||||
# make diecimila_isp
|
||||
# make lilypad_isp
|
||||
# make ng_isp
|
||||
# etc...
|
||||
|
||||
# program name should not be changed...
|
||||
PROGRAM = ATmegaBOOT_168
|
||||
|
||||
# enter the parameters for the avrdude isp tool
|
||||
ISPTOOL = stk500v2
|
||||
ISPPORT = usb
|
||||
ISPSPEED = -b 115200
|
||||
|
||||
MCU_TARGET = atmega168
|
||||
LDSECTION = --section-start=.text=0x3800
|
||||
|
||||
# the efuse should really be 0xf8; since, however, only the lower
|
||||
# three bits of that byte are used on the atmega168, avrdude gets
|
||||
# confused if you specify 1's for the higher bits, see:
|
||||
# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
|
||||
#
|
||||
# similarly, the lock bits should be 0xff instead of 0x3f (to
|
||||
# unlock the bootloader section) and 0xcf instead of 0x0f (to
|
||||
# lock it), but since the high two bits of the lock byte are
|
||||
# unused, avrdude would get confused.
|
||||
|
||||
ISPFUSES = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
|
||||
-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
|
||||
ISPFLASH = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
|
||||
-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
|
||||
|
||||
STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
|
||||
STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
|
||||
-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
|
||||
STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
|
||||
|
||||
|
||||
OBJ = $(PROGRAM).o
|
||||
OPTIMIZE = -O2
|
||||
|
||||
DEFS =
|
||||
LIBS =
|
||||
|
||||
CC = avr-gcc
|
||||
|
||||
# Override is only needed by avr-lib build system.
|
||||
|
||||
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
|
||||
override LDFLAGS = -Wl,$(LDSECTION)
|
||||
#override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
|
||||
|
||||
OBJCOPY = avr-objcopy
|
||||
OBJDUMP = avr-objdump
|
||||
|
||||
all:
|
||||
|
||||
lilypad: TARGET = lilypad
|
||||
lilypad: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
|
||||
lilypad: AVR_FREQ = 8000000L
|
||||
lilypad: $(PROGRAM)_lilypad.hex
|
||||
|
||||
lilypad_isp: lilypad
|
||||
lilypad_isp: TARGET = lilypad
|
||||
lilypad_isp: HFUSE = DD
|
||||
lilypad_isp: LFUSE = E2
|
||||
lilypad_isp: EFUSE = 00
|
||||
lilypad_isp: isp
|
||||
|
||||
lilypad_resonator: TARGET = lilypad_resonator
|
||||
lilypad_resonator: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=3'
|
||||
lilypad_resonator: AVR_FREQ = 8000000L
|
||||
lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
|
||||
|
||||
lilypad_resonator_isp: lilypad_resonator
|
||||
lilypad_resonator_isp: TARGET = lilypad_resonator
|
||||
lilypad_resonator_isp: HFUSE = DD
|
||||
lilypad_resonator_isp: LFUSE = C6
|
||||
lilypad_resonator_isp: EFUSE = 00
|
||||
lilypad_resonator_isp: isp
|
||||
|
||||
pro8: TARGET = pro_8MHz
|
||||
pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
|
||||
pro8: AVR_FREQ = 8000000L
|
||||
pro8: $(PROGRAM)_pro_8MHz.hex
|
||||
|
||||
pro8_isp: pro8
|
||||
pro8_isp: TARGET = pro_8MHz
|
||||
pro8_isp: HFUSE = DD
|
||||
pro8_isp: LFUSE = C6
|
||||
pro8_isp: EFUSE = 00
|
||||
pro8_isp: isp
|
||||
|
||||
pro16: TARGET = pro_16MHz
|
||||
pro16: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
|
||||
pro16: AVR_FREQ = 16000000L
|
||||
pro16: $(PROGRAM)_pro_16MHz.hex
|
||||
|
||||
pro16_isp: pro16
|
||||
pro16_isp: TARGET = pro_16MHz
|
||||
pro16_isp: HFUSE = DD
|
||||
pro16_isp: LFUSE = C6
|
||||
pro16_isp: EFUSE = 00
|
||||
pro16_isp: isp
|
||||
|
||||
pro20: TARGET = pro_20mhz
|
||||
pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
|
||||
pro20: AVR_FREQ = 20000000L
|
||||
pro20: $(PROGRAM)_pro_20mhz.hex
|
||||
|
||||
pro20_isp: pro20
|
||||
pro20_isp: TARGET = pro_20mhz
|
||||
pro20_isp: HFUSE = DD
|
||||
pro20_isp: LFUSE = C6
|
||||
pro20_isp: EFUSE = 00
|
||||
pro20_isp: isp
|
||||
|
||||
diecimila: TARGET = diecimila
|
||||
diecimila: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1'
|
||||
diecimila: AVR_FREQ = 16000000L
|
||||
diecimila: $(PROGRAM)_diecimila.hex
|
||||
|
||||
diecimila_isp: diecimila
|
||||
diecimila_isp: TARGET = diecimila
|
||||
diecimila_isp: HFUSE = DD
|
||||
diecimila_isp: LFUSE = FF
|
||||
diecimila_isp: EFUSE = 00
|
||||
diecimila_isp: isp
|
||||
|
||||
ng: TARGET = ng
|
||||
ng: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
|
||||
ng: AVR_FREQ = 16000000L
|
||||
ng: $(PROGRAM)_ng.hex
|
||||
|
||||
ng_isp: ng
|
||||
ng_isp: TARGET = ng
|
||||
ng_isp: HFUSE = DD
|
||||
ng_isp: LFUSE = FF
|
||||
ng_isp: EFUSE = 00
|
||||
ng_isp: isp
|
||||
|
||||
atmega328: TARGET = atmega328
|
||||
atmega328: MCU_TARGET = atmega328p
|
||||
atmega328: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600
|
||||
atmega328: AVR_FREQ = 16000000L
|
||||
atmega328: LDSECTION = --section-start=.text=0x7800
|
||||
atmega328: $(PROGRAM)_atmega328.hex
|
||||
|
||||
atmega328_isp: atmega328
|
||||
atmega328_isp: TARGET = atmega328
|
||||
atmega328_isp: MCU_TARGET = atmega328p
|
||||
atmega328_isp: HFUSE = DA
|
||||
atmega328_isp: LFUSE = FF
|
||||
atmega328_isp: EFUSE = 05
|
||||
atmega328_isp: isp
|
||||
|
||||
atmega328_pro8: TARGET = atmega328_pro_8MHz
|
||||
atmega328_pro8: MCU_TARGET = atmega328p
|
||||
atmega328_pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED
|
||||
atmega328_pro8: AVR_FREQ = 8000000L
|
||||
atmega328_pro8: LDSECTION = --section-start=.text=0x7800
|
||||
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
|
||||
|
||||
atmega328_pro8_isp: atmega328_pro8
|
||||
atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
|
||||
atmega328_pro8_isp: MCU_TARGET = atmega328p
|
||||
atmega328_pro8_isp: HFUSE = DA
|
||||
atmega328_pro8_isp: LFUSE = FF
|
||||
atmega328_pro8_isp: EFUSE = 05
|
||||
atmega328_pro8_isp: isp
|
||||
|
||||
mega: TARGET = atmega1280
|
||||
mega: MCU_TARGET = atmega1280
|
||||
mega: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' -DBAUD_RATE=57600
|
||||
mega: AVR_FREQ = 16000000L
|
||||
mega: LDSECTION = --section-start=.text=0x1F000
|
||||
mega: $(PROGRAM)_atmega1280.hex
|
||||
|
||||
mega_isp: mega
|
||||
mega_isp: TARGET = atmega1280
|
||||
mega_isp: MCU_TARGET = atmega1280
|
||||
mega_isp: HFUSE = DA
|
||||
mega_isp: LFUSE = FF
|
||||
mega_isp: EFUSE = F5
|
||||
mega_isp: isp
|
||||
|
||||
atmega1284p: TARGET = atmega1284p
|
||||
atmega1284p: MCU_TARGET = atmega1284p
|
||||
atmega1284p: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=57600'
|
||||
atmega1284p: AVR_FREQ = 16000000L
|
||||
atmega1284p: LDSECTION = --section-start=.text=0x1F000
|
||||
atmega1284p: $(PROGRAM)_atmega1284p.hex
|
||||
|
||||
atmega1284p_8m: TARGET = atmega1284p
|
||||
atmega1284p_8m: MCU_TARGET = atmega1284p
|
||||
atmega1284p_8m: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=19200'
|
||||
atmega1284p_8m: AVR_FREQ = 8000000L
|
||||
atmega1284p_8m: LDSECTION = --section-start=.text=0x1F000
|
||||
atmega1284p_8m: $(PROGRAM)_atmega1284p_8m.hex
|
||||
|
||||
atmega644p: TARGET = atmega644p
|
||||
atmega644p: MCU_TARGET = atmega644p
|
||||
atmega644p: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=57600'
|
||||
atmega644p: AVR_FREQ = 16000000L
|
||||
atmega644p: LDSECTION = --section-start=.text=0xF800
|
||||
atmega644p: $(PROGRAM)_atmega644p.hex
|
||||
|
||||
|
||||
atmega1284p_isp: atmega1284p
|
||||
atmega1284p_isp: TARGET = atmega1284p
|
||||
atmega1284p_isp: MCU_TARGET = atmega1284p
|
||||
atmega1284p_isp: HFUSE = DC
|
||||
atmega1284p_isp: LFUSE = FF
|
||||
atmega1284p_isp: EFUSE = FD
|
||||
atmega1284p_isp: isp
|
||||
|
||||
isp: $(TARGET)
|
||||
$(ISPFUSES)
|
||||
$(ISPFLASH)
|
||||
|
||||
isp-stk500: $(PROGRAM)_$(TARGET).hex
|
||||
$(STK500-1)
|
||||
$(STK500-2)
|
||||
|
||||
%.elf: $(OBJ)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
|
||||
|
||||
%.lst: %.elf
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
|
||||
%.hex: %.elf
|
||||
$(OBJCOPY) -j .text -j .data -O ihex $< $@
|
||||
|
||||
%.srec: %.elf
|
||||
$(OBJCOPY) -j .text -j .data -O srec $< $@
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -j .text -j .data -O binary $< $@
|
||||
|
@ -1,117 +0,0 @@
|
||||
:020000021000EC
|
||||
:10F800000C9446FC0C9465FC0C9465FC0C9465FC13
|
||||
:10F810000C9465FC0C9465FC0C9465FC0C9465FCE4
|
||||
:10F820000C9465FC0C9465FC0C9465FC0C9465FCD4
|
||||
:10F830000C9465FC0C9465FC0C9465FC0C9465FCC4
|
||||
:10F840000C9465FC0C9465FC0C9465FC0C9465FCB4
|
||||
:10F850000C9465FC0C9465FC0C9465FC0C9465FCA4
|
||||
:10F860000C9465FC0C9465FC0C9465FC0C9465FC94
|
||||
:10F870000C9465FC0C9465FC0C9465FC0C9465FC84
|
||||
:10F880000C9465FC0C9465FC0C9465FC11241FBE63
|
||||
:10F89000CFEFD0E4DEBFCDBF11E0A0E0B1E0E6E005
|
||||
:10F8A000FFEF01E00BBF02C007900D92A230B1073D
|
||||
:10F8B000D9F712E0A2E0B1E001C01D92AD30B1076E
|
||||
:10F8C000E1F70E945FFD0C9481FF0C9400FC909185
|
||||
:10F8D0000201913039F49091C00095FFFCCF8093E4
|
||||
:10F8E000C6000895923031F49091C80095FFFCCF86
|
||||
:10F8F0008093CE0008951F93982F95959595959593
|
||||
:10F900009595905D182F1F701A3014F0195A01C088
|
||||
:10F91000105D892F0E9467FC812F0E9467FC1F9158
|
||||
:10F920000895EF92FF920F931F938091020181300F
|
||||
:10F93000F1F4EE24FF24870113C00894E11CF11CAC
|
||||
:10F94000011D111D81E0E81682E1F8068AE708072B
|
||||
:10F9500080E0180728F0E0910401F0910501099575
|
||||
:10F960008091C00087FFE9CF8091C60021C082301E
|
||||
:10F97000F1F4EE24FF24870113C00894E11CF11C6C
|
||||
:10F98000011D111D81E0E81682E1F8068AE70807EB
|
||||
:10F9900080E0180728F0E0910401F0910501099535
|
||||
:10F9A0008091C80087FFE9CF8091CE0001C080E040
|
||||
:10F9B0001F910F91FF90EF9008951F930E9491FC6B
|
||||
:10F9C000182F0E9467FC113614F0175503C010332E
|
||||
:10F9D0000CF01053812F1F9108951F930E94DDFC9E
|
||||
:10F9E000182F0E94DDFC1295107F810F1F91089542
|
||||
:10F9F0009091020112C0913039F42091C00027FF8C
|
||||
:10FA0000FCCF2091C60008C0923031F42091C8008C
|
||||
:10FA100027FFFCCF2091CE008150882361F7089505
|
||||
:10FA20001F93182F0E9491FC803251F484E10E94B0
|
||||
:10FA300067FC812F0E9467FC80E10E9467FC0CC07C
|
||||
:10FA4000809103018F5F80930301853029F4E09159
|
||||
:10FA50000401F091050109951F9108950E9491FC00
|
||||
:10FA6000803239F484E10E9467FC80E10E9467FCE7
|
||||
:10FA70000895809103018F5F80930301853029F4FD
|
||||
:10FA8000E0910401F09105010995089515C0289AA7
|
||||
:10FA90002FEF31EE44E0215030404040E1F700C00C
|
||||
:10FAA000000028982FEF31EE44E0215030404040D4
|
||||
:10FAB000E1F700C000008150882349F70895BF9204
|
||||
:10FAC000CF92DF92EF92FF920F931F93CF93DF932A
|
||||
:10FAD00094B714BE8091600088618093600010929A
|
||||
:10FAE000600091FD05C0E0910401F09105010995C8
|
||||
:10FAF00081E08093020180E18093C4001092C500F0
|
||||
:10FB00001092C00086E08093C20088E18093C1001B
|
||||
:10FB1000209A84E00E9446FDBB24B3940E9491FC8D
|
||||
:10FB2000803309F441C08133E1F40E9491FC8032BA
|
||||
:10FB300009F0C3C184E10E9467FC81E40E9467FC74
|
||||
:10FB400086E50E9467FC82E50E9467FC80E20E94D5
|
||||
:10FB500067FC89E40E9467FC83E50E9467FC80E5FE
|
||||
:10FB600029C1803439F40E9491FC8638E8F00E9463
|
||||
:10FB700091FC1AC0813499F40E9491FC803811F4F0
|
||||
:10FB800082E098C1813811F481E094C1823811F487
|
||||
:10FB900080E190C1883909F08CC183E08BC1823447
|
||||
:10FBA00031F484E10E94F8FC0E942EFDB7CF853429
|
||||
:10FBB00011F485E0F7CF8035B9F38235A9F38135AB
|
||||
:10FBC00031F40E942EFD88E080936000FFCF8535E0
|
||||
:10FBD00049F40E9491FC809306010E9491FC80935D
|
||||
:10FBE0000701E2CF8635C9F40E9491FC803389F485
|
||||
:10FBF0000E9491FC0E9491FC082F0E9491FC00231E
|
||||
:10FC000011F48EE157C1013011F487E953C185E049
|
||||
:10FC100051C183E00E94F8FC4CC1843609F0D0C089
|
||||
:10FC20000E9491FC809309020E9491FC809308023B
|
||||
:10FC300080910C028E7F80930C020E9491FC85348F
|
||||
:10FC400029F480910C02816080930C0258E0C52E4B
|
||||
:10FC500051E0D52E760100E010E007C00E9491FC33
|
||||
:10FC6000F70181937F010F5F1F4F809108029091F0
|
||||
:10FC700009020817190790F30E9491FC803209F0DD
|
||||
:10FC80001CC180910C0280FF29C0809106019091D7
|
||||
:10FC90000701880F991F909307018093060100E0E8
|
||||
:10FCA00010E014C0F60161916F01809106019091FE
|
||||
:10FCB00007010E9473FF8091060190910701019650
|
||||
:10FCC00090930701809306010F5F1F4F80910802F8
|
||||
:10FCD000909109020817190728F36BC0809107015A
|
||||
:10FCE000880F880B8B2180930B028BBF80910601BC
|
||||
:10FCF00090910701880F991F909307018093060147
|
||||
:10FD00008091080280FF09C0809108029091090249
|
||||
:10FD100001969093090280930802F894F999FECF16
|
||||
:10FD20001127E0910601F0910701C8E0D1E0809130
|
||||
:10FD3000080290910902103091F40091570001706F
|
||||
:10FD40000130D9F303E000935700E8950091570084
|
||||
:10FD500001700130D9F301E100935700E895099053
|
||||
:10FD600019900091570001700130D9F301E0009320
|
||||
:10FD70005700E8951395103898F011270091570017
|
||||
:10FD800001700130D9F305E000935700E895009128
|
||||
:10FD9000570001700130D9F301E100935700E89555
|
||||
:10FDA0003296029709F0C7CF103011F00296E5CFD6
|
||||
:10FDB000112484E10E9467FC80E10E9467FCAECEC2
|
||||
:10FDC000843709F063C00E9491FC809309020E946D
|
||||
:10FDD00091FC809308028091060190910701209187
|
||||
:10FDE0000C0297FF02C0226001C02D7F20930C02FD
|
||||
:10FDF000880F991F90930701809306010E9491FC40
|
||||
:10FE000020910C02853411F4216001C02E7F2093D3
|
||||
:10FE10000C020E9491FC803209F080CE84E10E94A5
|
||||
:10FE200067FC00E010E02AC080910C0280FF07C050
|
||||
:10FE300080910601909107010E946BFF12C0E09132
|
||||
:10FE40000601F091070181FD02C084910AC0CF0133
|
||||
:10FE5000A0E0B0E080509040AF4FBF4FABBFFC017F
|
||||
:10FE600087910E9467FC809106019091070101969D
|
||||
:10FE700090930701809306010F5F1F4F8091080246
|
||||
:10FE8000909109020817190778F296CF853779F40F
|
||||
:10FE90000E9491FC803289F484E10E9467FC8EE12B
|
||||
:10FEA0000E9467FC87E90E9467FC85E083CF863764
|
||||
:10FEB00021F480E00E9410FD31CE809103018F5F1C
|
||||
:10FEC00080930301853009F029CEE0910401F0917F
|
||||
:10FED0000501099523CEF999FECF92BD81BDF89A0F
|
||||
:10FEE000992780B50895262FF999FECF1FBA92BDA4
|
||||
:10FEF00081BD20BD0FB6F894FA9AF99A0FBE01960B
|
||||
:06FF00000895F894FFCF04
|
||||
:02FF0600800079
|
||||
:040000031000F800F1
|
||||
:00000001FF
|
@ -1,121 +0,0 @@
|
||||
:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
|
||||
:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
|
||||
:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
|
||||
:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
|
||||
:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
|
||||
:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
|
||||
:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
|
||||
:10F870000C945B7C0C945B7C0C945B7C11241FBE11
|
||||
:10F88000CFEFD8E0DEBFCDBF11E0A0E0B1E0E6E60B
|
||||
:10F89000FFEF02C005900D92A030B107D9F712E03A
|
||||
:10F8A000A0E0B1E001C01D92A930B107E1F70E94CC
|
||||
:10F8B000537D0C94B27F0C94007CCF93DF93CDB733
|
||||
:10F8C000DEB724970FB6F894DEBF0FBECDBF8823F6
|
||||
:10F8D00009F481E020E0482F55274115510509F42E
|
||||
:10F8E0003DC0289A19821A821B821C820BC0898112
|
||||
:10F8F0009A81AB81BC810196A11DB11D89839A8338
|
||||
:10F90000AB83BC8389819A81AB81BC8180589E4343
|
||||
:10F91000A040B04060F3289819821A821B821C8292
|
||||
:10F920000BC089819A81AB81BC810196A11DB11D5B
|
||||
:10F9300089839A83AB83BC8389819A81AB81BC81A3
|
||||
:10F9400080509A4FA040B04060F32F5F822F9927DC
|
||||
:10F9500087FD9095841795070CF4C3CF19821A82FE
|
||||
:10F960001B821C8289819A81AB81BC818050914726
|
||||
:10F97000A240B040A0F489819A81AB81BC810196FC
|
||||
:10F98000A11DB11D89839A83AB83BC8389819A8130
|
||||
:10F99000AB81BC8180509147A240B04060F3249677
|
||||
:10F9A0000FB6F894DEBF0FBECDBFDF91CF910895A3
|
||||
:10F9B000EF92FF920F931F93EE24FF248701289864
|
||||
:10F9C0008091C00087FD17C00894E11CF11C011D47
|
||||
:10F9D000111D81E0E81689E0F8068DE3080780E054
|
||||
:10F9E000180770F3E0910001F091010109958091F1
|
||||
:10F9F000C00087FFE9CF289A8091C600992787FD2C
|
||||
:10FA000090951F910F91FF90EF900895982F8091FE
|
||||
:10FA1000C00085FFFCCF9093C60008950E94D87C5B
|
||||
:10FA2000803271F0809102018F5F809302018530F6
|
||||
:10FA300009F00895E0910001F09101010995089500
|
||||
:10FA400084E10E94067D80E10E94067D0895CF93A7
|
||||
:10FA5000C82F0E94D87C803241F0809102018F5FD4
|
||||
:10FA600080930201853081F40AC084E10E94067D02
|
||||
:10FA70008C2F0E94067D80E10E94067D05C0E091EA
|
||||
:10FA80000001F09101010995CF910895282F90E090
|
||||
:10FA900007C08091C0008823E4F78091C6009F5F73
|
||||
:10FAA0009217B8F30895CFEFD8E0DEBFCDBF0000C6
|
||||
:10FAB00094B714BE809160008861809360001092BA
|
||||
:10FAC000600091FF74C189E18093C4001092C50069
|
||||
:10FAD00088E18093C10086E08093C2005098589AD4
|
||||
:10FAE000209A83E00E945D7C81E00E945D7C0E9400
|
||||
:10FAF000D87C8033B9F18133C1F1803409F456C028
|
||||
:10FB0000813409F45CC0823409F46EC0853409F490
|
||||
:10FB100071C0803539F1813509F4F3C0823511F1B6
|
||||
:10FB2000853509F4D3C0863509F4CBC0843609F491
|
||||
:10FB300065C0843709F4EBC0853709F4D2C0863735
|
||||
:10FB400009F44AC0809102018F5F809302018530E1
|
||||
:10FB500071F6E0910001F091010109950E94D87CB5
|
||||
:10FB6000803349F60E940E7DC2CF0E94D87CC82FF8
|
||||
:10FB7000803241F784E10E94067D81E40E94067D87
|
||||
:10FB800086E50E94067D82E50E94067D8C2F0E94FC
|
||||
:10FB9000067D89E40E94067D83E50E94067D80E55E
|
||||
:10FBA0000E94067D80E10E94067DA1CF0E94D87C44
|
||||
:10FBB0008638C0F20E94D87C0E940E7D98CF0E94A9
|
||||
:10FBC000D87C803809F407C1813809F400C1823833
|
||||
:10FBD00009F4F9C0883921F080E00E94277D87CFA1
|
||||
:10FBE00083E00E94277D83CF84E10E94467D0E94AE
|
||||
:10FBF0000E7D7DCF85E00E94467DF9CF0E94D87CA6
|
||||
:10FC0000809306020E94D87C8093050280910802AE
|
||||
:10FC10008E7F809308020E94D87C853409F44BC003
|
||||
:10FC2000E5E0F1E0119281E0E438F807D9F3D0F390
|
||||
:10FC3000C0E0D0E0809105029091060218161906E6
|
||||
:10FC400078F405E011E00E94D87CF80181938F01DF
|
||||
:10FC500021968091050290910602C817D90798F362
|
||||
:10FC60000E94D87C803209F06DCF8091080280FF1D
|
||||
:10FC7000B6C0C0E0D0E02091050230910602121615
|
||||
:10FC80001306B8F4E0910301F0910401A5E0B1E09E
|
||||
:10FC9000F999FECFF2BDE1BD8D9180BDFA9AF99A36
|
||||
:10FCA00031962196C217D30798F3F0930401E0939D
|
||||
:10FCB000030184E175CF809108028160809308027E
|
||||
:10FCC000AFCF84E00E94467D80E087CF0E94D87C41
|
||||
:10FCD000809303010E94D87C809304010E940E7DD2
|
||||
:10FCE00006CF0E94D87C803209F02CCF84E10E949C
|
||||
:10FCF000067D8EE10E94067D85E90E94067D88E0F2
|
||||
:10FD00004FCF0E940E7D88E080936000FFCF0E945D
|
||||
:10FD1000D87C809306020E94D87C809305020E94C2
|
||||
:10FD2000D87C853409F449C0809108028E7F809385
|
||||
:10FD300008028091030190910401880F991F90930C
|
||||
:10FD40000401809303010E94D87C803209F0CFCE59
|
||||
:10FD500084E10E94067DC0E0D0E020910502309150
|
||||
:10FD600006021216130608F01DCFE0910301F09170
|
||||
:10FD700004018091080280FF96C0F999FECFF2BD80
|
||||
:10FD8000E1BDF89A80B50E94067DE0910301F091F3
|
||||
:10FD900004013196F0930401E093030120910502E0
|
||||
:10FDA000309106022196C217D30718F3FBCEE091DB
|
||||
:10FDB0000001F0910101099586CE809108028160D1
|
||||
:10FDC00080930802C0CF80E10E94277D90CE81E021
|
||||
:10FDD0000E94277D8CCE82E00E94277D88CE809174
|
||||
:10FDE000030190910401880F991F9093040180935F
|
||||
:10FDF00003018091050280FF09C080910502909166
|
||||
:10FE0000060201969093060280930502F999FECFAF
|
||||
:10FE10001127E0910301F0910401C5E0D1E0809148
|
||||
:10FE2000050290910602103091F400915700017084
|
||||
:10FE30000130D9F303E000935700E8950091570093
|
||||
:10FE400001700130D9F301E100935700E895099062
|
||||
:10FE500019900091570001700130D9F301E000932F
|
||||
:10FE60005700E8951395103898F011270091570026
|
||||
:10FE700001700130D9F305E000935700E895009137
|
||||
:10FE8000570001700130D9F301E100935700E89564
|
||||
:10FE90003296029709F0C7CF103011F00296E5CFE5
|
||||
:10FEA000112484E17DCE869580FF06C03196F093C3
|
||||
:10FEB0000401E093030176CF84910E94067D209196
|
||||
:10FEC000050230910602E0910301F0910401EECFAA
|
||||
:10FED0001F93CF930E94D87CC82F0E94067D0E945A
|
||||
:10FEE000D87C182F0E94067DC1362CF0C7551136DC
|
||||
:10FEF0003CF0175508C0C033D4F3C0531136CCF7CB
|
||||
:10FF000010330CF01053C295C07FC10F8C2F99276E
|
||||
:10FF100087FD9095CF911F910895CF93282F992712
|
||||
:10FF200087FD9095807F907095958795959587959D
|
||||
:10FF300095958795959587958A303CF0895AC22F7B
|
||||
:10FF4000CF70CA303CF0C95A06C0805DC22FCF7056
|
||||
:10FF5000CA30CCF7C05D0E94067D8C2F0E94067DC2
|
||||
:06FF6000CF910895FFCFD0
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,120 +0,0 @@
|
||||
:10F800000C94387C0C94557C0C94557C0C94557C51
|
||||
:10F810000C94557C0C94557C0C94557C0C94557C24
|
||||
:10F820000C94557C0C94557C0C94557C0C94557C14
|
||||
:10F830000C94557C0C94557C0C94557C0C94557C04
|
||||
:10F840000C94557C0C94557C0C94557C0C94557CF4
|
||||
:10F850000C94557C0C94557C0C94557C0C94557CE4
|
||||
:10F860000C94557C0C94557C0C94557C0C94557CD4
|
||||
:10F8700011241FBECFEFD0E1DEBFCDBF11E0A0E06D
|
||||
:10F88000B1E0EAE5FFEF02C005900D92A030B107AC
|
||||
:10F89000D9F712E0A0E0B1E001C01D92A930B10794
|
||||
:10F8A000E1F70E944D7D0C94AC7F0C94007CCF93CB
|
||||
:10F8B000DF93CDB7DEB724970FB6F894DEBF0FBE47
|
||||
:10F8C000CDBF882309F481E020E0482F552741155A
|
||||
:10F8D000510509F43DC0289A19821A821B821C82A4
|
||||
:10F8E0000BC089819A81AB81BC810196A11DB11D9C
|
||||
:10F8F00089839A83AB83BC8389819A81AB81BC81E4
|
||||
:10F9000080589E43A040B04060F3289819821A8224
|
||||
:10F910001B821C820BC089819A81AB81BC810196BC
|
||||
:10F92000A11DB11D89839A83AB83BC8389819A8190
|
||||
:10F93000AB81BC8180509A4FA040B04060F32F5FF4
|
||||
:10F94000822F992787FD9095841795070CF4C3CFD4
|
||||
:10F9500019821A821B821C8289819A81AB81BC81A7
|
||||
:10F9600080509147A240B040A0F489819A81AB8138
|
||||
:10F97000BC810196A11DB11D89839A83AB83BC8391
|
||||
:10F9800089819A81AB81BC8180509147A240B0406F
|
||||
:10F9900060F324960FB6F894DEBF0FBECDBFDF91A3
|
||||
:10F9A000CF910895EF92FF920F931F93EE24FF24BF
|
||||
:10F9B000870128988091C00087FD17C00894E11C3A
|
||||
:10F9C000F11C011D111D81E0E81689E0F8068DE3A8
|
||||
:10F9D000080780E0180770F3E0910001F091010141
|
||||
:10F9E00009958091C00087FFE9CF289A8091C600D1
|
||||
:10F9F000992787FD90951F910F91FF90EF900895A3
|
||||
:10FA0000982F8091C00085FFFCCF9093C600089589
|
||||
:10FA10000E94D27C803271F0809102018F5F8093CE
|
||||
:10FA20000201853009F00895E0910001F091010193
|
||||
:10FA30000995089584E10E94007D80E10E94007D87
|
||||
:10FA40000895CF93C82F0E94D27C803241F08091DC
|
||||
:10FA500002018F5F80930201853081F40AC084E146
|
||||
:10FA60000E94007D8C2F0E94007D80E10E94007D1D
|
||||
:10FA700005C0E0910001F09101010995CF91089531
|
||||
:10FA8000282F90E007C08091C0008823E4F7809180
|
||||
:10FA9000C6009F5F9217B8F30895CFEFD0E1DEBFA5
|
||||
:10FAA000CDBF000094B714BE809160008861809340
|
||||
:10FAB00060001092600091FF74C189E18093C400DE
|
||||
:10FAC0001092C50088E18093C10086E08093C20057
|
||||
:10FAD0005098589A209A83E00E94577C81E00E94B7
|
||||
:10FAE000577C0E94D27C8033B9F18133C1F18034DC
|
||||
:10FAF00009F456C0813409F45CC0823409F46EC044
|
||||
:10FB0000853409F471C0803539F1813509F4F3C0C9
|
||||
:10FB1000823511F1853509F4D3C0863509F4CBC09F
|
||||
:10FB2000843609F465C0843709F4EBC0853709F4DD
|
||||
:10FB3000D2C0863709F44AC0809102018F5F80935A
|
||||
:10FB40000201853071F6E0910001F0910101099503
|
||||
:10FB50000E94D27C803349F60E94087DC2CF0E9469
|
||||
:10FB6000D27CC82F803241F784E10E94007D81E47D
|
||||
:10FB70000E94007D86E50E94007D82E50E94007D56
|
||||
:10FB80008C2F0E94007D89E40E94007D83E50E9405
|
||||
:10FB9000007D80E50E94007D80E10E94007DA1CF74
|
||||
:10FBA0000E94D27C8638C0F20E94D27C0E94087DDE
|
||||
:10FBB00098CF0E94D27C803809F407C1813809F4BB
|
||||
:10FBC00000C1823809F4F9C0883921F080E00E9430
|
||||
:10FBD000217D87CF83E00E94217D83CF84E10E9435
|
||||
:10FBE000407D0E94087D7DCF85E00E94407DF9CF59
|
||||
:10FBF0000E94D27C809306020E94D27C80930502F0
|
||||
:10FC0000809108028E7F809308020E94D27C853406
|
||||
:10FC100009F44BC0E5E0F1E0119281E0E438F80727
|
||||
:10FC2000D9F3D0F3C0E0D0E08091050290910602B4
|
||||
:10FC30001816190678F405E011E00E94D27CF8014C
|
||||
:10FC400081938F0121968091050290910602C81739
|
||||
:10FC5000D90798F30E94D27C803209F06DCF809151
|
||||
:10FC6000080280FFB6C0C0E0D0E0209105023091CC
|
||||
:10FC7000060212161306B8F4E0910301F091040194
|
||||
:10FC8000A5E0B1E0F999FECFF2BDE1BD8D9180BD57
|
||||
:10FC9000FA9AF99A31962196C217D30798F3F093FE
|
||||
:10FCA0000401E093030184E175CF80910802816033
|
||||
:10FCB00080930802AFCF84E00E94407D80E087CF30
|
||||
:10FCC0000E94D27C809303010E94D27C8093040125
|
||||
:10FCD0000E94087D06CF0E94D27C803209F02CCF92
|
||||
:10FCE00084E10E94007D8EE10E94007D86E90E94F1
|
||||
:10FCF000007D89E04FCF0E94087D88E080936000FE
|
||||
:10FD0000FFCF0E94D27C809306020E94D27C809317
|
||||
:10FD100005020E94D27C853409F449C08091080212
|
||||
:10FD20008E7F809308028091030190910401880FD7
|
||||
:10FD3000991F90930401809303010E94D27C80322A
|
||||
:10FD400009F0CFCE84E10E94007DC0E0D0E0209198
|
||||
:10FD50000502309106021216130608F01DCFE0913D
|
||||
:10FD60000301F09104018091080280FF96C0F99987
|
||||
:10FD7000FECFF2BDE1BDF89A80B50E94007DE09112
|
||||
:10FD80000301F09104013196F0930401E093030123
|
||||
:10FD900020910502309106022196C217D30718F36D
|
||||
:10FDA000FBCEE0910001F0910101099586CE809192
|
||||
:10FDB0000802816080930802C0CF80E10E94217D0B
|
||||
:10FDC00090CE81E00E94217D8CCE82E00E94217D38
|
||||
:10FDD00088CE8091030190910401880F991F909320
|
||||
:10FDE0000401809303018091050280FF09C0809186
|
||||
:10FDF00005029091060201969093060280930502F7
|
||||
:10FE0000F999FECF1127E0910301F0910401C5E0BB
|
||||
:10FE1000D1E08091050290910602103091F400919A
|
||||
:10FE2000570001700130D9F303E000935700E895C3
|
||||
:10FE30000091570001700130D9F301E100935700A0
|
||||
:10FE4000E895099019900091570001700130D9F39D
|
||||
:10FE500001E000935700E8951395103898F01127AA
|
||||
:10FE60000091570001700130D9F305E0009357006D
|
||||
:10FE7000E8950091570001700130D9F301E100933A
|
||||
:10FE80005700E8953296029709F0C7CF103011F06D
|
||||
:10FE90000296E5CF112484E17DCE869580FF06C0D1
|
||||
:10FEA0003196F0930401E093030176CF84910E9490
|
||||
:10FEB000007D2091050230910602E0910301F0914E
|
||||
:10FEC0000401EECF1F93CF930E94D27CC82F0E94D3
|
||||
:10FED000007D0E94D27C182F0E94007DC1362CF03C
|
||||
:10FEE000C75511363CF0175508C0C033D4F3C05382
|
||||
:10FEF0001136CCF710330CF01053C295C07FC10FF0
|
||||
:10FF00008C2F992787FD9095CF911F910895CF93BE
|
||||
:10FF1000282F992787FD9095807F907095958795DC
|
||||
:10FF20009595879595958795959587958A303CF019
|
||||
:10FF3000895AC22FCF70CA303CF0C95A06C0805DC2
|
||||
:10FF4000C22FCF70CA30CCF7C05D0E94007D8C2FCD
|
||||
:0AFF50000E94007DCF910895FFCFBD
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,121 +0,0 @@
|
||||
:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
|
||||
:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
|
||||
:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
|
||||
:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
|
||||
:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
|
||||
:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
|
||||
:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
|
||||
:10F870000C945B7C0C945B7C0C945B7C11241FBE11
|
||||
:10F88000CFEFD0E1DEBFCDBF11E0A0E0B1E0E6E612
|
||||
:10F89000FFEF02C005900D92A030B107D9F712E03A
|
||||
:10F8A000A0E0B1E001C01D92A930B107E1F70E94CC
|
||||
:10F8B000537D0C94B27F0C94007CCF93DF93CDB733
|
||||
:10F8C000DEB724970FB6F894DEBF0FBECDBF8823F6
|
||||
:10F8D00009F481E020E0482F55274115510509F42E
|
||||
:10F8E0003DC0289A19821A821B821C820BC0898112
|
||||
:10F8F0009A81AB81BC810196A11DB11D89839A8338
|
||||
:10F90000AB83BC8389819A81AB81BC8180589E4343
|
||||
:10F91000A040B04060F3289819821A821B821C8292
|
||||
:10F920000BC089819A81AB81BC810196A11DB11D5B
|
||||
:10F9300089839A83AB83BC8389819A81AB81BC81A3
|
||||
:10F9400080509A4FA040B04060F32F5F822F9927DC
|
||||
:10F9500087FD9095841795070CF4C3CF19821A82FE
|
||||
:10F960001B821C8289819A81AB81BC818050914726
|
||||
:10F97000A240B040A0F489819A81AB81BC810196FC
|
||||
:10F98000A11DB11D89839A83AB83BC8389819A8130
|
||||
:10F99000AB81BC8180509147A240B04060F3249677
|
||||
:10F9A0000FB6F894DEBF0FBECDBFDF91CF910895A3
|
||||
:10F9B000EF92FF920F931F93EE24FF248701289864
|
||||
:10F9C0008091C00087FD17C00894E11CF11C011D47
|
||||
:10F9D000111D81E0E81689E0F8068DE3080780E054
|
||||
:10F9E000180770F3E0910001F091010109958091F1
|
||||
:10F9F000C00087FFE9CF289A8091C600992787FD2C
|
||||
:10FA000090951F910F91FF90EF900895982F8091FE
|
||||
:10FA1000C00085FFFCCF9093C60008950E94D87C5B
|
||||
:10FA2000803271F0809102018F5F809302018530F6
|
||||
:10FA300009F00895E0910001F09101010995089500
|
||||
:10FA400084E10E94067D80E10E94067D0895CF93A7
|
||||
:10FA5000C82F0E94D87C803241F0809102018F5FD4
|
||||
:10FA600080930201853081F40AC084E10E94067D02
|
||||
:10FA70008C2F0E94067D80E10E94067D05C0E091EA
|
||||
:10FA80000001F09101010995CF910895282F90E090
|
||||
:10FA900007C08091C0008823E4F78091C6009F5F73
|
||||
:10FAA0009217B8F30895CFEFD0E1DEBFCDBF0000CD
|
||||
:10FAB00094B714BE809160008861809360001092BA
|
||||
:10FAC000600091FF74C189E18093C4001092C50069
|
||||
:10FAD00088E18093C10086E08093C2005098589AD4
|
||||
:10FAE000209A83E00E945D7C81E00E945D7C0E9400
|
||||
:10FAF000D87C8033B9F18133C1F1803409F456C028
|
||||
:10FB0000813409F45CC0823409F46EC0853409F490
|
||||
:10FB100071C0803539F1813509F4F3C0823511F1B6
|
||||
:10FB2000853509F4D3C0863509F4CBC0843609F491
|
||||
:10FB300065C0843709F4EBC0853709F4D2C0863735
|
||||
:10FB400009F44AC0809102018F5F809302018530E1
|
||||
:10FB500071F6E0910001F091010109950E94D87CB5
|
||||
:10FB6000803349F60E940E7DC2CF0E94D87CC82FF8
|
||||
:10FB7000803241F784E10E94067D81E40E94067D87
|
||||
:10FB800086E50E94067D82E50E94067D8C2F0E94FC
|
||||
:10FB9000067D89E40E94067D83E50E94067D80E55E
|
||||
:10FBA0000E94067D80E10E94067DA1CF0E94D87C44
|
||||
:10FBB0008638C0F20E94D87C0E940E7D98CF0E94A9
|
||||
:10FBC000D87C803809F407C1813809F400C1823833
|
||||
:10FBD00009F4F9C0883921F080E00E94277D87CFA1
|
||||
:10FBE00083E00E94277D83CF84E10E94467D0E94AE
|
||||
:10FBF0000E7D7DCF85E00E94467DF9CF0E94D87CA6
|
||||
:10FC0000809306020E94D87C8093050280910802AE
|
||||
:10FC10008E7F809308020E94D87C853409F44BC003
|
||||
:10FC2000E5E0F1E0119281E0E438F807D9F3D0F390
|
||||
:10FC3000C0E0D0E0809105029091060218161906E6
|
||||
:10FC400078F405E011E00E94D87CF80181938F01DF
|
||||
:10FC500021968091050290910602C817D90798F362
|
||||
:10FC60000E94D87C803209F06DCF8091080280FF1D
|
||||
:10FC7000B6C0C0E0D0E02091050230910602121615
|
||||
:10FC80001306B8F4E0910301F0910401A5E0B1E09E
|
||||
:10FC9000F999FECFF2BDE1BD8D9180BDFA9AF99A36
|
||||
:10FCA00031962196C217D30798F3F0930401E0939D
|
||||
:10FCB000030184E175CF809108028160809308027E
|
||||
:10FCC000AFCF84E00E94467D80E087CF0E94D87C41
|
||||
:10FCD000809303010E94D87C809304010E940E7DD2
|
||||
:10FCE00006CF0E94D87C803209F02CCF84E10E949C
|
||||
:10FCF000067D8EE10E94067D86E90E94067D8AE0EF
|
||||
:10FD00004FCF0E940E7D88E080936000FFCF0E945D
|
||||
:10FD1000D87C809306020E94D87C809305020E94C2
|
||||
:10FD2000D87C853409F449C0809108028E7F809385
|
||||
:10FD300008028091030190910401880F991F90930C
|
||||
:10FD40000401809303010E94D87C803209F0CFCE59
|
||||
:10FD500084E10E94067DC0E0D0E020910502309150
|
||||
:10FD600006021216130608F01DCFE0910301F09170
|
||||
:10FD700004018091080280FF96C0F999FECFF2BD80
|
||||
:10FD8000E1BDF89A80B50E94067DE0910301F091F3
|
||||
:10FD900004013196F0930401E093030120910502E0
|
||||
:10FDA000309106022196C217D30718F3FBCEE091DB
|
||||
:10FDB0000001F0910101099586CE809108028160D1
|
||||
:10FDC00080930802C0CF80E10E94277D90CE81E021
|
||||
:10FDD0000E94277D8CCE82E00E94277D88CE809174
|
||||
:10FDE000030190910401880F991F9093040180935F
|
||||
:10FDF00003018091050280FF09C080910502909166
|
||||
:10FE0000060201969093060280930502F999FECFAF
|
||||
:10FE10001127E0910301F0910401C5E0D1E0809148
|
||||
:10FE2000050290910602103091F400915700017084
|
||||
:10FE30000130D9F303E000935700E8950091570093
|
||||
:10FE400001700130D9F301E100935700E895099062
|
||||
:10FE500019900091570001700130D9F301E000932F
|
||||
:10FE60005700E8951395103898F011270091570026
|
||||
:10FE700001700130D9F305E000935700E895009137
|
||||
:10FE8000570001700130D9F301E100935700E89564
|
||||
:10FE90003296029709F0C7CF103011F00296E5CFE5
|
||||
:10FEA000112484E17DCE869580FF06C03196F093C3
|
||||
:10FEB0000401E093030176CF84910E94067D209196
|
||||
:10FEC000050230910602E0910301F0910401EECFAA
|
||||
:10FED0001F93CF930E94D87CC82F0E94067D0E945A
|
||||
:10FEE000D87C182F0E94067DC1362CF0C7551136DC
|
||||
:10FEF0003CF0175508C0C033D4F3C0531136CCF7CB
|
||||
:10FF000010330CF01053C295C07FC10F8C2F99276E
|
||||
:10FF100087FD9095CF911F910895CF93282F992712
|
||||
:10FF200087FD9095807F907095958795959587959D
|
||||
:10FF300095958795959587958A303CF0895AC22F7B
|
||||
:10FF4000CF70CA303CF0C95A06C0805DC22FCF7056
|
||||
:10FF5000CA30CCF7C05D0E94067D8C2F0E94067DC2
|
||||
:06FF6000CF910895FFCFD0
|
||||
:040000030000F80001
|
||||
:00000001FF
|
@ -1,723 +0,0 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
|
||||
//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
|
||||
//Released as MIT license
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "L6470.h"
|
||||
#include <SPI.h>
|
||||
|
||||
#define ENABLE_RESET_PIN 0
|
||||
#define K_VALUE 100
|
||||
|
||||
L6470::L6470(int SSPin){
|
||||
_SSPin = SSPin;
|
||||
// Serial.begin(9600);
|
||||
}
|
||||
|
||||
void L6470::init(int k_value){
|
||||
// This is the generic initialization function to set up the Arduino to
|
||||
// communicate with the dSPIN chip.
|
||||
|
||||
// set up the input/output pins for the application.
|
||||
pinMode(SLAVE_SELECT_PIN, OUTPUT); // The SPI peripheral REQUIRES the hardware SS pin-
|
||||
// pin 10- to be an output. This is in here just
|
||||
// in case some future user makes something other
|
||||
// than pin 10 the SS pin.
|
||||
|
||||
pinMode(_SSPin, OUTPUT);
|
||||
digitalWrite(_SSPin, HIGH);
|
||||
pinMode(MOSI, OUTPUT);
|
||||
pinMode(MISO, INPUT);
|
||||
pinMode(SCK, OUTPUT);
|
||||
pinMode(BUSYN, INPUT);
|
||||
#if (ENABLE_RESET_PIN == 1)
|
||||
pinMode(RESET, OUTPUT);
|
||||
// reset the dSPIN chip. This could also be accomplished by
|
||||
// calling the "L6470::ResetDev()" function after SPI is initialized.
|
||||
digitalWrite(RESET, HIGH);
|
||||
delay(10);
|
||||
digitalWrite(RESET, LOW);
|
||||
delay(10);
|
||||
digitalWrite(RESET, HIGH);
|
||||
delay(10);
|
||||
#endif
|
||||
|
||||
|
||||
// initialize SPI for the dSPIN chip's needs:
|
||||
// most significant bit first,
|
||||
// SPI clock not to exceed 5MHz,
|
||||
// SPI_MODE3 (clock idle high, latch data on rising edge of clock)
|
||||
SPI.begin();
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64
|
||||
SPI.setDataMode(SPI_MODE3);
|
||||
|
||||
// First things first: let's check communications. The CONFIG register should
|
||||
// power up to 0x2E88, so we can use that to check the communications.
|
||||
if (GetParam(CONFIG) == 0x2E88){
|
||||
//Serial.println('good to go');
|
||||
}
|
||||
else{
|
||||
//Serial.println('Comm issue');
|
||||
}
|
||||
|
||||
#if (ENABLE_RESET_PIN == 0)
|
||||
resetDev();
|
||||
#endif
|
||||
// First, let's set the step mode register:
|
||||
// - SYNC_EN controls whether the BUSY/SYNC pin reflects the step
|
||||
// frequency or the BUSY status of the chip. We want it to be the BUSY
|
||||
// status.
|
||||
// - STEP_SEL_x is the microstepping rate- we'll go full step.
|
||||
// - SYNC_SEL_x is the ratio of (micro)steps to toggles on the
|
||||
// BUSY/SYNC pin (when that pin is used for SYNC). Make it 1:1, despite
|
||||
// not using that pin.
|
||||
//SetParam(STEP_MODE, !SYNC_EN | STEP_SEL_1 | SYNC_SEL_1);
|
||||
|
||||
|
||||
SetParam(KVAL_RUN, k_value);
|
||||
SetParam(KVAL_ACC, k_value);
|
||||
SetParam(KVAL_DEC, k_value);
|
||||
SetParam(KVAL_HOLD, k_value);
|
||||
|
||||
// Set up the CONFIG register as follows:
|
||||
// PWM frequency divisor = 1
|
||||
// PWM frequency multiplier = 2 (62.5kHz PWM frequency)
|
||||
// Slew rate is 290V/us
|
||||
// Do NOT shut down bridges on overcurrent
|
||||
// Disable motor voltage compensation
|
||||
// Hard stop on switch low
|
||||
// 16MHz internal oscillator, nothing on output
|
||||
SetParam(CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_SR_290V_us| CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
|
||||
// Configure the RUN KVAL. This defines the duty cycle of the PWM of the bridges
|
||||
// during running. 0xFF means that they are essentially NOT PWMed during run; this
|
||||
// MAY result in more power being dissipated than you actually need for the task.
|
||||
// Setting this value too low may result in failure to turn.
|
||||
// There are ACC, DEC, and HOLD KVAL registers as well; you may need to play with
|
||||
// those values to get acceptable performance for a given application.
|
||||
//SetParam(KVAL_RUN, 0xFF);
|
||||
// Calling GetStatus() clears the UVLO bit in the status register, which is set by
|
||||
// default on power-up. The driver may not run without that bit cleared by this
|
||||
// read operation.
|
||||
getStatus();
|
||||
|
||||
hardStop(); //engage motors
|
||||
}
|
||||
|
||||
boolean L6470::isBusy(){
|
||||
int status = getStatus();
|
||||
return !((status >> 1) & 0b1);
|
||||
}
|
||||
|
||||
void L6470::setMicroSteps(int microSteps){
|
||||
byte stepVal = 0;
|
||||
|
||||
for(stepVal = 0; stepVal < 8; stepVal++){
|
||||
if(microSteps == 1) break;
|
||||
microSteps = microSteps >> 1;
|
||||
}
|
||||
|
||||
SetParam(STEP_MODE, !SYNC_EN | stepVal | SYNC_SEL_1);
|
||||
}
|
||||
|
||||
void L6470::setThresholdSpeed(float thresholdSpeed){
|
||||
// Configure the FS_SPD register- this is the speed at which the driver ceases
|
||||
// microstepping and goes to full stepping. FSCalc() converts a value in steps/s
|
||||
// to a value suitable for this register; to disable full-step switching, you
|
||||
// can pass 0x3FF to this register.
|
||||
|
||||
if(thresholdSpeed == 0.0){
|
||||
SetParam(FS_SPD, 0x3FF);
|
||||
}
|
||||
else{
|
||||
SetParam(FS_SPD, FSCalc(thresholdSpeed));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void L6470::setCurrent(int current){}
|
||||
|
||||
|
||||
|
||||
void L6470::setMaxSpeed(int speed){
|
||||
// Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
|
||||
// second allowed. You'll want to mess around with your desired application to see
|
||||
// how far you can push it before the motor starts to slip. The ACTUAL parameter
|
||||
// passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
|
||||
// steps/s into an appropriate value for this function. Note that for any move or
|
||||
// goto type function where no speed is specified, this value will be used.
|
||||
SetParam(MAX_SPEED, MaxSpdCalc(speed));
|
||||
}
|
||||
|
||||
|
||||
void L6470::setMinSpeed(int speed){
|
||||
// Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
|
||||
// second allowed. You'll want to mess around with your desired application to see
|
||||
// how far you can push it before the motor starts to slip. The ACTUAL parameter
|
||||
// passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
|
||||
// steps/s into an appropriate value for this function. Note that for any move or
|
||||
// goto type function where no speed is specified, this value will be used.
|
||||
SetParam(MIN_SPEED, MinSpdCalc(speed));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void L6470::setAcc(float acceleration){
|
||||
// Configure the acceleration rate, in steps/tick/tick. There is also a DEC register;
|
||||
// both of them have a function (AccCalc() and DecCalc() respectively) that convert
|
||||
// from steps/s/s into the appropriate value for the register. Writing ACC to 0xfff
|
||||
// sets the acceleration and deceleration to 'infinite' (or as near as the driver can
|
||||
// manage). If ACC is set to 0xfff, DEC is ignored. To get infinite deceleration
|
||||
// without infinite acceleration, only hard stop will work.
|
||||
unsigned long accelerationBYTES = AccCalc(acceleration);
|
||||
SetParam(ACC, accelerationBYTES);
|
||||
}
|
||||
|
||||
|
||||
void L6470::setDec(float deceleration){
|
||||
unsigned long decelerationBYTES = DecCalc(deceleration);
|
||||
SetParam(DEC, decelerationBYTES);
|
||||
}
|
||||
|
||||
|
||||
long L6470::getPos(){
|
||||
unsigned long position = GetParam(ABS_POS);
|
||||
return convert(position);
|
||||
}
|
||||
|
||||
float L6470::getSpeed(){
|
||||
/*
|
||||
SPEED
|
||||
The SPEED register contains the current motor speed, expressed in step/tick (format unsigned fixed point 0.28).
|
||||
In order to convert the SPEED value in step/s the following formula can be used:
|
||||
Equation 4
|
||||
where SPEED is the integer number stored into the register and tick is 250 ns.
|
||||
The available range is from 0 to 15625 step/s with a resolution of 0.015 step/s.
|
||||
Note: The range effectively available to the user is limited by the MAX_SPEED parameter.
|
||||
*/
|
||||
|
||||
return (float) GetParam(SPEED);
|
||||
//return (float) speed * pow(8, -22);
|
||||
//return FSCalc(speed); NEEDS FIX
|
||||
}
|
||||
|
||||
|
||||
void L6470::setOverCurrent(unsigned int ma_current){
|
||||
// Configure the overcurrent detection threshold.
|
||||
byte OCValue = floor(ma_current / 375);
|
||||
if(OCValue > 0x0F)OCValue = 0x0F;
|
||||
SetParam(OCD_TH, OCValue);
|
||||
}
|
||||
|
||||
void L6470::setStallCurrent(float ma_current){
|
||||
byte STHValue = (byte)floor(ma_current / 31.25);
|
||||
if(STHValue > 0x80)STHValue = 0x80;
|
||||
if(STHValue < 0)STHValue = 0;
|
||||
SetParam(STALL_TH, STHValue);
|
||||
}
|
||||
|
||||
void L6470::SetLowSpeedOpt(boolean enable){
|
||||
// Enable or disable the low-speed optimization option. If enabling,
|
||||
// the other 12 bits of the register will be automatically zero.
|
||||
// When disabling, the value will have to be explicitly written by
|
||||
// the user with a SetParam() call. See the datasheet for further
|
||||
// information about low-speed optimization.
|
||||
Xfer(SET_PARAM | MIN_SPEED);
|
||||
if (enable) Param(0x1000, 13);
|
||||
else Param(0, 13);
|
||||
}
|
||||
|
||||
|
||||
void L6470::run(byte dir, float spd){
|
||||
// RUN sets the motor spinning in a direction (defined by the constants
|
||||
// FWD and REV). Maximum speed and minimum speed are defined
|
||||
// by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value
|
||||
// will switch the device into full-step mode.
|
||||
// The SpdCalc() function is provided to convert steps/s values into
|
||||
// appropriate integer values for this function.
|
||||
unsigned long speedVal = SpdCalc(spd);
|
||||
|
||||
Xfer(RUN | dir);
|
||||
if (speedVal > 0xFFFFF) speedVal = 0xFFFFF;
|
||||
Xfer((byte)(speedVal >> 16));
|
||||
Xfer((byte)(speedVal >> 8));
|
||||
Xfer((byte)(speedVal));
|
||||
}
|
||||
|
||||
|
||||
void L6470::Step_Clock(byte dir){
|
||||
// STEP_CLOCK puts the device in external step clocking mode. When active,
|
||||
// pin 25, STCK, becomes the step clock for the device, and steps it in
|
||||
// the direction (set by the FWD and REV constants) imposed by the call
|
||||
// of this function. Motion commands (RUN, MOVE, etc) will cause the device
|
||||
// to exit step clocking mode.
|
||||
Xfer(STEP_CLOCK | dir);
|
||||
}
|
||||
|
||||
void L6470::move(long n_step){
|
||||
// MOVE will send the motor n_step steps (size based on step mode) in the
|
||||
// direction imposed by dir (FWD or REV constants may be used). The motor
|
||||
// will accelerate according the acceleration and deceleration curves, and
|
||||
// will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well.
|
||||
|
||||
byte dir;
|
||||
|
||||
if(n_step >= 0){
|
||||
dir = FWD;
|
||||
}
|
||||
else{
|
||||
dir = REV;
|
||||
}
|
||||
|
||||
long n_stepABS = abs(n_step);
|
||||
|
||||
Xfer(MOVE | dir); //set direction
|
||||
if (n_stepABS > 0x3FFFFF) n_step = 0x3FFFFF;
|
||||
Xfer((byte)(n_stepABS >> 16));
|
||||
Xfer((byte)(n_stepABS >> 8));
|
||||
Xfer((byte)(n_stepABS));
|
||||
}
|
||||
|
||||
void L6470::goTo(long pos){
|
||||
// GOTO operates much like MOVE, except it produces absolute motion instead
|
||||
// of relative motion. The motor will be moved to the indicated position
|
||||
// in the shortest possible fashion.
|
||||
|
||||
Xfer(GOTO);
|
||||
if (pos > 0x3FFFFF) pos = 0x3FFFFF;
|
||||
Xfer((byte)(pos >> 16));
|
||||
Xfer((byte)(pos >> 8));
|
||||
Xfer((byte)(pos));
|
||||
}
|
||||
|
||||
|
||||
void L6470::goTo_DIR(byte dir, long pos){
|
||||
// Same as GOTO, but with user constrained rotational direction.
|
||||
|
||||
Xfer(GOTO_DIR);
|
||||
if (pos > 0x3FFFFF) pos = 0x3FFFFF;
|
||||
Xfer((byte)(pos >> 16));
|
||||
Xfer((byte)(pos >> 8));
|
||||
Xfer((byte)(pos));
|
||||
}
|
||||
|
||||
void L6470::goUntil(byte act, byte dir, unsigned long spd){
|
||||
// GoUntil will set the motor running with direction dir (REV or
|
||||
// FWD) until a falling edge is detected on the SW pin. Depending
|
||||
// on bit SW_MODE in CONFIG, either a hard stop or a soft stop is
|
||||
// performed at the falling edge, and depending on the value of
|
||||
// act (either RESET or COPY) the value in the ABS_POS register is
|
||||
// either RESET to 0 or COPY-ed into the MARK register.
|
||||
Xfer(GO_UNTIL | act | dir);
|
||||
if (spd > 0x3FFFFF) spd = 0x3FFFFF;
|
||||
Xfer((byte)(spd >> 16));
|
||||
Xfer((byte)(spd >> 8));
|
||||
Xfer((byte)(spd));
|
||||
}
|
||||
|
||||
void L6470::releaseSW(byte act, byte dir){
|
||||
// Similar in nature to GoUntil, ReleaseSW produces motion at the
|
||||
// higher of two speeds: the value in MIN_SPEED or 5 steps/s.
|
||||
// The motor continues to run at this speed until a rising edge
|
||||
// is detected on the switch input, then a hard stop is performed
|
||||
// and the ABS_POS register is either COPY-ed into MARK or RESET to
|
||||
// 0, depending on whether RESET or COPY was passed to the function
|
||||
// for act.
|
||||
Xfer(RELEASE_SW | act | dir);
|
||||
}
|
||||
|
||||
void L6470::goHome(){
|
||||
// GoHome is equivalent to GoTo(0), but requires less time to send.
|
||||
// Note that no direction is provided; motion occurs through shortest
|
||||
// path. If a direction is required, use GoTo_DIR().
|
||||
Xfer(GO_HOME);
|
||||
}
|
||||
|
||||
void L6470::goMark(){
|
||||
// GoMark is equivalent to GoTo(MARK), but requires less time to send.
|
||||
// Note that no direction is provided; motion occurs through shortest
|
||||
// path. If a direction is required, use GoTo_DIR().
|
||||
Xfer(GO_MARK);
|
||||
}
|
||||
|
||||
|
||||
void L6470::setMark(long value){
|
||||
|
||||
Xfer(MARK);
|
||||
if (value > 0x3FFFFF) value = 0x3FFFFF;
|
||||
if (value < -0x3FFFFF) value = -0x3FFFFF;
|
||||
|
||||
|
||||
Xfer((byte)(value >> 16));
|
||||
Xfer((byte)(value >> 8));
|
||||
Xfer((byte)(value));
|
||||
}
|
||||
|
||||
|
||||
void L6470::setMark(){
|
||||
long value = getPos();
|
||||
|
||||
Xfer(MARK);
|
||||
if (value > 0x3FFFFF) value = 0x3FFFFF;
|
||||
if (value < -0x3FFFFF) value = -0x3FFFFF;
|
||||
|
||||
|
||||
Xfer((byte)(value >> 16));
|
||||
Xfer((byte)(value >> 8));
|
||||
Xfer((byte)(value));
|
||||
}
|
||||
|
||||
void L6470::setAsHome(){
|
||||
// Sets the ABS_POS register to 0, effectively declaring the current
|
||||
// position to be "HOME".
|
||||
Xfer(RESET_POS);
|
||||
}
|
||||
|
||||
void L6470::resetDev(){
|
||||
// Reset device to power up conditions. Equivalent to toggling the STBY
|
||||
// pin or cycling power.
|
||||
Xfer(RESET_DEVICE);
|
||||
}
|
||||
|
||||
void L6470::softStop(){
|
||||
// Bring the motor to a halt using the deceleration curve.
|
||||
Xfer(SOFT_STOP);
|
||||
}
|
||||
|
||||
void L6470::hardStop(){
|
||||
// Stop the motor right away. No deceleration.
|
||||
Xfer(HARD_STOP);
|
||||
}
|
||||
|
||||
void L6470::softFree(){
|
||||
// Decelerate the motor and disengage
|
||||
Xfer(SOFT_HIZ);
|
||||
}
|
||||
|
||||
void L6470::free(){
|
||||
// disengage the motor immediately with no deceleration.
|
||||
Xfer(HARD_HIZ);
|
||||
}
|
||||
|
||||
int L6470::getStatus(){
|
||||
// Fetch and return the 16-bit value in the STATUS register. Resets
|
||||
// any warning flags and exits any error states. Using GetParam()
|
||||
// to read STATUS does not clear these values.
|
||||
int temp = 0;
|
||||
Xfer(GET_STATUS);
|
||||
temp = Xfer(0)<<8;
|
||||
temp |= Xfer(0);
|
||||
return temp;
|
||||
}
|
||||
|
||||
unsigned long L6470::AccCalc(float stepsPerSecPerSec){
|
||||
// The value in the ACC register is [(steps/s/s)*(tick^2)]/(2^-40) where tick is
|
||||
// 250ns (datasheet value)- 0x08A on boot.
|
||||
// Multiply desired steps/s/s by .137438 to get an appropriate value for this register.
|
||||
// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
|
||||
float temp = stepsPerSecPerSec * 0.137438;
|
||||
if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
|
||||
unsigned long L6470::DecCalc(float stepsPerSecPerSec){
|
||||
// The calculation for DEC is the same as for ACC. Value is 0x08A on boot.
|
||||
// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
|
||||
float temp = stepsPerSecPerSec * 0.137438;
|
||||
if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
unsigned long L6470::MaxSpdCalc(float stepsPerSec){
|
||||
// The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is
|
||||
// 250ns (datasheet value)- 0x041 on boot.
|
||||
// Multiply desired steps/s by .065536 to get an appropriate value for this register
|
||||
// This is a 10-bit value, so we need to make sure it remains at or below 0x3FF
|
||||
float temp = stepsPerSec * .065536;
|
||||
if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
unsigned long L6470::MinSpdCalc(float stepsPerSec){
|
||||
// The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
|
||||
// 250ns (datasheet value)- 0x000 on boot.
|
||||
// Multiply desired steps/s by 4.1943 to get an appropriate value for this register
|
||||
// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
|
||||
float temp = stepsPerSec * 4.1943;
|
||||
if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
unsigned long L6470::FSCalc(float stepsPerSec){
|
||||
// The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is
|
||||
// 250ns (datasheet value)- 0x027 on boot.
|
||||
// Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register
|
||||
// This is a 10-bit value, so we need to make sure the value is at or below 0x3FF.
|
||||
float temp = (stepsPerSec * .065536)-.5;
|
||||
if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
unsigned long L6470::IntSpdCalc(float stepsPerSec){
|
||||
// The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
|
||||
// 250ns (datasheet value)- 0x408 on boot.
|
||||
// Multiply desired steps/s by 4.1943 to get an appropriate value for this register
|
||||
// This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF.
|
||||
float temp = stepsPerSec * 4.1943;
|
||||
if( (unsigned long) long(temp) > 0x00003FFF) return 0x00003FFF;
|
||||
else return (unsigned long) long(temp);
|
||||
}
|
||||
|
||||
unsigned long L6470::SpdCalc(float stepsPerSec){
|
||||
// When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is
|
||||
// 250ns (datasheet value).
|
||||
// Multiply desired steps/s by 67.106 to get an appropriate value for this register
|
||||
// This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF.
|
||||
|
||||
float temp = stepsPerSec * 67.106;
|
||||
if( (unsigned long) long(temp) > 0x000FFFFF) return 0x000FFFFF;
|
||||
else return (unsigned long)temp;
|
||||
}
|
||||
|
||||
unsigned long L6470::Param(unsigned long value, byte bit_len){
|
||||
// Generalization of the subsections of the register read/write functionality.
|
||||
// We want the end user to just write the value without worrying about length,
|
||||
// so we pass a bit length parameter from the calling function.
|
||||
unsigned long ret_val=0; // We'll return this to generalize this function
|
||||
// for both read and write of registers.
|
||||
byte byte_len = bit_len/8; // How many BYTES do we have?
|
||||
if (bit_len%8 > 0) byte_len++; // Make sure not to lose any partial byte values.
|
||||
// Let's make sure our value has no spurious bits set, and if the value was too
|
||||
// high, max it out.
|
||||
unsigned long mask = 0xffffffff >> (32-bit_len);
|
||||
if (value > mask) value = mask;
|
||||
// The following three if statements handle the various possible byte length
|
||||
// transfers- it'll be no less than 1 but no more than 3 bytes of data.
|
||||
// L6470::Xfer() sends a byte out through SPI and returns a byte received
|
||||
// over SPI- when calling it, we typecast a shifted version of the masked
|
||||
// value, then we shift the received value back by the same amount and
|
||||
// store it until return time.
|
||||
if (byte_len == 3) {
|
||||
ret_val |= long(Xfer((byte)(value>>16))) << 16;
|
||||
//Serial.println(ret_val, HEX);
|
||||
}
|
||||
if (byte_len >= 2) {
|
||||
ret_val |= long(Xfer((byte)(value>>8))) << 8;
|
||||
//Serial.println(ret_val, HEX);
|
||||
}
|
||||
if (byte_len >= 1) {
|
||||
ret_val |= Xfer((byte)value);
|
||||
//Serial.println(ret_val, HEX);
|
||||
}
|
||||
// Return the received values. Mask off any unnecessary bits, just for
|
||||
// the sake of thoroughness- we don't EXPECT to see anything outside
|
||||
// the bit length range but better to be safe than sorry.
|
||||
return (ret_val & mask);
|
||||
}
|
||||
|
||||
byte L6470::Xfer(byte data){
|
||||
// This simple function shifts a byte out over SPI and receives a byte over
|
||||
// SPI. Unusually for SPI devices, the dSPIN requires a toggling of the
|
||||
// CS (slaveSelect) pin after each byte sent. That makes this function
|
||||
// a bit more reasonable, because we can include more functionality in it.
|
||||
byte data_out;
|
||||
digitalWrite(_SSPin,LOW);
|
||||
// SPI.transfer() both shifts a byte out on the MOSI pin AND receives a
|
||||
// byte in on the MISO pin.
|
||||
data_out = SPI.transfer(data);
|
||||
digitalWrite(_SSPin,HIGH);
|
||||
return data_out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void L6470::SetParam(byte param, unsigned long value){
|
||||
Xfer(SET_PARAM | param);
|
||||
ParamHandler(param, value);
|
||||
}
|
||||
|
||||
unsigned long L6470::GetParam(byte param){
|
||||
// Realize the "get parameter" function, to read from the various registers in
|
||||
// the dSPIN chip.
|
||||
Xfer(GET_PARAM | param);
|
||||
return ParamHandler(param, 0);
|
||||
}
|
||||
|
||||
long L6470::convert(unsigned long val){
|
||||
//convert 22bit 2s comp to signed long
|
||||
int MSB = val >> 21;
|
||||
|
||||
val = val << 11;
|
||||
val = val >> 11;
|
||||
|
||||
if(MSB == 1) val = val | 0b11111111111000000000000000000000;
|
||||
return val;
|
||||
}
|
||||
|
||||
unsigned long L6470::ParamHandler(byte param, unsigned long value){
|
||||
// Much of the functionality between "get parameter" and "set parameter" is
|
||||
// very similar, so we deal with that by putting all of it in one function
|
||||
// here to save memory space and simplify the program.
|
||||
unsigned long ret_val = 0; // This is a temp for the value to return.
|
||||
// This switch structure handles the appropriate action for each register.
|
||||
// This is necessary since not all registers are of the same length, either
|
||||
// bit-wise or byte-wise, so we want to make sure we mask out any spurious
|
||||
// bits and do the right number of transfers. That is handled by the dSPIN_Param()
|
||||
// function, in most cases, but for 1-byte or smaller transfers, we call
|
||||
// Xfer() directly.
|
||||
switch (param)
|
||||
{
|
||||
// ABS_POS is the current absolute offset from home. It is a 22 bit number expressed
|
||||
// in two's complement. At power up, this value is 0. It cannot be written when
|
||||
// the motor is running, but at any other time, it can be updated to change the
|
||||
// interpreted position of the motor.
|
||||
case ABS_POS:
|
||||
ret_val = Param(value, 22);
|
||||
break;
|
||||
// EL_POS is the current electrical position in the step generation cycle. It can
|
||||
// be set when the motor is not in motion. Value is 0 on power up.
|
||||
case EL_POS:
|
||||
ret_val = Param(value, 9);
|
||||
break;
|
||||
// MARK is a second position other than 0 that the motor can be told to go to. As
|
||||
// with ABS_POS, it is 22-bit two's complement. Value is 0 on power up.
|
||||
case MARK:
|
||||
ret_val = Param(value, 22);
|
||||
break;
|
||||
// SPEED contains information about the current speed. It is read-only. It does
|
||||
// NOT provide direction information.
|
||||
case SPEED:
|
||||
ret_val = Param(0, 20);
|
||||
break;
|
||||
// ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF
|
||||
// to get infinite acceleration/decelaeration- there is no way to get infinite
|
||||
// deceleration w/o infinite acceleration (except the HARD STOP command).
|
||||
// Cannot be written while motor is running. Both default to 0x08A on power up.
|
||||
// AccCalc() and DecCalc() functions exist to convert steps/s/s values into
|
||||
// 12-bit values for these two registers.
|
||||
case ACC:
|
||||
ret_val = Param(value, 12);
|
||||
break;
|
||||
case DEC:
|
||||
ret_val = Param(value, 12);
|
||||
break;
|
||||
// MAX_SPEED is just what it says- any command which attempts to set the speed
|
||||
// of the motor above this value will simply cause the motor to turn at this
|
||||
// speed. Value is 0x041 on power up.
|
||||
// MaxSpdCalc() function exists to convert steps/s value into a 10-bit value
|
||||
// for this register.
|
||||
case MAX_SPEED:
|
||||
ret_val = Param(value, 10);
|
||||
break;
|
||||
// MIN_SPEED controls two things- the activation of the low-speed optimization
|
||||
// feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT
|
||||
// is the 13th bit, and when it is set, the minimum allowed speed is automatically
|
||||
// set to zero. This value is 0 on startup.
|
||||
// MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this
|
||||
// register. SetLowSpeedOpt() function exists to enable/disable the optimization feature.
|
||||
case MIN_SPEED:
|
||||
ret_val = Param(value, 12);
|
||||
break;
|
||||
// FS_SPD register contains a threshold value above which microstepping is disabled
|
||||
// and the dSPIN operates in full-step mode. Defaults to 0x027 on power up.
|
||||
// FSCalc() function exists to convert steps/s value into 10-bit integer for this
|
||||
// register.
|
||||
case FS_SPD:
|
||||
ret_val = Param(value, 10);
|
||||
break;
|
||||
// KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric
|
||||
// representations: 255 for full output voltage, 128 for half, etc. Default is 0x29.
|
||||
// The implications of different KVAL settings is too complex to dig into here, but
|
||||
// it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for
|
||||
// HOLD may result in excessive power dissipation when the motor is not running.
|
||||
case KVAL_HOLD:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
case KVAL_RUN:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
case KVAL_ACC:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
case KVAL_DEC:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
// INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF
|
||||
// compensation functionality. Please see the datasheet for details of this
|
||||
// function- it is too complex to discuss here. Default values seem to work
|
||||
// well enough.
|
||||
case INT_SPD:
|
||||
ret_val = Param(value, 14);
|
||||
break;
|
||||
case ST_SLP:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
case FN_SLP_ACC:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
case FN_SLP_DEC:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
// K_THERM is motor winding thermal drift compensation. Please see the datasheet
|
||||
// for full details on operation- the default value should be okay for most users.
|
||||
case K_THERM:
|
||||
ret_val = Xfer((byte)value & 0x0F);
|
||||
break;
|
||||
// ADC_OUT is a read-only register containing the result of the ADC measurements.
|
||||
// This is less useful than it sounds; see the datasheet for more information.
|
||||
case ADC_OUT:
|
||||
ret_val = Xfer(0);
|
||||
break;
|
||||
// Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA.
|
||||
// A set of defined constants is provided for the user's convenience. Default
|
||||
// value is 3.375A- 0x08. This is a 4-bit value.
|
||||
case OCD_TH:
|
||||
ret_val = Xfer((byte)value & 0x0F);
|
||||
break;
|
||||
// Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to
|
||||
// 4A in 31.25mA steps. This is a 7-bit value.
|
||||
case STALL_TH:
|
||||
ret_val = Xfer((byte)value & 0x7F);
|
||||
break;
|
||||
// STEP_MODE controls the microstepping settings, as well as the generation of an
|
||||
// output signal from the dSPIN. Bits 2:0 control the number of microsteps per
|
||||
// step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs
|
||||
// a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency
|
||||
// of the output signal relative to the full-step frequency; see datasheet for
|
||||
// that relationship as it is too complex to reproduce here.
|
||||
// Most likely, only the microsteps per step value will be needed; there is a set
|
||||
// of constants provided for ease of use of these values.
|
||||
case STEP_MODE:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
// ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants
|
||||
// is provided to make this easy to interpret. By default, ALL alarms will trigger the
|
||||
// FLAG pin.
|
||||
case ALARM_EN:
|
||||
ret_val = Xfer((byte)value);
|
||||
break;
|
||||
// CONFIG contains some assorted configuration bits and fields. A fairly comprehensive
|
||||
// set of reasonably self-explanatory constants is provided, but users should refer
|
||||
// to the datasheet before modifying the contents of this register to be certain they
|
||||
// understand the implications of their modifications. Value on boot is 0x2E88; this
|
||||
// can be a useful way to verify proper start up and operation of the dSPIN chip.
|
||||
case CONFIG:
|
||||
ret_val = Param(value, 16);
|
||||
break;
|
||||
// STATUS contains read-only information about the current condition of the chip. A
|
||||
// comprehensive set of constants for masking and testing this register is provided, but
|
||||
// users should refer to the datasheet to ensure that they fully understand each one of
|
||||
// the bits in the register.
|
||||
case STATUS: // STATUS is a read-only register
|
||||
ret_val = Param(0, 16);
|
||||
break;
|
||||
default:
|
||||
ret_val = Xfer((byte)(value));
|
||||
break;
|
||||
}
|
||||
return ret_val;
|
||||
}
|
@ -1,286 +0,0 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
|
||||
//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
|
||||
//Released as MIT license
|
||||
////////////////////////////////////////////////////////////
|
||||
#ifndef L6470_h
|
||||
#define L6470_h
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
|
||||
#define SLAVE_SELECT_PIN 38 // Wire this to the CSN pin
|
||||
// #define RESET 6 // Wire this to the STBY line
|
||||
#define BUSYN 7 // Wire this to the BSYN line
|
||||
|
||||
// constant definitions for overcurrent thresholds. Write these values to
|
||||
// register dSPIN_OCD_TH to set the level at which an overcurrent even occurs.
|
||||
#define OCD_TH_375mA 0x00
|
||||
#define OCD_TH_750mA 0x01
|
||||
#define OCD_TH_1125mA 0x02
|
||||
#define OCD_TH_1500mA 0x03
|
||||
#define OCD_TH_1875mA 0x04
|
||||
#define OCD_TH_2250mA 0x05
|
||||
#define OCD_TH_2625mA 0x06
|
||||
#define OCD_TH_3000mA 0x07
|
||||
#define OCD_TH_3375mA 0x08
|
||||
#define OCD_TH_3750mA 0x09
|
||||
#define OCD_TH_4125mA 0x0A
|
||||
#define OCD_TH_4500mA 0x0B
|
||||
#define OCD_TH_4875mA 0x0C
|
||||
#define OCD_TH_5250mA 0x0D
|
||||
#define OCD_TH_5625mA 0x0E
|
||||
#define OCD_TH_6000mA 0x0F
|
||||
|
||||
// STEP_MODE option values.
|
||||
// First comes the "microsteps per step" options...
|
||||
#define STEP_MODE_STEP_SEL 0x07 // Mask for these bits only.
|
||||
#define STEP_SEL_1 0x00
|
||||
#define STEP_SEL_1_2 0x01
|
||||
#define STEP_SEL_1_4 0x02
|
||||
#define STEP_SEL_1_8 0x03
|
||||
#define STEP_SEL_1_16 0x04
|
||||
#define STEP_SEL_1_32 0x05
|
||||
#define STEP_SEL_1_64 0x06
|
||||
#define STEP_SEL_1_128 0x07
|
||||
|
||||
// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead
|
||||
// output a clock related to the full-step frequency as defined by the
|
||||
// SYNC_SEL bits below.
|
||||
#define STEP_MODE_SYNC_EN 0x80 // Mask for this bit
|
||||
#define SYNC_EN 0x80
|
||||
|
||||
// ...last, define the SYNC_SEL modes. The clock output is defined by
|
||||
// the full-step frequency and the value in these bits- see the datasheet
|
||||
// for a matrix describing that relationship (page 46).
|
||||
#define STEP_MODE_SYNC_SEL 0x70
|
||||
#define SYNC_SEL_1_2 0x00
|
||||
#define SYNC_SEL_1 0x10
|
||||
#define SYNC_SEL_2 0x20
|
||||
#define SYNC_SEL_4 0x30
|
||||
#define SYNC_SEL_8 0x40
|
||||
#define SYNC_SEL_16 0x50
|
||||
#define SYNC_SEL_32 0x60
|
||||
#define SYNC_SEL_64 0x70
|
||||
|
||||
// Bit names for the ALARM_EN register.
|
||||
// Each of these bits defines one potential alarm condition.
|
||||
// When one of these conditions occurs and the respective bit in ALARM_EN is set,
|
||||
// the FLAG pin will go low. The register must be queried to determine which event
|
||||
// caused the alarm.
|
||||
#define ALARM_EN_OVERCURRENT 0x01
|
||||
#define ALARM_EN_THERMAL_SHUTDOWN 0x02
|
||||
#define ALARM_EN_THERMAL_WARNING 0x04
|
||||
#define ALARM_EN_UNDER_VOLTAGE 0x08
|
||||
#define ALARM_EN_STALL_DET_A 0x10
|
||||
#define ALARM_EN_STALL_DET_B 0x20
|
||||
#define ALARM_EN_SW_TURN_ON 0x40
|
||||
#define ALARM_EN_WRONG_NPERF_CMD 0x80
|
||||
|
||||
// CONFIG register renames.
|
||||
|
||||
// Oscillator options.
|
||||
// The dSPIN needs to know what the clock frequency is because it uses that for some
|
||||
// calculations during operation.
|
||||
#define CONFIG_OSC_SEL 0x000F // Mask for this bit field.
|
||||
#define CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output
|
||||
#define CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output
|
||||
#define CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output
|
||||
#define CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output
|
||||
#define CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output
|
||||
#define CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal
|
||||
#define CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal
|
||||
#define CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal
|
||||
#define CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal
|
||||
#define CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted
|
||||
#define CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted
|
||||
#define CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted
|
||||
#define CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted
|
||||
|
||||
// Configure the functionality of the external switch input
|
||||
#define CONFIG_SW_MODE 0x0010 // Mask for this bit.
|
||||
#define CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch.
|
||||
#define CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW
|
||||
// commands to provide jog function.
|
||||
// See page 25 of datasheet.
|
||||
|
||||
// Configure the motor voltage compensation mode (see page 34 of datasheet)
|
||||
#define CONFIG_EN_VSCOMP 0x0020 // Mask for this bit.
|
||||
#define CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation.
|
||||
#define CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation.
|
||||
|
||||
// Configure overcurrent detection event handling
|
||||
#define CONFIG_OC_SD 0x0080 // Mask for this bit.
|
||||
#define CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect
|
||||
#define CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect
|
||||
|
||||
// Configure the slew rate of the power bridge output
|
||||
#define CONFIG_POW_SR 0x0300 // Mask for this bit field.
|
||||
#define CONFIG_SR_180V_us 0x0000 // 180V/us
|
||||
#define CONFIG_SR_290V_us 0x0200 // 290V/us
|
||||
#define CONFIG_SR_530V_us 0x0300 // 530V/us
|
||||
|
||||
// Integer divisors for PWM sinewave generation
|
||||
// See page 32 of the datasheet for more information on this.
|
||||
#define CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field
|
||||
#define CONFIG_PWM_MUL_0_625 (0x00)<<10
|
||||
#define CONFIG_PWM_MUL_0_75 (0x01)<<10
|
||||
#define CONFIG_PWM_MUL_0_875 (0x02)<<10
|
||||
#define CONFIG_PWM_MUL_1 (0x03)<<10
|
||||
#define CONFIG_PWM_MUL_1_25 (0x04)<<10
|
||||
#define CONFIG_PWM_MUL_1_5 (0x05)<<10
|
||||
#define CONFIG_PWM_MUL_1_75 (0x06)<<10
|
||||
#define CONFIG_PWM_MUL_2 (0x07)<<10
|
||||
|
||||
// Multiplier for the PWM sinewave frequency
|
||||
#define CONFIG_F_PWM_INT 0xE000 // mask for this bit field.
|
||||
#define CONFIG_PWM_DIV_1 (0x00)<<13
|
||||
#define CONFIG_PWM_DIV_2 (0x01)<<13
|
||||
#define CONFIG_PWM_DIV_3 (0x02)<<13
|
||||
#define CONFIG_PWM_DIV_4 (0x03)<<13
|
||||
#define CONFIG_PWM_DIV_5 (0x04)<<13
|
||||
#define CONFIG_PWM_DIV_6 (0x05)<<13
|
||||
#define CONFIG_PWM_DIV_7 (0x06)<<13
|
||||
|
||||
// Status register bit renames- read-only bits conferring information about the
|
||||
// device to the user.
|
||||
#define STATUS_HIZ 0x0001 // high when bridges are in HiZ mode
|
||||
#define STATUS_BUSY 0x0002 // mirrors BUSY pin
|
||||
#define STATUS_SW_F 0x0004 // low when switch open, high when closed
|
||||
#define STATUS_SW_EVN 0x0008 // active high, set on switch falling edge,
|
||||
// cleared by reading STATUS
|
||||
#define STATUS_DIR 0x0010 // Indicates current motor direction.
|
||||
// High is FWD, Low is REV.
|
||||
#define STATUS_NOTPERF_CMD 0x0080 // Last command not performed.
|
||||
#define STATUS_WRONG_CMD 0x0100 // Last command not valid.
|
||||
#define STATUS_UVLO 0x0200 // Undervoltage lockout is active
|
||||
#define STATUS_TH_WRN 0x0400 // Thermal warning
|
||||
#define STATUS_TH_SD 0x0800 // Thermal shutdown
|
||||
#define STATUS_OCD 0x1000 // Overcurrent detected
|
||||
#define STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge
|
||||
#define STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge
|
||||
#define STATUS_SCK_MOD 0x8000 // Step clock mode is active
|
||||
|
||||
// Status register motor status field
|
||||
#define STATUS_MOT_STATUS 0x0060 // field mask
|
||||
#define STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped
|
||||
#define STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating
|
||||
#define STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating
|
||||
#define STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed
|
||||
|
||||
// Register address redefines.
|
||||
// See the Param_Handler() function for more info about these.
|
||||
#define ABS_POS 0x01
|
||||
#define EL_POS 0x02
|
||||
#define MARK 0x03
|
||||
#define SPEED 0x04
|
||||
#define ACC 0x05
|
||||
#define DEC 0x06
|
||||
#define MAX_SPEED 0x07
|
||||
#define MIN_SPEED 0x08
|
||||
#define FS_SPD 0x15
|
||||
#define KVAL_HOLD 0x09
|
||||
#define KVAL_RUN 0x0A
|
||||
#define KVAL_ACC 0x0B
|
||||
#define KVAL_DEC 0x0C
|
||||
#define INT_SPD 0x0D
|
||||
#define ST_SLP 0x0E
|
||||
#define FN_SLP_ACC 0x0F
|
||||
#define FN_SLP_DEC 0x10
|
||||
#define K_THERM 0x11
|
||||
#define ADC_OUT 0x12
|
||||
#define OCD_TH 0x13
|
||||
#define STALL_TH 0x14
|
||||
#define STEP_MODE 0x16
|
||||
#define ALARM_EN 0x17
|
||||
#define CONFIG 0x18
|
||||
#define STATUS 0x19
|
||||
|
||||
//dSPIN commands
|
||||
#define NOP 0x00
|
||||
#define SET_PARAM 0x00
|
||||
#define GET_PARAM 0x20
|
||||
#define RUN 0x50
|
||||
#define STEP_CLOCK 0x58
|
||||
#define MOVE 0x40
|
||||
#define GOTO 0x60
|
||||
#define GOTO_DIR 0x68
|
||||
#define GO_UNTIL 0x82
|
||||
#define RELEASE_SW 0x92
|
||||
#define GO_HOME 0x70
|
||||
#define GO_MARK 0x78
|
||||
#define RESET_POS 0xD8
|
||||
#define RESET_DEVICE 0xC0
|
||||
#define SOFT_STOP 0xB0
|
||||
#define HARD_STOP 0xB8
|
||||
#define SOFT_HIZ 0xA0
|
||||
#define HARD_HIZ 0xA8
|
||||
#define GET_STATUS 0xD0
|
||||
|
||||
/* dSPIN direction options */
|
||||
#define FWD 0x01
|
||||
#define REV 0x00
|
||||
|
||||
/* dSPIN action options */
|
||||
#define ACTION_RESET 0x00
|
||||
#define ACTION_COPY 0x01
|
||||
|
||||
|
||||
class L6470{
|
||||
|
||||
public:
|
||||
|
||||
L6470(int SSPin);
|
||||
void init(int k_value);
|
||||
void setMicroSteps(int microSteps);
|
||||
void setCurrent(int current);
|
||||
void setMaxSpeed(int speed);
|
||||
void setMinSpeed(int speed);
|
||||
void setAcc(float acceleration);
|
||||
void setDec(float deceleration);
|
||||
void setOverCurrent(unsigned int ma_current);
|
||||
void setThresholdSpeed(float threshold);
|
||||
void setStallCurrent(float ma_current);
|
||||
|
||||
unsigned long ParamHandler(byte param, unsigned long value);
|
||||
void SetLowSpeedOpt(boolean enable);
|
||||
void run(byte dir, float spd);
|
||||
void Step_Clock(byte dir);
|
||||
void goHome();
|
||||
void setAsHome();
|
||||
void goMark();
|
||||
void move(long n_step);
|
||||
void goTo(long pos);
|
||||
void goTo_DIR(byte dir, long pos);
|
||||
void goUntil(byte act, byte dir, unsigned long spd);
|
||||
boolean isBusy();
|
||||
void releaseSW(byte act, byte dir);
|
||||
float getSpeed();
|
||||
long getPos();
|
||||
void setMark();
|
||||
void setMark(long value);
|
||||
void resetPos();
|
||||
void resetDev();
|
||||
void softStop();
|
||||
void hardStop();
|
||||
void softFree();
|
||||
void free();
|
||||
int getStatus();
|
||||
void SetParam(byte param, unsigned long value);
|
||||
|
||||
private:
|
||||
long convert(unsigned long val);
|
||||
unsigned long GetParam(byte param);
|
||||
unsigned long AccCalc(float stepsPerSecPerSec);
|
||||
unsigned long DecCalc(float stepsPerSecPerSec);
|
||||
unsigned long MaxSpdCalc(float stepsPerSec);
|
||||
unsigned long MinSpdCalc(float stepsPerSec);
|
||||
unsigned long FSCalc(float stepsPerSec);
|
||||
unsigned long IntSpdCalc(float stepsPerSec);
|
||||
unsigned long SpdCalc(float stepsPerSec);
|
||||
unsigned long Param(unsigned long value, byte bit_len);
|
||||
byte Xfer(byte data);
|
||||
int _SSPin;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,53 +0,0 @@
|
||||
#######################################################
|
||||
# keywords.txt - keywords file for the L6470 library
|
||||
#
|
||||
# ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
|
||||
# Library by Adam Meyer of bildr Aug 18th 2012
|
||||
#
|
||||
# Released as MIT license
|
||||
#######################################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
L6470 KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
L6470 KEYWORD2
|
||||
init KEYWORD2
|
||||
setMicroSteps KEYWORD2
|
||||
setCurrent KEYWORD2
|
||||
setMaxSpeed KEYWORD2
|
||||
setMinSpeed KEYWORD2
|
||||
setAcc KEYWORD2
|
||||
setDec KEYWORD2
|
||||
setOverCurrent KEYWORD2
|
||||
setThresholdSpeed KEYWORD2
|
||||
setStallCurrent KEYWORD2
|
||||
ParamHandler KEYWORD2
|
||||
SetLowSpeedOpt KEYWORD2
|
||||
run KEYWORD2
|
||||
Step_Clock KEYWORD2
|
||||
goHome KEYWORD2
|
||||
goMark KEYWORD2
|
||||
move KEYWORD2
|
||||
goTo KEYWORD2
|
||||
goTo_DIR KEYWORD2
|
||||
goUntil KEYWORD2
|
||||
isBusy KEYWORD2
|
||||
releaseSW KEYWORD2
|
||||
resetPos KEYWORD2
|
||||
resetDev KEYWORD2
|
||||
softStop KEYWORD2
|
||||
hardStop KEYWORD2
|
||||
softHiZ KEYWORD2
|
||||
hardHiZ KEYWORD2
|
||||
getStatus KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
@ -1,310 +0,0 @@
|
||||
#include "LiquidCrystal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include "Arduino.h"
|
||||
|
||||
// When the display powers up, it is configured as follows:
|
||||
//
|
||||
// 1. Display clear
|
||||
// 2. Function set:
|
||||
// DL = 1; 8-bit interface data
|
||||
// N = 0; 1-line display
|
||||
// F = 0; 5x8 dot character font
|
||||
// 3. Display on/off control:
|
||||
// D = 0; Display off
|
||||
// C = 0; Cursor off
|
||||
// B = 0; Blinking off
|
||||
// 4. Entry mode set:
|
||||
// I/D = 1; Increment by 1
|
||||
// S = 0; No shift
|
||||
//
|
||||
// Note, however, that resetting the Arduino doesn't reset the LCD, so we
|
||||
// can't assume that it's in that state when a sketch starts (and the
|
||||
// LiquidCrystal constructor is called).
|
||||
|
||||
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
|
||||
{
|
||||
init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
|
||||
}
|
||||
|
||||
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
|
||||
{
|
||||
init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
|
||||
}
|
||||
|
||||
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
|
||||
{
|
||||
init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
|
||||
{
|
||||
init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
|
||||
{
|
||||
_rs_pin = rs;
|
||||
_rw_pin = rw;
|
||||
_enable_pin = enable;
|
||||
|
||||
_data_pins[0] = d0;
|
||||
_data_pins[1] = d1;
|
||||
_data_pins[2] = d2;
|
||||
_data_pins[3] = d3;
|
||||
_data_pins[4] = d4;
|
||||
_data_pins[5] = d5;
|
||||
_data_pins[6] = d6;
|
||||
_data_pins[7] = d7;
|
||||
|
||||
pinMode(_rs_pin, OUTPUT);
|
||||
// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
|
||||
if (_rw_pin != 255) {
|
||||
pinMode(_rw_pin, OUTPUT);
|
||||
}
|
||||
pinMode(_enable_pin, OUTPUT);
|
||||
|
||||
if (fourbitmode)
|
||||
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
|
||||
else
|
||||
_displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
|
||||
|
||||
begin(16, 1);
|
||||
}
|
||||
|
||||
void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
|
||||
if (lines > 1) {
|
||||
_displayfunction |= LCD_2LINE;
|
||||
}
|
||||
_numlines = lines;
|
||||
_currline = 0;
|
||||
|
||||
// for some 1 line displays you can select a 10 pixel high font
|
||||
if ((dotsize != 0) && (lines == 1)) {
|
||||
_displayfunction |= LCD_5x10DOTS;
|
||||
}
|
||||
|
||||
// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
|
||||
// according to datasheet, we need at least 40ms after power rises above 2.7V
|
||||
// before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
|
||||
delayMicroseconds(50000);
|
||||
// Now we pull both RS and R/W low to begin commands
|
||||
digitalWrite(_rs_pin, LOW);
|
||||
digitalWrite(_enable_pin, LOW);
|
||||
if (_rw_pin != 255) {
|
||||
digitalWrite(_rw_pin, LOW);
|
||||
}
|
||||
|
||||
//put the LCD into 4 bit or 8 bit mode
|
||||
if (! (_displayfunction & LCD_8BITMODE)) {
|
||||
// this is according to the hitachi HD44780 datasheet
|
||||
// figure 24, pg 46
|
||||
|
||||
// we start in 8bit mode, try to set 4 bit mode
|
||||
write4bits(0x03);
|
||||
delayMicroseconds(4500); // wait min 4.1ms
|
||||
|
||||
// second try
|
||||
write4bits(0x03);
|
||||
delayMicroseconds(4500); // wait min 4.1ms
|
||||
|
||||
// third go!
|
||||
write4bits(0x03);
|
||||
delayMicroseconds(150);
|
||||
|
||||
// finally, set to 4-bit interface
|
||||
write4bits(0x02);
|
||||
} else {
|
||||
// this is according to the hitachi HD44780 datasheet
|
||||
// page 45 figure 23
|
||||
|
||||
// Send function set command sequence
|
||||
command(LCD_FUNCTIONSET | _displayfunction);
|
||||
delayMicroseconds(4500); // wait more than 4.1ms
|
||||
|
||||
// second try
|
||||
command(LCD_FUNCTIONSET | _displayfunction);
|
||||
delayMicroseconds(150);
|
||||
|
||||
// third go
|
||||
command(LCD_FUNCTIONSET | _displayfunction);
|
||||
}
|
||||
|
||||
// finally, set # lines, font size, etc.
|
||||
command(LCD_FUNCTIONSET | _displayfunction);
|
||||
|
||||
// turn the display on with no cursor or blinking default
|
||||
_displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;
|
||||
display();
|
||||
|
||||
// clear it off
|
||||
clear();
|
||||
|
||||
// Initialize to default text direction (for romance languages)
|
||||
_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
|
||||
// set the entry mode
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
|
||||
}
|
||||
|
||||
/********** high level commands, for the user! */
|
||||
void LiquidCrystal::clear()
|
||||
{
|
||||
command(LCD_CLEARDISPLAY); // clear display, set cursor position to zero
|
||||
delayMicroseconds(2000); // this command takes a long time!
|
||||
}
|
||||
|
||||
void LiquidCrystal::home()
|
||||
{
|
||||
command(LCD_RETURNHOME); // set cursor position to zero
|
||||
delayMicroseconds(2000); // this command takes a long time!
|
||||
}
|
||||
|
||||
void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
|
||||
{
|
||||
int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
|
||||
if ( row >= _numlines ) {
|
||||
row = _numlines-1; // we count rows starting w/0
|
||||
}
|
||||
|
||||
command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
|
||||
}
|
||||
|
||||
// Turn the display on/off (quickly)
|
||||
void LiquidCrystal::noDisplay() {
|
||||
_displaycontrol &= ~LCD_DISPLAYON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
void LiquidCrystal::display() {
|
||||
_displaycontrol |= LCD_DISPLAYON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
|
||||
// Turns the underline cursor on/off
|
||||
void LiquidCrystal::noCursor() {
|
||||
_displaycontrol &= ~LCD_CURSORON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
void LiquidCrystal::cursor() {
|
||||
_displaycontrol |= LCD_CURSORON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
|
||||
// Turn on and off the blinking cursor
|
||||
void LiquidCrystal::noBlink() {
|
||||
_displaycontrol &= ~LCD_BLINKON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
void LiquidCrystal::blink() {
|
||||
_displaycontrol |= LCD_BLINKON;
|
||||
command(LCD_DISPLAYCONTROL | _displaycontrol);
|
||||
}
|
||||
|
||||
// These commands scroll the display without changing the RAM
|
||||
void LiquidCrystal::scrollDisplayLeft(void) {
|
||||
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
|
||||
}
|
||||
void LiquidCrystal::scrollDisplayRight(void) {
|
||||
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
|
||||
}
|
||||
|
||||
// This is for text that flows Left to Right
|
||||
void LiquidCrystal::leftToRight(void) {
|
||||
_displaymode |= LCD_ENTRYLEFT;
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
}
|
||||
|
||||
// This is for text that flows Right to Left
|
||||
void LiquidCrystal::rightToLeft(void) {
|
||||
_displaymode &= ~LCD_ENTRYLEFT;
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
}
|
||||
|
||||
// This will 'right justify' text from the cursor
|
||||
void LiquidCrystal::autoscroll(void) {
|
||||
_displaymode |= LCD_ENTRYSHIFTINCREMENT;
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
}
|
||||
|
||||
// This will 'left justify' text from the cursor
|
||||
void LiquidCrystal::noAutoscroll(void) {
|
||||
_displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
}
|
||||
|
||||
// Allows us to fill the first 8 CGRAM locations
|
||||
// with custom characters
|
||||
void LiquidCrystal::createChar(uint8_t location, uint8_t charmap[]) {
|
||||
location &= 0x7; // we only have 8 locations 0-7
|
||||
command(LCD_SETCGRAMADDR | (location << 3));
|
||||
for (int i=0; i<8; i++) {
|
||||
write(charmap[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*********** mid level commands, for sending data/cmds */
|
||||
|
||||
inline void LiquidCrystal::command(uint8_t value) {
|
||||
send(value, LOW);
|
||||
}
|
||||
|
||||
inline size_t LiquidCrystal::write(uint8_t value) {
|
||||
send(value, HIGH);
|
||||
return 1; // assume sucess
|
||||
}
|
||||
|
||||
/************ low level data pushing commands **********/
|
||||
|
||||
// write either command or data, with automatic 4/8-bit selection
|
||||
void LiquidCrystal::send(uint8_t value, uint8_t mode) {
|
||||
digitalWrite(_rs_pin, mode);
|
||||
|
||||
// if there is a RW pin indicated, set it low to Write
|
||||
if (_rw_pin != 255) {
|
||||
digitalWrite(_rw_pin, LOW);
|
||||
}
|
||||
|
||||
if (_displayfunction & LCD_8BITMODE) {
|
||||
write8bits(value);
|
||||
} else {
|
||||
write4bits(value>>4);
|
||||
write4bits(value);
|
||||
}
|
||||
}
|
||||
|
||||
void LiquidCrystal::pulseEnable(void) {
|
||||
digitalWrite(_enable_pin, LOW);
|
||||
delayMicroseconds(1);
|
||||
digitalWrite(_enable_pin, HIGH);
|
||||
delayMicroseconds(1); // enable pulse must be >450ns
|
||||
digitalWrite(_enable_pin, LOW);
|
||||
delayMicroseconds(100); // commands need > 37us to settle
|
||||
}
|
||||
|
||||
void LiquidCrystal::write4bits(uint8_t value) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
pinMode(_data_pins[i], OUTPUT);
|
||||
digitalWrite(_data_pins[i], (value >> i) & 0x01);
|
||||
}
|
||||
|
||||
pulseEnable();
|
||||
}
|
||||
|
||||
void LiquidCrystal::write8bits(uint8_t value) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
pinMode(_data_pins[i], OUTPUT);
|
||||
digitalWrite(_data_pins[i], (value >> i) & 0x01);
|
||||
}
|
||||
|
||||
pulseEnable();
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
#ifndef LiquidCrystal_h
|
||||
#define LiquidCrystal_h
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "Print.h"
|
||||
|
||||
// commands
|
||||
#define LCD_CLEARDISPLAY 0x01
|
||||
#define LCD_RETURNHOME 0x02
|
||||
#define LCD_ENTRYMODESET 0x04
|
||||
#define LCD_DISPLAYCONTROL 0x08
|
||||
#define LCD_CURSORSHIFT 0x10
|
||||
#define LCD_FUNCTIONSET 0x20
|
||||
#define LCD_SETCGRAMADDR 0x40
|
||||
#define LCD_SETDDRAMADDR 0x80
|
||||
|
||||
// flags for display entry mode
|
||||
#define LCD_ENTRYRIGHT 0x00
|
||||
#define LCD_ENTRYLEFT 0x02
|
||||
#define LCD_ENTRYSHIFTINCREMENT 0x01
|
||||
#define LCD_ENTRYSHIFTDECREMENT 0x00
|
||||
|
||||
// flags for display on/off control
|
||||
#define LCD_DISPLAYON 0x04
|
||||
#define LCD_DISPLAYOFF 0x00
|
||||
#define LCD_CURSORON 0x02
|
||||
#define LCD_CURSOROFF 0x00
|
||||
#define LCD_BLINKON 0x01
|
||||
#define LCD_BLINKOFF 0x00
|
||||
|
||||
// flags for display/cursor shift
|
||||
#define LCD_DISPLAYMOVE 0x08
|
||||
#define LCD_CURSORMOVE 0x00
|
||||
#define LCD_MOVERIGHT 0x04
|
||||
#define LCD_MOVELEFT 0x00
|
||||
|
||||
// flags for function set
|
||||
#define LCD_8BITMODE 0x10
|
||||
#define LCD_4BITMODE 0x00
|
||||
#define LCD_2LINE 0x08
|
||||
#define LCD_1LINE 0x00
|
||||
#define LCD_5x10DOTS 0x04
|
||||
#define LCD_5x8DOTS 0x00
|
||||
|
||||
class LiquidCrystal : public Print {
|
||||
public:
|
||||
LiquidCrystal(uint8_t rs, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
|
||||
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
|
||||
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
|
||||
LiquidCrystal(uint8_t rs, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
|
||||
|
||||
void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
|
||||
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
|
||||
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
|
||||
|
||||
void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
|
||||
|
||||
void clear();
|
||||
void home();
|
||||
|
||||
void noDisplay();
|
||||
void display();
|
||||
void noBlink();
|
||||
void blink();
|
||||
void noCursor();
|
||||
void cursor();
|
||||
void scrollDisplayLeft();
|
||||
void scrollDisplayRight();
|
||||
void leftToRight();
|
||||
void rightToLeft();
|
||||
void autoscroll();
|
||||
void noAutoscroll();
|
||||
|
||||
void createChar(uint8_t, uint8_t[]);
|
||||
void setCursor(uint8_t, uint8_t);
|
||||
virtual size_t write(uint8_t);
|
||||
void command(uint8_t);
|
||||
|
||||
using Print::write;
|
||||
private:
|
||||
void send(uint8_t, uint8_t);
|
||||
void write4bits(uint8_t);
|
||||
void write8bits(uint8_t);
|
||||
void pulseEnable();
|
||||
|
||||
uint8_t _rs_pin; // LOW: command. HIGH: character.
|
||||
uint8_t _rw_pin; // LOW: write to LCD. HIGH: read from LCD.
|
||||
uint8_t _enable_pin; // activated by a HIGH pulse.
|
||||
uint8_t _data_pins[8];
|
||||
|
||||
uint8_t _displayfunction;
|
||||
uint8_t _displaycontrol;
|
||||
uint8_t _displaymode;
|
||||
|
||||
uint8_t _initialized;
|
||||
|
||||
uint8_t _numlines,_currline;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For LiquidCrystal
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
LiquidCrystal KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
begin KEYWORD2
|
||||
clear KEYWORD2
|
||||
home KEYWORD2
|
||||
print KEYWORD2
|
||||
setCursor KEYWORD2
|
||||
cursor KEYWORD2
|
||||
noCursor KEYWORD2
|
||||
blink KEYWORD2
|
||||
noBlink KEYWORD2
|
||||
display KEYWORD2
|
||||
noDisplay KEYWORD2
|
||||
autoscroll KEYWORD2
|
||||
noAutoscroll KEYWORD2
|
||||
leftToRight KEYWORD2
|
||||
rightToLeft KEYWORD2
|
||||
scrollDisplayLeft KEYWORD2
|
||||
scrollDisplayRight KEYWORD2
|
||||
createChar KEYWORD2
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
|
@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2010 by Cristian Maglie <c.maglie@bug.st>
|
||||
* SPI Master library for arduino.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of either the GNU General Public License version 2
|
||||
* or the GNU Lesser General Public License version 2.1, both as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "pins_arduino.h"
|
||||
#include "SPI.h"
|
||||
|
||||
SPIClass SPI;
|
||||
|
||||
void SPIClass::begin() {
|
||||
|
||||
// Set SS to high so a connected chip will be "deselected" by default
|
||||
digitalWrite(SS, HIGH);
|
||||
|
||||
// When the SS pin is set as OUTPUT, it can be used as
|
||||
// a general purpose output port (it doesn't influence
|
||||
// SPI operations).
|
||||
pinMode(SS, OUTPUT);
|
||||
|
||||
// Warning: if the SS pin ever becomes a LOW INPUT then SPI
|
||||
// automatically switches to Slave, so the data direction of
|
||||
// the SS pin MUST be kept as OUTPUT.
|
||||
SPCR |= _BV(MSTR);
|
||||
SPCR |= _BV(SPE);
|
||||
|
||||
// Set direction register for SCK and MOSI pin.
|
||||
// MISO pin automatically overrides to INPUT.
|
||||
// By doing this AFTER enabling SPI, we avoid accidentally
|
||||
// clocking in a single bit since the lines go directly
|
||||
// from "input" to SPI control.
|
||||
// http://code.google.com/p/arduino/issues/detail?id=888
|
||||
pinMode(SCK, OUTPUT);
|
||||
pinMode(MOSI, OUTPUT);
|
||||
}
|
||||
|
||||
|
||||
void SPIClass::end() {
|
||||
SPCR &= ~_BV(SPE);
|
||||
}
|
||||
|
||||
void SPIClass::setBitOrder(uint8_t bitOrder)
|
||||
{
|
||||
if(bitOrder == LSBFIRST) {
|
||||
SPCR |= _BV(DORD);
|
||||
} else {
|
||||
SPCR &= ~(_BV(DORD));
|
||||
}
|
||||
}
|
||||
|
||||
void SPIClass::setDataMode(uint8_t mode)
|
||||
{
|
||||
SPCR = (SPCR & ~SPI_MODE_MASK) | mode;
|
||||
}
|
||||
|
||||
void SPIClass::setClockDivider(uint8_t rate)
|
||||
{
|
||||
SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK);
|
||||
SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK);
|
||||
}
|
||||
|
@ -1,70 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2010 by Cristian Maglie <c.maglie@bug.st>
|
||||
* SPI Master library for arduino.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of either the GNU General Public License version 2
|
||||
* or the GNU Lesser General Public License version 2.1, both as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _SPI_H_INCLUDED
|
||||
#define _SPI_H_INCLUDED
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Arduino.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define SPI_CLOCK_DIV4 0x00
|
||||
#define SPI_CLOCK_DIV16 0x01
|
||||
#define SPI_CLOCK_DIV64 0x02
|
||||
#define SPI_CLOCK_DIV128 0x03
|
||||
#define SPI_CLOCK_DIV2 0x04
|
||||
#define SPI_CLOCK_DIV8 0x05
|
||||
#define SPI_CLOCK_DIV32 0x06
|
||||
//#define SPI_CLOCK_DIV64 0x07
|
||||
|
||||
#define SPI_MODE0 0x00
|
||||
#define SPI_MODE1 0x04
|
||||
#define SPI_MODE2 0x08
|
||||
#define SPI_MODE3 0x0C
|
||||
|
||||
#define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR
|
||||
#define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR
|
||||
#define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR
|
||||
|
||||
class SPIClass {
|
||||
public:
|
||||
inline static byte transfer(byte _data);
|
||||
|
||||
// SPI Configuration methods
|
||||
|
||||
inline static void attachInterrupt();
|
||||
inline static void detachInterrupt(); // Default
|
||||
|
||||
static void begin(); // Default
|
||||
static void end();
|
||||
|
||||
static void setBitOrder(uint8_t);
|
||||
static void setDataMode(uint8_t);
|
||||
static void setClockDivider(uint8_t);
|
||||
};
|
||||
|
||||
extern SPIClass SPI;
|
||||
|
||||
byte SPIClass::transfer(byte _data) {
|
||||
SPDR = _data;
|
||||
while (!(SPSR & _BV(SPIF)))
|
||||
;
|
||||
return SPDR;
|
||||
}
|
||||
|
||||
void SPIClass::attachInterrupt() {
|
||||
SPCR |= _BV(SPIE);
|
||||
}
|
||||
|
||||
void SPIClass::detachInterrupt() {
|
||||
SPCR &= ~_BV(SPIE);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,36 +0,0 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map SPI
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
SPI KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
begin KEYWORD2
|
||||
end KEYWORD2
|
||||
transfer KEYWORD2
|
||||
setBitOrder KEYWORD2
|
||||
setDataMode KEYWORD2
|
||||
setClockDivider KEYWORD2
|
||||
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
SPI_CLOCK_DIV4 LITERAL1
|
||||
SPI_CLOCK_DIV16 LITERAL1
|
||||
SPI_CLOCK_DIV64 LITERAL1
|
||||
SPI_CLOCK_DIV128 LITERAL1
|
||||
SPI_CLOCK_DIV2 LITERAL1
|
||||
SPI_CLOCK_DIV8 LITERAL1
|
||||
SPI_CLOCK_DIV32 LITERAL1
|
||||
SPI_CLOCK_DIV64 LITERAL1
|
||||
SPI_MODE0 LITERAL1
|
||||
SPI_MODE1 LITERAL1
|
||||
SPI_MODE2 LITERAL1
|
||||
SPI_MODE3 LITERAL1
|
@ -1,17 +0,0 @@
|
||||
#mac stuff
|
||||
.DS_Store
|
||||
|
||||
#eclipse stuff
|
||||
.classpath
|
||||
.project
|
||||
|
||||
#processing stuff
|
||||
generated/
|
||||
examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*/
|
||||
examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*
|
||||
|
||||
#eagle stuff
|
||||
schematics/*.b#?
|
||||
schematics/*.s#?
|
||||
|
||||
*.zip
|
@ -1,10 +0,0 @@
|
||||
|
||||
Copyright (c) 2012 Interactive Matter
|
||||
|
||||
based on the stepper library by Tom Igoe, et. al.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,71 +0,0 @@
|
||||
Arduino TMC26X Stepper Motor Controller Library
|
||||
===============================================
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
TMC26XStepper.cpp - - TMC 260/261/262 Stepper library for Wiring/Arduino
|
||||
|
||||
based on the stepper library by Tom Igoe, et. al.
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
About
|
||||
-----
|
||||
|
||||
The TMC26X is a stepper motor controller for bipolar stepper motors. From the trinamic web site:
|
||||
|
||||
The TMC262 is the first energy efficient high current high precision microstepping driver
|
||||
IC for bipolar stepper motors. The unique high resolution sensorless load detection stallGuard2™
|
||||
is used to for the world’s first integrated load dependent current control feature called coolStep™.
|
||||
The ability to read out the load and detect an overload makes the TMC262 an optimum choice for
|
||||
drives where a high reliability is desired at a low cost. The new patented spreadCycle PWM mixed
|
||||
decay chopper scheme ensures best zero crossing performance as well as high speed operation.
|
||||
The TMC262 can be driven with Step & Direction signals as well as by serial SPI™ interface.
|
||||
Using the microPlyer allows to operate the motor with highest 256 μStep smoothness reducing the
|
||||
input frequency to 16 μSteps. A full set of protection and diagnostic features makes this device
|
||||
very rugged. It directly drives external MOSFETs for currents of up to 6A. This way it reaches
|
||||
highest energy efficiency and allows driving of a high motor current without cooling measures
|
||||
even at high environment temperatures.
|
||||
|
||||
|
||||
The unique features of the TMC26X are that everything can (and must) be controlled in software:
|
||||
|
||||
* the motor current
|
||||
* microstepping
|
||||
* stall protection
|
||||
* current reduction according to load
|
||||
* stallGuard2™ sensorless load detection
|
||||
* coolStep™ load dependent current control
|
||||
* spreadCycle hysteresis PWM chopper
|
||||
* microPlyer 16-to-256 μStep multiplier
|
||||
* full protection and diagnostics
|
||||
|
||||
This makes the TMC26X a bit harder to use than other stepper motors but much more versatile.
|
||||
This library resolves all the complicated stuff so that you can use TMC26X straight away.
|
||||
Furthermore, all the settings are implemented in high level interfaces so that configuring your
|
||||
motor is a breeze.
|
||||
|
||||
How to use
|
||||
----------
|
||||
|
||||
Check out the Setup Guide here:
|
||||
And the How To here:
|
@ -1,999 +0,0 @@
|
||||
/*
|
||||
TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino
|
||||
|
||||
based on the stepper library by Tom Igoe, et. al.
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include <Arduino.h>
|
||||
#else
|
||||
#include <WProgram.h>
|
||||
#endif
|
||||
#include <SPI.h>
|
||||
#include "TMC26XStepper.h"
|
||||
|
||||
//some default values used in initialization
|
||||
#define DEFAULT_MICROSTEPPING_VALUE 32
|
||||
|
||||
//TMC26X register definitions
|
||||
#define DRIVER_CONTROL_REGISTER 0x0ul
|
||||
#define CHOPPER_CONFIG_REGISTER 0x80000ul
|
||||
#define COOL_STEP_REGISTER 0xA0000ul
|
||||
#define STALL_GUARD2_LOAD_MEASURE_REGISTER 0xC0000ul
|
||||
#define DRIVER_CONFIG_REGISTER 0xE0000ul
|
||||
|
||||
#define REGISTER_BIT_PATTERN 0xFFFFFul
|
||||
|
||||
//definitions for the driver control register
|
||||
#define MICROSTEPPING_PATTERN 0xFul
|
||||
#define STEP_INTERPOLATION 0x200ul
|
||||
#define DOUBLE_EDGE_STEP 0x100ul
|
||||
#define VSENSE 0x40ul
|
||||
#define READ_MICROSTEP_POSTION 0x0ul
|
||||
#define READ_STALL_GUARD_READING 0x10ul
|
||||
#define READ_STALL_GUARD_AND_COOL_STEP 0x20ul
|
||||
#define READ_SELECTION_PATTERN 0x30ul
|
||||
|
||||
//definitions for the chopper config register
|
||||
#define CHOPPER_MODE_STANDARD 0x0ul
|
||||
#define CHOPPER_MODE_T_OFF_FAST_DECAY 0x4000ul
|
||||
#define T_OFF_PATTERN 0xful
|
||||
#define RANDOM_TOFF_TIME 0x2000ul
|
||||
#define BLANK_TIMING_PATTERN 0x18000ul
|
||||
#define BLANK_TIMING_SHIFT 15
|
||||
#define HYSTERESIS_DECREMENT_PATTERN 0x1800ul
|
||||
#define HYSTERESIS_DECREMENT_SHIFT 11
|
||||
#define HYSTERESIS_LOW_VALUE_PATTERN 0x780ul
|
||||
#define HYSTERESIS_LOW_SHIFT 7
|
||||
#define HYSTERESIS_START_VALUE_PATTERN 0x78ul
|
||||
#define HYSTERESIS_START_VALUE_SHIFT 4
|
||||
#define T_OFF_TIMING_PATERN 0xFul
|
||||
|
||||
//definitions for cool step register
|
||||
#define MINIMUM_CURRENT_FOURTH 0x8000ul
|
||||
#define CURRENT_DOWN_STEP_SPEED_PATTERN 0x6000ul
|
||||
#define SE_MAX_PATTERN 0xF00ul
|
||||
#define SE_CURRENT_STEP_WIDTH_PATTERN 0x60ul
|
||||
#define SE_MIN_PATTERN 0xful
|
||||
|
||||
//definitions for stall guard2 current register
|
||||
#define STALL_GUARD_FILTER_ENABLED 0x10000ul
|
||||
#define STALL_GUARD_TRESHHOLD_VALUE_PATTERN 0x17F00ul
|
||||
#define CURRENT_SCALING_PATTERN 0x1Ful
|
||||
#define STALL_GUARD_CONFIG_PATTERN 0x17F00ul
|
||||
#define STALL_GUARD_VALUE_PATTERN 0x7F00ul
|
||||
|
||||
//definitions for the input from the TCM260
|
||||
#define STATUS_STALL_GUARD_STATUS 0x1ul
|
||||
#define STATUS_OVER_TEMPERATURE_SHUTDOWN 0x2ul
|
||||
#define STATUS_OVER_TEMPERATURE_WARNING 0x4ul
|
||||
#define STATUS_SHORT_TO_GROUND_A 0x8ul
|
||||
#define STATUS_SHORT_TO_GROUND_B 0x10ul
|
||||
#define STATUS_OPEN_LOAD_A 0x20ul
|
||||
#define STATUS_OPEN_LOAD_B 0x40ul
|
||||
#define STATUS_STAND_STILL 0x80ul
|
||||
#define READOUT_VALUE_PATTERN 0xFFC00ul
|
||||
|
||||
//default values
|
||||
#define INITIAL_MICROSTEPPING 0x3ul //32th microstepping
|
||||
|
||||
//debuging output
|
||||
//#define DEBUG
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
* number_of_steps - the steps per rotation
|
||||
* cs_pin - the SPI client select pin
|
||||
* dir_pin - the pin where the direction pin is connected
|
||||
* step_pin - the pin where the step pin is connected
|
||||
*/
|
||||
TMC26XStepper::TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor)
|
||||
{
|
||||
//we are not started yet
|
||||
started=false;
|
||||
//by default cool step is not enabled
|
||||
cool_step_enabled=false;
|
||||
|
||||
//save the pins for later use
|
||||
this->cs_pin=cs_pin;
|
||||
this->dir_pin=dir_pin;
|
||||
this->step_pin = step_pin;
|
||||
|
||||
//store the current sense resistor value for later use
|
||||
this->resistor = resistor;
|
||||
|
||||
//initizalize our status values
|
||||
this->steps_left = 0;
|
||||
this->direction = 0;
|
||||
|
||||
//initialize register values
|
||||
driver_control_register_value=DRIVER_CONTROL_REGISTER | INITIAL_MICROSTEPPING;
|
||||
chopper_config_register=CHOPPER_CONFIG_REGISTER;
|
||||
|
||||
//setting the default register values
|
||||
driver_control_register_value=DRIVER_CONTROL_REGISTER|INITIAL_MICROSTEPPING;
|
||||
microsteps = (1 << INITIAL_MICROSTEPPING);
|
||||
chopper_config_register=CHOPPER_CONFIG_REGISTER;
|
||||
cool_step_register_value=COOL_STEP_REGISTER;
|
||||
stall_guard2_current_register_value=STALL_GUARD2_LOAD_MEASURE_REGISTER;
|
||||
driver_configuration_register_value = DRIVER_CONFIG_REGISTER | READ_STALL_GUARD_READING;
|
||||
|
||||
//set the current
|
||||
setCurrent(current);
|
||||
//set to a conservative start value
|
||||
setConstantOffTimeChopper(7, 54, 13,12,1);
|
||||
//set a nice microstepping value
|
||||
setMicrosteps(DEFAULT_MICROSTEPPING_VALUE);
|
||||
//save the number of steps
|
||||
this->number_of_steps = number_of_steps;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* start & configure the stepper driver
|
||||
* just must be called.
|
||||
*/
|
||||
void TMC26XStepper::start() {
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.println("TMC26X stepper library");
|
||||
Serial.print("CS pin: ");
|
||||
Serial.println(cs_pin);
|
||||
Serial.print("DIR pin: ");
|
||||
Serial.println(dir_pin);
|
||||
Serial.print("STEP pin: ");
|
||||
Serial.println(step_pin);
|
||||
Serial.print("current scaling: ");
|
||||
Serial.println(current_scaling,DEC);
|
||||
#endif
|
||||
//set the pins as output & its initial value
|
||||
pinMode(step_pin, OUTPUT);
|
||||
pinMode(dir_pin, OUTPUT);
|
||||
pinMode(cs_pin, OUTPUT);
|
||||
digitalWrite(step_pin, LOW);
|
||||
digitalWrite(dir_pin, LOW);
|
||||
digitalWrite(cs_pin, HIGH);
|
||||
|
||||
//configure the SPI interface
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV8);
|
||||
//todo this does not work reliably - find a way to foolprof set it (e.g. while communicating
|
||||
//SPI.setDataMode(SPI_MODE3);
|
||||
SPI.begin();
|
||||
|
||||
//set the initial values
|
||||
send262(driver_control_register_value);
|
||||
send262(chopper_config_register);
|
||||
send262(cool_step_register_value);
|
||||
send262(stall_guard2_current_register_value);
|
||||
send262(driver_configuration_register_value);
|
||||
|
||||
//save that we are in running mode
|
||||
started=true;
|
||||
}
|
||||
|
||||
/*
|
||||
Mark the driver as unstarted to be able to start it again
|
||||
*/
|
||||
void TMC26XStepper::un_start() {
|
||||
started=false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sets the speed in revs per minute
|
||||
|
||||
*/
|
||||
void TMC26XStepper::setSpeed(unsigned int whatSpeed)
|
||||
{
|
||||
this->speed = whatSpeed;
|
||||
this->step_delay = (60UL * 1000UL * 1000UL) / ((unsigned long)this->number_of_steps * (unsigned long)whatSpeed * (unsigned long)this->microsteps);
|
||||
#ifdef DEBUG
|
||||
Serial.print("Step delay in micros: ");
|
||||
Serial.println(this->step_delay);
|
||||
#endif
|
||||
//update the next step time
|
||||
this->next_step_time = this->last_step_time+this->step_delay;
|
||||
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getSpeed(void) {
|
||||
return this->speed;
|
||||
}
|
||||
|
||||
/*
|
||||
Moves the motor steps_to_move steps. If the number is negative,
|
||||
the motor moves in the reverse direction.
|
||||
*/
|
||||
char TMC26XStepper::step(int steps_to_move)
|
||||
{
|
||||
if (this->steps_left==0) {
|
||||
this->steps_left = abs(steps_to_move); // how many steps to take
|
||||
|
||||
// determine direction based on whether steps_to_mode is + or -:
|
||||
if (steps_to_move > 0) {
|
||||
this->direction = 1;
|
||||
} else if (steps_to_move < 0) {
|
||||
this->direction = 0;
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
char TMC26XStepper::move(void) {
|
||||
// decrement the number of steps, moving one step each time:
|
||||
if(this->steps_left>0) {
|
||||
unsigned long time = micros();
|
||||
// move only if the appropriate delay has passed:
|
||||
if (time >= this->next_step_time) {
|
||||
// increment or decrement the step number,
|
||||
// depending on direction:
|
||||
if (this->direction == 1) {
|
||||
digitalWrite(step_pin, HIGH);
|
||||
} else {
|
||||
digitalWrite(dir_pin, HIGH);
|
||||
digitalWrite(step_pin, HIGH);
|
||||
}
|
||||
// get the timeStamp of when you stepped:
|
||||
this->last_step_time = time;
|
||||
this->next_step_time = time+this->step_delay;
|
||||
// decrement the steps left:
|
||||
steps_left--;
|
||||
//disable the step & dir pins
|
||||
digitalWrite(step_pin, LOW);
|
||||
digitalWrite(dir_pin, LOW);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
char TMC26XStepper::isMoving(void) {
|
||||
return (this->steps_left>0);
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getStepsLeft(void) {
|
||||
return this->steps_left;
|
||||
}
|
||||
|
||||
char TMC26XStepper::stop(void) {
|
||||
//note to self if the motor is currently moving
|
||||
char state = isMoving();
|
||||
//stop the motor
|
||||
this->steps_left = 0;
|
||||
this->direction = 0;
|
||||
//return if it was moving
|
||||
return state;
|
||||
}
|
||||
|
||||
void TMC26XStepper::setCurrent(unsigned int current) {
|
||||
unsigned char current_scaling = 0;
|
||||
//calculate the current scaling from the max current setting (in mA)
|
||||
double mASetting = (double)current;
|
||||
double resistor_value = (double) this->resistor;
|
||||
// remove vesense flag
|
||||
this->driver_configuration_register_value &= ~(VSENSE);
|
||||
//this is derrived from I=(cs+1)/32*(Vsense/Rsense)
|
||||
//leading to cs = CS = 32*R*I/V (with V = 0,31V oder 0,165V and I = 1000*current)
|
||||
//with Rsense=0,15
|
||||
//for vsense = 0,310V (VSENSE not set)
|
||||
//or vsense = 0,165V (VSENSE set)
|
||||
current_scaling = (byte)((resistor_value*mASetting*32.0/(0.31*1000.0*1000.0))-0.5); //theoretically - 1.0 for better rounding it is 0.5
|
||||
|
||||
//check if the current scalingis too low
|
||||
if (current_scaling<16) {
|
||||
//set the csense bit to get a use half the sense voltage (to support lower motor currents)
|
||||
this->driver_configuration_register_value |= VSENSE;
|
||||
//and recalculate the current setting
|
||||
current_scaling = (byte)((resistor_value*mASetting*32.0/(0.165*1000.0*1000.0))-0.5); //theoretically - 1.0 for better rounding it is 0.5
|
||||
#ifdef DEBUG
|
||||
Serial.print("CS (Vsense=1): ");
|
||||
Serial.println(current_scaling);
|
||||
} else {
|
||||
Serial.print("CS: ");
|
||||
Serial.println(current_scaling);
|
||||
#endif
|
||||
}
|
||||
|
||||
//do some sanity checks
|
||||
if (current_scaling>31) {
|
||||
current_scaling=31;
|
||||
}
|
||||
//delete the old value
|
||||
stall_guard2_current_register_value &= ~(CURRENT_SCALING_PATTERN);
|
||||
//set the new current scaling
|
||||
stall_guard2_current_register_value |= current_scaling;
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(driver_configuration_register_value);
|
||||
send262(stall_guard2_current_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getCurrent(void) {
|
||||
//we calculate the current according to the datasheet to be on the safe side
|
||||
//this is not the fastest but the most accurate and illustrative way
|
||||
double result = (double)(stall_guard2_current_register_value & CURRENT_SCALING_PATTERN);
|
||||
double resistor_value = (double)this->resistor;
|
||||
double voltage = (driver_configuration_register_value & VSENSE)? 0.165:0.31;
|
||||
result = (result+1.0)/32.0*voltage/resistor_value*1000.0*1000.0;
|
||||
return (unsigned int)result;
|
||||
}
|
||||
|
||||
void TMC26XStepper::setStallGuardThreshold(char stall_guard_threshold, char stall_guard_filter_enabled) {
|
||||
if (stall_guard_threshold<-64) {
|
||||
stall_guard_threshold = -64;
|
||||
//We just have 5 bits
|
||||
} else if (stall_guard_threshold > 63) {
|
||||
stall_guard_threshold = 63;
|
||||
}
|
||||
//add trim down to 7 bits
|
||||
stall_guard_threshold &=0x7f;
|
||||
//delete old stall guard settings
|
||||
stall_guard2_current_register_value &= ~(STALL_GUARD_CONFIG_PATTERN);
|
||||
if (stall_guard_filter_enabled) {
|
||||
stall_guard2_current_register_value |= STALL_GUARD_FILTER_ENABLED;
|
||||
}
|
||||
//Set the new stall guard threshold
|
||||
stall_guard2_current_register_value |= (((unsigned long)stall_guard_threshold << 8) & STALL_GUARD_CONFIG_PATTERN);
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(stall_guard2_current_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
char TMC26XStepper::getStallGuardThreshold(void) {
|
||||
unsigned long stall_guard_threshold = stall_guard2_current_register_value & STALL_GUARD_VALUE_PATTERN;
|
||||
//shift it down to bit 0
|
||||
stall_guard_threshold >>=8;
|
||||
//convert the value to an int to correctly handle the negative numbers
|
||||
char result = stall_guard_threshold;
|
||||
//check if it is negative and fill it up with leading 1 for proper negative number representation
|
||||
if (result & _BV(6)) {
|
||||
result |= 0xC0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
char TMC26XStepper::getStallGuardFilter(void) {
|
||||
if (stall_guard2_current_register_value & STALL_GUARD_FILTER_ENABLED) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Set the number of microsteps per step.
|
||||
* 0,2,4,8,16,32,64,128,256 is supported
|
||||
* any value in between will be mapped to the next smaller value
|
||||
* 0 and 1 set the motor in full step mode
|
||||
*/
|
||||
void TMC26XStepper::setMicrosteps(int number_of_steps) {
|
||||
long setting_pattern;
|
||||
//poor mans log
|
||||
if (number_of_steps>=256) {
|
||||
setting_pattern=0;
|
||||
microsteps=256;
|
||||
} else if (number_of_steps>=128) {
|
||||
setting_pattern=1;
|
||||
microsteps=128;
|
||||
} else if (number_of_steps>=64) {
|
||||
setting_pattern=2;
|
||||
microsteps=64;
|
||||
} else if (number_of_steps>=32) {
|
||||
setting_pattern=3;
|
||||
microsteps=32;
|
||||
} else if (number_of_steps>=16) {
|
||||
setting_pattern=4;
|
||||
microsteps=16;
|
||||
} else if (number_of_steps>=8) {
|
||||
setting_pattern=5;
|
||||
microsteps=8;
|
||||
} else if (number_of_steps>=4) {
|
||||
setting_pattern=6;
|
||||
microsteps=4;
|
||||
} else if (number_of_steps>=2) {
|
||||
setting_pattern=7;
|
||||
microsteps=2;
|
||||
//1 and 0 lead to full step
|
||||
} else if (number_of_steps<=1) {
|
||||
setting_pattern=8;
|
||||
microsteps=1;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
Serial.print("Microstepping: ");
|
||||
Serial.println(microsteps);
|
||||
#endif
|
||||
//delete the old value
|
||||
this->driver_control_register_value &=0xFFFF0ul;
|
||||
//set the new value
|
||||
this->driver_control_register_value |=setting_pattern;
|
||||
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(driver_control_register_value);
|
||||
}
|
||||
//recalculate the stepping delay by simply setting the speed again
|
||||
this->setSpeed(this->speed);
|
||||
}
|
||||
|
||||
/*
|
||||
* returns the effective number of microsteps at the moment
|
||||
*/
|
||||
int TMC26XStepper::getMicrosteps(void) {
|
||||
return microsteps;
|
||||
}
|
||||
|
||||
/*
|
||||
* constant_off_time: The off time setting controls the minimum chopper frequency.
|
||||
* For most applications an off time within the range of 5μs to 20μs will fit.
|
||||
* 2...15: off time setting
|
||||
*
|
||||
* blank_time: Selects the comparator blank time. This time needs to safely cover the switching event and the
|
||||
* duration of the ringing on the sense resistor. For
|
||||
* 0: min. setting 3: max. setting
|
||||
*
|
||||
* fast_decay_time_setting: Fast decay time setting. With CHM=1, these bits control the portion of fast decay for each chopper cycle.
|
||||
* 0: slow decay only
|
||||
* 1...15: duration of fast decay phase
|
||||
*
|
||||
* sine_wave_offset: Sine wave offset. With CHM=1, these bits control the sine wave offset.
|
||||
* A positive offset corrects for zero crossing error.
|
||||
* -3..-1: negative offset 0: no offset 1...12: positive offset
|
||||
*
|
||||
* use_current_comparator: Selects usage of the current comparator for termination of the fast decay cycle.
|
||||
* If current comparator is enabled, it terminates the fast decay cycle in case the current
|
||||
* reaches a higher negative value than the actual positive value.
|
||||
* 1: enable comparator termination of fast decay cycle
|
||||
* 0: end by time only
|
||||
*/
|
||||
void TMC26XStepper::setConstantOffTimeChopper(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator) {
|
||||
//perform some sanity checks
|
||||
if (constant_off_time<2) {
|
||||
constant_off_time=2;
|
||||
} else if (constant_off_time>15) {
|
||||
constant_off_time=15;
|
||||
}
|
||||
//save the constant off time
|
||||
this->constant_off_time = constant_off_time;
|
||||
char blank_value;
|
||||
//calculate the value acc to the clock cycles
|
||||
if (blank_time>=54) {
|
||||
blank_value=3;
|
||||
} else if (blank_time>=36) {
|
||||
blank_value=2;
|
||||
} else if (blank_time>=24) {
|
||||
blank_value=1;
|
||||
} else {
|
||||
blank_value=0;
|
||||
}
|
||||
if (fast_decay_time_setting<0) {
|
||||
fast_decay_time_setting=0;
|
||||
} else if (fast_decay_time_setting>15) {
|
||||
fast_decay_time_setting=15;
|
||||
}
|
||||
if (sine_wave_offset < -3) {
|
||||
sine_wave_offset = -3;
|
||||
} else if (sine_wave_offset>12) {
|
||||
sine_wave_offset = 12;
|
||||
}
|
||||
//shift the sine_wave_offset
|
||||
sine_wave_offset +=3;
|
||||
|
||||
//calculate the register setting
|
||||
//first of all delete all the values for this
|
||||
chopper_config_register &= ~((1<<12) | BLANK_TIMING_PATTERN | HYSTERESIS_DECREMENT_PATTERN | HYSTERESIS_LOW_VALUE_PATTERN | HYSTERESIS_START_VALUE_PATTERN | T_OFF_TIMING_PATERN);
|
||||
//set the constant off pattern
|
||||
chopper_config_register |= CHOPPER_MODE_T_OFF_FAST_DECAY;
|
||||
//set the blank timing value
|
||||
chopper_config_register |= ((unsigned long)blank_value) << BLANK_TIMING_SHIFT;
|
||||
//setting the constant off time
|
||||
chopper_config_register |= constant_off_time;
|
||||
//set the fast decay time
|
||||
//set msb
|
||||
chopper_config_register |= (((unsigned long)(fast_decay_time_setting & 0x8))<<HYSTERESIS_DECREMENT_SHIFT);
|
||||
//other bits
|
||||
chopper_config_register |= (((unsigned long)(fast_decay_time_setting & 0x7))<<HYSTERESIS_START_VALUE_SHIFT);
|
||||
//set the sine wave offset
|
||||
chopper_config_register |= (unsigned long)sine_wave_offset << HYSTERESIS_LOW_SHIFT;
|
||||
//using the current comparator?
|
||||
if (!use_current_comparator) {
|
||||
chopper_config_register |= (1<<12);
|
||||
}
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(driver_control_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* constant_off_time: The off time setting controls the minimum chopper frequency.
|
||||
* For most applications an off time within the range of 5μs to 20μs will fit.
|
||||
* 2...15: off time setting
|
||||
*
|
||||
* blank_time: Selects the comparator blank time. This time needs to safely cover the switching event and the
|
||||
* duration of the ringing on the sense resistor. For
|
||||
* 0: min. setting 3: max. setting
|
||||
*
|
||||
* hysteresis_start: Hysteresis start setting. Please remark, that this value is an offset to the hysteresis end value HEND.
|
||||
* 1...8
|
||||
*
|
||||
* hysteresis_end: Hysteresis end setting. Sets the hysteresis end value after a number of decrements. Decrement interval time is controlled by HDEC.
|
||||
* The sum HSTRT+HEND must be <16. At a current setting CS of max. 30 (amplitude reduced to 240), the sum is not limited.
|
||||
* -3..-1: negative HEND 0: zero HEND 1...12: positive HEND
|
||||
*
|
||||
* hysteresis_decrement: Hysteresis decrement setting. This setting determines the slope of the hysteresis during on time and during fast decay time.
|
||||
* 0: fast decrement 3: very slow decrement
|
||||
*/
|
||||
|
||||
void TMC26XStepper::setSpreadCycleChopper(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement) {
|
||||
//perform some sanity checks
|
||||
if (constant_off_time<2) {
|
||||
constant_off_time=2;
|
||||
} else if (constant_off_time>15) {
|
||||
constant_off_time=15;
|
||||
}
|
||||
//save the constant off time
|
||||
this->constant_off_time = constant_off_time;
|
||||
char blank_value;
|
||||
//calculate the value acc to the clock cycles
|
||||
if (blank_time>=54) {
|
||||
blank_value=3;
|
||||
} else if (blank_time>=36) {
|
||||
blank_value=2;
|
||||
} else if (blank_time>=24) {
|
||||
blank_value=1;
|
||||
} else {
|
||||
blank_value=0;
|
||||
}
|
||||
if (hysteresis_start<1) {
|
||||
hysteresis_start=1;
|
||||
} else if (hysteresis_start>8) {
|
||||
hysteresis_start=8;
|
||||
}
|
||||
hysteresis_start--;
|
||||
|
||||
if (hysteresis_end < -3) {
|
||||
hysteresis_end = -3;
|
||||
} else if (hysteresis_end>12) {
|
||||
hysteresis_end = 12;
|
||||
}
|
||||
//shift the hysteresis_end
|
||||
hysteresis_end +=3;
|
||||
|
||||
if (hysteresis_decrement<0) {
|
||||
hysteresis_decrement=0;
|
||||
} else if (hysteresis_decrement>3) {
|
||||
hysteresis_decrement=3;
|
||||
}
|
||||
|
||||
//first of all delete all the values for this
|
||||
chopper_config_register &= ~(CHOPPER_MODE_T_OFF_FAST_DECAY | BLANK_TIMING_PATTERN | HYSTERESIS_DECREMENT_PATTERN | HYSTERESIS_LOW_VALUE_PATTERN | HYSTERESIS_START_VALUE_PATTERN | T_OFF_TIMING_PATERN);
|
||||
|
||||
//set the blank timing value
|
||||
chopper_config_register |= ((unsigned long)blank_value) << BLANK_TIMING_SHIFT;
|
||||
//setting the constant off time
|
||||
chopper_config_register |= constant_off_time;
|
||||
//set the hysteresis_start
|
||||
chopper_config_register |= ((unsigned long)hysteresis_start) << HYSTERESIS_START_VALUE_SHIFT;
|
||||
//set the hysteresis end
|
||||
chopper_config_register |= ((unsigned long)hysteresis_end) << HYSTERESIS_LOW_SHIFT;
|
||||
//set the hystereis decrement
|
||||
chopper_config_register |= ((unsigned long)blank_value) << BLANK_TIMING_SHIFT;
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(driver_control_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* In a constant off time chopper scheme both coil choppers run freely, i.e. are not synchronized.
|
||||
* The frequency of each chopper mainly depends on the coil current and the position dependant motor coil inductivity, thus it depends on the microstep position.
|
||||
* With some motors a slightly audible beat can occur between the chopper frequencies, especially when they are near to each other. This typically occurs at a
|
||||
* few microstep positions within each quarter wave. This effect normally is not audible when compared to mechanical noise generated by ball bearings, etc.
|
||||
* Further factors which can cause a similar effect are a poor layout of sense resistor GND connection.
|
||||
* Hint: A common factor, which can cause motor noise, is a bad PCB layout causing coupling of both sense resistor voltages
|
||||
* (please refer to sense resistor layout hint in chapter 8.1).
|
||||
* In order to minimize the effect of a beat between both chopper frequencies, an internal random generator is provided.
|
||||
* It modulates the slow decay time setting when switched on by the RNDTF bit. The RNDTF feature further spreads the chopper spectrum,
|
||||
* reducing electromagnetic emission on single frequencies.
|
||||
*/
|
||||
void TMC26XStepper::setRandomOffTime(char value) {
|
||||
if (value) {
|
||||
chopper_config_register |= RANDOM_TOFF_TIME;
|
||||
} else {
|
||||
chopper_config_register &= ~(RANDOM_TOFF_TIME);
|
||||
}
|
||||
//if started we directly send it to the motor
|
||||
if (started) {
|
||||
send262(driver_control_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
void TMC26XStepper::setCoolStepConfiguration(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size,
|
||||
unsigned char current_increment_step_size, unsigned char lower_current_limit) {
|
||||
//sanitize the input values
|
||||
if (lower_SG_threshold>480) {
|
||||
lower_SG_threshold = 480;
|
||||
}
|
||||
//divide by 32
|
||||
lower_SG_threshold >>=5;
|
||||
if (SG_hysteresis>480) {
|
||||
SG_hysteresis=480;
|
||||
}
|
||||
//divide by 32
|
||||
SG_hysteresis >>=5;
|
||||
if (current_decrement_step_size>3) {
|
||||
current_decrement_step_size=3;
|
||||
}
|
||||
if (current_increment_step_size>3) {
|
||||
current_increment_step_size=3;
|
||||
}
|
||||
if (lower_current_limit>1) {
|
||||
lower_current_limit=1;
|
||||
}
|
||||
//store the lower level in order to enable/disable the cool step
|
||||
this->cool_step_lower_threshold=lower_SG_threshold;
|
||||
//if cool step is not enabled we delete the lower value to keep it disabled
|
||||
if (!this->cool_step_enabled) {
|
||||
lower_SG_threshold=0;
|
||||
}
|
||||
//the good news is that we can start with a complete new cool step register value
|
||||
//and simply set the values in the register
|
||||
cool_step_register_value = ((unsigned long)lower_SG_threshold) | (((unsigned long)SG_hysteresis)<<8) | (((unsigned long)current_decrement_step_size)<<5)
|
||||
| (((unsigned long)current_increment_step_size)<<13) | (((unsigned long)lower_current_limit)<<15)
|
||||
//and of course we have to include the signature of the register
|
||||
| COOL_STEP_REGISTER;
|
||||
//Serial.println(cool_step_register_value,HEX);
|
||||
if (started) {
|
||||
send262(cool_step_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
void TMC26XStepper::setCoolStepEnabled(boolean enabled) {
|
||||
//simply delete the lower limit to disable the cool step
|
||||
cool_step_register_value &= ~SE_MIN_PATTERN;
|
||||
//and set it to the proper value if cool step is to be enabled
|
||||
if (enabled) {
|
||||
cool_step_register_value |=this->cool_step_lower_threshold;
|
||||
}
|
||||
//and save the enabled status
|
||||
this->cool_step_enabled = enabled;
|
||||
//save the register value
|
||||
if (started) {
|
||||
send262(cool_step_register_value);
|
||||
}
|
||||
}
|
||||
|
||||
boolean TMC26XStepper::isCoolStepEnabled(void) {
|
||||
return this->cool_step_enabled;
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getCoolStepLowerSgThreshold() {
|
||||
//we return our internally stored value - in order to provide the correct setting even if cool step is not enabled
|
||||
return this->cool_step_lower_threshold<<5;
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getCoolStepUpperSgThreshold() {
|
||||
return (unsigned char)((cool_step_register_value & SE_MAX_PATTERN)>>8)<<5;
|
||||
}
|
||||
|
||||
unsigned char TMC26XStepper::getCoolStepCurrentIncrementSize() {
|
||||
return (unsigned char)((cool_step_register_value & CURRENT_DOWN_STEP_SPEED_PATTERN)>>13);
|
||||
}
|
||||
|
||||
unsigned char TMC26XStepper::getCoolStepNumberOfSGReadings() {
|
||||
return (unsigned char)((cool_step_register_value & SE_CURRENT_STEP_WIDTH_PATTERN)>>5);
|
||||
}
|
||||
|
||||
unsigned char TMC26XStepper::getCoolStepLowerCurrentLimit() {
|
||||
return (unsigned char)((cool_step_register_value & MINIMUM_CURRENT_FOURTH)>>15);
|
||||
}
|
||||
|
||||
void TMC26XStepper::setEnabled(boolean enabled) {
|
||||
//delete the t_off in the chopper config to get sure
|
||||
chopper_config_register &= ~(T_OFF_PATTERN);
|
||||
if (enabled) {
|
||||
//and set the t_off time
|
||||
chopper_config_register |= this->constant_off_time;
|
||||
}
|
||||
//if not enabled we don't have to do anything since we already delete t_off from the register
|
||||
if (started) {
|
||||
send262(chopper_config_register);
|
||||
}
|
||||
}
|
||||
|
||||
boolean TMC26XStepper::isEnabled() {
|
||||
if (chopper_config_register & T_OFF_PATTERN) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* reads a value from the TMC26X status register. The value is not obtained directly but can then
|
||||
* be read by the various status routines.
|
||||
*
|
||||
*/
|
||||
void TMC26XStepper::readStatus(char read_value) {
|
||||
unsigned long old_driver_configuration_register_value = driver_configuration_register_value;
|
||||
//reset the readout configuration
|
||||
driver_configuration_register_value &= ~(READ_SELECTION_PATTERN);
|
||||
//this now equals TMC26X_READOUT_POSITION - so we just have to check the other two options
|
||||
if (read_value == TMC26X_READOUT_STALLGUARD) {
|
||||
driver_configuration_register_value |= READ_STALL_GUARD_READING;
|
||||
} else if (read_value == TMC26X_READOUT_CURRENT) {
|
||||
driver_configuration_register_value |= READ_STALL_GUARD_AND_COOL_STEP;
|
||||
}
|
||||
//all other cases are ignored to prevent funny values
|
||||
//check if the readout is configured for the value we are interested in
|
||||
if (driver_configuration_register_value!=old_driver_configuration_register_value) {
|
||||
//because then we need to write the value twice - one time for configuring, second time to get the value, see below
|
||||
send262(driver_configuration_register_value);
|
||||
}
|
||||
//write the configuration to get the last status
|
||||
send262(driver_configuration_register_value);
|
||||
}
|
||||
|
||||
int TMC26XStepper::getMotorPosition(void) {
|
||||
//we read it out even if we are not started yet - perhaps it is useful information for somebody
|
||||
readStatus(TMC26X_READOUT_POSITION);
|
||||
return getReadoutValue();
|
||||
}
|
||||
|
||||
//reads the stall guard setting from last status
|
||||
//returns -1 if stallguard information is not present
|
||||
int TMC26XStepper::getCurrentStallGuardReading(void) {
|
||||
//if we don't yet started there cannot be a stall guard value
|
||||
if (!started) {
|
||||
return -1;
|
||||
}
|
||||
//not time optimal, but solution optiomal:
|
||||
//first read out the stall guard value
|
||||
readStatus(TMC26X_READOUT_STALLGUARD);
|
||||
return getReadoutValue();
|
||||
}
|
||||
|
||||
unsigned char TMC26XStepper::getCurrentCSReading(void) {
|
||||
//if we don't yet started there cannot be a stall guard value
|
||||
if (!started) {
|
||||
return 0;
|
||||
}
|
||||
//not time optimal, but solution optiomal:
|
||||
//first read out the stall guard value
|
||||
readStatus(TMC26X_READOUT_CURRENT);
|
||||
return (getReadoutValue() & 0x1f);
|
||||
}
|
||||
|
||||
unsigned int TMC26XStepper::getCurrentCurrent(void) {
|
||||
double result = (double)getCurrentCSReading();
|
||||
double resistor_value = (double)this->resistor;
|
||||
double voltage = (driver_configuration_register_value & VSENSE)? 0.165:0.31;
|
||||
result = (result+1.0)/32.0*voltage/resistor_value*1000.0*1000.0;
|
||||
return (unsigned int)result;
|
||||
}
|
||||
|
||||
/*
|
||||
return true if the stallguard threshold has been reached
|
||||
*/
|
||||
boolean TMC26XStepper::isStallGuardOverThreshold(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_STALL_GUARD_STATUS);
|
||||
}
|
||||
|
||||
/*
|
||||
returns if there is any over temperature condition:
|
||||
OVER_TEMPERATURE_PREWARING if pre warning level has been reached
|
||||
OVER_TEMPERATURE_SHUTDOWN if the temperature is so hot that the driver is shut down
|
||||
Any of those levels are not too good.
|
||||
*/
|
||||
char TMC26XStepper::getOverTemperature(void) {
|
||||
if (!this->started) {
|
||||
return 0;
|
||||
}
|
||||
if (driver_status_result & STATUS_OVER_TEMPERATURE_SHUTDOWN) {
|
||||
return TMC26X_OVERTEMPERATURE_SHUTDOWN;
|
||||
}
|
||||
if (driver_status_result & STATUS_OVER_TEMPERATURE_WARNING) {
|
||||
return TMC26X_OVERTEMPERATURE_PREWARING;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//is motor channel A shorted to ground
|
||||
boolean TMC26XStepper::isShortToGroundA(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_SHORT_TO_GROUND_A);
|
||||
}
|
||||
|
||||
//is motor channel B shorted to ground
|
||||
boolean TMC26XStepper::isShortToGroundB(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_SHORT_TO_GROUND_B);
|
||||
}
|
||||
|
||||
//is motor channel A connected
|
||||
boolean TMC26XStepper::isOpenLoadA(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_OPEN_LOAD_A);
|
||||
}
|
||||
|
||||
//is motor channel B connected
|
||||
boolean TMC26XStepper::isOpenLoadB(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_OPEN_LOAD_B);
|
||||
}
|
||||
|
||||
//is chopper inactive since 2^20 clock cycles - defaults to ~0,08s
|
||||
boolean TMC26XStepper::isStandStill(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_STAND_STILL);
|
||||
}
|
||||
|
||||
//is chopper inactive since 2^20 clock cycles - defaults to ~0,08s
|
||||
boolean TMC26XStepper::isStallGuardReached(void) {
|
||||
if (!this->started) {
|
||||
return false;
|
||||
}
|
||||
return (driver_status_result & STATUS_STALL_GUARD_STATUS);
|
||||
}
|
||||
|
||||
//reads the stall guard setting from last status
|
||||
//returns -1 if stallguard inforamtion is not present
|
||||
int TMC26XStepper::getReadoutValue(void) {
|
||||
return (int)(driver_status_result >> 10);
|
||||
}
|
||||
|
||||
int TMC26XStepper::getResistor() {
|
||||
return this->resistor;
|
||||
}
|
||||
|
||||
boolean TMC26XStepper::isCurrentScalingHalfed() {
|
||||
if (this->driver_configuration_register_value & VSENSE) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*
|
||||
version() returns the version of the library:
|
||||
*/
|
||||
int TMC26XStepper::version(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void TMC26XStepper::debugLastStatus() {
|
||||
#ifdef DEBUG
|
||||
if (this->started) {
|
||||
if (this->getOverTemperature()&TMC26X_OVERTEMPERATURE_PREWARING) {
|
||||
Serial.println("WARNING: Overtemperature Prewarning!");
|
||||
} else if (this->getOverTemperature()&TMC26X_OVERTEMPERATURE_SHUTDOWN) {
|
||||
Serial.println("ERROR: Overtemperature Shutdown!");
|
||||
}
|
||||
if (this->isShortToGroundA()) {
|
||||
Serial.println("ERROR: SHORT to ground on channel A!");
|
||||
}
|
||||
if (this->isShortToGroundB()) {
|
||||
Serial.println("ERROR: SHORT to ground on channel A!");
|
||||
}
|
||||
if (this->isOpenLoadA()) {
|
||||
Serial.println("ERROR: Channel A seems to be unconnected!");
|
||||
}
|
||||
if (this->isOpenLoadB()) {
|
||||
Serial.println("ERROR: Channel B seems to be unconnected!");
|
||||
}
|
||||
if (this->isStallGuardReached()) {
|
||||
Serial.println("INFO: Stall Guard level reached!");
|
||||
}
|
||||
if (this->isStandStill()) {
|
||||
Serial.println("INFO: Motor is standing still.");
|
||||
}
|
||||
unsigned long readout_config = driver_configuration_register_value & READ_SELECTION_PATTERN;
|
||||
int value = getReadoutValue();
|
||||
if (readout_config == READ_MICROSTEP_POSTION) {
|
||||
Serial.print("Microstep postion phase A: ");
|
||||
Serial.println(value);
|
||||
} else if (readout_config == READ_STALL_GUARD_READING) {
|
||||
Serial.print("Stall Guard value:");
|
||||
Serial.println(value);
|
||||
} else if (readout_config == READ_STALL_GUARD_AND_COOL_STEP) {
|
||||
int stallGuard = value & 0xf;
|
||||
int current = value & 0x1F0;
|
||||
Serial.print("Approx Stall Guard: ");
|
||||
Serial.println(stallGuard);
|
||||
Serial.print("Current level");
|
||||
Serial.println(current);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* send register settings to the stepper driver via SPI
|
||||
* returns the current status
|
||||
*/
|
||||
inline void TMC26XStepper::send262(unsigned long datagram) {
|
||||
unsigned long i_datagram;
|
||||
|
||||
//preserver the previous spi mode
|
||||
unsigned char oldMode = SPCR & SPI_MODE_MASK;
|
||||
|
||||
//if the mode is not correct set it to mode 3
|
||||
if (oldMode != SPI_MODE3) {
|
||||
SPI.setDataMode(SPI_MODE3);
|
||||
}
|
||||
|
||||
//select the TMC driver
|
||||
digitalWrite(cs_pin,LOW);
|
||||
|
||||
//ensure that only valid bist are set (0-19)
|
||||
//datagram &=REGISTER_BIT_PATTERN;
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.print("Sending ");
|
||||
Serial.println(datagram,HEX);
|
||||
#endif
|
||||
|
||||
//write/read the values
|
||||
i_datagram = SPI.transfer((datagram >> 16) & 0xff);
|
||||
i_datagram <<= 8;
|
||||
i_datagram |= SPI.transfer((datagram >> 8) & 0xff);
|
||||
i_datagram <<= 8;
|
||||
i_datagram |= SPI.transfer((datagram) & 0xff);
|
||||
i_datagram >>= 4;
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.print("Received ");
|
||||
Serial.println(i_datagram,HEX);
|
||||
debugLastStatus();
|
||||
#endif
|
||||
//deselect the TMC chip
|
||||
digitalWrite(cs_pin,HIGH);
|
||||
|
||||
//restore the previous SPI mode if neccessary
|
||||
//if the mode is not correct set it to mode 3
|
||||
if (oldMode != SPI_MODE3) {
|
||||
SPI.setDataMode(oldMode);
|
||||
}
|
||||
|
||||
|
||||
//store the datagram as status result
|
||||
driver_status_result = i_datagram;
|
||||
}
|
@ -1,607 +0,0 @@
|
||||
/*
|
||||
TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino
|
||||
|
||||
based on the stepper library by Tom Igoe, et. al.
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// ensure this library description is only included once
|
||||
#ifndef TMC26XStepper_h
|
||||
#define TMC26XStepper_h
|
||||
|
||||
//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature situation in the TMC chip
|
||||
/*!
|
||||
* This warning indicates that the TCM chip is too warm.
|
||||
* It is still working but some parameters may be inferior.
|
||||
* You should do something against it.
|
||||
*/
|
||||
#define TMC26X_OVERTEMPERATURE_PREWARING 1
|
||||
//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature shutdown in the TMC chip
|
||||
/*!
|
||||
* This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage.
|
||||
* It will stop working until it cools down again.
|
||||
* If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout
|
||||
* and/or heat management.
|
||||
*/
|
||||
#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2
|
||||
|
||||
//which values can be read out
|
||||
/*!
|
||||
* Selects to readout the microstep position from the motor.
|
||||
*\sa readStatus()
|
||||
*/
|
||||
#define TMC26X_READOUT_POSITION 0
|
||||
/*!
|
||||
* Selects to read out the StallGuard value of the motor.
|
||||
*\sa readStatus()
|
||||
*/
|
||||
#define TMC26X_READOUT_STALLGUARD 1
|
||||
/*!
|
||||
* Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor.
|
||||
*\sa readStatus(), setCurrent()
|
||||
*/
|
||||
#define TMC26X_READOUT_CURRENT 3
|
||||
|
||||
/*!
|
||||
* Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium.
|
||||
*\sa setCoolStepConfiguration()
|
||||
*/
|
||||
#define COOL_STEP_HALF_CS_LIMIT 0
|
||||
/*!
|
||||
* Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium.
|
||||
*\sa setCoolStepConfiguration()
|
||||
*/
|
||||
#define COOL_STEP_QUARTDER_CS_LIMIT 1
|
||||
|
||||
/*!
|
||||
* \class TMC26XStepper
|
||||
* \brief Class representing a TMC26X stepper driver
|
||||
*
|
||||
* In order to use one fo those drivers in your Arduino code you have to create an object of that class:
|
||||
* \code
|
||||
* TMC26XStepper stepper = TMC26XStepper(200,1,2,3,500);
|
||||
* \endcode
|
||||
* see TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int rms_current)
|
||||
*
|
||||
* Keep in mind that you need to start the driver with start() in order to get the TMC26X configured.
|
||||
*
|
||||
* The most important function is the move(). It checks if the motor has to do a step or not.
|
||||
* It is important that you call move() as often as possible in your Arduino loop() routine. I suggest
|
||||
* to use a very fast loop routine and always call it at the beginning or the end.
|
||||
*
|
||||
* In order to move you have to provide a movement speed with setSpeed(). The speed is a positive value setting
|
||||
* the rotations per minute.
|
||||
*
|
||||
* To really move the motor you have to call step() to tell the driver to move the motor the given number
|
||||
* of steps in the given direction. Positive values move the motor in one direction, negative values in the other direction.
|
||||
*
|
||||
* You can check with isMoving() if the mototr is still moving or stop it apruptely with stop().
|
||||
*/
|
||||
class TMC26XStepper {
|
||||
public:
|
||||
/*!
|
||||
* \brief creates a new represenatation of a stepper motor connected to a TMC26X stepper driver
|
||||
*
|
||||
* This is the main constructor. If in doubt use this. You must provide all parameters as described below.
|
||||
*
|
||||
* \param number_of_steps the number of steps the motor has per rotation.
|
||||
* \param cs_pin The Arduino pin you have connected the Cient Select Pin (!CS) of the TMC26X for SPI
|
||||
* \param dir_pin the number of the Arduino pin the Direction input of the TMC26X is connected
|
||||
* \param step_pin the number of the Arduino pin the step pin of the TMC26X driver is connected.
|
||||
* \param rms_current the maximum current to privide to the motor in mA (!). A value of 200 would send up to 200mA to the motor
|
||||
* \param resistor the current sense resistor in milli Ohm, defaults to ,15 Ohm ( or 150 milli Ohm) as in the TMC260 Arduino Shield
|
||||
*
|
||||
* Keep in mind that you must also call TMC26XStepper.start() in order to configure the stepper driver for use.
|
||||
*
|
||||
* By default the Constant Off Time chopper is used, see TCM262Stepper.setConstantOffTimeChopper() for details.
|
||||
* This should work on most motors (YMMV). You may want to configure and use the Spread Cycle Chopper, see setSpreadCycleChopper().
|
||||
*
|
||||
* By default a microstepping of 1/32th is used to provide a smooth motor run, while still giving a good progression per step.
|
||||
* You can select a different stepping with setMicrosteps() to aa different value.
|
||||
* \sa start(), setMicrosteps()
|
||||
*/
|
||||
TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150);
|
||||
|
||||
/*!
|
||||
* \brief configures and starts the TMC26X stepper driver. Before you called this function the stepper driver is in nonfunctional mode.
|
||||
*
|
||||
* This routine configures the TMC26X stepper driver for the given values via SPI.
|
||||
* Most member functions are non functional if the driver has not been started.
|
||||
* Therefore it is best to call this in your Arduino setup() function.
|
||||
*/
|
||||
void start();
|
||||
|
||||
/*!
|
||||
* \brief resets the stepper in unconfigured mode.
|
||||
*
|
||||
* This routine enables you to call start again. It does not change anything
|
||||
* in the internal stepper configuration or the desired configuration.
|
||||
* It just marks the stepper as not yet startet. You do not have to reconfigure
|
||||
* the stepper to start it again, but it is not reset to any factory settings
|
||||
* this has to be configured back by yourself.
|
||||
* (Hint: Normally you do not need this function)
|
||||
*/
|
||||
void un_start();
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Sets the rotation speed in revolutions per minute.
|
||||
* \param whatSpeed the desired speed in rotations per minute.
|
||||
*/
|
||||
void setSpeed(unsigned int whatSpeed);
|
||||
|
||||
/*!
|
||||
* \brief reads out the currently selected speed in revolutions per minute.
|
||||
* \sa setSpeed()
|
||||
*/
|
||||
unsigned int getSpeed(void);
|
||||
|
||||
/*!
|
||||
* \brief Set the number of microsteps in 2^i values (rounded) up to 256
|
||||
*
|
||||
* This method set's the number of microsteps per step in 2^i interval.
|
||||
* This means you can select 1, 2, 4, 16, 32, 64, 128 or 256 as valid microsteps.
|
||||
* If you give any other value it will be rounded to the next smaller number (3 would give a microstepping of 2).
|
||||
* You can always check the current microstepping with getMicrosteps().
|
||||
*/
|
||||
void setMicrosteps(int number_of_steps);
|
||||
|
||||
/*!
|
||||
* \brief returns the effective current number of microsteps selected.
|
||||
*
|
||||
* This function always returns the effective number of microsteps.
|
||||
* This can be a bit different than the micro steps set in setMicrosteps() since it is rounded to 2^i.
|
||||
*
|
||||
* \sa setMicrosteps()
|
||||
*/
|
||||
int getMicrosteps(void);
|
||||
|
||||
/*!
|
||||
* \brief Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in the other direction.
|
||||
*
|
||||
* \param number_of_steps The number of steps to move the motor.
|
||||
* \return 0 if the motor was not moving and moves now. -1 if the motor is moving and the new steps could not be set.
|
||||
*
|
||||
* If the previous movement is not finished yet the function will return -1 and not change the steps to move the motor.
|
||||
* If the motor does not move it return 0
|
||||
*
|
||||
* The direction of the movement is indicated by the sign of the steps parameter. It is not determinable if positive values are right
|
||||
* or left This depends on the internal construction of the motor and how you connected it to the stepper driver.
|
||||
*
|
||||
* You can always verify with isMoving() or even use stop() to stop the motor before giving it new step directions.
|
||||
* \sa isMoving(), getStepsLeft(), stop()
|
||||
*/
|
||||
char step(int number_of_steps);
|
||||
|
||||
/*!
|
||||
* \brief Central movement method, must be called as often as possible in the lopp function and is very fast.
|
||||
*
|
||||
* This routine checks if the motor still has to move, if the waiting delay has passed to send a new step command to the motor
|
||||
* and manages the number of steps yet to move to fulfill the current move command.
|
||||
*
|
||||
* This function is implemented to be as fast as possible to call it as often as possible in your loop routine.
|
||||
* The more regurlarly you call this function the better. In both senses of 'regularly': Calling it as often as
|
||||
* possible is not a bad idea and if you even manage that the intervals you call this function are not too irregular helps too.
|
||||
*
|
||||
* You can call this routine even if you know that the motor is not miving. It introduces just a very small penalty in your code.
|
||||
* You must not call isMoving() to determine if you need to call this function, since taht is done internally already and only
|
||||
* slows down you code.
|
||||
*
|
||||
* How often you call this function directly influences your top miving speed for the motor. It may be a good idea to call this
|
||||
* from an timer overflow interrupt to ensure proper calling.
|
||||
* \sa step()
|
||||
*/
|
||||
char move(void);
|
||||
|
||||
/*!
|
||||
* \brief checks if the motor still has to move to fulfill the last movement command.
|
||||
* \return 0 if the motor stops, -1 if the motor is moving.
|
||||
*
|
||||
* This method can be used to determine if the motor is ready for new movements.
|
||||
*\sa step(), move()
|
||||
*/
|
||||
char isMoving(void);
|
||||
|
||||
/*!
|
||||
* \brief Get the number of steps left in the current movement.
|
||||
* \return The number of steps left in the movement. This number is always positive.
|
||||
*/
|
||||
unsigned int getStepsLeft(void);
|
||||
|
||||
/*!
|
||||
* \brief Stops the motor regardless if it moves or not.
|
||||
* \return -1 if the motor was moving and is really stoped or 0 if it was not moving at all.
|
||||
*
|
||||
* This method directly and apruptely stops the motor and may be used as an emergency stop.
|
||||
*/
|
||||
char stop(void);
|
||||
|
||||
/*!
|
||||
* \brief Sets and configure the classical Constant Off Timer Chopper
|
||||
* \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
|
||||
* \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
|
||||
* \param fast_decay_time_setting Fast decay time setting. Controls the portion of fast decay for each chopper cycle. 0: slow decay only, 1…15: duration of fast decay phase
|
||||
* \param sine_wave_offset Sine wave offset. Controls the sine wave offset. A positive offset corrects for zero crossing error. -3…-1: negative offset, 0: no offset,1…12: positive offset
|
||||
* \param use_curreent_comparator Selects usage of the current comparator for termination of the fast decay cycle. If current comparator is enabled, it terminates the fast decay cycle in case the current reaches a higher negative value than the actual positive value. (0 disable, -1 enable).
|
||||
*
|
||||
* The classic constant off time chopper uses a fixed portion of fast decay following each on phase.
|
||||
* While the duration of the on time is determined by the chopper comparator, the fast decay time needs
|
||||
* to be set by the user in a way, that the current decay is enough for the driver to be able to follow
|
||||
* the falling slope of the sine wave, and on the other hand it should not be too long, in order to minimize
|
||||
* motor current ripple and power dissipation. This best can be tuned using an oscilloscope or
|
||||
* trying out motor smoothness at different velocities. A good starting value is a fast decay time setting
|
||||
* similar to the slow decay time setting.
|
||||
* After tuning of the fast decay time, the offset should be determined, in order to have a smooth zero transition.
|
||||
* This is necessary, because the fast decay phase leads to the absolute value of the motor current being lower
|
||||
* than the target current (see figure 17). If the zero offset is too low, the motor stands still for a short
|
||||
* moment during current zero crossing, if it is set too high, it makes a larger microstep.
|
||||
* Typically, a positive offset setting is required for optimum operation.
|
||||
*
|
||||
* \sa setSpreadCycleChoper() for other alternatives.
|
||||
* \sa setRandomOffTime() for spreading the noise over a wider spectrum
|
||||
*/
|
||||
void setConstantOffTimeChopper(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator);
|
||||
|
||||
/*!
|
||||
* \brief Sets and configures with spread cycle chopper.
|
||||
* \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
|
||||
* \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
|
||||
* \param hysteresis_start Hysteresis start setting. Please remark, that this value is an offset to the hysteresis end value. 1 … 8
|
||||
* \param hysteresis_end Hysteresis end setting. Sets the hysteresis end value after a number of decrements. Decrement interval time is controlled by hysteresis_decrement. The sum hysteresis_start + hysteresis_end must be <16. At a current setting CS of max. 30 (amplitude reduced to 240), the sum is not limited.
|
||||
* \param hysteresis_decrement Hysteresis decrement setting. This setting determines the slope of the hysteresis during on time and during fast decay time. 0 (fast decrement) … 3 (slow decrement).
|
||||
*
|
||||
* The spreadCycle chopper scheme (pat.fil.) is a precise and simple to use chopper principle, which automatically determines
|
||||
* the optimum fast decay portion for the motor. Anyhow, a number of settings can be made in order to optimally fit the driver
|
||||
* to the motor.
|
||||
* Each chopper cycle is comprised of an on-phase, a slow decay phase, a fast decay phase and a second slow decay phase.
|
||||
* The slow decay phases limit the maximum chopper frequency and are important for low motor and driver power dissipation.
|
||||
* The hysteresis start setting limits the chopper frequency by forcing the driver to introduce a minimum amount of
|
||||
* current ripple into the motor coils. The motor inductivity determines the ability to follow a changing motor current.
|
||||
* The duration of the on- and fast decay phase needs to cover at least the blank time, because the current comparator is
|
||||
* disabled during this time.
|
||||
*
|
||||
* \sa setRandomOffTime() for spreading the noise over a wider spectrum
|
||||
*/
|
||||
void setSpreadCycleChopper(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement);
|
||||
|
||||
/*!
|
||||
* \brief Use random off time for noise reduction (0 for off, -1 for on).
|
||||
* \param value 0 for off, -1 for on
|
||||
*
|
||||
* In a constant off time chopper scheme both coil choppers run freely, i.e. are not synchronized.
|
||||
* The frequency of each chopper mainly depends on the coil current and the position dependant motor coil inductivity,
|
||||
* thus it depends on the microstep position. With some motors a slightly audible beat can occur between the chopper
|
||||
* frequencies, especially when they are near to each other. This typically occurs at a few microstep positions within
|
||||
* each quarter wave.
|
||||
* This effect normally is not audible when compared to mechanical noise generated by ball bearings,
|
||||
* etc. Further factors which can cause a similar effect are a poor layout of sense resistor GND connection.
|
||||
* In order to minimize the effect of a beat between both chopper frequencies, an internal random generator is provided.
|
||||
* It modulates the slow decay time setting when switched on. The random off time feature further spreads the chopper spectrum,
|
||||
* reducing electromagnetic emission on single frequencies.
|
||||
*/
|
||||
void setRandomOffTime(char value);
|
||||
|
||||
/*!
|
||||
* \brief set the maximum motor current in mA (1000 is 1 Amp)
|
||||
* Keep in mind this is the maximum peak Current. The RMS current will be 1/sqrt(2) smaller. The actual current can also be smaller
|
||||
* by employing CoolStep.
|
||||
* \param current the maximum motor current in mA
|
||||
* \sa getCurrent(), getCurrentCurrent()
|
||||
*/
|
||||
void setCurrent(unsigned int current);
|
||||
|
||||
/*!
|
||||
* \brief readout the motor maximum current in mA (1000 is an Amp)
|
||||
* This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()
|
||||
*\return the maximum motor current in milli amps
|
||||
* \sa getCurrentCurrent()
|
||||
*/
|
||||
unsigned int getCurrent(void);
|
||||
|
||||
/*!
|
||||
* \brief set the StallGuard threshold in order to get sensible StallGuard readings.
|
||||
* \param stall_guard_threshold -64 … 63 the StallGuard threshold
|
||||
* \param stall_guard_filter_enabled 0 if the filter is disabled, -1 if it is enabled
|
||||
*
|
||||
* The StallGuard threshold is used to optimize the StallGuard reading to sensible values. It should be at 0 at
|
||||
* the maximum allowable load on the otor (but not before). = is a good starting point (and the default)
|
||||
* If you get Stall Gaurd readings of 0 without any load or with too little laod increase the value.
|
||||
* If you get readings of 1023 even with load decrease the setting.
|
||||
*
|
||||
* If you switch on the filter the StallGuard reading is only updated each 4th full step to reduce the noise in the
|
||||
* reading.
|
||||
*
|
||||
* \sa getCurrentStallGuardReading() to read out the current value.
|
||||
*/
|
||||
void setStallGuardThreshold(char stall_guard_threshold, char stall_guard_filter_enabled);
|
||||
|
||||
/*!
|
||||
* \brief reads out the StallGuard threshold
|
||||
* \return a number between -64 and 63.
|
||||
*/
|
||||
char getStallGuardThreshold(void);
|
||||
|
||||
/*!
|
||||
* \brief returns the current setting of the StallGuard filter
|
||||
* \return 0 if not set, -1 if set
|
||||
*/
|
||||
char getStallGuardFilter(void);
|
||||
|
||||
/*!
|
||||
* \brief This method configures the CoolStep smart energy operation. You must have a proper StallGuard configuration for the motor situation (current, voltage, speed) in rder to use this feature.
|
||||
* \param lower_SG_threshold Sets the lower threshold for stallGuard2TM reading. Below this value, the motor current becomes increased. Allowed values are 0...480
|
||||
* \param SG_hysteresis Sets the distance between the lower and the upper threshold for stallGuard2TM reading. Above the upper threshold (which is lower_SG_threshold+SG_hysteresis+1) the motor current becomes decreased. Allowed values are 0...480
|
||||
* \param current_decrement_step_size Sets the current decrement steps. If the StallGuard value is above the threshold the current gets decremented by this step size. 0...32
|
||||
* \param current_increment_step_size Sets the current increment step. The current becomes incremented for each measured stallGuard2TM value below the lower threshold. 0...8
|
||||
* \param lower_current_limit Sets the lower motor current limit for coolStepTM operation by scaling the CS value. Values can be COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
|
||||
* The CoolStep smart energy operation automatically adjust the current sent into the motor according to the current load,
|
||||
* read out by the StallGuard in order to provide the optimum torque with the minimal current consumption.
|
||||
* You configure the CoolStep current regulator by defining upper and lower bounds of StallGuard readouts. If the readout is above the
|
||||
* limit the current gets increased, below the limit the current gets decreased.
|
||||
* You can specify the upper an lower threshold of the StallGuard readout in order to adjust the current. You can also set the number of
|
||||
* StallGuard readings neccessary above or below the limit to get a more stable current adjustement.
|
||||
* The current adjustement itself is configured by the number of steps the current gests in- or decreased and the absolut minimum current
|
||||
* (1/2 or 1/4th otf the configured current).
|
||||
* \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
|
||||
*/
|
||||
void setCoolStepConfiguration(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size,
|
||||
unsigned char current_increment_step_size, unsigned char lower_current_limit);
|
||||
|
||||
/*!
|
||||
* \brief enables or disables the CoolStep smart energy operation feature. It must be configured before enabling it.
|
||||
* \param enabled true if CoolStep should be enabled, false if not.
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
void setCoolStepEnabled(boolean enabled);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief check if the CoolStep feature is enabled
|
||||
* \sa setCoolStepEnabled()
|
||||
*/
|
||||
boolean isCoolStepEnabled();
|
||||
|
||||
/*!
|
||||
* \brief returns the lower StallGuard threshold for the CoolStep operation
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
unsigned int getCoolStepLowerSgThreshold();
|
||||
|
||||
/*!
|
||||
* \brief returns the upper StallGuard threshold for the CoolStep operation
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
unsigned int getCoolStepUpperSgThreshold();
|
||||
|
||||
/*!
|
||||
* \brief returns the number of StallGuard readings befor CoolStep adjusts the motor current.
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
unsigned char getCoolStepNumberOfSGReadings();
|
||||
|
||||
/*!
|
||||
* \brief returns the increment steps for the current for the CoolStep operation
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
unsigned char getCoolStepCurrentIncrementSize();
|
||||
|
||||
/*!
|
||||
* \brief returns the absolut minium current for the CoolStep operation
|
||||
* \sa setCoolStepConfiguration()
|
||||
* \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
|
||||
*/
|
||||
unsigned char getCoolStepLowerCurrentLimit();
|
||||
|
||||
/*!
|
||||
* \brief Get the current microstep position for phase A
|
||||
* \return The current microstep position for phase A 0…255
|
||||
*
|
||||
* Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
|
||||
*/
|
||||
int getMotorPosition(void);
|
||||
|
||||
/*!
|
||||
* \brief Reads the current StallGuard value.
|
||||
* \return The current StallGuard value, lesser values indicate higher load, 0 means stall detected.
|
||||
* Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
|
||||
* \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
|
||||
*/
|
||||
int getCurrentStallGuardReading(void);
|
||||
|
||||
/*!
|
||||
* \brief Reads the current current setting value as fraction of the maximum current
|
||||
* Returns values between 0 and 31, representing 1/32 to 32/32 (=1)
|
||||
* \sa setCoolStepConfiguration()
|
||||
*/
|
||||
unsigned char getCurrentCSReading(void);
|
||||
|
||||
|
||||
/*!
|
||||
*\brief a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.
|
||||
*\return false if 0.13V is the reference voltage, true if 0.165V is used.
|
||||
*/
|
||||
boolean isCurrentScalingHalfed();
|
||||
|
||||
/*!
|
||||
* \brief Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000).
|
||||
* This method calculates the currently used current setting (either by setting or by CoolStep) and reconstructs
|
||||
* the current in mA by usinge the VSENSE and resistor value. This method uses floating point math - so it
|
||||
* may not be the fastest.
|
||||
* \sa getCurrentCSReading(), getResistor(), isCurrentScalingHalfed(), getCurrent()
|
||||
*/
|
||||
unsigned int getCurrentCurrent(void);
|
||||
|
||||
/*!
|
||||
* \brief checks if there is a StallGuard warning in the last status
|
||||
* \return 0 if there was no warning, -1 if there was some warning.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*
|
||||
* \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
|
||||
*/
|
||||
boolean isStallGuardOverThreshold(void);
|
||||
|
||||
/*!
|
||||
* \brief Return over temperature status of the last status readout
|
||||
* return 0 is everything is OK, TMC26X_OVERTEMPERATURE_PREWARING if status is reached, TMC26X_OVERTEMPERATURE_SHUTDOWN is the chip is shutdown, -1 if the status is unknown.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
char getOverTemperature(void);
|
||||
|
||||
/*!
|
||||
* \brief Is motor channel A shorted to ground detected in the last status readout.
|
||||
* \return true is yes, false if not.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
|
||||
boolean isShortToGroundA(void);
|
||||
|
||||
/*!
|
||||
* \brief Is motor channel B shorted to ground detected in the last status readout.
|
||||
* \return true is yes, false if not.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
boolean isShortToGroundB(void);
|
||||
/*!
|
||||
* \brief iIs motor channel A connected according to the last statu readout.
|
||||
* \return true is yes, false if not.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
boolean isOpenLoadA(void);
|
||||
|
||||
/*!
|
||||
* \brief iIs motor channel A connected according to the last statu readout.
|
||||
* \return true is yes, false if not.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
boolean isOpenLoadB(void);
|
||||
|
||||
/*!
|
||||
* \brief Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s
|
||||
* \return true is yes, false if not.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*/
|
||||
boolean isStandStill(void);
|
||||
|
||||
/*!
|
||||
* \brief checks if there is a StallGuard warning in the last status
|
||||
* \return 0 if there was no warning, -1 if there was some warning.
|
||||
* Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
|
||||
* You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
|
||||
*
|
||||
* \sa isStallGuardOverThreshold()
|
||||
* TODO why?
|
||||
*
|
||||
* \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
|
||||
*/
|
||||
boolean isStallGuardReached(void);
|
||||
|
||||
/*!
|
||||
*\brief enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.
|
||||
*\param enabled a boolean value true if the motor should be enabled, false otherwise.
|
||||
*/
|
||||
void setEnabled(boolean enabled);
|
||||
|
||||
/*!
|
||||
*\brief checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely
|
||||
*\return true if the bridges and by that the motor driver are enabled, false if not.
|
||||
*\sa setEnabled()
|
||||
*/
|
||||
boolean isEnabled();
|
||||
|
||||
/*!
|
||||
* \brief Manually read out the status register
|
||||
* This function sends a byte to the motor driver in order to get the current readout. The parameter read_value
|
||||
* seletcs which value will get returned. If the read_vlaue changes in respect to the previous readout this method
|
||||
* automatically send two bytes to the motor: one to set the redout and one to get the actual readout. So this method
|
||||
* may take time to send and read one or two bits - depending on the previous readout.
|
||||
* \param read_value selects which value to read out (0..3). You can use the defines TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, or TMC_262_READOUT_CURRENT
|
||||
* \sa TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, TMC_262_READOUT_CURRENT
|
||||
*/
|
||||
void readStatus(char read_value);
|
||||
|
||||
/*!
|
||||
* \brief Returns the current sense resistor value in milliohm.
|
||||
* The default value of ,15 Ohm will return 150.
|
||||
*/
|
||||
int getResistor();
|
||||
|
||||
/*!
|
||||
* \brief Prints out all the information that can be found in the last status read out - it does not force a status readout.
|
||||
* The result is printed via Serial
|
||||
*/
|
||||
void debugLastStatus(void);
|
||||
/*!
|
||||
* \brief library version
|
||||
* \return the version number as int.
|
||||
*/
|
||||
int version(void);
|
||||
|
||||
private:
|
||||
unsigned int steps_left; //the steps the motor has to do to complete the movement
|
||||
int direction; // Direction of rotation
|
||||
unsigned long step_delay; // delay between steps, in ms, based on speed
|
||||
int number_of_steps; // total number of steps this motor can take
|
||||
unsigned int speed; // we need to store the current speed in order to change the speed after changing microstepping
|
||||
unsigned int resistor; //current sense resitor value in milliohm
|
||||
|
||||
unsigned long last_step_time; // time stamp in ms of when the last step was taken
|
||||
unsigned long next_step_time; // time stamp in ms of when the last step was taken
|
||||
|
||||
//driver control register copies to easily set & modify the registers
|
||||
unsigned long driver_control_register_value;
|
||||
unsigned long chopper_config_register;
|
||||
unsigned long cool_step_register_value;
|
||||
unsigned long stall_guard2_current_register_value;
|
||||
unsigned long driver_configuration_register_value;
|
||||
//the driver status result
|
||||
unsigned long driver_status_result;
|
||||
|
||||
//helper routione to get the top 10 bit of the readout
|
||||
inline int getReadoutValue();
|
||||
|
||||
//the pins for the stepper driver
|
||||
unsigned char cs_pin;
|
||||
unsigned char step_pin;
|
||||
unsigned char dir_pin;
|
||||
|
||||
//status values
|
||||
boolean started; //if the stepper has been started yet
|
||||
int microsteps; //the current number of micro steps
|
||||
char constant_off_time; //we need to remember this value in order to enable and disable the motor
|
||||
unsigned char cool_step_lower_threshold; // we need to remember the threshold to enable and disable the CoolStep feature
|
||||
boolean cool_step_enabled; //we need to remember this to configure the coolstep if it si enabled
|
||||
|
||||
//SPI sender
|
||||
inline void send262(unsigned long datagram);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,848 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.cpp File Reference</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Defines</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">TMC26XStepper.cpp File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include <WProgram.h></code><br/>
|
||||
<code>#include <SPI.h></code><br/>
|
||||
<code>#include "<a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>"</code><br/>
|
||||
</div>
|
||||
<p><a href="_t_m_c26_x_stepper_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="define-members"></a>
|
||||
Defines</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>   32</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>   0x0ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>   0x80000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>   0xA0000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>   0xC0000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>   0xE0000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>   0xFFFFFul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>   0xFul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>   0x200ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>   0x100ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>   0x40ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>   0x0ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>   0x10ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>   0x20ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>   0x30ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>   0x0ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>   0x4000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>   0xful</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>   0x2000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>   0x18000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>   15</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>   0x1800ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>   11</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>   0x780ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>   7</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>   0x78ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>   4</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>   0xFul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>   0x8000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>   0x6000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>   0xF00ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>   0x60ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>   0xful</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>   0x10000ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>   0x17F00ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>   0x1Ful</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>   0x17F00ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>   0x7F00ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>   0x1ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>   0x2ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>   0x4ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>   0x8ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>   0x10ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>   0x20ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>   0x40ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>   0x80ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>   0xFFC00ul</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>   0x3ul</td></tr>
|
||||
</table>
|
||||
<hr/><h2>Define Documentation</h2>
|
||||
<a class="anchor" id="a42cb2ce84258587d514ec3268548ba89"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_PATTERN" ref="a42cb2ce84258587d514ec3268548ba89" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>   0x18000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00063">63</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="abdac78f7f2c506972265a8e5883e1eae"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_SHIFT" ref="abdac78f7f2c506972265a8e5883e1eae" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>   15</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a70a540d1090b989b8600b5e4776659fe"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_CONFIG_REGISTER" ref="a70a540d1090b989b8600b5e4776659fe" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>   0x80000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00041">41</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a57418a67ff726d540b813230bca1d536"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_STANDARD" ref="a57418a67ff726d540b813230bca1d536" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>   0x0ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aaf1b564ced7de8ff3245c964e3775826"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_T_OFF_FAST_DECAY" ref="aaf1b564ced7de8ff3245c964e3775826" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>   0x4000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00060">60</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ab9828bfaa075a0a8647c709136016317"></a><!-- doxytag: member="TMC26XStepper.cpp::COOL_STEP_REGISTER" ref="ab9828bfaa075a0a8647c709136016317" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>   0xA0000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00042">42</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="adbe13a0464355e42fbe786ca5f58ed8d"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_DOWN_STEP_SPEED_PATTERN" ref="adbe13a0464355e42fbe786ca5f58ed8d" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>   0x6000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a99dcb8c6d98b0b54c23699a3f90450e4"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_SCALING_PATTERN" ref="a99dcb8c6d98b0b54c23699a3f90450e4" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>   0x1Ful</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00083">83</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a6560b3471273e99e280ba795e3469ede"></a><!-- doxytag: member="TMC26XStepper.cpp::DEFAULT_MICROSTEPPING_VALUE" ref="a6560b3471273e99e280ba795e3469ede" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>   32</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00037">37</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a770601bf0153e4bc639b9c3005b15af7"></a><!-- doxytag: member="TMC26XStepper.cpp::DOUBLE_EDGE_STEP" ref="a770601bf0153e4bc639b9c3005b15af7" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>   0x100ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00051">51</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="af35f569d42ea3b1d634901a3b6a908ee"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONFIG_REGISTER" ref="af35f569d42ea3b1d634901a3b6a908ee" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>   0xE0000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00044">44</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a108f18bf4a30a0e0f0991ac0e4ce0579"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONTROL_REGISTER" ref="a108f18bf4a30a0e0f0991ac0e4ce0579" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>   0x0ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00040">40</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a424c248097b38c1e29e6a58ad48e6bd9"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_PATTERN" ref="a424c248097b38c1e29e6a58ad48e6bd9" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>   0x1800ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00065">65</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a36e554a87785ce6ba998b79aae9e74e0"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_SHIFT" ref="a36e554a87785ce6ba998b79aae9e74e0" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>   11</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00066">66</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a38ce0bb0fa20db28351ac9167f28db98"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_SHIFT" ref="a38ce0bb0fa20db28351ac9167f28db98" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>   7</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00068">68</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ad9d2302f6d61cd84a612a2e2bcdeb56e"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_VALUE_PATTERN" ref="ad9d2302f6d61cd84a612a2e2bcdeb56e" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>   0x780ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00067">67</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a0de4e98b412dced62c3a4452b7483af3"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_PATTERN" ref="a0de4e98b412dced62c3a4452b7483af3" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>   0x78ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00069">69</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ac2c1c939256126e605396c4aaee3c804"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_SHIFT" ref="ac2c1c939256126e605396c4aaee3c804" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a54a6d12e96d851361974b10614a00e45"></a><!-- doxytag: member="TMC26XStepper.cpp::INITIAL_MICROSTEPPING" ref="a54a6d12e96d851361974b10614a00e45" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>   0x3ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00099">99</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a8f5cb0c066109ffb18cefc0e85ee1d1b"></a><!-- doxytag: member="TMC26XStepper.cpp::MICROSTEPPING_PATTERN" ref="a8f5cb0c066109ffb18cefc0e85ee1d1b" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>   0xFul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00049">49</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a8a261a77d198b85f6dd8416387b354b3"></a><!-- doxytag: member="TMC26XStepper.cpp::MINIMUM_CURRENT_FOURTH" ref="a8a261a77d198b85f6dd8416387b354b3" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>   0x8000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00074">74</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a64520580cffd416668f3b91bd60f84e1"></a><!-- doxytag: member="TMC26XStepper.cpp::RANDOM_TOFF_TIME" ref="a64520580cffd416668f3b91bd60f84e1" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>   0x2000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00062">62</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a143b7757272f07866d9655bde8303d9a"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_MICROSTEP_POSTION" ref="a143b7757272f07866d9655bde8303d9a" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>   0x0ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00053">53</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a88a4b45fa6385eba8aa4f0342334b832"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_SELECTION_PATTERN" ref="a88a4b45fa6385eba8aa4f0342334b832" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>   0x30ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00056">56</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aef62b7fdcbac0b33b2d6e9cea4b5f9b2"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_AND_COOL_STEP" ref="aef62b7fdcbac0b33b2d6e9cea4b5f9b2" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>   0x20ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00055">55</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ac1bd4da94fab7ce1049be2f866211819"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_READING" ref="ac1bd4da94fab7ce1049be2f866211819" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>   0x10ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a5c3d76da63f585e37813c32be2e11ab7"></a><!-- doxytag: member="TMC26XStepper.cpp::READOUT_VALUE_PATTERN" ref="a5c3d76da63f585e37813c32be2e11ab7" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>   0xFFC00ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00096">96</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a3b02ee1f518b0c90c16488f937abd443"></a><!-- doxytag: member="TMC26XStepper.cpp::REGISTER_BIT_PATTERN" ref="a3b02ee1f518b0c90c16488f937abd443" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>   0xFFFFFul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00046">46</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aba6c07e5672e34e618bb3a550ab0d2bc"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_CURRENT_STEP_WIDTH_PATTERN" ref="aba6c07e5672e34e618bb3a550ab0d2bc" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>   0x60ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00077">77</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ac8f748bf735c447dbed7dd4c7b631a87"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MAX_PATTERN" ref="ac8f748bf735c447dbed7dd4c7b631a87" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>   0xF00ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00076">76</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ae1862dfb958c03698b0abd95fda033ea"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MIN_PATTERN" ref="ae1862dfb958c03698b0abd95fda033ea" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>   0xful</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00078">78</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a478d9bde09a6528eef6af6ffeeb6caba"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD2_LOAD_MEASURE_REGISTER" ref="a478d9bde09a6528eef6af6ffeeb6caba" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>   0xC0000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00043">43</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a99ac04f0615556fc13c0c9f3e1c1b49d"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_CONFIG_PATTERN" ref="a99ac04f0615556fc13c0c9f3e1c1b49d" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>   0x17F00ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00084">84</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="afdbbefabd0c29c4b6e403c4663d0f0be"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_FILTER_ENABLED" ref="afdbbefabd0c29c4b6e403c4663d0f0be" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>   0x10000ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00081">81</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ae631457932894a974334892704550ecc"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_TRESHHOLD_VALUE_PATTERN" ref="ae631457932894a974334892704550ecc" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>   0x17F00ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00082">82</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a6a1cb1fd61cf7c570f94376fa11fe55b"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_VALUE_PATTERN" ref="a6a1cb1fd61cf7c570f94376fa11fe55b" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>   0x7F00ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00085">85</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ae9cbbe5af7188e6bff8fe412f8e42f59"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_A" ref="ae9cbbe5af7188e6bff8fe412f8e42f59" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>   0x20ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00093">93</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ab29dc5cd6c6c4e5bf99e71bd563e1be1"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_B" ref="ab29dc5cd6c6c4e5bf99e71bd563e1be1" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>   0x40ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00094">94</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="adbb23d2f055c9eab55eac29d1a75deb4"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_SHUTDOWN" ref="adbb23d2f055c9eab55eac29d1a75deb4" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>   0x2ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00089">89</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aa317fd77f2f26fdfbfd331e21d9069e8"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_WARNING" ref="aa317fd77f2f26fdfbfd331e21d9069e8" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>   0x4ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00090">90</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a8e03041302a092174fa33b3cf837dca2"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_A" ref="a8e03041302a092174fa33b3cf837dca2" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>   0x8ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00091">91</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a903c3eba99695a32c6736463dcfd93ae"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_B" ref="a903c3eba99695a32c6736463dcfd93ae" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>   0x10ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00092">92</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aa09ef662fd19bf2d063d6bd0f48eca14"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STALL_GUARD_STATUS" ref="aa09ef662fd19bf2d063d6bd0f48eca14" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>   0x1ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00088">88</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ab96ed1635faee6650e9cce73598a2773"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STAND_STILL" ref="ab96ed1635faee6650e9cce73598a2773" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>   0x80ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00095">95</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aa64245f223209654c60588e4558e0bab"></a><!-- doxytag: member="TMC26XStepper.cpp::STEP_INTERPOLATION" ref="aa64245f223209654c60588e4558e0bab" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>   0x200ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00050">50</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aa4e49237f2671e7f28aa34ae0e89da8d"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_PATTERN" ref="aa4e49237f2671e7f28aa34ae0e89da8d" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>   0xful</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00061">61</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a7659d842c803e47ba911a2a6e26327f3"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_TIMING_PATERN" ref="a7659d842c803e47ba911a2a6e26327f3" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>   0xFul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00071">71</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a4fb1c008e2ff76eee9362600eed112e1"></a><!-- doxytag: member="TMC26XStepper.cpp::VSENSE" ref="a4fb1c008e2ff76eee9362600eed112e1" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>   0x40ul</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00052">52</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,212 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h File Reference</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#define-members">Defines</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">TMC26XStepper.h File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><a href="_t_m_c26_x_stepper_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing a TMC26X stepper driver. <a href="class_t_m_c26_x_stepper.html#details">More...</a><br/></td></tr>
|
||||
<tr><td colspan="2"><h2><a name="define-members"></a>
|
||||
Defines</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>   1</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip <a href="#add42eee34f674f92c19bcd5266d2445f"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>   2</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip <a href="#adae814ce848677abd87758c7ac79a436"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>   0</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>   1</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>   3</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>   0</td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>   1</td></tr>
|
||||
</table>
|
||||
<hr/><h2>Define Documentation</h2>
|
||||
<a class="anchor" id="a28b1774bd4aa854fb5e4b6dc7db96ecb"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_HALF_CS_LIMIT" ref="a28b1774bd4aa854fb5e4b6dc7db96ecb" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
<p>Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a1a4db5eafd0a9247677153cb4c8b7d54"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_QUARTDER_CS_LIMIT" ref="a1a4db5eafd0a9247677153cb4c8b7d54" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
<p>Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="add42eee34f674f92c19bcd5266d2445f"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_PREWARING" ref="add42eee34f674f92c19bcd5266d2445f" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip </p>
|
||||
<p>This warning indicates that the TCM chip is too warm. It is still working but some parameters may be inferior. You should do something against it. </p>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00039">39</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="adae814ce848677abd87758c7ac79a436"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_SHUTDOWN" ref="adae814ce848677abd87758c7ac79a436" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip </p>
|
||||
<p>This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage. It will stop working until it cools down again. If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout and/or heat management. </p>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00047">47</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a01760ad15e3846536526a990efe47094"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_CURRENT" ref="a01760ad15e3846536526a990efe47094" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
<p>Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd>readStatus(), setCurrent() </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="aff05d4a47ef8821322ccc2a20785fbee"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_POSITION" ref="aff05d4a47ef8821322ccc2a20785fbee" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
<p>Selects to readout the microstep position from the motor. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ac864ff8886123039c7d2d3c617f7ef87"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_STALLGUARD" ref="ac864ff8886123039c7d2d3c617f7ef87" args="" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
<p>Selects to read out the StallGuard value of the motor. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,256 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h Source File</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">TMC26XStepper.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="_t_m_c26_x_stepper_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||||
<a name="l00002"></a>00002 <span class="comment"> TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino - Version 0.1</span>
|
||||
<a name="l00003"></a>00003 <span class="comment"> </span>
|
||||
<a name="l00004"></a>00004 <span class="comment"> based on the stepper library by Tom Igoe, et. al.</span>
|
||||
<a name="l00005"></a>00005 <span class="comment"></span>
|
||||
<a name="l00006"></a>00006 <span class="comment"> Copyright (c) 2011, Interactive Matter, Marcus Nowotny</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> </span>
|
||||
<a name="l00008"></a>00008 <span class="comment"> Permission is hereby granted, free of charge, to any person obtaining a copy</span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> of this software and associated documentation files (the "Software"), to deal</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> in the Software without restriction, including without limitation the rights</span>
|
||||
<a name="l00011"></a>00011 <span class="comment"> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
|
||||
<a name="l00012"></a>00012 <span class="comment"> copies of the Software, and to permit persons to whom the Software is</span>
|
||||
<a name="l00013"></a>00013 <span class="comment"> furnished to do so, subject to the following conditions:</span>
|
||||
<a name="l00014"></a>00014 <span class="comment"> </span>
|
||||
<a name="l00015"></a>00015 <span class="comment"> The above copyright notice and this permission notice shall be included in</span>
|
||||
<a name="l00016"></a>00016 <span class="comment"> all copies or substantial portions of the Software.</span>
|
||||
<a name="l00017"></a>00017 <span class="comment"> </span>
|
||||
<a name="l00018"></a>00018 <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
|
||||
<a name="l00019"></a>00019 <span class="comment"> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
|
||||
<a name="l00020"></a>00020 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
|
||||
<a name="l00021"></a>00021 <span class="comment"> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
|
||||
<a name="l00022"></a>00022 <span class="comment"> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
|
||||
<a name="l00023"></a>00023 <span class="comment"> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
|
||||
<a name="l00024"></a>00024 <span class="comment"> THE SOFTWARE.</span>
|
||||
<a name="l00025"></a>00025 <span class="comment"></span>
|
||||
<a name="l00026"></a>00026 <span class="comment"> */</span>
|
||||
<a name="l00027"></a>00027
|
||||
<a name="l00028"></a>00028
|
||||
<a name="l00029"></a>00029 <span class="comment">// ensure this library description is only included once</span>
|
||||
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef TMC26XStepper_h</span>
|
||||
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define TMC26XStepper_h</span>
|
||||
<a name="l00032"></a>00032 <span class="preprocessor"></span>
|
||||
<a name="l00034"></a>00034
|
||||
<a name="l00039"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">00039</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_PREWARING 1</span>
|
||||
<a name="l00040"></a>00040 <span class="preprocessor"></span>
|
||||
<a name="l00041"></a>00041
|
||||
<a name="l00047"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">00047</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2</span>
|
||||
<a name="l00048"></a>00048 <span class="preprocessor"></span>
|
||||
<a name="l00049"></a>00049 <span class="comment">//which values can be read out</span>
|
||||
<a name="l00054"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">00054</a> <span class="comment"></span><span class="preprocessor">#define TMC26X_READOUT_POSITION 0</span>
|
||||
<a name="l00055"></a>00055 <span class="preprocessor"></span>
|
||||
<a name="l00059"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">00059</a> <span class="preprocessor">#define TMC26X_READOUT_STALLGUARD 1</span>
|
||||
<a name="l00060"></a>00060 <span class="preprocessor"></span>
|
||||
<a name="l00064"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">00064</a> <span class="preprocessor">#define TMC26X_READOUT_CURRENT 3</span>
|
||||
<a name="l00065"></a>00065 <span class="preprocessor"></span>
|
||||
<a name="l00070"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">00070</a> <span class="preprocessor">#define COOL_STEP_HALF_CS_LIMIT 0</span>
|
||||
<a name="l00071"></a>00071 <span class="preprocessor"></span>
|
||||
<a name="l00075"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">00075</a> <span class="preprocessor">#define COOL_STEP_QUARTDER_CS_LIMIT 1</span>
|
||||
<a name="l00076"></a>00076 <span class="preprocessor"></span>
|
||||
<a name="l00101"></a><a class="code" href="class_t_m_c26_x_stepper.html">00101</a> <span class="keyword">class </span><a class="code" href="class_t_m_c26_x_stepper.html" title="Class representing a TMC26X stepper driver.">TMC26XStepper</a> {
|
||||
<a name="l00102"></a>00102 <span class="keyword">public</span>:
|
||||
<a name="l00124"></a>00124 <a class="code" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c" title="creates a new represenatation of a stepper motor connected to a TMC26X stepper driver">TMC26XStepper</a>(<span class="keywordtype">int</span> number_of_steps, <span class="keywordtype">int</span> cs_pin, <span class="keywordtype">int</span> dir_pin, <span class="keywordtype">int</span> step_pin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor=150);
|
||||
<a name="l00125"></a>00125
|
||||
<a name="l00133"></a>00133 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7" title="configures and starts the TMC26X stepper driver. Before you called this function the stepper driver i...">start</a>();
|
||||
<a name="l00134"></a>00134
|
||||
<a name="l00145"></a>00145 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5" title="resets the stepper in unconfigured mode.">un_start</a>();
|
||||
<a name="l00146"></a>00146
|
||||
<a name="l00147"></a>00147
|
||||
<a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd" title="Sets the rotation speed in revolutions per minute.">setSpeed</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> whatSpeed);
|
||||
<a name="l00153"></a>00153
|
||||
<a name="l00158"></a>00158 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29" title="reads out the currently selected speed in revolutions per minute.">getSpeed</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00159"></a>00159
|
||||
<a name="l00168"></a>00168 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0" title="Set the number of microsteps in 2^i values (rounded) up to 256.">setMicrosteps</a>(<span class="keywordtype">int</span> number_of_steps);
|
||||
<a name="l00169"></a>00169
|
||||
<a name="l00178"></a>00178 <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3" title="returns the effective current number of microsteps selected.">getMicrosteps</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00179"></a>00179
|
||||
<a name="l00195"></a>00195 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d" title="Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in ...">step</a>(<span class="keywordtype">int</span> number_of_steps);
|
||||
<a name="l00196"></a>00196
|
||||
<a name="l00215"></a>00215 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415" title="Central movement method, must be called as often as possible in the lopp function and is very fast...">move</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00216"></a>00216
|
||||
<a name="l00224"></a>00224 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e" title="checks if the motor still has to move to fulfill the last movement command.">isMoving</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00225"></a>00225
|
||||
<a name="l00230"></a>00230 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7" title="Get the number of steps left in the current movement.">getStepsLeft</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00231"></a>00231
|
||||
<a name="l00238"></a>00238 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123" title="Stops the motor regardless if it moves or not.">stop</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00239"></a>00239
|
||||
<a name="l00264"></a>00264 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649" title="Sets and configure the classical Constant Off Timer Chopper.">setConstantOffTimeChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> fast_decay_time_setting, <span class="keywordtype">char</span> sine_wave_offset, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> use_current_comparator);
|
||||
<a name="l00265"></a>00265
|
||||
<a name="l00286"></a>00286 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2" title="Sets and configures with spread cycle chopper.">setSpreadCycleChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> hysteresis_start, <span class="keywordtype">char</span> hysteresis_end, <span class="keywordtype">char</span> hysteresis_decrement);
|
||||
<a name="l00287"></a>00287
|
||||
<a name="l00303"></a>00303 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a" title="Use random off time for noise reduction (0 for off, -1 for on).">setRandomOffTime</a>(<span class="keywordtype">char</span> value);
|
||||
<a name="l00304"></a>00304
|
||||
<a name="l00312"></a>00312 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2" title="set the maximum motor current in mA (1000 is 1 Amp) Keep in mind this is the maximum peak Current...">setCurrent</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current);
|
||||
<a name="l00313"></a>00313
|
||||
<a name="l00320"></a>00320 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f" title="readout the motor maximum current in mA (1000 is an Amp) This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()">getCurrent</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00321"></a>00321
|
||||
<a name="l00337"></a>00337 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a" title="set the StallGuard threshold in order to get sensible StallGuard readings.">setStallGuardThreshold</a>(<span class="keywordtype">char</span> stall_guard_threshold, <span class="keywordtype">char</span> stall_guard_filter_enabled);
|
||||
<a name="l00338"></a>00338
|
||||
<a name="l00343"></a>00343 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def" title="reads out the StallGuard threshold">getStallGuardThreshold</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00344"></a>00344
|
||||
<a name="l00349"></a>00349 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a" title="returns the current setting of the StallGuard filter">getStallGuardFilter</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00350"></a>00350
|
||||
<a name="l00368"></a>00368 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e" title="This method configures the CoolStep smart energy operation. You must have a proper StallGuard configu...">setCoolStepConfiguration</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> lower_SG_threshold, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SG_hysteresis, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_decrement_step_size,
|
||||
<a name="l00369"></a>00369 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_increment_step_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> lower_current_limit);
|
||||
<a name="l00370"></a>00370
|
||||
<a name="l00376"></a>00376 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157" title="enables or disables the CoolStep smart energy operation feature. It must be configured before enablin...">setCoolStepEnabled</a>(<span class="keywordtype">boolean</span> enabled);
|
||||
<a name="l00377"></a>00377
|
||||
<a name="l00378"></a>00378
|
||||
<a name="l00383"></a>00383 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d" title="check if the CoolStep feature is enabled">isCoolStepEnabled</a>();
|
||||
<a name="l00384"></a>00384
|
||||
<a name="l00389"></a>00389 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8" title="returns the lower StallGuard threshold for the CoolStep operation">getCoolStepLowerSgThreshold</a>();
|
||||
<a name="l00390"></a>00390
|
||||
<a name="l00395"></a>00395 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f" title="returns the upper StallGuard threshold for the CoolStep operation">getCoolStepUpperSgThreshold</a>();
|
||||
<a name="l00396"></a>00396
|
||||
<a name="l00401"></a>00401 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46" title="returns the number of StallGuard readings befor CoolStep adjusts the motor current.">getCoolStepNumberOfSGReadings</a>();
|
||||
<a name="l00402"></a>00402
|
||||
<a name="l00407"></a>00407 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883" title="returns the increment steps for the current for the CoolStep operation">getCoolStepCurrentIncrementSize</a>();
|
||||
<a name="l00408"></a>00408
|
||||
<a name="l00414"></a>00414 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c" title="returns the absolut minium current for the CoolStep operation">getCoolStepLowerCurrentLimit</a>();
|
||||
<a name="l00415"></a>00415
|
||||
<a name="l00422"></a>00422 <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125" title="Get the current microstep position for phase A.">getMotorPosition</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00423"></a>00423
|
||||
<a name="l00430"></a>00430 <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e" title="Reads the current StallGuard value.">getCurrentStallGuardReading</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00431"></a>00431
|
||||
<a name="l00437"></a>00437 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1" title="Reads the current current setting value as fraction of the maximum current Returns values between 0 a...">getCurrentCSReading</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00438"></a>00438
|
||||
<a name="l00439"></a>00439
|
||||
<a name="l00444"></a>00444 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905" title="a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.">isCurrentScalingHalfed</a>();
|
||||
<a name="l00445"></a>00445
|
||||
<a name="l00453"></a>00453 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7" title="Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000...">getCurrentCurrent</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00454"></a>00454
|
||||
<a name="l00463"></a>00463 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41" title="checks if there is a StallGuard warning in the last status">isStallGuardOverThreshold</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00464"></a>00464
|
||||
<a name="l00471"></a>00471 <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">getOverTemperature</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00472"></a>00472
|
||||
<a name="l00480"></a>00480 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf" title="Is motor channel A shorted to ground detected in the last status readout.">isShortToGroundA</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00481"></a>00481
|
||||
<a name="l00488"></a>00488 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b" title="Is motor channel B shorted to ground detected in the last status readout.">isShortToGroundB</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00495"></a>00495 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadA</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00496"></a>00496
|
||||
<a name="l00503"></a>00503 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadB</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00504"></a>00504
|
||||
<a name="l00511"></a>00511 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0" title="Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s.">isStandStill</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00512"></a>00512
|
||||
<a name="l00524"></a>00524 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7" title="checks if there is a StallGuard warning in the last status">isStallGuardReached</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00525"></a>00525
|
||||
<a name="l00530"></a>00530 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305" title="enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.">setEnabled</a>(<span class="keywordtype">boolean</span> enabled);
|
||||
<a name="l00531"></a>00531
|
||||
<a name="l00537"></a>00537 <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6" title="checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely...">isEnabled</a>();
|
||||
<a name="l00538"></a>00538
|
||||
<a name="l00548"></a>00548 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967" title="Manually read out the status register This function sends a byte to the motor driver in order to get ...">readStatus</a>(<span class="keywordtype">char</span> read_value);
|
||||
<a name="l00549"></a>00549
|
||||
<a name="l00554"></a>00554 <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e" title="Returns the current sense resistor value in milliohm. The default value of ,15 Ohm will return 150...">getResistor</a>();
|
||||
<a name="l00555"></a>00555
|
||||
<a name="l00560"></a>00560 <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3" title="Prints out all the information that can be found in the last status read out - it does not force a st...">debugLastStatus</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00565"></a>00565 <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215" title="library version">version</a>(<span class="keywordtype">void</span>);
|
||||
<a name="l00566"></a>00566
|
||||
<a name="l00567"></a>00567 <span class="keyword">private</span>:
|
||||
<a name="l00568"></a>00568 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps_left; <span class="comment">//the steps the motor has to do to complete the movement</span>
|
||||
<a name="l00569"></a>00569 <span class="keywordtype">int</span> direction; <span class="comment">// Direction of rotation</span>
|
||||
<a name="l00570"></a>00570 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> step_delay; <span class="comment">// delay between steps, in ms, based on speed</span>
|
||||
<a name="l00571"></a>00571 <span class="keywordtype">int</span> number_of_steps; <span class="comment">// total number of steps this motor can take</span>
|
||||
<a name="l00572"></a>00572 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> speed; <span class="comment">// we need to store the current speed in order to change the speed after changing microstepping</span>
|
||||
<a name="l00573"></a>00573 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor; <span class="comment">//current sense resitor value in milliohm</span>
|
||||
<a name="l00574"></a>00574
|
||||
<a name="l00575"></a>00575 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> last_step_time; <span class="comment">// time stamp in ms of when the last step was taken</span>
|
||||
<a name="l00576"></a>00576 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> next_step_time; <span class="comment">// time stamp in ms of when the last step was taken</span>
|
||||
<a name="l00577"></a>00577
|
||||
<a name="l00578"></a>00578 <span class="comment">//driver control register copies to easily set & modify the registers</span>
|
||||
<a name="l00579"></a>00579 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_control_register_value;
|
||||
<a name="l00580"></a>00580 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> chopper_config_register;
|
||||
<a name="l00581"></a>00581 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cool_step_register_value;
|
||||
<a name="l00582"></a>00582 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> stall_guard2_current_register_value;
|
||||
<a name="l00583"></a>00583 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_configuration_register_value;
|
||||
<a name="l00584"></a>00584 <span class="comment">//the driver status result</span>
|
||||
<a name="l00585"></a>00585 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_status_result;
|
||||
<a name="l00586"></a>00586
|
||||
<a name="l00587"></a>00587 <span class="comment">//helper routione to get the top 10 bit of the readout</span>
|
||||
<a name="l00588"></a>00588 <span class="keyword">inline</span> <span class="keywordtype">int</span> getReadoutValue();
|
||||
<a name="l00589"></a>00589
|
||||
<a name="l00590"></a>00590 <span class="comment">//the pins for the stepper driver</span>
|
||||
<a name="l00591"></a>00591 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cs_pin;
|
||||
<a name="l00592"></a>00592 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> step_pin;
|
||||
<a name="l00593"></a>00593 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> dir_pin;
|
||||
<a name="l00594"></a>00594
|
||||
<a name="l00595"></a>00595 <span class="comment">//status values </span>
|
||||
<a name="l00596"></a>00596 <span class="keywordtype">boolean</span> started; <span class="comment">//if the stepper has been started yet</span>
|
||||
<a name="l00597"></a>00597 <span class="keywordtype">int</span> microsteps; <span class="comment">//the current number of micro steps</span>
|
||||
<a name="l00598"></a>00598 <span class="keywordtype">char</span> constant_off_time; <span class="comment">//we need to remember this value in order to enable and disable the motor</span>
|
||||
<a name="l00599"></a>00599 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cool_step_lower_threshold; <span class="comment">// we need to remember the threshold to enable and disable the CoolStep feature</span>
|
||||
<a name="l00600"></a>00600 <span class="keywordtype">boolean</span> cool_step_enabled; <span class="comment">//we need to remember this to configure the coolstep if it si enabled</span>
|
||||
<a name="l00601"></a>00601
|
||||
<a name="l00602"></a>00602 <span class="comment">//SPI sender</span>
|
||||
<a name="l00603"></a>00603 <span class="keyword">inline</span> <span class="keywordtype">void</span> send262(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> datagram);
|
||||
<a name="l00604"></a>00604 };
|
||||
<a name="l00605"></a>00605
|
||||
<a name="l00606"></a>00606 <span class="preprocessor">#endif</span>
|
||||
<a name="l00607"></a>00607 <span class="preprocessor"></span>
|
||||
</pre></div></div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: Class List</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><table>
|
||||
<tr><td class="indexkey"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td class="indexvalue">Class representing a TMC26X stepper driver </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 677 B |
@ -1,117 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: Member List</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">TMC26XStepper Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
This is the complete list of members for <a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>, including all inherited members.<table>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">debugLastStatus</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">getCoolStepCurrentIncrementSize</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">getCoolStepLowerCurrentLimit</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">getCoolStepLowerSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">getCoolStepNumberOfSGReadings</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">getCoolStepUpperSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">getCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">getCurrentCSReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">getCurrentCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">getCurrentStallGuardReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">getMicrosteps</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">getMotorPosition</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">getOverTemperature</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">getResistor</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">getSpeed</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">getStallGuardFilter</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">getStallGuardThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">getStepsLeft</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">isCoolStepEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">isCurrentScalingHalfed</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">isEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">isMoving</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">isOpenLoadA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">isOpenLoadB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">isShortToGroundA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">isShortToGroundB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">isStallGuardOverThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">isStallGuardReached</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">isStandStill</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">move</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">readStatus</a>(char read_value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">setConstantOffTimeChopper</a>(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">setCoolStepConfiguration</a>(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size, unsigned char current_increment_step_size, unsigned char lower_current_limit)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">setCoolStepEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">setCurrent</a>(unsigned int current)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">setEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">setMicrosteps</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">setRandomOffTime</a>(char value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">setSpeed</a>(unsigned int whatSpeed)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">setSpreadCycleChopper</a>(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">setStallGuardThreshold</a>(char stall_guard_threshold, char stall_guard_filter_enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">step</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">stop</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">un_start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">version</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: Class Index</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li class="current"><a href="classes.html"><span>Class Index</span></a></li>
|
||||
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class Index</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
|
||||
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td rowspan="2" valign="bottom"><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  T  </div></td></tr></table>
|
||||
</td><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td valign="top"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>   </td><td></td></tr>
|
||||
<tr><td></td><td></td></tr>
|
||||
</table>
|
||||
<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 126 B |
@ -1,949 +0,0 @@
|
||||
/* The standard CSS for doxygen */
|
||||
|
||||
body, table, div, p, dl {
|
||||
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* @group Heading Levels */
|
||||
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.multicol {
|
||||
-moz-column-gap: 1em;
|
||||
-webkit-column-gap: 1em;
|
||||
-moz-column-count: 3;
|
||||
-webkit-column-count: 3;
|
||||
}
|
||||
|
||||
p.startli, p.startdd, p.starttd {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
p.endli {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
p.enddd {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
p.endtd {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
caption {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.legend {
|
||||
font-size: 70%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h3.version {
|
||||
font-size: 90%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.qindex, div.navtab{
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.qindex, div.navpath {
|
||||
width: 100%;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
div.navtab {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
/* @group Link Styling */
|
||||
|
||||
a {
|
||||
color: #3D578C;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.contents a:visited {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.qindex {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.qindexHL {
|
||||
font-weight: bold;
|
||||
background-color: #9CAFD4;
|
||||
color: #ffffff;
|
||||
border: 1px double #869DCA;
|
||||
}
|
||||
|
||||
.contents a.qindexHL:visited {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
a.el {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.elRef {
|
||||
}
|
||||
|
||||
a.code, a.code:visited {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a.codeRef, a.codeRef:visited {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
dl.el {
|
||||
margin-left: -1cm;
|
||||
}
|
||||
|
||||
.fragment {
|
||||
font-family: monospace, fixed;
|
||||
font-size: 105%;
|
||||
}
|
||||
|
||||
pre.fragment {
|
||||
border: 1px solid #C4CFE5;
|
||||
background-color: #FBFCFD;
|
||||
padding: 4px 6px;
|
||||
margin: 4px 8px 4px 2px;
|
||||
overflow: auto;
|
||||
word-wrap: break-word;
|
||||
font-size: 9pt;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
div.ah {
|
||||
background-color: black;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px;
|
||||
padding: 0.2em;
|
||||
border: solid thin #333;
|
||||
border-radius: 0.5em;
|
||||
-webkit-border-radius: .5em;
|
||||
-moz-border-radius: .5em;
|
||||
box-shadow: 2px 2px 3px #999;
|
||||
-webkit-box-shadow: 2px 2px 3px #999;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
|
||||
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
|
||||
}
|
||||
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
color: black;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.contents {
|
||||
margin-top: 10px;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
td.indexkey {
|
||||
background-color: #EBEFF6;
|
||||
font-weight: bold;
|
||||
border: 1px solid #C4CFE5;
|
||||
margin: 2px 0px 2px 0;
|
||||
padding: 2px 10px;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td.indexvalue {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #C4CFE5;
|
||||
padding: 2px 10px;
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
||||
tr.memlist {
|
||||
background-color: #EEF1F7;
|
||||
}
|
||||
|
||||
p.formulaDsp {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.formulaDsp {
|
||||
|
||||
}
|
||||
|
||||
img.formulaInl {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.center {
|
||||
text-align: center;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.center img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
img.footer {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* @group Code Colorization */
|
||||
|
||||
span.keyword {
|
||||
color: #008000
|
||||
}
|
||||
|
||||
span.keywordtype {
|
||||
color: #604020
|
||||
}
|
||||
|
||||
span.keywordflow {
|
||||
color: #e08000
|
||||
}
|
||||
|
||||
span.comment {
|
||||
color: #800000
|
||||
}
|
||||
|
||||
span.preprocessor {
|
||||
color: #806020
|
||||
}
|
||||
|
||||
span.stringliteral {
|
||||
color: #002080
|
||||
}
|
||||
|
||||
span.charliteral {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
span.vhdldigit {
|
||||
color: #ff00ff
|
||||
}
|
||||
|
||||
span.vhdlchar {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
span.vhdlkeyword {
|
||||
color: #700070
|
||||
}
|
||||
|
||||
span.vhdllogic {
|
||||
color: #ff0000
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/*
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
input.search {
|
||||
font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
*/
|
||||
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #A3B4D7;
|
||||
}
|
||||
|
||||
th.dirtab {
|
||||
background: #EBEFF6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border: none;
|
||||
border-top: 1px solid #4A6AAA;
|
||||
}
|
||||
|
||||
hr.footer {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
/* @group Member Descriptions */
|
||||
|
||||
table.memberdecls {
|
||||
border-spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight,
|
||||
.memItemLeft, .memItemRight,
|
||||
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
|
||||
background-color: #F9FAFC;
|
||||
border: none;
|
||||
margin: 4px;
|
||||
padding: 1px 0 0 8px;
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.memItemLeft, .memItemRight, .memTemplParams {
|
||||
border-top: 1px solid #C4CFE5;
|
||||
}
|
||||
|
||||
.memItemLeft, .memTemplItemLeft {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.memItemRight {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
color: #4665A2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Member Details */
|
||||
|
||||
/* Styles for detailed member documentation */
|
||||
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #4665A2;
|
||||
font-weight: normal;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.memnav {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.mempage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memitem {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.memname {
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.memproto, dl.reflist dt {
|
||||
border-top: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 6px 0px 6px 0px;
|
||||
color: #253555;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
/* opera specific markup */
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
border-top-right-radius: 8px;
|
||||
border-top-left-radius: 8px;
|
||||
/* firefox specific markup */
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
-moz-border-radius-topright: 8px;
|
||||
-moz-border-radius-topleft: 8px;
|
||||
/* webkit specific markup */
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-webkit-border-top-right-radius: 8px;
|
||||
-webkit-border-top-left-radius: 8px;
|
||||
background-image:url('nav_f.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
|
||||
}
|
||||
|
||||
.memdoc, dl.reflist dd {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 2px 5px;
|
||||
background-color: #FBFCFD;
|
||||
border-top-width: 0;
|
||||
/* opera specific markup */
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
/* firefox specific markup */
|
||||
-moz-border-radius-bottomleft: 8px;
|
||||
-moz-border-radius-bottomright: 8px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
|
||||
/* webkit specific markup */
|
||||
-webkit-border-bottom-left-radius: 8px;
|
||||
-webkit-border-bottom-right-radius: 8px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
|
||||
}
|
||||
|
||||
dl.reflist dt {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
dl.reflist dd {
|
||||
margin: 0px 0px 10px 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
color: #602020;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.paramname em {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.params, .retval, .exception, .tparams {
|
||||
border-spacing: 6px 2px;
|
||||
}
|
||||
|
||||
.params .paramname, .retval .paramname {
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramtype {
|
||||
font-style: italic;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramdir {
|
||||
font-family: "courier new",courier,monospace;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Directory (tree) */
|
||||
|
||||
/* for the tree view */
|
||||
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* these are for tree view when used as main index */
|
||||
|
||||
.directory {
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.directory h3 {
|
||||
margin: 0px;
|
||||
margin-top: 1em;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
/*
|
||||
The following two styles can be used to replace the root node title
|
||||
with an image of your choice. Simply uncomment the next two styles,
|
||||
specify the name of your image and be sure to set 'height' to the
|
||||
proper pixel height of your image.
|
||||
*/
|
||||
|
||||
/*
|
||||
.directory h3.swap {
|
||||
height: 61px;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("yourimage.gif");
|
||||
}
|
||||
.directory h3.swap span {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
.directory > h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.directory p {
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory div {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.directory img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
/* these are for tree view when not used as main index */
|
||||
|
||||
.directory-alt {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.directory-alt h3 {
|
||||
margin: 0px;
|
||||
margin-top: 1em;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
.directory-alt > h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.directory-alt p {
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory-alt div {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.directory-alt img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
div.dynheader {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: #2A3D61;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
table.doxtable td, table.doxtable th {
|
||||
border: 1px solid #2D4068;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.doxtable th {
|
||||
background-color: #374F7F;
|
||||
color: #FFFFFF;
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
table.fieldtable {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #A8B8D9;
|
||||
border-spacing: 0px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
|
||||
-webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.fieldtable td, .fieldtable th {
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
.fieldtable td.fieldtype, .fieldtable td.fieldname {
|
||||
white-space: nowrap;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fieldtable td.fielddoc {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fieldtable tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.fieldtable th {
|
||||
background-image:url('nav_f.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
font-size: 90%;
|
||||
color: #253555;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
text-align:left;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
}
|
||||
|
||||
|
||||
.tabsearch {
|
||||
top: 0px;
|
||||
left: 10px;
|
||||
height: 36px;
|
||||
background-image: url('tab_b.png');
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.navpath ul
|
||||
{
|
||||
font-size: 11px;
|
||||
background-image:url('tab_b.png');
|
||||
background-repeat:repeat-x;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
color:#8AA0CC;
|
||||
border:solid 1px #C2CDE4;
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
.navpath li
|
||||
{
|
||||
list-style-type:none;
|
||||
float:left;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:url('bc_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
}
|
||||
|
||||
.navpath li.navelem a
|
||||
{
|
||||
height:32px;
|
||||
display:block;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.navpath li.navelem a:hover
|
||||
{
|
||||
color:#6884BD;
|
||||
}
|
||||
|
||||
.navpath li.footer
|
||||
{
|
||||
list-style-type:none;
|
||||
float:right;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:none;
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
|
||||
div.summary
|
||||
{
|
||||
float: right;
|
||||
font-size: 8pt;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.summary a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.ingroups
|
||||
{
|
||||
margin-left: 5px;
|
||||
font-size: 8pt;
|
||||
padding-left: 5px;
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.ingroups a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.header
|
||||
{
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid #C4CFE5;
|
||||
}
|
||||
|
||||
div.headertitle
|
||||
{
|
||||
padding: 5px 5px 5px 7px;
|
||||
}
|
||||
|
||||
dl
|
||||
{
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
|
||||
{
|
||||
border-left:4px solid;
|
||||
padding: 0 0 0 6px;
|
||||
}
|
||||
|
||||
dl.note
|
||||
{
|
||||
border-color: #D0C000;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention
|
||||
{
|
||||
border-color: #FF0000;
|
||||
}
|
||||
|
||||
dl.pre, dl.post, dl.invariant
|
||||
{
|
||||
border-color: #00D000;
|
||||
}
|
||||
|
||||
dl.deprecated
|
||||
{
|
||||
border-color: #505050;
|
||||
}
|
||||
|
||||
dl.todo
|
||||
{
|
||||
border-color: #00C0E0;
|
||||
}
|
||||
|
||||
dl.test
|
||||
{
|
||||
border-color: #3030E0;
|
||||
}
|
||||
|
||||
dl.bug
|
||||
{
|
||||
border-color: #C08050;
|
||||
}
|
||||
|
||||
#projectlogo
|
||||
{
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
#projectlogo img
|
||||
{
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
#projectname
|
||||
{
|
||||
font: 300% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
#projectbrief
|
||||
{
|
||||
font: 120% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectnumber
|
||||
{
|
||||
font: 50% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#titlearea
|
||||
{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #5373B4;
|
||||
}
|
||||
|
||||
.image
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dotgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mscgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.caption
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.zoom
|
||||
{
|
||||
border: 1px solid #90A5CE;
|
||||
}
|
||||
|
||||
dl.citelist {
|
||||
margin-bottom:50px;
|
||||
}
|
||||
|
||||
dl.citelist dt {
|
||||
color:#334975;
|
||||
float:left;
|
||||
font-weight:bold;
|
||||
margin-right:10px;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
dl.citelist dd {
|
||||
margin:2px 0;
|
||||
padding:5px 0;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
#top { display: none; }
|
||||
#side-nav { display: none; }
|
||||
#nav-path { display: none; }
|
||||
body { overflow:visible; }
|
||||
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
|
||||
.summary { display: none; }
|
||||
.memitem { page-break-inside: avoid; }
|
||||
#doc-content
|
||||
{
|
||||
margin-left:0 !important;
|
||||
height:auto !important;
|
||||
width:auto !important;
|
||||
overflow:inherit;
|
||||
display:inline;
|
||||
}
|
||||
pre.fragment
|
||||
{
|
||||
overflow: visible;
|
||||
text-wrap: unrestricted;
|
||||
white-space: -moz-pre-wrap; /* Moz */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
white-space: pre-wrap; /* CSS3 */
|
||||
word-wrap: break-word; /* IE 5.5+ */
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: File List</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">File List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all files with brief descriptions:</div><table>
|
||||
<tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8cpp.html">TMC26XStepper.cpp</a> <a href="_t_m_c26_x_stepper_8cpp_source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
<tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8h.html">TMC26XStepper.h</a> <a href="_t_m_c26_x_stepper_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,261 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="functions.html"><span>All</span></a></li>
|
||||
<li><a href="functions_func.html"><span>Functions</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_g"><span>g</span></a></li>
|
||||
<li><a href="#index_i"><span>i</span></a></li>
|
||||
<li><a href="#index_m"><span>m</span></a></li>
|
||||
<li><a href="#index_r"><span>r</span></a></li>
|
||||
<li><a href="#index_s"><span>s</span></a></li>
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_u"><span>u</span></a></li>
|
||||
<li><a href="#index_v"><span>v</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
|
||||
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>debugLastStatus()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
|
||||
<li>getCoolStepCurrentIncrementSize()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepLowerCurrentLimit()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepLowerSgThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepNumberOfSGReadings()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepUpperSgThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentCSReading()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentStallGuardReading()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getMicrosteps()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getMotorPosition()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getOverTemperature()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getResistor()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getSpeed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStallGuardFilter()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStallGuardThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStepsLeft()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>isCoolStepEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isCurrentScalingHalfed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isMoving()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isOpenLoadA()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isOpenLoadB()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isShortToGroundA()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isShortToGroundB()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStallGuardOverThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStallGuardReached()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStandStill()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>move()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>readStatus()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
||||
<li>setConstantOffTimeChopper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCoolStepConfiguration()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCoolStepEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setMicrosteps()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setRandomOffTime()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setSpeed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setSpreadCycleChopper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setStallGuardThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>start()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>step()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>stop()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>TMC26XStepper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
||||
<li>un_start()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
||||
<li>version()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,261 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members - Functions</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||||
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||||
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="functions.html"><span>All</span></a></li>
|
||||
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_g"><span>g</span></a></li>
|
||||
<li><a href="#index_i"><span>i</span></a></li>
|
||||
<li><a href="#index_m"><span>m</span></a></li>
|
||||
<li><a href="#index_r"><span>r</span></a></li>
|
||||
<li><a href="#index_s"><span>s</span></a></li>
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_u"><span>u</span></a></li>
|
||||
<li><a href="#index_v"><span>v</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
 
|
||||
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>debugLastStatus()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
|
||||
<li>getCoolStepCurrentIncrementSize()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepLowerCurrentLimit()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepLowerSgThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepNumberOfSGReadings()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCoolStepUpperSgThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentCSReading()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getCurrentStallGuardReading()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getMicrosteps()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getMotorPosition()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getOverTemperature()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getResistor()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getSpeed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStallGuardFilter()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStallGuardThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>getStepsLeft()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>isCoolStepEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isCurrentScalingHalfed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isMoving()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isOpenLoadA()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isOpenLoadB()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isShortToGroundA()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isShortToGroundB()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStallGuardOverThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStallGuardReached()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>isStandStill()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>move()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>readStatus()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
||||
<li>setConstantOffTimeChopper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCoolStepConfiguration()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCoolStepEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setCurrent()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setEnabled()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setMicrosteps()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setRandomOffTime()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setSpeed()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setSpreadCycleChopper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>setStallGuardThreshold()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>start()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>step()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
|
||||
</li>
|
||||
<li>stop()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>TMC26XStepper()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
|
||||
<li>un_start()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
||||
<li>version()
|
||||
: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,289 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="globals.html"><span>All</span></a></li>
|
||||
<li><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_b"><span>b</span></a></li>
|
||||
<li><a href="#index_c"><span>c</span></a></li>
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_h"><span>h</span></a></li>
|
||||
<li><a href="#index_i"><span>i</span></a></li>
|
||||
<li><a href="#index_m"><span>m</span></a></li>
|
||||
<li><a href="#index_r"><span>r</span></a></li>
|
||||
<li><a href="#index_s"><span>s</span></a></li>
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_v"><span>v</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
|
||||
|
||||
<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
|
||||
<li>BLANK_TIMING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>BLANK_TIMING_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
||||
<li>CHOPPER_CONFIG_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CHOPPER_MODE_STANDARD
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CHOPPER_MODE_T_OFF_FAST_DECAY
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>COOL_STEP_HALF_CS_LIMIT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>COOL_STEP_QUARTDER_CS_LIMIT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>COOL_STEP_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CURRENT_DOWN_STEP_SPEED_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CURRENT_SCALING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>DEFAULT_MICROSTEPPING_VALUE
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DOUBLE_EDGE_STEP
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DRIVER_CONFIG_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DRIVER_CONTROL_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
||||
<li>HYSTERESIS_DECREMENT_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_DECREMENT_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_LOW_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_LOW_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_START_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_START_VALUE_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>INITIAL_MICROSTEPPING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>MICROSTEPPING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>MINIMUM_CURRENT_FOURTH
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>RANDOM_TOFF_TIME
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_MICROSTEP_POSTION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_SELECTION_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_STALL_GUARD_AND_COOL_STEP
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_STALL_GUARD_READING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READOUT_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>REGISTER_BIT_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
||||
<li>SE_CURRENT_STEP_WIDTH_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>SE_MAX_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>SE_MIN_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_CONFIG_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_FILTER_ENABLED
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OPEN_LOAD_A
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OPEN_LOAD_B
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OVER_TEMPERATURE_WARNING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_SHORT_TO_GROUND_A
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_SHORT_TO_GROUND_B
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_STALL_GUARD_STATUS
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_STAND_STILL
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STEP_INTERPOLATION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>T_OFF_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>T_OFF_TIMING_PATERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>TMC26X_OVERTEMPERATURE_PREWARING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_CURRENT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_POSITION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_STALLGUARD
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
||||
<li>VSENSE
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,289 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li class="current"><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow3" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="globals.html"><span>All</span></a></li>
|
||||
<li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow4" class="tabs3">
|
||||
<ul class="tablist">
|
||||
<li><a href="#index_b"><span>b</span></a></li>
|
||||
<li><a href="#index_c"><span>c</span></a></li>
|
||||
<li><a href="#index_d"><span>d</span></a></li>
|
||||
<li><a href="#index_h"><span>h</span></a></li>
|
||||
<li><a href="#index_i"><span>i</span></a></li>
|
||||
<li><a href="#index_m"><span>m</span></a></li>
|
||||
<li><a href="#index_r"><span>r</span></a></li>
|
||||
<li><a href="#index_s"><span>s</span></a></li>
|
||||
<li><a href="#index_t"><span>t</span></a></li>
|
||||
<li><a href="#index_v"><span>v</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
 
|
||||
|
||||
<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
|
||||
<li>BLANK_TIMING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>BLANK_TIMING_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
|
||||
<li>CHOPPER_CONFIG_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CHOPPER_MODE_STANDARD
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CHOPPER_MODE_T_OFF_FAST_DECAY
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>COOL_STEP_HALF_CS_LIMIT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>COOL_STEP_QUARTDER_CS_LIMIT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>COOL_STEP_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CURRENT_DOWN_STEP_SPEED_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>CURRENT_SCALING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
|
||||
<li>DEFAULT_MICROSTEPPING_VALUE
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DOUBLE_EDGE_STEP
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DRIVER_CONFIG_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>DRIVER_CONTROL_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
|
||||
<li>HYSTERESIS_DECREMENT_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_DECREMENT_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_LOW_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_LOW_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_START_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>HYSTERESIS_START_VALUE_SHIFT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
|
||||
<li>INITIAL_MICROSTEPPING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
|
||||
<li>MICROSTEPPING_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>MINIMUM_CURRENT_FOURTH
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
|
||||
<li>RANDOM_TOFF_TIME
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_MICROSTEP_POSTION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_SELECTION_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_STALL_GUARD_AND_COOL_STEP
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READ_STALL_GUARD_READING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>READOUT_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>REGISTER_BIT_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
|
||||
<li>SE_CURRENT_STEP_WIDTH_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>SE_MAX_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>SE_MIN_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_CONFIG_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_FILTER_ENABLED
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STALL_GUARD_VALUE_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OPEN_LOAD_A
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OPEN_LOAD_B
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_OVER_TEMPERATURE_WARNING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_SHORT_TO_GROUND_A
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_SHORT_TO_GROUND_B
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_STALL_GUARD_STATUS
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STATUS_STAND_STILL
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>STEP_INTERPOLATION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
|
||||
<li>T_OFF_PATTERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>T_OFF_TIMING_PATERN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
<li>TMC26X_OVERTEMPERATURE_PREWARING
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_CURRENT
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_POSITION
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
|
||||
</li>
|
||||
<li>TMC26X_READOUT_STALLGUARD
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
|
||||
<li>VSENSE
|
||||
: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: TMC 260, 261, 262 Stepper Driver for Arduino</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">TMC 260, 261, 262 Stepper Driver for Arduino </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Interactive MAtter, MArcus Nowotny, <a href="mailto:marcus@interactive-matter.eu">marcus@interactive-matter.eu</a> </dd></dl>
|
||||
<h2><a class="anchor" id="HOWTO"></a>
|
||||
How to use the driver</h2>
|
||||
<p>Here we go with aminial how to description</p>
|
||||
<h2><a class="anchor" id="COPYRIGHT_NOTIFICATION"></a>
|
||||
COPYRIGHT NOTIFICATION</h2>
|
||||
<dl class="user"><dt><b>(c) 2011 Interactive MAtter, Marcus Nowotny </b></dt><dd></dd></dl>
|
||||
<dl class="user"><dt><b></b></dt><dd>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</dd></dl>
|
||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
|
||||
</div></div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,68 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>Trinamic TMC26X Stepper Driver for Arduino: mainpage.dox File Reference</title>
|
||||
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
|
||||
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
|
||||
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Generated by Doxygen 1.7.6.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">mainpage.dox File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.7.6.1
|
||||
</small></address>
|
||||
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 189 B |
@ -1,59 +0,0 @@
|
||||
.tabs, .tabs2, .tabs3 {
|
||||
background-image: url('tab_b.png');
|
||||
width: 100%;
|
||||
z-index: 101;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tabs2 {
|
||||
font-size: 10px;
|
||||
}
|
||||
.tabs3 {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.tablist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.tablist li {
|
||||
float: left;
|
||||
display: table-cell;
|
||||
background-image: url('tab_b.png');
|
||||
line-height: 36px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tablist a {
|
||||
display: block;
|
||||
padding: 0 20px;
|
||||
font-weight: bold;
|
||||
background-image:url('tab_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color: #283A5D;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tabs3 .tablist a {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.tablist a:hover {
|
||||
background-image: url('tab_h.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tablist li.current a {
|
||||
background-image: url('tab_a.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
TMC26XExample.ino - - TMC26X Stepper library Example for Wiring/Arduino
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
#include <SPI.h>
|
||||
#include <TMC26XStepper.h>
|
||||
|
||||
//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 6, step pin 7 and a current of 300mA
|
||||
TMC26XStepper tmc26XStepper = TMC26XStepper(200,2,6,7,700);
|
||||
int curr_step;
|
||||
int speed = 0;
|
||||
int speedDirection = 100;
|
||||
int maxSpeed = 1000;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
Serial.println("==============================");
|
||||
Serial.println("TMC26X Stepper Driver Demo App");
|
||||
Serial.println("==============================");
|
||||
//set this according to you stepper
|
||||
Serial.println("Configuring stepper driver");
|
||||
//char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
|
||||
tmc26XStepper.setSpreadCycleChopper(2,24,8,6,0);
|
||||
tmc26XStepper.setRandomOffTime(0);
|
||||
|
||||
tmc26XStepper.setMicrosteps(32);
|
||||
tmc26XStepper.setStallGuardThreshold(4,0);
|
||||
Serial.println("config finished, starting");
|
||||
tmc26XStepper.start();
|
||||
Serial.println("started");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (!tmc26XStepper.isMoving()) {
|
||||
speed+=speedDirection;
|
||||
if (speed>maxSpeed) {
|
||||
speed = maxSpeed;
|
||||
speedDirection = -speedDirection;
|
||||
} else if (speed<0) {
|
||||
speedDirection = -speedDirection;
|
||||
speed=speedDirection;
|
||||
}
|
||||
//setting the speed
|
||||
Serial.print("setting speed to ");
|
||||
Serial.println(speed);
|
||||
tmc26XStepper.setSpeed(speed);
|
||||
//we want some kind of constant running time - so the length is just a product of speed
|
||||
Serial.print("Going ");
|
||||
Serial.print(10*speed);
|
||||
Serial.println(" steps");
|
||||
tmc26XStepper.step(10*speed);
|
||||
} else {
|
||||
//we put out the status every 100 steps
|
||||
if (tmc26XStepper.getStepsLeft()%100==0) {
|
||||
Serial.print("Stall Guard: ");
|
||||
Serial.println(tmc26XStepper.getCurrentStallGuardReading());
|
||||
}
|
||||
}
|
||||
tmc26XStepper.move();
|
||||
}
|
||||
|
||||
|
@ -1,176 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
unsigned int motor_counter = 0;
|
||||
unsigned char motor_moved = 0;
|
||||
int sgThreshold = 4;
|
||||
int sgFilter = 0;
|
||||
int direction = 1;
|
||||
|
||||
unsigned int lower_SG_threshold = 0;
|
||||
unsigned int upper_SG_threshold = 0;
|
||||
unsigned char number_of_SG_readings=0;
|
||||
unsigned char current_increment_step_size=0;
|
||||
unsigned char lower_current_limit=0;
|
||||
|
||||
|
||||
char chopperMode = 0; //0 for spread, 1 for constant off
|
||||
char t_off = 2;
|
||||
char t_blank = 24;
|
||||
char h_start = 8;
|
||||
char h_end = 6;
|
||||
char h_decrement = 0;
|
||||
|
||||
|
||||
void startMotor() {
|
||||
Serial.println(F("Configuring stepper driver"));
|
||||
//char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
|
||||
tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
|
||||
tmc26XStepper.setRandomOffTime(0);
|
||||
|
||||
tmc26XStepper.setMicrosteps(32);
|
||||
tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
|
||||
// Serial.println("config finished, starting");
|
||||
digitalWrite(ENABLE_PIN,LOW);
|
||||
tmc26XStepper.start();
|
||||
tmc26XStepper.setSpeed(10);
|
||||
TCNT2=setupTimer2(10000);
|
||||
sei();
|
||||
}
|
||||
|
||||
void runMotor() {
|
||||
if (running && !tmc26XStepper.isMoving()) {
|
||||
tmc26XStepper.step(direction*10000);
|
||||
Serial.println("run");
|
||||
}
|
||||
if (!running & tmc26XStepper.isMoving()) {
|
||||
tmc26XStepper.stop();
|
||||
Serial.println("stop");
|
||||
}
|
||||
}
|
||||
|
||||
void setSpeed(unsigned int targetSpeed) {
|
||||
if (targetSpeed>0 && targetSpeed<MAX_SPEED) {
|
||||
Serial.print(F("Setting speed: "));
|
||||
Serial.println(targetSpeed);
|
||||
tmc26XStepper.setSpeed(targetSpeed);
|
||||
}
|
||||
else {
|
||||
Serial.print(F("improper speed "));
|
||||
Serial.println(targetSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
void setMicrostepping(int microstepping) {
|
||||
if (microstepping<1 || microstepping>256) {
|
||||
Serial.print(F("Improperd microstepping setting [1...256]: "));
|
||||
Serial.print(microstepping);
|
||||
}
|
||||
else {
|
||||
tmc26XStepper.setMicrosteps(microstepping);
|
||||
}
|
||||
}
|
||||
|
||||
void setStallGuardThreshold(int threshold) {
|
||||
if (threshold<-64 || threshold > 63) {
|
||||
Serial.print(F("Improper Stall Guard Threshold [-64...63]: "));
|
||||
Serial.println(threshold);
|
||||
}
|
||||
else {
|
||||
sgThreshold = threshold;
|
||||
tmc26XStepper.setStallGuardThreshold(threshold,sgFilter);
|
||||
}
|
||||
}
|
||||
|
||||
void setStallGuardFilter(int filter) {
|
||||
if (filter) {
|
||||
sgFilter=1;
|
||||
}
|
||||
else {
|
||||
sgFilter=0;
|
||||
}
|
||||
tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
|
||||
}
|
||||
|
||||
void setCurrent(int current) {
|
||||
if (current>0 && current <1700) {
|
||||
tmc26XStepper.setCurrent(current);
|
||||
}
|
||||
else {
|
||||
Serial.print(F("Improper current {0 ... 1200}: "));
|
||||
Serial.print(current);
|
||||
}
|
||||
}
|
||||
|
||||
void updateChopper() {
|
||||
//we can do only spread now
|
||||
if (chopperMode==0) {
|
||||
tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
|
||||
}
|
||||
}
|
||||
|
||||
void updateCoolStep() {
|
||||
tmc26XStepper.setCoolStepConfiguration(
|
||||
lower_SG_threshold, upper_SG_threshold, number_of_SG_readings,
|
||||
current_increment_step_size, lower_current_limit);
|
||||
}
|
||||
|
||||
//from http://www.uchobby.com/index.php/2007/11/24/arduino-interrupts/
|
||||
//Setup Timer2.s
|
||||
//Configures the ATMega168 8-Bit Timer2 to generate an interrupt
|
||||
//at the specified frequency.
|
||||
//Returns the timer load value which must be loaded into TCNT2
|
||||
//inside your ISR routine.
|
||||
//See the example usage below.
|
||||
unsigned char setupTimer2(float timeoutFrequency){
|
||||
unsigned char result; //The timer load value.
|
||||
|
||||
//Calculate the timer load value
|
||||
result=(int)((257.0-(TIMER_CLOCK_FREQ/timeoutFrequency))+0.5);
|
||||
//The 257 really should be 256 but I get better results with 257.
|
||||
|
||||
//Timer2 Settings: Timer Prescaler /8, mode 0
|
||||
//Timer clock = 16MHz/8 = 2Mhz or 0.5us
|
||||
//The /8 prescale gives us a good range to work with
|
||||
//so we just hard code this for now.
|
||||
TCCR2A = 0;
|
||||
TCCR2B = 0<<CS22 | 1<<CS21 | 0<<CS20;
|
||||
|
||||
//Timer2 Overflow Interrupt Enable
|
||||
TIMSK2 = 1<<TOIE2;
|
||||
|
||||
//load the timer for its first cycle
|
||||
TCNT2=result;
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
ISR(TIMER2_OVF_vect) {
|
||||
motor_moved = tmc26XStepper.move();
|
||||
motor_counter++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,369 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
#define INPUT_BUFFER_LENGTH 32
|
||||
|
||||
#define SERIAL_SPEED 115200
|
||||
#define STATUS_COUNTER 100
|
||||
|
||||
char inputBuffer[INPUT_BUFFER_LENGTH+1]; //ad on character to keep the trainling 0
|
||||
unsigned char inputBufferPosition;
|
||||
|
||||
void startSerial() {
|
||||
Serial.begin(SERIAL_SPEED);
|
||||
Serial.println(F("================================="));
|
||||
Serial.println(F("TMC26X Stepper Driver Motor Tester"));
|
||||
Serial.println(F("================================="));
|
||||
//empty the input buffer
|
||||
for (unsigned char i=0; i< INPUT_BUFFER_LENGTH+1; i++) {
|
||||
inputBuffer[i]=0;
|
||||
}
|
||||
inputBufferPosition=0;
|
||||
}
|
||||
|
||||
void loopSerial() {
|
||||
if (Serial.available()>0 && inputBufferPosition<INPUT_BUFFER_LENGTH) {
|
||||
char c = Serial.read();
|
||||
//Read the char
|
||||
inputBuffer[inputBufferPosition]=c;
|
||||
inputBufferPosition++;
|
||||
//always terminate the string
|
||||
inputBuffer[inputBufferPosition]=0;
|
||||
//and if the line ended we execute the command
|
||||
if (c=='\n') {
|
||||
executeSerialCommand();
|
||||
}
|
||||
}
|
||||
if (motor_moved) {
|
||||
Serial.print("#sg");
|
||||
Serial.print(tmc26XStepper.getCurrentStallGuardReading(),DEC);
|
||||
Serial.print(",p");
|
||||
Serial.print(tmc26XStepper.getMotorPosition(),DEC);
|
||||
Serial.print(",k");
|
||||
Serial.print(tmc26XStepper.getCurrentCurrent(),DEC);
|
||||
Serial.println(',');
|
||||
motor_moved=0;
|
||||
}
|
||||
if (motor_counter>STATUS_COUNTER) {
|
||||
motor_counter=0;
|
||||
char moving = tmc26XStepper.isMoving();
|
||||
Serial.print('#');
|
||||
if (moving) {
|
||||
Serial.print('r');
|
||||
}
|
||||
else {
|
||||
Serial.print('s');
|
||||
}
|
||||
Serial.print(',');
|
||||
Serial.print('d');
|
||||
Serial.print(direction);
|
||||
Serial.print(',');
|
||||
Serial.print("c");
|
||||
Serial.print(tmc26XStepper.getCurrent(),DEC);
|
||||
Serial.print(',');
|
||||
Serial.print('S');
|
||||
Serial.print(tmc26XStepper.getSpeed(),DEC);
|
||||
Serial.print(',');
|
||||
Serial.print('m');
|
||||
Serial.print(tmc26XStepper.getMicrosteps(),DEC);
|
||||
Serial.print(',');
|
||||
Serial.print("t");
|
||||
Serial.print(tmc26XStepper.getStallGuardThreshold(),DEC);
|
||||
Serial.print(',');
|
||||
Serial.print('f');
|
||||
Serial.print(tmc26XStepper.getStallGuardFilter(),DEC);
|
||||
Serial.print(',');
|
||||
//print out the general cool step config
|
||||
if (tmc26XStepper.isCoolStepEnabled()) {
|
||||
Serial.print("Ke+,");
|
||||
}
|
||||
else {
|
||||
Serial.print("Ke-,");
|
||||
}
|
||||
Serial.print("Kl");
|
||||
Serial.print(tmc26XStepper.getCoolStepLowerSgThreshold(),DEC);
|
||||
Serial.print(",Ku");
|
||||
Serial.print(tmc26XStepper.getCoolStepUpperSgThreshold(),DEC);
|
||||
Serial.print(",Kn");
|
||||
Serial.print(tmc26XStepper.getCoolStepNumberOfSGReadings(),DEC);
|
||||
Serial.print(",Ki");
|
||||
Serial.print(tmc26XStepper.getCoolStepCurrentIncrementSize(),DEC);
|
||||
Serial.print(",Km");
|
||||
Serial.print(tmc26XStepper.getCoolStepLowerCurrentLimit(),DEC);
|
||||
Serial.print(',');
|
||||
//detect the winding status
|
||||
if (tmc26XStepper.isOpenLoadA()) {
|
||||
Serial.print("ao,");
|
||||
}
|
||||
else if(tmc26XStepper.isShortToGroundA()) {
|
||||
Serial.print("ag,");
|
||||
}
|
||||
else {
|
||||
Serial.print("a-,");
|
||||
}
|
||||
//detect the winding status
|
||||
if (tmc26XStepper.isOpenLoadB()) {
|
||||
Serial.print("bo,");
|
||||
}
|
||||
else if(tmc26XStepper.isShortToGroundB()) {
|
||||
Serial.print("bg,");
|
||||
}
|
||||
else {
|
||||
Serial.print("b-,");
|
||||
}
|
||||
char temperature = tmc26XStepper.getOverTemperature();
|
||||
if (temperature==0) {
|
||||
Serial.print("x-,");
|
||||
}
|
||||
else if (temperature==TMC26X_OVERTEMPERATURE_PREWARING) {
|
||||
Serial.print("xw,");
|
||||
}
|
||||
else {
|
||||
Serial.print("xe,");
|
||||
}
|
||||
if (tmc26XStepper.isEnabled()) {
|
||||
Serial.print("e1,");
|
||||
}
|
||||
else {
|
||||
Serial.print("e0,");
|
||||
}
|
||||
//write out the current chopper config
|
||||
Serial.print("Cm");
|
||||
Serial.print(chopperMode,DEC);
|
||||
Serial.print(",Co");
|
||||
Serial.print(t_off,DEC);
|
||||
Serial.print(",Cb");
|
||||
Serial.print(t_blank,DEC);
|
||||
if (chopperMode==0) {
|
||||
Serial.print(",Cs");
|
||||
Serial.print(h_start,DEC);
|
||||
Serial.print(",Ce");
|
||||
Serial.print(h_end,DEC);
|
||||
Serial.print(",Cd");
|
||||
Serial.print(h_decrement,DEC);
|
||||
}
|
||||
Serial.print(',');
|
||||
Serial.println();
|
||||
}
|
||||
}
|
||||
|
||||
void executeSerialCommand() {
|
||||
Serial.print("Executing ");
|
||||
Serial.println(inputBuffer);
|
||||
//stimple runn & stop commands
|
||||
switch(inputBuffer[0]) {
|
||||
case 's':
|
||||
running = 0;
|
||||
break;
|
||||
case 'r':
|
||||
running = -1;
|
||||
break;
|
||||
case 'S':
|
||||
{
|
||||
int targetSpeed = decode(1);
|
||||
setSpeed(targetSpeed);
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
{
|
||||
int microstepping = decode(1);
|
||||
setMicrostepping(microstepping);
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
{
|
||||
int threshold = decode(1);
|
||||
setStallGuardThreshold(threshold);
|
||||
}
|
||||
break;
|
||||
case 'f':
|
||||
{
|
||||
int filter = decode(1);
|
||||
setStallGuardFilter(filter);
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
{
|
||||
int value = decode(1);
|
||||
tmc26XStepper.stop();
|
||||
if (value<0) {
|
||||
direction=-1;
|
||||
}
|
||||
else {
|
||||
direction=1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
{
|
||||
int current = decode(1);
|
||||
setCurrent(current);
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
{
|
||||
int enabled = decode(1);
|
||||
if (enabled) {
|
||||
tmc26XStepper.setEnabled(true);
|
||||
}
|
||||
else {
|
||||
tmc26XStepper.setEnabled(false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
switch(inputBuffer[1]) {
|
||||
case 'o':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>0 && value<16) {
|
||||
t_off=value;
|
||||
updateChopper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'b':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<=3) {
|
||||
t_blank=value;
|
||||
updateChopper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<=8) {
|
||||
h_start=value;
|
||||
updateChopper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=-3 && value<=12) {
|
||||
h_end=value;
|
||||
updateChopper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<=3) {
|
||||
h_decrement=value;
|
||||
updateChopper();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'K':
|
||||
switch(inputBuffer[1]) {
|
||||
case '+':
|
||||
tmc26XStepper.setCoolStepEnabled(true);
|
||||
break;
|
||||
case '-':
|
||||
tmc26XStepper.setCoolStepEnabled(false);
|
||||
break;
|
||||
case 'l':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<480) {
|
||||
lower_SG_threshold=value;
|
||||
updateCoolStep();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<480) {
|
||||
upper_SG_threshold=value;
|
||||
updateCoolStep();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<4) {
|
||||
number_of_SG_readings=value;
|
||||
updateCoolStep();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<4) {
|
||||
current_increment_step_size=value;
|
||||
updateCoolStep();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
{
|
||||
int value = decode(2);
|
||||
if (value>=0 && value<2) {
|
||||
lower_current_limit=value;
|
||||
updateCoolStep();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//at the end delete buffer
|
||||
inputBufferPosition=0;
|
||||
inputBuffer[0]=0;
|
||||
}
|
||||
|
||||
int decode(unsigned char startPosition) {
|
||||
int result=0;
|
||||
boolean negative = false;
|
||||
if (inputBuffer[startPosition]=='-') {
|
||||
negative=true;
|
||||
startPosition++;
|
||||
}
|
||||
for (unsigned char i=startPosition; i< (INPUT_BUFFER_LENGTH+1) && inputBuffer[i]!=0; i++) {
|
||||
char number = inputBuffer[i];
|
||||
//this very dumb approac can lead to errors, but we expect only numbers after the command anyway
|
||||
if (number <= '9' && number >='0') {
|
||||
result *= 10;
|
||||
result += number - '0';
|
||||
}
|
||||
}
|
||||
if (negative) {
|
||||
return -result;
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.ino - - TMC26X Stepper library Example for Wiring/Arduino
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
#include <SPI.h>
|
||||
#include <TMC26XStepper.h>
|
||||
|
||||
//you may adapt this to your shield or breakout board connection
|
||||
#define CS_PIN 2
|
||||
#define DIR_PIN 6
|
||||
#define STEP_PIN 7
|
||||
#define ENABLE_PIN 8 //if it is not connected it won't be a problem
|
||||
|
||||
|
||||
#define TIMER_CLOCK_FREQ 2000000.0 //2MHz for /8 prescale from 16MHz
|
||||
#define INITIAL_CURRENT 500 //in mA
|
||||
#define MAX_SPEED 1000
|
||||
|
||||
|
||||
//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 3, step pin 4 and a current of 300mA
|
||||
TMC26XStepper tmc26XStepper = TMC26XStepper(200,CS_PIN,DIR_PIN,STEP_PIN,INITIAL_CURRENT);
|
||||
char running;
|
||||
|
||||
void setup() {
|
||||
//configure the enable pin
|
||||
pinMode(ENABLE_PIN, OUTPUT);
|
||||
digitalWrite(ENABLE_PIN,HIGH);
|
||||
|
||||
startSerial();
|
||||
startMotor();
|
||||
//set this according to you stepper
|
||||
Serial.println(F("started"));
|
||||
}
|
||||
|
||||
void loop() {
|
||||
loopSerial();
|
||||
runMotor();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,306 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
String channelAStatus=null;
|
||||
String channelBStatus=null;
|
||||
String temperatureStatus=null;
|
||||
boolean motor_connected = false;
|
||||
|
||||
RadioButton serialButtons;
|
||||
Button serialOkButton;
|
||||
Button helpButton;
|
||||
Textarea statusArea;
|
||||
String[] ports;
|
||||
int activePortIndex = -1;
|
||||
|
||||
String identString="TMC26X Stepper Driver Motor Tester";
|
||||
int connectTimeout=10*1000; //how long do we wait until the Arduino is connected
|
||||
|
||||
StringBuilder serialStringBuilder = new StringBuilder();
|
||||
|
||||
void setupSerialConfig() {
|
||||
Tab defaultTab = controlP5.getTab("default");
|
||||
//add the list of serial interfaces - it get's populated later
|
||||
serialButtons = controlP5.addRadioButton("serialport", 200, 100+TMCLogo.height*2+50);
|
||||
serialConfigElements.add(serialButtons);
|
||||
serialButtons.captionLabel().set("Select Serial Port");
|
||||
serialButtons.showBar();
|
||||
serialButtons.moveTo(defaultTab);
|
||||
//ad the ok button
|
||||
serialOkButton = controlP5.addButton("serialOk", 1, 200, height-300, 30, 30);
|
||||
serialConfigElements.add(serialOkButton);
|
||||
serialOkButton.setCaptionLabel("OK");
|
||||
runToggle.moveTo(defaultTab);
|
||||
//add the status area
|
||||
statusArea = controlP5.addTextarea("statusArea","",200,height-250,300,50);
|
||||
serialConfigElements.add(statusArea);
|
||||
statusArea.moveTo(defaultTab);
|
||||
|
||||
helpButton = controlP5.addButton("help", 1, 200, height-250, 80, 30);
|
||||
serialConfigElements.add(helpButton);
|
||||
helpButton.moveTo(defaultTab);
|
||||
|
||||
|
||||
//finally update the list of serial ports
|
||||
updateSerialPortList();
|
||||
}
|
||||
|
||||
void updateSerialPortList() {
|
||||
//first remove all present serial ports
|
||||
List items = serialButtons.getItems();
|
||||
for (Object i:items) {
|
||||
Toggle item = (Toggle) i;
|
||||
serialButtons.removeItem(item.getName());
|
||||
}
|
||||
//add the serial ports
|
||||
ports = Serial.list();
|
||||
for (int i=0; i< ports.length; i++) {
|
||||
serialButtons.addItem(ports[i],i);
|
||||
}
|
||||
serialButtons.setValue(-1);
|
||||
serialOkButton.setVisible(false);
|
||||
}
|
||||
|
||||
void serialport(int value) {
|
||||
//ok button is only active if a serial port is selected
|
||||
serialOkButton.setVisible(value>-1);
|
||||
if (value>-1) {
|
||||
statusArea.setText("");
|
||||
}
|
||||
activePortIndex = value;
|
||||
}
|
||||
|
||||
void serialOk(int value) {
|
||||
String error = null;
|
||||
if (value!=0 && activePortIndex>-1) {
|
||||
try {
|
||||
arduinoPort = new Serial(this, ports[activePortIndex], 115200);
|
||||
int timeStarted = millis();
|
||||
StringBuilder identBuffer = new StringBuilder();
|
||||
while (!motor_connected && (millis()-timeStarted)<connectTimeout) {
|
||||
if (arduinoPort.available ()>0) {
|
||||
char c = arduinoPort.readChar();
|
||||
identBuffer.append(c);
|
||||
if (c=='\n') {
|
||||
if (identString.contains(identString)) {
|
||||
motor_connected = true;
|
||||
toggleUi(true);
|
||||
return;
|
||||
}
|
||||
identBuffer = new StringBuilder();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
//we simply do nothing
|
||||
//TODO set status label
|
||||
error = "There was a problem with serial port "+ports[activePortIndex]+": "+e.getMessage();
|
||||
}
|
||||
//ok appearantly we did not find an motor tester - so lets deselect that port
|
||||
if (error == null) {
|
||||
error = "Could not find TMC26XMotorTester on serial port "+ports[activePortIndex];
|
||||
}
|
||||
statusArea.setText(error);
|
||||
Toggle selected = serialButtons.getItem(activePortIndex);
|
||||
selected.setState(false);
|
||||
serialOkButton.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void decodeSerial() {
|
||||
if (motor_connected) {
|
||||
while (arduinoPort.available ()>0) {
|
||||
char c = arduinoPort.readChar();
|
||||
serialStringBuilder.append(c);
|
||||
if (c=='\n') {
|
||||
decodeSerial(serialStringBuilder.toString());
|
||||
serialStringBuilder = new StringBuilder();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sendCommand(String command) {
|
||||
if (motor_connected) {
|
||||
arduinoPort.write(command+"\n");
|
||||
}
|
||||
}
|
||||
|
||||
void decodeSerial(String line) {
|
||||
settingStatus=true;
|
||||
if (line.startsWith("#")) {
|
||||
String status = line.substring(1);
|
||||
StringTokenizer statusTokenizer = new StringTokenizer(status, ",");
|
||||
while (statusTokenizer.hasMoreTokens ()) {
|
||||
String statusToken = statusTokenizer.nextToken();
|
||||
if ("s".equals(statusToken)) {
|
||||
runToggle.setValue(0);
|
||||
}
|
||||
else if ("r".equals(statusToken)) {
|
||||
runToggle.setValue(1);
|
||||
}
|
||||
else if (statusToken.startsWith("e")) {
|
||||
int enabled = getValueOfToken(statusToken, 1);
|
||||
if (enabled!=0) {
|
||||
enabledToggle.setValue(1);
|
||||
}
|
||||
else {
|
||||
enabledToggle.setValue(0);
|
||||
}
|
||||
}
|
||||
else if (statusToken.startsWith("S")) {
|
||||
speedSlider.setValue(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("m")) {
|
||||
microsteppingButtons.activate("m_1/"+String.valueOf(getValueOfToken(statusToken, 1)));
|
||||
}
|
||||
else if (statusToken.startsWith("sg")) {
|
||||
addStallGuardReading(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("p")) {
|
||||
addPositionReading(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("k")) {
|
||||
addCurrentReading(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("t")) {
|
||||
sgtSlider.setValue(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("f")) {
|
||||
sgFilterToggle.setValue(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("d")) {
|
||||
setDirection(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("c")) {
|
||||
setCurrent(getValueOfToken(statusToken, 1));
|
||||
}
|
||||
else if (statusToken.startsWith("a")) {
|
||||
if (statusToken.charAt(1)=='o') {
|
||||
channelAStatus="Open Load";
|
||||
}
|
||||
else if (statusToken.charAt(1)=='g') {
|
||||
channelAStatus="Short to Ground!";
|
||||
}
|
||||
else {
|
||||
channelAStatus=null;
|
||||
}
|
||||
}
|
||||
else if (statusToken.startsWith("b")) {
|
||||
if (statusToken.charAt(1)=='o') {
|
||||
channelBStatus="Open Load";
|
||||
}
|
||||
else if (statusToken.charAt(1)=='g') {
|
||||
channelBStatus="Short to Ground!";
|
||||
}
|
||||
else {
|
||||
channelBStatus=null;
|
||||
}
|
||||
}
|
||||
else if (statusToken.startsWith("x")) {
|
||||
if (statusToken.charAt(1)=='w') {
|
||||
temperatureStatus="Prewarning!";
|
||||
}
|
||||
else if (statusToken.charAt(1)=='e') {
|
||||
temperatureStatus="Error";
|
||||
}
|
||||
else {
|
||||
temperatureStatus=null;
|
||||
}
|
||||
}
|
||||
else if (statusToken.startsWith("Cm")) {
|
||||
//chopper mode is currently ignored
|
||||
}
|
||||
else if (statusToken.startsWith("Co")) {
|
||||
constantOffSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Cb")) {
|
||||
blankTimeSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Cs")) {
|
||||
hysteresisStartSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Ce")) {
|
||||
hysteresisEndSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Cd")) {
|
||||
setHystDecrement(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if ("Ke+".equals(statusToken)) {
|
||||
coolStepActiveToggle.setValue(1);
|
||||
}
|
||||
else if ("Ke-".equals(statusToken)) {
|
||||
coolStepActiveToggle.setValue(0);
|
||||
}
|
||||
else if (statusToken.startsWith("Kl")) {
|
||||
coolStepMinSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Ku")) {
|
||||
coolStepMaxSlider.setValue(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Kn")) {
|
||||
coolStepDecrementButtons.activate(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Ki")) {
|
||||
coolStepIncrementButtons.activate(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
else if (statusToken.startsWith("Km")) {
|
||||
coolStepMinButtons.activate(getValueOfToken(statusToken, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
println(line);
|
||||
}
|
||||
settingStatus=false;
|
||||
}
|
||||
|
||||
int getValueOfToken(String token, int position) {
|
||||
String value = token.substring(position);
|
||||
try {
|
||||
return Integer.valueOf(value);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
println("Unable to decode '"+value+"'of '"+token+"' !");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void drawSerial() {
|
||||
//draw the logo and some epxlaining text while setting up the serial port
|
||||
if (!motor_connected) {
|
||||
image(TMCLogo,200, 100);
|
||||
fill(uiTextColor);
|
||||
text("Select the serial port where your Arduino is connected\nIf in doubt check it in the Arduino IDE.\nThe Motor Tester will automatically verify if it can find an Motor tester ath the port.",200,100+TMCLogo.height+50);
|
||||
}
|
||||
}
|
||||
|
||||
void help(float value) {
|
||||
if (value!=0) {
|
||||
link(helpUrl);
|
||||
}
|
||||
}
|
||||
|
@ -1,175 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
Slider constantOffSlider;
|
||||
Slider blankTimeSlider;
|
||||
Toggle randomOffTimeToggle;
|
||||
RadioButton ChopperModeButtons;
|
||||
//for constant off time chopeer
|
||||
Slider fastDecaySlider;
|
||||
Slider sineWaveOffsetSlider;
|
||||
Toggle currentComparatorToggle;
|
||||
//for spread chopper
|
||||
Slider hysteresisStartSlider;
|
||||
Slider hysteresisEndSlider;
|
||||
Numberbox motorVoltageBox;
|
||||
Numberbox motorCurrentBox;
|
||||
Numberbox motorResistanceBox;
|
||||
Numberbox motorInductanceBox;
|
||||
|
||||
RadioButton hysteresisDecrementButtons;
|
||||
|
||||
PImage spreadChopperImage;
|
||||
|
||||
void setupChooperConfig() {
|
||||
//add input fields for the various motor parameters
|
||||
motorVoltageBox = controlP5.addNumberbox("motorvoltage",12.0,20,40,100,20);
|
||||
motorVoltageBox.setCaptionLabel("Motor Voltage (V)");
|
||||
motorVoltageBox.setMultiplier(0.025);
|
||||
motorVoltageBox.setMin(0);
|
||||
motorVoltageBox.setMax(40.0);
|
||||
motorVoltageBox.moveTo(configureTab);
|
||||
|
||||
motorCurrentBox = controlP5.addNumberbox("motorcurrent",0.5,140,40,100,20);
|
||||
motorCurrentBox.setCaptionLabel("Motor Current (A)");
|
||||
motorCurrentBox.setMultiplier(0.025);
|
||||
motorCurrentBox.setMin(0.46);
|
||||
motorCurrentBox.setMax(1.7);
|
||||
motorCurrentBox.moveTo(configureTab);
|
||||
|
||||
motorResistanceBox = controlP5.addNumberbox("motorresistance",2,260,40,100,20);
|
||||
motorResistanceBox.setCaptionLabel("Motor Resistance (Ohm)");
|
||||
motorResistanceBox.setMultiplier(0.1);
|
||||
motorResistanceBox.setMin(0);
|
||||
motorResistanceBox.setMax(250);
|
||||
motorResistanceBox.moveTo(configureTab);
|
||||
|
||||
motorInductanceBox = controlP5.addNumberbox("motorinductance",2,380,40,100,20);
|
||||
motorInductanceBox.setMultiplier(0.1);
|
||||
motorInductanceBox.setMin(0);
|
||||
motorInductanceBox.setMax(250);
|
||||
motorInductanceBox.setCaptionLabel("Motor Inductance (mH)");
|
||||
motorInductanceBox.moveTo(configureTab);
|
||||
// add a vertical slider for speed
|
||||
constantOffSlider = controlP5.addSlider("constantoff", 1, 15, 1, 20, 80, 400, 20);
|
||||
constantOffSlider.setCaptionLabel("Constant Off Time");
|
||||
constantOffSlider.setSliderMode(Slider.FIX);
|
||||
constantOffSlider.moveTo(configureTab);
|
||||
|
||||
blankTimeSlider = controlP5.addSlider("blanktime", 0, 3, 2, 20, 120, 400, 20);
|
||||
blankTimeSlider.setCaptionLabel("Blank Time");
|
||||
blankTimeSlider.moveTo(configureTab);
|
||||
|
||||
hysteresisStartSlider = controlP5.addSlider("hysteresisstart", 0, 8, 2, 20, 160, 400, 20);
|
||||
hysteresisStartSlider.setCaptionLabel("Hysteresis Start");
|
||||
hysteresisStartSlider.moveTo(configureTab);
|
||||
|
||||
hysteresisEndSlider = controlP5.addSlider("hysteresisend", -3, 12, 2, 20, 200, 400, 20);
|
||||
hysteresisEndSlider.setCaptionLabel("Hysteresis End");
|
||||
hysteresisEndSlider.moveTo(configureTab);
|
||||
|
||||
hysteresisDecrementButtons =controlP5.addRadioButton("decrement", 20, 240);
|
||||
hysteresisDecrementButtons.addItem("fastest", 0);
|
||||
hysteresisDecrementButtons.addItem("fast", 1);
|
||||
hysteresisDecrementButtons.addItem("medium", 2);
|
||||
hysteresisDecrementButtons.addItem("slow", 3);
|
||||
hysteresisDecrementButtons.showBar();
|
||||
hysteresisDecrementButtons.moveTo(configureTab);
|
||||
|
||||
spreadChopperImage = loadImage("hysteresis.png");
|
||||
}
|
||||
|
||||
void drawChopper() {
|
||||
if (activeTab!=null && configureTab.equals(activeTab)) {
|
||||
image(spreadChopperImage, 200, 400);
|
||||
}
|
||||
}
|
||||
|
||||
void constantoff(int theValue) {
|
||||
if (!settingStatus) {
|
||||
if (theValue>0 && theValue<16) {
|
||||
println("Constant off "+theValue);
|
||||
sendCommand("cO"+theValue);
|
||||
}
|
||||
else {
|
||||
println("invalid blank time of "+theValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void blanktime(int theValue) {
|
||||
if (!settingStatus) {
|
||||
if (theValue>=0 && theValue<=3) {
|
||||
println("blank time "+theValue);
|
||||
sendCommand("Cb"+theValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void hysteresisstart(int start) {
|
||||
if (!settingStatus) {
|
||||
if (start>=1 && start<=8) {
|
||||
println("hystereis start "+start);
|
||||
sendCommand("Cs"+start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void hysteresisend(int end) {
|
||||
if (!settingStatus) {
|
||||
if (end>=-3 && end<=12) {
|
||||
println("hystereis end "+end);
|
||||
sendCommand("Ce"+end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setHysteresisDecrement(int theValue) {
|
||||
if (!settingStatus) {
|
||||
if (theValue>=0 && theValue<=3) {
|
||||
println("Hysteresis decrement "+theValue);
|
||||
sendCommand("Cd"+theValue);
|
||||
}
|
||||
else {
|
||||
println("cannot set decrement to "+theValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setHystDecrement(int value) {
|
||||
if (value>=0 && value<=3) {
|
||||
hysteresisDecrementButtons.activate(value);
|
||||
}
|
||||
else {
|
||||
println("this is no proper hysteresis decerement value: "+value);
|
||||
}
|
||||
}
|
||||
|
||||
void motorcurrent(float value) {
|
||||
if (activeTab!=null && "default".equals(activeTab.name())) {
|
||||
currentSlider.setValue(value);
|
||||
}
|
||||
}
|
||||
|
@ -1,327 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
//our graph dimensions
|
||||
int plotBottom, plotTop;
|
||||
int plotLeft, plotRight;
|
||||
|
||||
|
||||
//we already know the minima and maxima of certain dates
|
||||
int stallGuardMin = 0;
|
||||
int stallGuardMax =1024;
|
||||
|
||||
int positionMin = 0;
|
||||
int positionMax = 1024;
|
||||
|
||||
int dataPointsWidth = 3;
|
||||
int dataLineWidth = 2;
|
||||
int highLightWidth = 7;
|
||||
|
||||
int numberOfDataPoints=1000;
|
||||
|
||||
int legendTitleSize = 10;
|
||||
int legendTextSize = 10;
|
||||
int currentLabelInterval = 500;
|
||||
int currentMinorTickInterval = 25;
|
||||
DecimalFormat currentLabelFormat = new DecimalFormat("#0.0A");
|
||||
|
||||
int stallGuardLabelInterval = 100;
|
||||
int stallGuardMinorTickInterval = 10;
|
||||
int positionLabelInterval = 64;
|
||||
int positionMinorTickInterval = 8;
|
||||
|
||||
int coolStepActiveStroke = 2;
|
||||
int coolStepInactiveStroke = 1;
|
||||
int stallGuardHighLightDistance = 1;
|
||||
int positionHighLightDistance = 3;
|
||||
int currentHighLightDistance = 3;
|
||||
|
||||
DataTable stallGuardTable = new DataTable(numberOfDataPoints);
|
||||
DataTable positionTable = new DataTable(numberOfDataPoints);
|
||||
DataTable currentTable = new DataTable(numberOfDataPoints);
|
||||
|
||||
int logoLeft = 10;
|
||||
int logoTop = 50;
|
||||
int logoWidth = 75;
|
||||
int logoHeight = 75;
|
||||
|
||||
void setupData() {
|
||||
plotBottom = height-50;
|
||||
plotTop = 300;
|
||||
|
||||
plotLeft = 150;
|
||||
plotRight= width-50;
|
||||
//recalculate the image dimension for the Logo
|
||||
logoHeight = (int)((float)logoWidth/(float)TMCLogo.width*(float)TMCLogo.height);
|
||||
logoTop = height - 10 - logoHeight;
|
||||
}
|
||||
|
||||
void drawData() {
|
||||
|
||||
if (motor_connected && activeTab!=null && runTab.equals(activeTab)) {
|
||||
fill(diagramBackgroundColor);
|
||||
noStroke();
|
||||
rect(plotLeft, plotTop, plotRight, plotBottom);
|
||||
noFill();
|
||||
rectMode(CORNERS);
|
||||
noStroke();
|
||||
//rect(plotLeft, plotBottom, plotRight, plotTop);
|
||||
|
||||
strokeWeight(dataLineWidth);
|
||||
stroke(positionColor);
|
||||
drawDataLine(positionTable, positionMin, positionMax);
|
||||
drawDataHighLight(positionTable, positionMin, positionMax, positionHighLightDistance, labelColor, "Microstep Position", false);
|
||||
|
||||
strokeWeight(dataLineWidth);
|
||||
stroke(coolStepColor);
|
||||
drawCurrentLine(currentTable);
|
||||
drawCurrentHighLight(positionTable, currentHighLightDistance, labelColor, "Current Ratio", false);
|
||||
|
||||
strokeWeight(dataPointsWidth);
|
||||
stroke(stallGuardColor);
|
||||
drawDataPoints(stallGuardTable, stallGuardMin, stallGuardMax);
|
||||
drawDataHighLight(stallGuardTable, stallGuardMin, stallGuardMax, stallGuardHighLightDistance, labelColor, "Stall Guard", true);
|
||||
|
||||
if (coolStepActive) {
|
||||
strokeWeight(coolStepActiveStroke);
|
||||
} else {
|
||||
strokeWeight(coolStepInactiveStroke);
|
||||
}
|
||||
stroke(coolStepColor);
|
||||
float coolStepMinHeight = map(coolStepMin, 0, stallGuardMax, plotBottom, plotTop);
|
||||
line(plotLeft,coolStepMinHeight, plotRight, coolStepMinHeight);
|
||||
float coolStepMaxHeight = map(coolStepMin+coolStepMax+1, 0, stallGuardMax, plotBottom, plotTop);
|
||||
line(plotLeft,coolStepMaxHeight, plotRight, coolStepMaxHeight);
|
||||
|
||||
textSize(legendTitleSize);
|
||||
textAlign(RIGHT);
|
||||
fill(coolStepColor);
|
||||
text("Motor Current", plotLeft - 50, plotTop - 10);
|
||||
textSize(legendTextSize);
|
||||
textAlign(RIGHT);
|
||||
strokeWeight(1);
|
||||
stroke(coolStepColor);
|
||||
int currentScaleMax = (int)(maxCurrent*1000.0);
|
||||
for (int i=0; i<=currentScaleMax; i++) {
|
||||
float y = map(i, 0, currentScaleMax, plotBottom, plotTop);
|
||||
if (i % currentLabelInterval == 0) {
|
||||
if (i==0) {
|
||||
textAlign(RIGHT, BOTTOM);
|
||||
}
|
||||
else if (i==currentScaleMax) {
|
||||
textAlign(RIGHT, TOP);
|
||||
}
|
||||
else {
|
||||
textAlign(RIGHT, CENTER);
|
||||
}
|
||||
text(currentLabelFormat.format((float)i/1000.0), plotLeft-58, y);
|
||||
line (plotLeft-55, y, plotLeft-50, y);
|
||||
}
|
||||
else if (i % currentMinorTickInterval == 0) {
|
||||
line (plotLeft-53, y, plotLeft-50, y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
textSize(legendTitleSize);
|
||||
textAlign(LEFT);
|
||||
fill(stallGuardColor);
|
||||
text("Stall Guard Reading", plotLeft - 30, plotTop - 10);
|
||||
textSize(legendTextSize);
|
||||
textAlign(RIGHT);
|
||||
strokeWeight(1);
|
||||
stroke(stallGuardColor);
|
||||
for (int i=stallGuardMin; i<=stallGuardMax; i++) {
|
||||
float y = map(i, stallGuardMin, stallGuardMax, plotBottom, plotTop);
|
||||
if (i % stallGuardLabelInterval == 0) {
|
||||
if (i==stallGuardMin) {
|
||||
textAlign(RIGHT, BOTTOM);
|
||||
}
|
||||
else if (i==stallGuardMax) {
|
||||
textAlign(RIGHT, TOP);
|
||||
}
|
||||
else {
|
||||
textAlign(RIGHT, CENTER);
|
||||
}
|
||||
text(i, plotLeft-8, y);
|
||||
line (plotLeft-5, y, plotLeft, y);
|
||||
}
|
||||
else if (i % stallGuardMinorTickInterval == 0) {
|
||||
line (plotLeft-3, y, plotLeft, y);
|
||||
}
|
||||
}
|
||||
|
||||
textSize(legendTitleSize);
|
||||
fill(positionColor);
|
||||
textAlign(RIGHT);
|
||||
text("Position", plotRight + 30, plotTop - 10);
|
||||
textSize(legendTextSize);
|
||||
textAlign(LEFT);
|
||||
strokeWeight(1);
|
||||
stroke(positionColor);
|
||||
for (int i=positionMin; i<=positionMax; i++) {
|
||||
float y = map(i, positionMin, positionMax, plotBottom, plotTop);
|
||||
if (i % positionLabelInterval == 0) {
|
||||
if (i==positionMin) {
|
||||
textAlign(LEFT, BOTTOM);
|
||||
}
|
||||
else if (i==stallGuardMax) {
|
||||
textAlign(LEFT, TOP);
|
||||
}
|
||||
else {
|
||||
textAlign(LEFT, CENTER);
|
||||
}
|
||||
text(i, plotRight+8, y);
|
||||
line (plotRight, y, plotRight+5, y);
|
||||
}
|
||||
else if (i % positionMinorTickInterval == 0) {
|
||||
line (plotRight, y, plotRight+3, y);
|
||||
}
|
||||
}
|
||||
//draw the channel status
|
||||
textSize(legendTextSize);
|
||||
textAlign(CENTER);
|
||||
strokeWeight(1);
|
||||
int statusY = height - 20;
|
||||
int channelAX = width/4;
|
||||
int temperatureX = width/2;
|
||||
int channelBX = width/4*3;
|
||||
if (channelAStatus==null) {
|
||||
fill(goodStatusColor);
|
||||
text("Channel A: OK", channelAX, statusY);
|
||||
}
|
||||
else {
|
||||
fill(badStatusColor);
|
||||
text("Channel A: "+channelAStatus, channelAX, statusY);
|
||||
}
|
||||
if (channelBStatus==null) {
|
||||
fill(goodStatusColor);
|
||||
text("Channel B: OK", channelBX, statusY);
|
||||
}
|
||||
else {
|
||||
fill(badStatusColor);
|
||||
text("Channel B: "+channelBStatus, channelBX, statusY);
|
||||
}
|
||||
if (temperatureStatus==null) {
|
||||
fill(goodStatusColor);
|
||||
text("Temperature: OK", temperatureX, statusY);
|
||||
}
|
||||
else {
|
||||
fill(badStatusColor);
|
||||
text("Temperature: "+temperatureStatus, temperatureX, statusY);
|
||||
}
|
||||
}
|
||||
}
|
||||
void drawDataPoints(DataTable table, int minValue, int maxValue) {
|
||||
int dataCount = table.getSize();
|
||||
for (int i=0; i<dataCount; i++) {
|
||||
int value = table.getEntry(i);
|
||||
float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
|
||||
float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
|
||||
point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void drawDataLine(DataTable table, int minValue, int maxValue) {
|
||||
beginShape();
|
||||
int dataCount = table.getSize();
|
||||
for (int i=0; i<dataCount; i++) {
|
||||
int value = table.getEntry(i);
|
||||
float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
|
||||
float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
|
||||
vertex(x, y);
|
||||
}
|
||||
endShape();
|
||||
}
|
||||
|
||||
void drawDataHighLight(DataTable table, int minValue, int maxValue, int distance, color textColor, String name, boolean top) {
|
||||
int dataCount = table.getSize();
|
||||
for (int i=0; i<dataCount; i++) {
|
||||
int value = table.getEntry(i);
|
||||
float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
|
||||
float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
|
||||
if (dist(mouseX, mouseY, x, y) < distance) {
|
||||
strokeWeight(highLightWidth);
|
||||
point(x, y);
|
||||
fill(textColor);
|
||||
textSize(10);
|
||||
textAlign(CENTER);
|
||||
if (top) {
|
||||
text(name+": "+value, x, y-8);
|
||||
}
|
||||
else {
|
||||
text(name+": "+value, x, y+8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void drawCurrentLine(DataTable table) {
|
||||
noFill();
|
||||
beginShape();
|
||||
int dataCount = table.getSize();
|
||||
for (int i=0; i<dataCount; i++) {
|
||||
float value = (table.getEntry(i)+1)/1000.0;
|
||||
float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
|
||||
float y = map(value, 0.0, maxCurrent, (float)plotBottom-dataPointsWidth, (float)plotTop+dataPointsWidth);
|
||||
vertex(x, y);
|
||||
}
|
||||
endShape();
|
||||
}
|
||||
|
||||
void drawCurrentHighLight(DataTable table, int distance, color textColor, String name, boolean top) {
|
||||
int dataCount = table.getSize();
|
||||
for (int i=0; i<dataCount; i++) {
|
||||
float value = (table.getEntry(i)+1)/1000.0;
|
||||
float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
|
||||
float y = map(value, 0.0, maxCurrent, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
|
||||
if (dist(mouseX, mouseY, x, y) < distance) {
|
||||
strokeWeight(highLightWidth);
|
||||
point(x, y);
|
||||
fill(textColor);
|
||||
textSize(10);
|
||||
textAlign(CENTER);
|
||||
if (top) {
|
||||
text(name+": "+value, x, y-8);
|
||||
}
|
||||
else {
|
||||
text(name+": "+value, x, y+8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addStallGuardReading(int value) {
|
||||
stallGuardTable.addData(value);
|
||||
}
|
||||
|
||||
void addPositionReading(int value) {
|
||||
positionTable.addData(value);
|
||||
}
|
||||
|
||||
void addCurrentReading(int value) {
|
||||
currentTable.addData(value);
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DataTable {
|
||||
|
||||
LinkedList<Integer> dataList = new LinkedList<Integer>();
|
||||
int maxEntries;
|
||||
|
||||
DataTable(int maxEntries) {
|
||||
this.maxEntries = maxEntries;
|
||||
}
|
||||
|
||||
void addData(int value) {
|
||||
dataList.add(value);
|
||||
if (dataList.size()>maxEntries) {
|
||||
dataList.remove();
|
||||
}
|
||||
}
|
||||
|
||||
int getSize() {
|
||||
return dataList.size();
|
||||
}
|
||||
|
||||
int getEntry(int position) {
|
||||
return dataList.get(position);
|
||||
}
|
||||
}
|
@ -1,335 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
Slider speedSlider;
|
||||
Toggle runToggle;
|
||||
RadioButton directionButtons;
|
||||
Toggle enabledToggle;
|
||||
RadioButton microsteppingButtons;
|
||||
Slider sgtSlider;
|
||||
Button sgtPlus;
|
||||
Button sgtMinus;
|
||||
Toggle sgFilterToggle;
|
||||
Slider currentSlider;
|
||||
Slider coolStepMinSlider;
|
||||
Slider coolStepMaxSlider;
|
||||
Toggle coolStepActiveToggle;
|
||||
RadioButton coolStepIncrementButtons;
|
||||
RadioButton coolStepDecrementButtons;
|
||||
RadioButton coolStepMinButtons;
|
||||
List runControls = new LinkedList();
|
||||
|
||||
Button trinamicButton;
|
||||
Button motionControlButton;
|
||||
|
||||
void setupRunConfig() {
|
||||
//the run configuration
|
||||
//controlP5.getControlFont().setSize(10); - the font is too small, try to increase it!
|
||||
//add a button te let the motor run
|
||||
runToggle = controlP5.addToggle("run", false, 20, 40, 30, 30);
|
||||
controlElements.add(runToggle);
|
||||
runToggle.moveTo(runTab);
|
||||
//add some directions buttons
|
||||
directionButtons = controlP5.addRadioButton("direction", 20, 90);
|
||||
controlElements.add(directionButtons);
|
||||
directionButtons.addItem("forward", 1);
|
||||
directionButtons.addItem("backward", -1);
|
||||
directionButtons.activate(0);
|
||||
directionButtons.moveTo(runTab);
|
||||
enabledToggle = controlP5.addToggle("enabled", false, 20, 220, 30, 30);
|
||||
controlElements.add(enabledToggle);
|
||||
enabledToggle.moveTo(runTab);
|
||||
|
||||
// add a vertical slider for speed
|
||||
speedSlider = controlP5.addSlider("speed", 1, 100, 10, 85, 40, 20, 210);
|
||||
controlElements.add(speedSlider);
|
||||
speedSlider.moveTo(runTab);
|
||||
|
||||
//ad a multilist for the microstepping setting
|
||||
microsteppingButtons = controlP5.addRadioButton("microstepping", 150, 40);
|
||||
controlElements.add(microsteppingButtons);
|
||||
microsteppingButtons.addItem("m_1/1", 1);
|
||||
microsteppingButtons.addItem("m_1/2", 2);
|
||||
microsteppingButtons.addItem("m_1/4", 4);
|
||||
microsteppingButtons.addItem("m_1/8", 8);
|
||||
microsteppingButtons.addItem("m_1/16", 16);
|
||||
microsteppingButtons.addItem("m_1/32", 32);
|
||||
microsteppingButtons.addItem("m_1/64", 64);
|
||||
microsteppingButtons.addItem("m_1/128", 128);
|
||||
microsteppingButtons.addItem("m_1/256", 256);
|
||||
for (Object o:microsteppingButtons.getItems()) {
|
||||
Toggle t = (Toggle) o;
|
||||
t.setCaptionLabel(t.getName().substring(2));
|
||||
}
|
||||
microsteppingButtons.showBar();
|
||||
microsteppingButtons.moveTo(runTab);
|
||||
|
||||
|
||||
|
||||
currentSlider = controlP5.addSlider("current", 0.46, maxCurrent, 0.4, 250, 40, 20, 210);
|
||||
controlElements.add(currentSlider);
|
||||
currentSlider.moveTo(runTab);
|
||||
|
||||
// add a vertical slider for stallGuard threshold
|
||||
sgtPlus = controlP5.addButton("sgtplus", 0, 400, 40, 20, 20);
|
||||
controlElements.add(sgtPlus);
|
||||
sgtPlus.setCaptionLabel("+");
|
||||
sgtPlus.moveTo(runTab);
|
||||
sgtMinus = controlP5.addButton("sgtminus", 1, 400, 70, 20, 20);
|
||||
controlElements.add(sgtMinus);
|
||||
sgtMinus.setCaptionLabel("-");
|
||||
sgtMinus.moveTo(runTab);
|
||||
sgtSlider = controlP5.addSlider("stallguardthreshold", -64, 63, 0, 350, 40, 20, 150);
|
||||
controlElements.add(sgtSlider);
|
||||
sgtSlider.setSliderMode(Slider.FIX);
|
||||
sgtSlider.setCaptionLabel("Stall Guard Threshold");
|
||||
sgtSlider.moveTo(runTab);
|
||||
//ading some buttons to have finer sg control
|
||||
//adding a button for the filter
|
||||
sgFilterToggle = controlP5.addToggle("sgfilter", false, 350, 220, 30, 30);
|
||||
controlElements.add(sgFilterToggle);
|
||||
sgFilterToggle.setCaptionLabel("Stall GuardFilter");
|
||||
sgFilterToggle.moveTo(runTab);
|
||||
|
||||
//add the coolstep sliders
|
||||
coolStepMaxSlider = controlP5.addSlider("coolStepUpper", 0, 480, 0, 500, 40, 20, 90);
|
||||
controlElements.add(coolStepMaxSlider);
|
||||
coolStepMaxSlider.setCaptionLabel("Cool Step Hysteresis");
|
||||
coolStepMaxSlider.moveTo(runTab);
|
||||
|
||||
coolStepMinSlider = controlP5.addSlider("coolStepLower", 0, 480, 0, 500, 160, 20, 90);
|
||||
controlElements.add(coolStepMinSlider);
|
||||
coolStepMinSlider.setCaptionLabel("Cool Step Minimum");
|
||||
coolStepMinSlider.moveTo(runTab);
|
||||
|
||||
coolStepActiveToggle = controlP5.addToggle("coolStepActive", false, 600, 220, 30, 30);
|
||||
controlElements.add(coolStepActiveToggle);
|
||||
coolStepActiveToggle.setCaptionLabel("Enable CoolStep");
|
||||
coolStepActiveToggle.moveTo(runTab);
|
||||
|
||||
coolStepIncrementButtons = controlP5.addRadioButton("coolStepIncrement", 600, 40);
|
||||
controlElements.add(coolStepIncrementButtons);
|
||||
coolStepIncrementButtons.captionLabel().set("Cool Step Increment");
|
||||
coolStepIncrementButtons.addItem("i_1", 0);
|
||||
coolStepIncrementButtons.addItem("i_2", 1);
|
||||
coolStepIncrementButtons.addItem("i_4", 2);
|
||||
coolStepIncrementButtons.addItem("i_8", 3);
|
||||
for (Object o:coolStepIncrementButtons.getItems()) {
|
||||
Toggle t = (Toggle) o;
|
||||
t.setCaptionLabel(t.getName().substring(2));
|
||||
}
|
||||
coolStepIncrementButtons.showBar();
|
||||
coolStepIncrementButtons.moveTo(runTab);
|
||||
|
||||
coolStepDecrementButtons = controlP5.addRadioButton("coolStepDecrement", 600, 110);
|
||||
controlElements.add(coolStepDecrementButtons);
|
||||
coolStepDecrementButtons.captionLabel().set("Cool Step Decrement");
|
||||
coolStepDecrementButtons.addItem("d_32", 0);
|
||||
coolStepDecrementButtons.addItem("d_8", 1);
|
||||
coolStepDecrementButtons.addItem("d_2", 2);
|
||||
coolStepDecrementButtons.addItem("d_1", 3);
|
||||
for (Object o:coolStepDecrementButtons.getItems()) {
|
||||
Toggle t = (Toggle) o;
|
||||
t.setCaptionLabel(t.getName().substring(2));
|
||||
}
|
||||
coolStepDecrementButtons.showBar();
|
||||
coolStepDecrementButtons.moveTo(runTab);
|
||||
|
||||
coolStepMinButtons = controlP5.addRadioButton("coolStepMin", 600, 180);
|
||||
controlElements.add(coolStepMinButtons);
|
||||
coolStepMinButtons.addItem("s_1/2", 0);
|
||||
coolStepMinButtons.addItem("s_1/4", 1);
|
||||
for (Object o:coolStepMinButtons.getItems()) {
|
||||
Toggle t = (Toggle) o;
|
||||
t.setCaptionLabel(t.getName().substring(2));
|
||||
}
|
||||
coolStepMinButtons.showBar();
|
||||
coolStepMinButtons.moveTo(runTab);
|
||||
|
||||
trinamicButton = controlP5.addButton("trinamicLogo", 1.0, 750, 40, 200, 100);
|
||||
trinamicButton.setImage(TMCLogo);
|
||||
trinamicButton.moveTo(runTab);
|
||||
controlElements.add(trinamicButton);
|
||||
|
||||
motionControlButton = controlP5.addButton("mcLogo", 1.0, 750, 150, 200, 100);
|
||||
motionControlButton.setImage(MCLogo);
|
||||
motionControlButton.moveTo(runTab);
|
||||
controlElements.add(motionControlButton);
|
||||
}
|
||||
|
||||
void speed(int theSpeed) {
|
||||
if (!settingStatus) {
|
||||
int speed = (int) theSpeed;
|
||||
println("setting speed to "+speed);
|
||||
sendCommand("S"+speed);
|
||||
}
|
||||
}
|
||||
|
||||
void run(int value) {
|
||||
if (!settingStatus) {
|
||||
println("button pressed");
|
||||
if (running) {
|
||||
println("stopping motor");
|
||||
sendCommand("s");
|
||||
running = false;
|
||||
}
|
||||
else {
|
||||
println("starting motor");
|
||||
sendCommand("r");
|
||||
running = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void enabled(int value) {
|
||||
if (!settingStatus) {
|
||||
println("enabled: "+value);
|
||||
sendCommand("e"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void microstepping(int value) {
|
||||
if (!settingStatus) {
|
||||
println("microstepping: "+value);
|
||||
sendCommand("m"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void stallguardthreshold(int value) {
|
||||
if (!settingStatus) {
|
||||
println("stall guard threshold: "+value);
|
||||
sendCommand("t"+value);
|
||||
}
|
||||
if (value==sgtSlider.max()) {
|
||||
sgtPlus.lock();
|
||||
}
|
||||
else {
|
||||
sgtPlus.unlock();
|
||||
}
|
||||
if (value==sgtSlider.min()) {
|
||||
sgtMinus.lock();
|
||||
}
|
||||
else {
|
||||
sgtMinus.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
void sgtplus(int value) {
|
||||
sgtSlider.setValue(sgtSlider.value()+1);
|
||||
}
|
||||
|
||||
void sgtminus(int value) {
|
||||
sgtSlider.setValue(sgtSlider.value()-1);
|
||||
}
|
||||
|
||||
void sgfilter(int value) {
|
||||
if (!settingStatus) {
|
||||
println("filter: "+value);
|
||||
sendCommand("f"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void current(float value) {
|
||||
if (!settingStatus) {
|
||||
int realValue=(int)(value*1000.0);
|
||||
println("current: "+((float)realValue/1000.0)+" = "+realValue);
|
||||
sendCommand("c"+realValue);
|
||||
if (activeTab!=null && "run".equals(activeTab.name())) {
|
||||
motorCurrentBox.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void coolStepUpper(int value) {
|
||||
coolStepMax=value;
|
||||
if (!settingStatus) {
|
||||
sendCommand("Ku"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void coolStepLower(int value) {
|
||||
coolStepMin = value;
|
||||
if (!settingStatus) {
|
||||
sendCommand("Kl"+value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void setCoolStepIncrement(int value) {
|
||||
if (!settingStatus) {
|
||||
println("cool step increment :"+value);
|
||||
sendCommand("Ki"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void setCoolStepDecrement(int value) {
|
||||
if (!settingStatus) {
|
||||
println("cool step decrement :"+value);
|
||||
sendCommand("Kn"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void setCoolStepMin(int value) {
|
||||
if (!settingStatus) {
|
||||
println("cool step minimum :"+value);
|
||||
sendCommand("Km"+value);
|
||||
}
|
||||
}
|
||||
|
||||
void coolStepActive(int value) {
|
||||
if (!settingStatus) {
|
||||
coolStepActive = (value!=0);
|
||||
sendCommand(coolStepActive? "K+":"K-");
|
||||
}
|
||||
}
|
||||
|
||||
void setCurrent(int current) {
|
||||
currentSlider.setValue((float)current/1000.0);
|
||||
}
|
||||
|
||||
void setDirection(int direction) {
|
||||
if (!settingStatus) {
|
||||
if (direction<0) {
|
||||
println("back");
|
||||
sendCommand("d-1");
|
||||
}
|
||||
else {
|
||||
sendCommand("d1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void trinamicLogo(float value){
|
||||
if (value!=0) {
|
||||
link(trinamicUrl);
|
||||
}
|
||||
}
|
||||
|
||||
void mcLogo(float value) {
|
||||
if (value!=0) {
|
||||
link(mcUrl);
|
||||
}
|
||||
}
|
||||
|
@ -1,156 +0,0 @@
|
||||
/*
|
||||
TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
|
||||
|
||||
Copyright (c) 2011, Interactive Matter, Marcus Nowotny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
*/
|
||||
import controlP5.*;
|
||||
import processing.serial.*;
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
|
||||
ControlP5 controlP5;
|
||||
|
||||
Serial arduinoPort;
|
||||
|
||||
String helpUrl = "http://www.motioncontrol-community.org/";
|
||||
String trinamicUrl = "http://trinamic.com";
|
||||
String mcUrl = "http://www.motioncontrol-community.org/";
|
||||
|
||||
//TODO comde up with a nice color scheme
|
||||
color activeColor = #01ADF1;
|
||||
color foreGroundColor = #01ADF1;
|
||||
color uiTextColor = #4D4D4F;
|
||||
color uiElementColor = #ffffff;
|
||||
color labelColor = #f0f0f0;
|
||||
color valueColor = #f0f0f0;
|
||||
color backgroundColor = #EDEEEF;
|
||||
color stallGuardColor = #969696;
|
||||
color positionColor = #01ADF1;
|
||||
color goodStatusColor = labelColor;
|
||||
color badStatusColor = stallGuardColor;
|
||||
color coolStepColor = #4D4D4F;
|
||||
color diagramBackgroundColor = #ffffff;
|
||||
|
||||
CColor uiColor = new CColor( foreGroundColor, uiElementColor, activeColor, uiTextColor, uiTextColor);
|
||||
|
||||
Tab configureTab;
|
||||
Tab runTab;
|
||||
Tab activeTab;
|
||||
|
||||
boolean settingStatus=false;
|
||||
|
||||
boolean running = false;
|
||||
int coolStepMin = 0;
|
||||
int coolStepMax = 0;
|
||||
boolean coolStepActive = false;
|
||||
|
||||
float maxCurrent = 1.7;
|
||||
|
||||
List controlElements = new LinkedList();
|
||||
List serialConfigElements = new LinkedList();
|
||||
|
||||
PImage TMCLogo;
|
||||
PImage MCLogo;
|
||||
|
||||
void setup() {
|
||||
size(1000, 800);
|
||||
//load the logos
|
||||
TMCLogo=loadImage("tmc_logo.jpg");
|
||||
MCLogo=loadImage("mc_logo.jpg");
|
||||
|
||||
//create the UI
|
||||
controlP5 = new ControlP5(this);
|
||||
controlP5.setColor(uiColor);
|
||||
runTab = controlP5.getTab("default");
|
||||
configureTab =controlP5.addTab("configure");
|
||||
//customize the tabs a bit
|
||||
configureTab.setLabel("configure");
|
||||
controlElements.add(configureTab);
|
||||
activeTab = controlP5.getTab("default");
|
||||
controlP5.setTabEventsActive(true);
|
||||
configureTab.activateEvent(true);
|
||||
runTab.activateEvent(true);
|
||||
|
||||
//configuring the general UI l&f
|
||||
//the configuration UI
|
||||
|
||||
setupRunConfig();
|
||||
setupChooperConfig();
|
||||
setupSerialConfig();
|
||||
//directly hide the controls again since we are not connected to the Arduino yet
|
||||
toggleUi(motor_connected);
|
||||
|
||||
smooth();
|
||||
setupData();
|
||||
}
|
||||
|
||||
|
||||
void toggleUi(boolean show_controls) {
|
||||
for (Object c:controlElements) {
|
||||
ControllerInterface controller = (ControllerInterface) c;
|
||||
if (show_controls) {
|
||||
controller.show();
|
||||
} else {
|
||||
controller.hide();
|
||||
}
|
||||
}
|
||||
for (Object c:serialConfigElements) {
|
||||
ControllerInterface controller = (ControllerInterface) c;
|
||||
if (show_controls) {
|
||||
controller.hide();
|
||||
} else {
|
||||
controller.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void draw() {
|
||||
background(backgroundColor);
|
||||
drawSerial();
|
||||
drawChopper();
|
||||
drawData();
|
||||
decodeSerial();
|
||||
}
|
||||
|
||||
|
||||
void controlEvent(ControlEvent theEvent) {
|
||||
if (theEvent.isGroup() && !settingStatus) {
|
||||
if ("microstepping".equals(theEvent.group().name())) {
|
||||
microstepping((int)theEvent.group().value());
|
||||
} else
|
||||
if ("direction".equals(theEvent.group().name())) {
|
||||
setDirection((int)theEvent.group().value());
|
||||
} else if ("decrement".equals(theEvent.group().name())) {
|
||||
setHysteresisDecrement((int)theEvent.group().value());
|
||||
} else if ("coolStepIncrement".equals(theEvent.group().name())) {
|
||||
setCoolStepIncrement((int)theEvent.group().value());
|
||||
} else if ("coolStepDecrement".equals(theEvent.group().name())) {
|
||||
setCoolStepDecrement((int)theEvent.group().value());
|
||||
} else if ("coolStepMin".equals(theEvent.group().name())) {
|
||||
setCoolStepMin((int)theEvent.group().value());
|
||||
}
|
||||
}
|
||||
else if (theEvent.isTab()) {
|
||||
activeTab = theEvent.tab();
|
||||
println("Tab: "+activeTab.name());
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 32 KiB |
@ -1,2 +0,0 @@
|
||||
mode.id=processing.mode.java.JavaMode
|
||||
mode=Java
|
@ -1,75 +0,0 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For Test
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
Stepper TMC26XStepper
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
start KEYWORD2
|
||||
step KEYWORD2
|
||||
setSpeed KEYWORD2
|
||||
getSpeed KEYWORD2
|
||||
setMicrosteps KEYWORD2
|
||||
getMicrosteps KEYWORD2
|
||||
move KEYWORD2
|
||||
isMoving KEYWORD2
|
||||
getStepsLeft KEYWORD2
|
||||
stop KEYWORD2
|
||||
setConstantOffTimeChopper KEYWORD2
|
||||
setSpreadCycleChopper KEYWORD2
|
||||
setRandomOffTime KEYWORD2
|
||||
setCurrent KEYWORD2
|
||||
getCurrent KEYWORD2
|
||||
setStallGuardThreshold KEYWORD2
|
||||
getStallGuardThreshold KEYWORD2
|
||||
getStallGuardFilter KEYWORD2
|
||||
setCoolStepConfiguration KEYWORD2
|
||||
setCoolStepEnabled KEYWORD2
|
||||
isCoolStepEnabled KEYWORD2
|
||||
getCoolStepLowerSgThreshold KEYWORD2
|
||||
getCoolStepUpperSgThreshold KEYWORD2
|
||||
getCoolStepNumberOfSGReadings KEYWORD2
|
||||
getCoolStepCurrentIncrementSize KEYWORD2
|
||||
getCoolStepLowerCurrentLimit KEYWORD2
|
||||
getMotorPosition KEYWORD2
|
||||
getCurrentStallGuardReading KEYWORD2
|
||||
getCurrentCSReading KEYWORD2
|
||||
isCurrentScalingHalfed KEYWORD2
|
||||
getCurrentCurrent KEYWORD2
|
||||
isStallGuardOverThreshold KEYWORD2
|
||||
getOverTemperature KEYWORD2
|
||||
isShortToGroundA KEYWORD2
|
||||
isShortToGroundB KEYWORD2
|
||||
isOpenLoadA KEYWORD2
|
||||
isOpenLoadB KEYWORD2
|
||||
isStandStill KEYWORD2
|
||||
isStallGuardReached KEYWORD2
|
||||
setEnabled KEYWORD2
|
||||
isEnabled KEYWORD2
|
||||
readStatus KEYWORD2
|
||||
getResistor KEYWORD2
|
||||
debugLastStatus KEYWORD2
|
||||
version KEYWORD2
|
||||
|
||||
######################################
|
||||
# Instances (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
||||
|
||||
TMC262_OVERTEMPERATURE_PREWARING LITERAL1
|
||||
TMC262_OVERTEMPERATURE_SHUTDOWN LITERAL1
|
||||
TMC262_READOUT_POSITION LITERAL1
|
||||
TMC262_READOUT_STALLGUARD LITERAL1
|
||||
TMC262_READOUT_CURRENT LITERAL1
|
||||
COOL_STEP_HALF_CS_LIMIT LITERAL1
|
||||
COOL_STEP_QUARTDER_CS_LIMIT LITERAL1
|
@ -1,30 +0,0 @@
|
||||
/*!
|
||||
* \mainpage TMC 260, 261, 262 Stepper Driver for Arduino
|
||||
* \author Interactive MAtter, MArcus Nowotny, marcus@interactive-matter.eu
|
||||
* \section HOWTO How to use the driver
|
||||
* Here we go with aminial how to description
|
||||
*
|
||||
*
|
||||
* \section COPYRIGHT_NOTIFICATION COPYRIGHT NOTIFICATION
|
||||
* \par (c) 2011 Interactive MAtter, Marcus Nowotny
|
||||
*
|
||||
* \par
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
@ -1,114 +0,0 @@
|
||||
|
||||
u8glib ChangeLog
|
||||
|
||||
2012-01-01 v0.01 Oliver Kraus <olikraus@gmail.com>
|
||||
* first beta release for Arduino IDE with simple SSD1325 support
|
||||
2012-01-04 v0.02 Oliver Kraus <olikraus@gmail.com>
|
||||
* support for some more display types
|
||||
2012-01-07 v0.03 Oliver Kraus <olikraus@gmail.com>
|
||||
* fixed some bugs, added more examples
|
||||
2012-01-07 v0.04 Oliver Kraus <olikraus@gmail.com>
|
||||
* single font file
|
||||
2012-01-08 v0.05 Oliver Kraus <olikraus@gmail.com>
|
||||
* Cleanup
|
||||
* More examples
|
||||
* SSD1325 graylevel support
|
||||
2012-01-15 v0.06 Oliver Kraus <olikraus@gmail.com>
|
||||
* LM6063 support
|
||||
2012-01-17 v0.07 Oliver Kraus <olikraus@gmail.com>
|
||||
* LM6063 support (update)
|
||||
2012-01-19 v0.08 Oliver Kraus <olikraus@gmail.com>
|
||||
* ST7920 beta device
|
||||
2012-01-21 v0.09 Oliver Kraus <olikraus@gmail.com>
|
||||
* ST7920 fixed (192x32)
|
||||
* fixed bug in com layer if pins are none
|
||||
* str reference position
|
||||
2012-01-22 v0.10 Oliver Kraus <olikraus@gmail.com>
|
||||
* Experimental LM6059
|
||||
2012-01-24 v0.11 Oliver Kraus <olikraus@gmail.com>
|
||||
* new st7920 memory layout for 128x64 lcd
|
||||
* experimental st7920 SPI
|
||||
2012-01-25 v0.12 Oliver Kraus <olikraus@gmail.com>
|
||||
* fixed st7920 memory layout for 128x64 lcd
|
||||
* ST7920 SPI performance improvement
|
||||
2012-01-27 v0.13 Oliver Kraus <olikraus@gmail.com>
|
||||
* LM6059 (Adafruit Display) fixed
|
||||
2012-02-01 v0.14 Oliver Kraus <olikraus@gmail.com>
|
||||
* undoRotation()
|
||||
* setRot..() can be used without restrictions
|
||||
* Class U8GLIB derived from Print class. New function "print"
|
||||
* Fixed memory index bug in the page management procedures
|
||||
2012-02-12 v1.00 Oliver Kraus <olikraus@gmail.com>
|
||||
* XBM support
|
||||
* F() macro support
|
||||
* str-rotation commands support ref-height and ref-position
|
||||
2012-03-17 v1.02 Oliver Kraus <olikraus@gmail.com>
|
||||
* U8GLIB_ST7687_C144MVGD spi experimental
|
||||
* U8GLIB_LC7981_160X80 8bit
|
||||
* Intersection test for frame and box procedures
|
||||
* 4L double memory architecture
|
||||
* setContrast infrastructure implemented, but not available for all devices
|
||||
* drawCircle, drawDisc
|
||||
* Bugfix for drawStr270
|
||||
* New examples: Chess (ported from dogm128 lib) and GraphicsTest
|
||||
2012-03-31 v1.03 Oliver Kraus <olikraus@gmail.com>
|
||||
* experimental parallel mode atmega
|
||||
* more unifont code pages
|
||||
* double memory, for NHD OLED and DOGXL160
|
||||
* "Menu" example
|
||||
* drawLine
|
||||
2012-04-13 v1.04 Oliver Kraus <olikraus@gmail.com>
|
||||
* Adjust U8grelease: Same version number with AVR and Arduino variant
|
||||
2012-06-10 v1.05 Oliver Kraus <olikraus@gmail.com>
|
||||
* m2icon font
|
||||
* experimental lc7981_240x64 device
|
||||
* experimental ssd1306
|
||||
* experimental ssd1322
|
||||
* Hardware state backup/restore procedure
|
||||
2012-06-15 v1.06 Oliver Kraus <olikraus@gmail.com>
|
||||
* SBN1661 (SED1520?) support
|
||||
* SSD1306 support
|
||||
* U8G_PROGMEM bugfix
|
||||
2012-07-04 v1.07 Oliver Kraus <olikraus@gmail.com>
|
||||
* Added Makefiles for AVR release (issue 77)
|
||||
* Fixed examples for Arduino Environment (issue 78)
|
||||
2012-10-02 v1.08 Oliver Kraus <olikraus@gmail.com>
|
||||
* Improved delay calculation for strobe pulse (issue 20)
|
||||
* Support Chipkit (issue 39)
|
||||
* Improved speed for ST7920 parallel mode (issue 79)
|
||||
* Overall speed optimization (new page intersection algorithm)
|
||||
* Support for Displays Newhaven NHD-C12864, CrystalFontz GFAG20232, Seeedstudio 96x96 OLED
|
||||
* Added SPI support for ST7920 with plain AVR (issue 85)
|
||||
* Add more LC7981 devices
|
||||
2012-12-23 v1.09 Oliver Kraus <olikraus@gmail.com>
|
||||
* Support for Displaytech 64128n
|
||||
* Support for MINI12864
|
||||
* HW SPI for ST7920
|
||||
* Add delay after sending a byte with (ST7920 com)
|
||||
* Support ATTiny
|
||||
* Support I2C for SSD1306
|
||||
* bdf2u8g, Windows executable released
|
||||
* LC7981 320x64
|
||||
* Scalue up: u8g::setScale2x2
|
||||
* Added more bitmap fonts
|
||||
* u8g::drawRBox(), u8g::drawRFrame()
|
||||
* Support for CFAG20232 (st7920_202x32)
|
||||
* Fixed ST7920 SW SPI for ChipKit
|
||||
* Support for tls8204
|
||||
2013-02-02 v1.10 Oliver Kraus <olikraus@gmail.com>
|
||||
* Support for SSD1309
|
||||
* Support for NHD-C12832A1Z
|
||||
* Bugfix: Fixed reset controll in parallel modes
|
||||
* Bugfix: Fixed calculation of cursor position
|
||||
* Bugfix: ST7920 parallel mode
|
||||
2013-03-2 v1.11 Oliver Kraus <olikraus@gmail.com>
|
||||
* Support for T6963
|
||||
* Support for Arduino Due
|
||||
* Sleep Mode
|
||||
* 4x mode for ST7920
|
||||
* New C++ interface for ST7920
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
|
||||
U8GLIB
|
||||
http://code.google.com/p/u8glib/
|
||||
|
||||
|
||||
Install instructions for the Arduino environment.
|
||||
|
||||
1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder
|
||||
2. Start Arduino IDE
|
||||
|
||||
Install instructions for the Chipkit (Arduino) environment.
|
||||
|
||||
1. cd <mpide-... path>/libraries
|
||||
2. unzip u8glib_arduino_vX.XX.zip
|
||||
3. cd <mpide-... path>///hardware/pic32/libraries
|
||||
4. again: u8glib_arduino_vX.XX.zip
|
||||
5. Open hardware/pic32/cores/pic32/Print.h
|
||||
Remove line
|
||||
#define BYTE 0
|
||||
from the file, use PRINT_BYTE instead of BYTE.
|
||||
|
@ -1,80 +0,0 @@
|
||||
/*
|
||||
|
||||
U8glib.cpp
|
||||
|
||||
C++ Interface
|
||||
|
||||
Universal 8bit Graphics Library
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
|
||||
|
||||
uint8_t U8GLIB::initSPI(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset)
|
||||
{
|
||||
prepare();
|
||||
return u8g_InitSPI(&u8g, dev, sck, mosi, cs, a0, reset);
|
||||
}
|
||||
|
||||
uint8_t U8GLIB::initHWSPI(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset)
|
||||
{
|
||||
prepare();
|
||||
return u8g_InitHWSPI(&u8g, dev, cs, a0, reset);
|
||||
}
|
||||
|
||||
uint8_t U8GLIB::initI2C(u8g_dev_t *dev, uint8_t options)
|
||||
{
|
||||
prepare();
|
||||
return u8g_InitI2C(&u8g, dev, options);
|
||||
}
|
||||
|
||||
uint8_t U8GLIB::init8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw, uint8_t reset)
|
||||
{
|
||||
prepare();
|
||||
return u8g_Init8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset);
|
||||
}
|
||||
|
||||
uint8_t U8GLIB::init8BitFixedPort(u8g_dev_t *dev, uint8_t en, uint8_t cs, uint8_t di, uint8_t rw, uint8_t reset)
|
||||
{
|
||||
prepare();
|
||||
return u8g_Init8BitFixedPort(&u8g, dev, en, cs, di, rw, reset);
|
||||
}
|
||||
|
||||
uint8_t U8GLIB::initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset)
|
||||
{
|
||||
prepare();
|
||||
return u8g_InitRW8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset);
|
||||
}
|
||||
|
||||
|
@ -1,826 +0,0 @@
|
||||
/*
|
||||
|
||||
U8glib.h
|
||||
|
||||
C++ Interface
|
||||
|
||||
Universal 8bit Graphics Library
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _CPP_U8GLIB
|
||||
#define _CPP_U8GLIB
|
||||
|
||||
#include <Print.h>
|
||||
#include "utility/u8g.h"
|
||||
|
||||
|
||||
class U8GLIB : public Print
|
||||
{
|
||||
private:
|
||||
u8g_t u8g;
|
||||
u8g_uint_t tx, ty; // current position for the Print base class procedures
|
||||
uint8_t is_begin;
|
||||
|
||||
void prepare(void) { tx = 0; ty = 0; is_begin = 0; }
|
||||
void cbegin(void) { if ( is_begin == 0 ) { is_begin = 1; u8g_Begin(&u8g); } }
|
||||
uint8_t initSPI(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE);
|
||||
uint8_t initHWSPI(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE);
|
||||
uint8_t initI2C(u8g_dev_t *dev, uint8_t options);
|
||||
protected:
|
||||
uint8_t init8BitFixedPort(u8g_dev_t *dev, uint8_t en, uint8_t cs, uint8_t di, uint8_t rw, uint8_t reset);
|
||||
private:
|
||||
uint8_t init8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE);
|
||||
uint8_t initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset);
|
||||
public:
|
||||
|
||||
/* constructor */
|
||||
U8GLIB(void)
|
||||
{ }
|
||||
U8GLIB(u8g_dev_t *dev)
|
||||
{ prepare(); u8g_Init(&u8g, dev); }
|
||||
U8GLIB(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset)
|
||||
{ initSPI(dev, sck, mosi, cs, a0, reset); }
|
||||
U8GLIB(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset)
|
||||
{ initHWSPI(dev, cs, a0, reset); }
|
||||
U8GLIB(u8g_dev_t *dev, uint8_t options)
|
||||
{ initI2C(dev, options); }
|
||||
U8GLIB(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw, uint8_t reset)
|
||||
{ init8Bit(dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset); }
|
||||
U8GLIB(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset)
|
||||
{ initRW8Bit(dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset); }
|
||||
|
||||
uint8_t begin(void) { is_begin = 1; return u8g_Begin(&u8g); }
|
||||
|
||||
void setPrintPos(u8g_uint_t x, u8g_uint_t y) { tx = x; ty = y; }
|
||||
u8g_t *getU8g(void) { return &u8g; }
|
||||
|
||||
|
||||
/* implementation of the write interface to the print class */
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
size_t write(uint8_t c) { tx += u8g_DrawGlyph(&u8g, tx, ty, c); return 1;}
|
||||
#else
|
||||
void write(uint8_t c) { tx += u8g_DrawGlyph(&u8g, tx, ty, c); }
|
||||
#endif
|
||||
|
||||
/* screen rotation */
|
||||
void undoRotation(void) { u8g_UndoRotation(&u8g); }
|
||||
void setRot90(void) { u8g_SetRot90(&u8g); }
|
||||
void setRot180(void) { u8g_SetRot180(&u8g); }
|
||||
void setRot270(void) { u8g_SetRot270(&u8g); }
|
||||
|
||||
/* screen scaling */
|
||||
void undoScale(void) { u8g_UndoScale(&u8g); }
|
||||
void setScale2x2(void) { u8g_SetScale2x2(&u8g); }
|
||||
|
||||
/* picture loop */
|
||||
void firstPage(void) { cbegin(); u8g_FirstPage(&u8g); }
|
||||
uint8_t nextPage(void) { return u8g_NextPage(&u8g); }
|
||||
|
||||
/* system commands */
|
||||
uint8_t setContrast(uint8_t contrast) { cbegin(); return u8g_SetContrast(&u8g, contrast); }
|
||||
void sleepOn(void) { u8g_SleepOn(&u8g); }
|
||||
void sleepOff(void) { u8g_SleepOff(&u8g); }
|
||||
|
||||
/* graphic primitives */
|
||||
void setColorIndex(uint8_t color_index) { u8g_SetColorIndex(&u8g, color_index); }
|
||||
uint8_t getColorIndex(void) { return u8g_GetColorIndex(&u8g); }
|
||||
|
||||
void setDefaultForegroundColor(void) { u8g_SetDefaultForegroundColor(&u8g); }
|
||||
void setDefaultBackgroundColor(void) { u8g_SetDefaultBackgroundColor(&u8g); }
|
||||
void setDefaultMidColor(void) { u8g_SetDefaultMidColor(&u8g); }
|
||||
|
||||
u8g_uint_t getWidth(void) { return u8g_GetWidth(&u8g); }
|
||||
u8g_uint_t getHeight(void) { return u8g_GetHeight(&u8g); }
|
||||
uint8_t getMode(void) { return u8g_GetMode(&u8g); }
|
||||
|
||||
void drawPixel(u8g_uint_t x, u8g_uint_t y) { return u8g_DrawPixel(&u8g, x, y); }
|
||||
void drawHLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w) { u8g_DrawHLine(&u8g, x, y, w); }
|
||||
void drawVLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t h) { u8g_DrawVLine(&u8g, x, y, h); }
|
||||
void drawLine(u8g_uint_t x1, u8g_uint_t y1, u8g_uint_t x2, u8g_uint_t y2) { u8g_DrawLine(&u8g, x1, y1, x2, y2); }
|
||||
|
||||
void drawFrame(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h) { u8g_DrawFrame(&u8g, x, y, w, h); }
|
||||
void drawRFrame(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, u8g_uint_t r) { u8g_DrawRFrame(&u8g, x, y, w, h,r); }
|
||||
void drawBox(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h) { u8g_DrawBox(&u8g, x, y, w, h); }
|
||||
void drawRBox(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, u8g_uint_t r) { u8g_DrawRBox(&u8g, x, y, w, h,r); }
|
||||
|
||||
void drawCircle(u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t opt = U8G_DRAW_ALL) { u8g_DrawCircle(&u8g, x0, y0, rad, opt); }
|
||||
void drawDisc(u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t opt = U8G_DRAW_ALL) { u8g_DrawDisc(&u8g, x0, y0, rad, opt); }
|
||||
|
||||
/* bitmap handling */
|
||||
void drawBitmap(u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const uint8_t *bitmap)
|
||||
{ u8g_DrawBitmap(&u8g, x, y, cnt, h, bitmap); }
|
||||
void drawBitmapP(u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
|
||||
{ u8g_DrawBitmapP(&u8g, x, y, cnt, h, bitmap); }
|
||||
|
||||
void drawXBM(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const uint8_t *bitmap)
|
||||
{ u8g_DrawXBM(&u8g, x, y, w, h, bitmap); }
|
||||
void drawXBMP(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
|
||||
{ u8g_DrawXBMP(&u8g, x, y, w, h, bitmap); }
|
||||
|
||||
|
||||
/* font handling */
|
||||
void setFont(const u8g_fntpgm_uint8_t *font) {u8g_SetFont(&u8g, font); }
|
||||
int8_t getFontAscent(void) { return u8g_GetFontAscent(&u8g); }
|
||||
int8_t getFontDescent(void) { return u8g_GetFontDescent(&u8g); }
|
||||
int8_t getFontLineSpacing(void) { return u8g_GetFontLineSpacing(&u8g); }
|
||||
|
||||
u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr90(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr90(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr180(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr180(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr270(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr270(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStrP(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStrP(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr90P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr90P(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr180P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr180P(&u8g, x, y, s); }
|
||||
u8g_uint_t drawStr270P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr270P(&u8g, x, y, s); }
|
||||
|
||||
void setFontPosBaseline(void) { u8g_SetFontPosBaseline(&u8g); }
|
||||
void setFontPosBottom(void) { u8g_SetFontPosBottom(&u8g); }
|
||||
void setFontPosCenter(void) { u8g_SetFontPosCenter(&u8g); }
|
||||
void setFontPosTop(void) { u8g_SetFontPosTop(&u8g); }
|
||||
|
||||
void setFontRefHeightText(void) { u8g_SetFontRefHeightText(&u8g); }
|
||||
void setFontRefHeightExtendedText(void) { u8g_SetFontRefHeightExtendedText(&u8g); }
|
||||
void setFontRefHeightAll(void) { u8g_SetFontRefHeightAll(&u8g); }
|
||||
void setFontLineSpacingFactor(uint8_t factor) { u8g_SetFontLineSpacingFactor(&u8g, factor); }
|
||||
|
||||
|
||||
u8g_uint_t getStrPixelWidth(const char *s) { return u8g_GetStrPixelWidth(&u8g, s); }
|
||||
u8g_uint_t getStrPixelWidthP(u8g_pgm_uint8_t *s) { return u8g_GetStrPixelWidthP(&u8g, s); }
|
||||
u8g_uint_t getStrWidth(const char *s) { return u8g_GetStrWidth(&u8g, s); }
|
||||
u8g_uint_t getStrWidthP(u8g_pgm_uint8_t *s) { return u8g_GetStrWidthP(&u8g, s); }
|
||||
|
||||
void setHardwareBackup(u8g_state_cb backup_cb) { u8g_SetHardwareBackup(&u8g, backup_cb); }
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
// support for the F() macro
|
||||
|
||||
u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStrP(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
|
||||
u8g_uint_t drawStr90(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr90P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
|
||||
u8g_uint_t drawStr180(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr180P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
|
||||
u8g_uint_t drawStr270(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr270P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
|
||||
|
||||
u8g_uint_t getStrPixelWidth(const __FlashStringHelper *s) { return u8g_GetStrPixelWidthP(&u8g, (u8g_pgm_uint8_t *)s); }
|
||||
u8g_uint_t getStrWidth(const __FlashStringHelper *s) { return u8g_GetStrWidthP(&u8g, (u8g_pgm_uint8_t *)s); }
|
||||
#endif
|
||||
|
||||
/* cursor handling */
|
||||
void setCursorFont(const u8g_pgm_uint8_t *cursor_font) { u8g_SetCursorFont(&u8g, cursor_font); }
|
||||
void setCursorStyle(uint8_t encoding) { u8g_SetCursorStyle(&u8g, encoding); }
|
||||
void setCursorPos(u8g_uint_t cursor_x, u8g_uint_t cursor_y) { u8g_SetCursorPos(&u8g, cursor_x, cursor_y); }
|
||||
void setCursorColor(uint8_t fg, uint8_t bg) { u8g_SetCursorColor(&u8g, fg, bg); }
|
||||
void enableCursor(void) { u8g_EnableCursor(&u8g); }
|
||||
void disableCursor(void) { u8g_DisableCursor(&u8g); }
|
||||
void drawCursor(void) { u8g_DrawCursor(&u8g); }
|
||||
|
||||
/* virtual screen */
|
||||
|
||||
void setVirtualScreenDimension(u8g_uint_t width, u8g_uint_t height) { u8g_SetVirtualScreenDimension(&u8g, width, height); }
|
||||
uint8_t addToVirtualScreen(u8g_uint_t x, u8g_uint_t y, U8GLIB &child_u8g) { return u8g_AddToVirtualScreen(&u8g, x, y, &child_u8g.u8g); }
|
||||
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_DOGS102 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGS102(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1701_dogs102_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGS102(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1701_dogs102_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_MINI12864 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_MINI12864(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1701_mini12864_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_MINI12864(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1701_mini12864_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_DOGM132 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGM132(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_dogm132_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGM132(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_dogm132_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD_C12832 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD_C12832(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_nhd_c12832_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD_C12832(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_nhd_c12832_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD_C12832(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_nhd_c12832_parallel, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_DOGM128 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGM128(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_dogm128_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGM128(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_dogm128_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_LM6059 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LM6059(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_lm6059_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_LM6059(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_lm6059_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_LM6063 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LM6063(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_lm6063_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_LM6063(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_lm6063_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_64128N : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_64128N(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_64128n_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_64128N(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_64128n_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD_C12864 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD_C12864(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_nhd_c12864_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD_C12864(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7565_nhd_c12864_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_ST7920_128X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
|
||||
{ }
|
||||
// U8GLIB_ST7920_128X64(uint8_t cs)
|
||||
// : U8GLIB(&u8g_dev_st7920_128x64_sw_spi, cs, U8G_PIN_NONE, U8G_PIN_NONE)
|
||||
// { }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_128X64_1X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_128X64_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_128X64_4X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_128X64_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_4x_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_128X64_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_128x64_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
|
||||
class U8GLIB_ST7920_192X32 : public U8GLIB // OBSOLETE, use U8GLIB_ST7920_192X32_1X instead
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_192X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_192X32_1X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_192X32_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_192X32_4X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_192X32_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_4x_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_192X32_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_192x32_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_ST7920_202X32 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_202X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_202X32_1X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_202X32_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ST7920_202X32_4X : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7920_202X32_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_4x_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||
{ }
|
||||
U8GLIB_ST7920_202X32_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7920_202x32_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset) // cs1 = cs2 = U8G_PIN_NONE
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_LC7981_160X80 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LC7981_160X80(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_lc7981_160x80_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_LC7981_240X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LC7981_240X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_lc7981_240x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_LC7981_240X128 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LC7981_240X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_lc7981_240x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
// 16 bit mode required: Remove comment from "#define U8G_16BIT 1" in utility/u8g.h
|
||||
class U8GLIB_LC7981_320X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_LC7981_320X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_lc7981_320x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
|
||||
class U8GLIB_DOGXL160_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGXL160_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGXL160_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_DOGXL160_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGXL160_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGXL160_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_DOGXL160_2X_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGXL160_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGXL160_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_2x_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_DOGXL160_2X_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_DOGXL160_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_DOGXL160_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_uc1610_dogxl160_2x_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_NHD27OLED_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD27OLED_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_BW(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_parallel, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD27OLED_2X_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD27OLED_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_2X_BW(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_parallel, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD31OLED_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD31OLED_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD31OLED_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD31OLED_2X_BW : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD31OLED_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD31OLED_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_bw_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD31OLED_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD31OLED_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD31OLED_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD31OLED_2X_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD31OLED_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD31OLED_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_SSD1306_128X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SSD1306_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x64_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1306_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x64_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1306_128X64(uint8_t options = U8G_I2C_OPT_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x64_i2c, options)
|
||||
{ }
|
||||
|
||||
};
|
||||
|
||||
class U8GLIB_SSD1309_128X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SSD1309_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1309_128x64_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1309_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1309_128x64_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1309_128X64(uint8_t options = U8G_I2C_OPT_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1309_128x64_i2c, options)
|
||||
{ }
|
||||
|
||||
};
|
||||
|
||||
class U8GLIB_SSD1306_128X32 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SSD1306_128X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x32_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1306_128X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x32_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1306_128X32(uint8_t options = U8G_I2C_OPT_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1306_128x32_i2c, options)
|
||||
{ }
|
||||
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_NHD27OLED_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD27OLED_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_NHD27OLED_2X_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_NHD27OLED_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_NHD27OLED_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_SSD1327_96X96_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SSD1327_96X96_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1327_96X96_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1327_96X96_GR(uint8_t options = U8G_I2C_OPT_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_gr_i2c, options)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_SSD1327_96X96_2X_GR : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SSD1327_96X96_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1327_96X96_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_hw_spi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_SSD1327_96X96_2X_GR(uint8_t options = U8G_I2C_OPT_NONE)
|
||||
: U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_i2c, options)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_PCF8812 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_PCF8812(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_pcf8812_96x65_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_PCD8544 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_PCD8544(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_pcd8544_84x48_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_TLS8204_84X48 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_TLS8204_84X48(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_tls8204_84x48_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_KS0108_128 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_KS0108_128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ks0108_128x64_fast, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_SBN1661_122X32 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_SBN1661_122X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_sbn1661_122x32, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs1, cs2, di, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_T6963_240X128 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_T6963_240X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_t6963_240x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_T6963_240X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_T6963_240X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_t6963_240x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_T6963_128X64 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_T6963_128X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_t6963_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
class U8GLIB_ST7687_C144MVGD: public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_ST7687_C144MVGD(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_st7687_c144mvgd_sw_spi, sck, mosi, cs, a0, reset)
|
||||
{ }
|
||||
U8GLIB_ST7687_C144MVGD(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs, uint8_t a0, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ks0108_128x64_fast, d0, d1, d2, d3, d4, d5, d6, d7, en, cs, U8G_PIN_NONE, a0, rw, reset)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_ILI9325D_320x240 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
/*
|
||||
U8GLIB_ILI9325D_320x240(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
|
||||
uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
: U8GLIB(&u8g_dev_ili9325d_320x240_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
|
||||
{ }
|
||||
*/
|
||||
U8GLIB_ILI9325D_320x240( uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)
|
||||
{ init8BitFixedPort(&u8g_dev_ili9325d_320x240_8bit, en, cs1, di, rw, reset); }
|
||||
};
|
||||
|
||||
class U8GLIB_FLIPDISC_2X7 : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_FLIPDISC_2X7(void) : U8GLIB(&u8g_dev_flipdisc_2x7)
|
||||
{ }
|
||||
};
|
||||
|
||||
class U8GLIB_VS : public U8GLIB
|
||||
{
|
||||
public:
|
||||
U8GLIB_VS(void) : U8GLIB(&u8g_dev_vs)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
#endif /* _CPP_U8GLIB */
|
@ -1,130 +0,0 @@
|
||||
/*
|
||||
|
||||
Bitmap.pde
|
||||
|
||||
Show simple bitmap
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
const uint8_t rook_bitmap[] PROGMEM = {
|
||||
0x00, // 00000000
|
||||
0x55, // 01010101
|
||||
0x7f, // 01111111
|
||||
0x3e, // 00111110
|
||||
0x3e, // 00111110
|
||||
0x3e, // 00111110
|
||||
0x3e, // 00111110
|
||||
0x7f // 01111111
|
||||
};
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.drawBitmapP( 0, 0, 1, 8, rook_bitmap);
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(1000);
|
||||
}
|
||||
|
@ -1,180 +0,0 @@
|
||||
/*
|
||||
|
||||
Chess.pde
|
||||
|
||||
Little Rook Chess
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
// DOGS102 shield configuration values
|
||||
uint8_t uiKeyPrev = 2;
|
||||
uint8_t uiKeyNext = 4;
|
||||
uint8_t uiKeySelect = 5;
|
||||
uint8_t uiKeyBack = 3;
|
||||
|
||||
// DOGM128-Shield configuration values
|
||||
// DOGXL60-Shield configuration values
|
||||
//uint8_t uiKeyPrev = 7;
|
||||
//uint8_t uiKeyNext = 3;
|
||||
//uint8_t uiKeySelect = 2;
|
||||
//uint8_t uiKeyBack = 8;
|
||||
|
||||
uint8_t uiKeyCodeFirst = CHESS_KEY_NONE;
|
||||
uint8_t uiKeyCodeSecond = CHESS_KEY_NONE;
|
||||
uint8_t uiKeyCode = CHESS_KEY_NONE;
|
||||
|
||||
|
||||
void uiSetup(void) {
|
||||
// configure input keys
|
||||
|
||||
pinMode(uiKeyPrev, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyPrev, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeyNext, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyNext, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeySelect, INPUT); // set pin to input
|
||||
digitalWrite(uiKeySelect, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeyBack, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyBack, HIGH); // turn on pullup resistors
|
||||
}
|
||||
|
||||
void uiStep(void)
|
||||
{
|
||||
uiKeyCodeSecond = uiKeyCodeFirst;
|
||||
if ( digitalRead(uiKeyPrev) == LOW )
|
||||
uiKeyCodeFirst = CHESS_KEY_PREV;
|
||||
else if ( digitalRead(uiKeyNext) == LOW )
|
||||
uiKeyCodeFirst = CHESS_KEY_NEXT;
|
||||
else if ( digitalRead(uiKeySelect) == LOW )
|
||||
uiKeyCodeFirst = CHESS_KEY_SELECT;
|
||||
else if ( digitalRead(uiKeyBack) == LOW )
|
||||
uiKeyCodeFirst = CHESS_KEY_BACK;
|
||||
else
|
||||
uiKeyCodeFirst = CHESS_KEY_NONE;
|
||||
|
||||
if ( uiKeyCodeSecond == uiKeyCodeFirst )
|
||||
uiKeyCode = uiKeyCodeFirst;
|
||||
else
|
||||
uiKeyCode = CHESS_KEY_NONE;
|
||||
}
|
||||
|
||||
|
||||
void setup() {
|
||||
// rotate screen, if required
|
||||
u8g.setRot180();
|
||||
|
||||
uiSetup();
|
||||
chess_Init(u8g.getU8g(), 0);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
uint8_t keyCode = CHESS_KEY_NONE;
|
||||
|
||||
u8g.firstPage();
|
||||
do {
|
||||
chess_Draw();
|
||||
uiStep();
|
||||
if ( uiKeyCode != CHESS_KEY_NONE )
|
||||
keyCode = uiKeyCode;
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
u8g_Delay(10);
|
||||
chess_Step(keyCode);
|
||||
uiStep();
|
||||
keyCode = uiKeyCode;
|
||||
}
|
||||
|
||||
|
@ -1,230 +0,0 @@
|
||||
/*
|
||||
|
||||
Console.pde
|
||||
|
||||
Read from serial monitor, output to display
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
// setup input buffer
|
||||
#define LINE_MAX 30
|
||||
uint8_t line_buf[LINE_MAX] = "U8GLIB Console";
|
||||
uint8_t line_pos = 0;
|
||||
|
||||
// setup a text screen to support scrolling
|
||||
#define ROW_MAX 12
|
||||
|
||||
|
||||
uint8_t screen[ROW_MAX][LINE_MAX];
|
||||
uint8_t rows, cols;
|
||||
|
||||
// line height, which matches the selected font (5x7)
|
||||
#define LINE_PIXEL_HEIGHT 7
|
||||
|
||||
// clear entire screen, called during setup
|
||||
void clear_screen(void) {
|
||||
uint8_t i, j;
|
||||
for( i = 0; i < ROW_MAX; i++ )
|
||||
for( j = 0; j < LINE_MAX; j++ )
|
||||
screen[i][j] = 0;
|
||||
}
|
||||
|
||||
// append a line to the screen, scroll up
|
||||
void add_line_to_screen(void) {
|
||||
uint8_t i, j;
|
||||
for( j = 0; j < LINE_MAX; j++ )
|
||||
for( i = 0; i < rows-1; i++ )
|
||||
screen[i][j] = screen[i+1][j];
|
||||
|
||||
for( j = 0; j < LINE_MAX; j++ )
|
||||
screen[rows-1][j] = line_buf[j];
|
||||
}
|
||||
|
||||
// U8GLIB draw procedure: output the screen
|
||||
void draw(void) {
|
||||
uint8_t i, y;
|
||||
// graphic commands to redraw the complete screen are placed here
|
||||
y = 0; // reference is the top left -1 position of the string
|
||||
y--; // correct the -1 position of the drawStr
|
||||
for( i = 0; i < rows; i++ )
|
||||
{
|
||||
u8g.drawStr( 0, y, (char *)(screen[i]));
|
||||
y += u8g.getFontLineSpacing();
|
||||
}
|
||||
}
|
||||
|
||||
void exec_line(void) {
|
||||
// echo line to the serial monitor
|
||||
Serial.println((const char *)line_buf);
|
||||
|
||||
// add the line to the screen
|
||||
add_line_to_screen();
|
||||
|
||||
// U8GLIB picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
}
|
||||
|
||||
// clear current input buffer
|
||||
void reset_line(void) {
|
||||
line_pos = 0;
|
||||
line_buf[line_pos] = '\0';
|
||||
}
|
||||
|
||||
// add a single character to the input buffer
|
||||
void char_to_line(uint8_t c) {
|
||||
line_buf[line_pos] = c;
|
||||
line_pos++;
|
||||
line_buf[line_pos] = '\0';
|
||||
}
|
||||
|
||||
// check serial in and handle the character
|
||||
void read_line(void) {
|
||||
if ( Serial.available() )
|
||||
{
|
||||
uint8_t c;
|
||||
c = Serial.read();
|
||||
if ( line_pos >= cols-1 ) {
|
||||
exec_line();
|
||||
reset_line();
|
||||
char_to_line(c);
|
||||
}
|
||||
else if ( c == '\n' ) {
|
||||
// ignore '\n'
|
||||
}
|
||||
else if ( c == '\r' ) {
|
||||
exec_line();
|
||||
reset_line();
|
||||
}
|
||||
else {
|
||||
char_to_line(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Arduino master setup
|
||||
void setup(void) {
|
||||
// set font for the console window
|
||||
u8g.setFont(u8g_font_5x7);
|
||||
//u8g.setFont(u8g_font_9x15);
|
||||
|
||||
// set upper left position for the string draw procedure
|
||||
u8g.setFontPosTop();
|
||||
|
||||
// calculate the number of rows for the display
|
||||
rows = u8g.getHeight() / u8g.getFontLineSpacing();
|
||||
if ( rows > ROW_MAX )
|
||||
rows = ROW_MAX;
|
||||
|
||||
// estimate the number of columns for the display
|
||||
cols = u8g.getWidth() / u8g.getStrWidth("m");
|
||||
if ( cols > LINE_MAX-1 )
|
||||
cols = LINE_MAX-1;
|
||||
|
||||
clear_screen(); // clear screen
|
||||
delay(1000); // do some delay
|
||||
Serial.begin(9600); // init serial
|
||||
exec_line(); // place the input buffer into the screen
|
||||
reset_line(); // clear input buffer
|
||||
}
|
||||
|
||||
// Arduino main loop
|
||||
void loop(void) {
|
||||
read_line();
|
||||
}
|
||||
|
@ -1,139 +0,0 @@
|
||||
/*
|
||||
|
||||
F.pde
|
||||
|
||||
Example code for the F() macro.
|
||||
|
||||
>>> This example requires Arduino 1.0 and above.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
|
||||
// assign default font
|
||||
u8g.setFont(u8g_font_unifont);
|
||||
|
||||
// pointer to strings in flash memory can be stored in a special type
|
||||
const __FlashStringHelper *flash_ptr;
|
||||
|
||||
// the result of the F() macro can be assigned to this pointer
|
||||
flash_ptr = F("Hello World!");
|
||||
|
||||
// this pointer can be used as argument to the draw procedures
|
||||
u8g.drawStr( 0+1, 20+1, flash_ptr);
|
||||
u8g.drawStr( 0, 20, flash_ptr);
|
||||
|
||||
// of course, the F() macro can be used directly
|
||||
u8g.drawStr( 0, 40, F("PROGMEM"));
|
||||
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
// flip screen, if required
|
||||
// u8g.setRot180();
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(500);
|
||||
}
|
||||
|
@ -1,223 +0,0 @@
|
||||
/*
|
||||
|
||||
GraphicsTest.pde
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
void u8g_prepare(void) {
|
||||
u8g.setFont(u8g_font_6x10);
|
||||
u8g.setFontRefHeightExtendedText();
|
||||
u8g.setDefaultForegroundColor();
|
||||
u8g.setFontPosTop();
|
||||
}
|
||||
|
||||
void u8g_box_frame(uint8_t a) {
|
||||
u8g.drawStr( 0, 0, "drawBox");
|
||||
u8g.drawBox(5,10,20,10);
|
||||
u8g.drawBox(10+a,15,30,7);
|
||||
u8g.drawStr( 0, 30, "drawFrame");
|
||||
u8g.drawFrame(5,10+30,20,10);
|
||||
u8g.drawFrame(10+a,15+30,30,7);
|
||||
}
|
||||
|
||||
void u8g_disc_circle(uint8_t a) {
|
||||
u8g.drawStr( 0, 0, "drawDisc");
|
||||
u8g.drawDisc(10,18,9);
|
||||
u8g.drawDisc(24+a,16,7);
|
||||
u8g.drawStr( 0, 30, "drawCircle");
|
||||
u8g.drawCircle(10,18+30,9);
|
||||
u8g.drawCircle(24+a,16+30,7);
|
||||
}
|
||||
|
||||
void u8g_r_frame(uint8_t a) {
|
||||
u8g.drawStr( 0, 0, "drawRFrame/Box");
|
||||
u8g.drawRFrame(5, 10,40,30, a+1);
|
||||
u8g.drawRBox(50, 10,25,40, a+1);
|
||||
}
|
||||
|
||||
void u8g_string(uint8_t a) {
|
||||
u8g.drawStr(30+a,31, " 0");
|
||||
u8g.drawStr90(30,31+a, " 90");
|
||||
u8g.drawStr180(30-a,31, " 180");
|
||||
u8g.drawStr270(30,31-a, " 270");
|
||||
}
|
||||
|
||||
void u8g_line(uint8_t a) {
|
||||
u8g.drawStr( 0, 0, "drawLine");
|
||||
u8g.drawLine(7+a, 10, 40, 55);
|
||||
u8g.drawLine(7+a*2, 10, 60, 55);
|
||||
u8g.drawLine(7+a*3, 10, 80, 55);
|
||||
u8g.drawLine(7+a*4, 10, 100, 55);
|
||||
}
|
||||
|
||||
void u8g_ascii_1() {
|
||||
char s[2] = " ";
|
||||
uint8_t x, y;
|
||||
u8g.drawStr( 0, 0, "ASCII page 1");
|
||||
for( y = 0; y < 6; y++ ) {
|
||||
for( x = 0; x < 16; x++ ) {
|
||||
s[0] = y*16 + x + 32;
|
||||
u8g.drawStr(x*7, y*10+10, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_ascii_2() {
|
||||
char s[2] = " ";
|
||||
uint8_t x, y;
|
||||
u8g.drawStr( 0, 0, "ASCII page 2");
|
||||
for( y = 0; y < 6; y++ ) {
|
||||
for( x = 0; x < 16; x++ ) {
|
||||
s[0] = y*16 + x + 160;
|
||||
u8g.drawStr(x*7, y*10+10, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t draw_state = 0;
|
||||
|
||||
void draw(void) {
|
||||
u8g_prepare();
|
||||
switch(draw_state >> 3) {
|
||||
case 0: u8g_box_frame(draw_state&7); break;
|
||||
case 1: u8g_disc_circle(draw_state&7); break;
|
||||
case 2: u8g_r_frame(draw_state&7); break;
|
||||
case 3: u8g_string(draw_state&7); break;
|
||||
case 4: u8g_line(draw_state&7); break;
|
||||
case 5: u8g_ascii_1(); break;
|
||||
case 6: u8g_ascii_2(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
|
||||
// flip screen, if required
|
||||
//u8g.setRot180();
|
||||
|
||||
// assign default color value
|
||||
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
|
||||
u8g.setColorIndex(255); // white
|
||||
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
|
||||
u8g.setColorIndex(3); // max intensity
|
||||
else if ( u8g.getMode() == U8G_MODE_BW )
|
||||
u8g.setColorIndex(1); // pixel on
|
||||
|
||||
//u8g.setContrast(0x30);
|
||||
|
||||
pinMode(13, OUTPUT);
|
||||
digitalWrite(13, HIGH);
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// increase the state
|
||||
draw_state++;
|
||||
if ( draw_state >= 7*8 )
|
||||
draw_state = 0;
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(150);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,136 +0,0 @@
|
||||
/*
|
||||
|
||||
HelloWorld.pde
|
||||
|
||||
"Hello World!" example code.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.setFont(u8g_font_unifont);
|
||||
//u8g.setFont(u8g_font_osb21);
|
||||
u8g.drawStr( 0, 22, "Hello World!");
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
|
||||
// flip screen, if required
|
||||
// u8g.setRot180();
|
||||
|
||||
// set SPI backup if required
|
||||
//u8g.setHardwareBackup(u8g_backup_avr_spi);
|
||||
|
||||
// assign default color value
|
||||
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
|
||||
u8g.setColorIndex(255); // white
|
||||
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
|
||||
u8g.setColorIndex(3); // max intensity
|
||||
else if ( u8g.getMode() == U8G_MODE_BW )
|
||||
u8g.setColorIndex(1); // pixel on
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(500);
|
||||
}
|
||||
|
@ -1,234 +0,0 @@
|
||||
/*
|
||||
|
||||
Menu.pde
|
||||
|
||||
Simple Menu Selection
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
#define KEY_NONE 0
|
||||
#define KEY_PREV 1
|
||||
#define KEY_NEXT 2
|
||||
#define KEY_SELECT 3
|
||||
#define KEY_BACK 4
|
||||
|
||||
// DOGS102 shield configuration values
|
||||
//uint8_t uiKeyPrev = 2;
|
||||
//uint8_t uiKeyNext = 4;
|
||||
//uint8_t uiKeySelect = 5;
|
||||
//uint8_t uiKeyBack = 3;
|
||||
|
||||
// DOGM128-Shield configuration values
|
||||
// DOGXL60-Shield configuration values
|
||||
uint8_t uiKeyPrev = 7;
|
||||
uint8_t uiKeyNext = 3;
|
||||
uint8_t uiKeySelect = 2;
|
||||
uint8_t uiKeyBack = 8;
|
||||
|
||||
uint8_t uiKeyCodeFirst = KEY_NONE;
|
||||
uint8_t uiKeyCodeSecond = KEY_NONE;
|
||||
uint8_t uiKeyCode = KEY_NONE;
|
||||
|
||||
|
||||
void uiSetup(void) {
|
||||
// configure input keys
|
||||
|
||||
pinMode(uiKeyPrev, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyPrev, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeyNext, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyNext, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeySelect, INPUT); // set pin to input
|
||||
digitalWrite(uiKeySelect, HIGH); // turn on pullup resistors
|
||||
pinMode(uiKeyBack, INPUT); // set pin to input
|
||||
digitalWrite(uiKeyBack, HIGH); // turn on pullup resistors
|
||||
}
|
||||
|
||||
void uiStep(void) {
|
||||
uiKeyCodeSecond = uiKeyCodeFirst;
|
||||
if ( digitalRead(uiKeyPrev) == LOW )
|
||||
uiKeyCodeFirst = KEY_PREV;
|
||||
else if ( digitalRead(uiKeyNext) == LOW )
|
||||
uiKeyCodeFirst = KEY_NEXT;
|
||||
else if ( digitalRead(uiKeySelect) == LOW )
|
||||
uiKeyCodeFirst = KEY_SELECT;
|
||||
else if ( digitalRead(uiKeyBack) == LOW )
|
||||
uiKeyCodeFirst = KEY_BACK;
|
||||
else
|
||||
uiKeyCodeFirst = KEY_NONE;
|
||||
|
||||
if ( uiKeyCodeSecond == uiKeyCodeFirst )
|
||||
uiKeyCode = uiKeyCodeFirst;
|
||||
else
|
||||
uiKeyCode = KEY_NONE;
|
||||
}
|
||||
|
||||
|
||||
#define MENU_ITEMS 4
|
||||
char *menu_strings[MENU_ITEMS] = { "First Line", "Second Item", "3333333", "abcdefg" };
|
||||
|
||||
uint8_t menu_current = 0;
|
||||
uint8_t menu_redraw_required = 0;
|
||||
uint8_t last_key_code = KEY_NONE;
|
||||
|
||||
|
||||
void drawMenu(void) {
|
||||
uint8_t i, h;
|
||||
u8g_uint_t w, d;
|
||||
|
||||
u8g.setFont(u8g_font_6x13);
|
||||
u8g.setFontRefHeightText();
|
||||
u8g.setFontPosTop();
|
||||
|
||||
h = u8g.getFontAscent()-u8g.getFontDescent();
|
||||
w = u8g.getWidth();
|
||||
for( i = 0; i < MENU_ITEMS; i++ ) {
|
||||
d = (w-u8g.getStrWidth(menu_strings[i]))/2;
|
||||
u8g.setDefaultForegroundColor();
|
||||
if ( i == menu_current ) {
|
||||
u8g.drawBox(0, i*h+1, w, h);
|
||||
u8g.setDefaultBackgroundColor();
|
||||
}
|
||||
u8g.drawStr(d, i*h, menu_strings[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void updateMenu(void) {
|
||||
if ( uiKeyCode != KEY_NONE && last_key_code == uiKeyCode ) {
|
||||
return;
|
||||
}
|
||||
last_key_code = uiKeyCode;
|
||||
|
||||
switch ( uiKeyCode ) {
|
||||
case KEY_NEXT:
|
||||
menu_current++;
|
||||
if ( menu_current >= MENU_ITEMS )
|
||||
menu_current = 0;
|
||||
menu_redraw_required = 1;
|
||||
break;
|
||||
case KEY_PREV:
|
||||
if ( menu_current == 0 )
|
||||
menu_current = MENU_ITEMS;
|
||||
menu_current--;
|
||||
menu_redraw_required = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void setup() {
|
||||
// rotate screen, if required
|
||||
// u8g.setRot180();
|
||||
|
||||
uiSetup(); // setup key detection and debounce algorithm
|
||||
menu_redraw_required = 1; // force initial redraw
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
uiStep(); // check for key press
|
||||
|
||||
if ( menu_redraw_required != 0 ) {
|
||||
u8g.firstPage();
|
||||
do {
|
||||
drawMenu();
|
||||
} while( u8g.nextPage() );
|
||||
menu_redraw_required = 0;
|
||||
}
|
||||
|
||||
updateMenu(); // update menu bar
|
||||
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
/*
|
||||
|
||||
PrintTest.pde
|
||||
|
||||
How to use the base class "Print"
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.setFont(u8g_font_unifont);
|
||||
u8g.setPrintPos(0, 20);
|
||||
// call procedure from base class, http://arduino.cc/en/Serial/Print
|
||||
u8g.print("Hello World!");
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
// flip screen, if required
|
||||
// u8g.setRot180();
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(500);
|
||||
}
|
||||
|
@ -1,152 +0,0 @@
|
||||
/*
|
||||
|
||||
HelloWorld.pde
|
||||
|
||||
"Hello World!" example code.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
uint8_t offset = 0;
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.setFont(u8g_font_unifont);
|
||||
u8g.drawStr( 0+0, 20+0, "Hello!");
|
||||
u8g.drawStr( 0+2, 20+16, "Hello!");
|
||||
|
||||
u8g.drawBox(0, 0, 3, 3);
|
||||
u8g.drawBox(u8g.getWidth()-6, 0, 6, 6);
|
||||
u8g.drawBox(u8g.getWidth()-9, u8g.getHeight()-9, 9, 9);
|
||||
u8g.drawBox(0, u8g.getHeight()-12, 12, 12);
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
}
|
||||
|
||||
|
||||
void rotate(void) {
|
||||
static uint8_t dir = 0;
|
||||
static unsigned long next_rotation = 0;
|
||||
|
||||
if ( next_rotation < millis() )
|
||||
{
|
||||
switch(dir) {
|
||||
case 0: u8g.undoRotation(); break;
|
||||
case 1: u8g.setRot90(); break;
|
||||
case 2: u8g.setRot180(); break;
|
||||
case 3: u8g.setRot270(); offset = ( offset + 1 ) & 0x0f; break;
|
||||
}
|
||||
|
||||
dir++;
|
||||
dir &= 3;
|
||||
next_rotation = millis();
|
||||
next_rotation += 1000;
|
||||
}
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// screen rotation
|
||||
rotate();
|
||||
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(100);
|
||||
}
|
||||
|
@ -1,141 +0,0 @@
|
||||
/*
|
||||
|
||||
HelloWorld.pde
|
||||
|
||||
"Hello World!" example code.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.setFont(u8g_font_unifont);
|
||||
u8g.setFontPosTop();
|
||||
u8g.drawStr(0, 1, "Hello");
|
||||
u8g.drawHLine(0, 1+14, 40);
|
||||
u8g.setScale2x2(); // Scale up all draw procedures
|
||||
u8g.drawStr(0, 12, "Hello"); // actual display position is (0,24)
|
||||
u8g.drawHLine(0, 12+14, 40); // All other procedures are also affected
|
||||
u8g.undoScale(); // IMPORTANT: Switch back to normal mode
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
|
||||
// flip screen, if required
|
||||
u8g.setRot180();
|
||||
|
||||
// set SPI backup if required
|
||||
//u8g.setHardwareBackup(u8g_backup_avr_spi);
|
||||
|
||||
// assign default color value
|
||||
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
|
||||
u8g.setColorIndex(255); // white
|
||||
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
|
||||
u8g.setColorIndex(3); // max intensity
|
||||
else if ( u8g.getMode() == U8G_MODE_BW )
|
||||
u8g.setColorIndex(1); // pixel on
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(500);
|
||||
}
|
||||
|
@ -1,154 +0,0 @@
|
||||
/*
|
||||
|
||||
TextRotX.pde
|
||||
|
||||
Text rotation example code.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
void draw(void) {
|
||||
u8g_uint_t mx, my;
|
||||
|
||||
mx = u8g.getWidth();
|
||||
mx >>= 1;
|
||||
|
||||
my = u8g.getHeight();
|
||||
my >>= 1;
|
||||
|
||||
u8g.drawStr( mx, my, "Ag");
|
||||
u8g.drawStr90( mx, my, "Ag");
|
||||
u8g.drawStr180( mx, my, "Ag");
|
||||
u8g.drawStr270( mx, my, "Ag");
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
u8g.setFont(u8g_font_9x18);
|
||||
}
|
||||
|
||||
void change_font_pos(void) {
|
||||
static uint8_t dir = 0;
|
||||
static unsigned long next = 0;
|
||||
|
||||
if ( next < millis() )
|
||||
{
|
||||
switch(dir) {
|
||||
case 0: u8g.setFontPosBottom(); break;
|
||||
case 1: u8g.setFontPosBaseline(); break;
|
||||
case 2: u8g.setFontPosCenter(); break;
|
||||
case 3: u8g.setFontPosTop(); break;
|
||||
}
|
||||
|
||||
dir++;
|
||||
dir &= 3;
|
||||
next = millis();
|
||||
next += 1000;
|
||||
}
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// change the font position
|
||||
change_font_pos();
|
||||
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(100);
|
||||
}
|
||||
|
@ -1,179 +0,0 @@
|
||||
/*
|
||||
|
||||
U8gLogo.pde
|
||||
|
||||
Put the U8GLIB logo on the display.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
|
||||
void drawColorBox(void)
|
||||
{
|
||||
u8g_uint_t w,h;
|
||||
u8g_uint_t r, g, b;
|
||||
|
||||
w = u8g.getWidth()/32;
|
||||
h = u8g.getHeight()/8;
|
||||
for( b = 0; b < 4; b++ )
|
||||
for( g = 0; g < 8; g++ )
|
||||
for( r = 0; r < 8; r++ )
|
||||
{
|
||||
u8g.setColorIndex((r<<5) | (g<<2) | b );
|
||||
u8g.drawBox(g*w + b*w*8, r*h, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
void drawLogo(uint8_t d)
|
||||
{
|
||||
u8g.setFont(u8g_font_gdr25r);
|
||||
u8g.drawStr(0+d, 30+d, "U");
|
||||
u8g.setFont(u8g_font_gdr30n);
|
||||
u8g.drawStr90(23+d,10+d,"8");
|
||||
u8g.setFont(u8g_font_gdr25r);
|
||||
u8g.drawStr(53+d,30+d,"g");
|
||||
|
||||
u8g.drawHLine(2+d, 35+d, 47);
|
||||
u8g.drawVLine(45+d, 32+d, 12);
|
||||
}
|
||||
|
||||
void drawURL(void)
|
||||
{
|
||||
u8g.setFont(u8g_font_4x6);
|
||||
if ( u8g.getHeight() < 59 )
|
||||
{
|
||||
u8g.drawStr(53,9,"code.google.com");
|
||||
u8g.drawStr(77,18,"/p/u8glib");
|
||||
}
|
||||
else
|
||||
{
|
||||
u8g.drawStr(1,54,"code.google.com/p/u8glib");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void draw(void) {
|
||||
if ( u8g.getMode() == U8G_MODE_R3G3B2 ) {
|
||||
drawColorBox();
|
||||
}
|
||||
u8g.setColorIndex(1);
|
||||
if ( U8G_MODE_GET_BITS_PER_PIXEL(u8g.getMode()) > 1 ) {
|
||||
drawLogo(2);
|
||||
u8g.setColorIndex(2);
|
||||
drawLogo(1);
|
||||
u8g.setColorIndex(3);
|
||||
}
|
||||
drawLogo(0);
|
||||
drawURL();
|
||||
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
// flip screen, if required
|
||||
//u8g.setRot180();
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
u8g.setColorIndex(1);
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(200);
|
||||
}
|
||||
|
@ -1,136 +0,0 @@
|
||||
/*
|
||||
|
||||
XBM.pde
|
||||
|
||||
drawXBM example code.
|
||||
|
||||
>>> Before compiling: Please remove comment from the constructor of the
|
||||
>>> connected graphics display (see below).
|
||||
|
||||
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "U8glib.h"
|
||||
|
||||
// setup u8g object, please remove comment from one of the following constructor calls
|
||||
// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
|
||||
|
||||
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGS102 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM132 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
|
||||
//U8GLIB_ST7920_192X32_4X u8g(10); // SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
|
||||
//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
|
||||
//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
|
||||
//U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_LM6063 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_BW u8g(10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
|
||||
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
|
||||
//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
|
||||
//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 ); // 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
|
||||
//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
|
||||
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
|
||||
//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
|
||||
//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE); // I2C
|
||||
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
|
||||
//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
|
||||
|
||||
#define u8g_logo_width 38
|
||||
#define u8g_logo_height 24
|
||||
//static unsigned char u8g_logo_bits[] = {
|
||||
static unsigned char u8g_logo_bits[] U8G_PROGMEM = {
|
||||
0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xe0,
|
||||
0xff, 0xff, 0x3f, 0xe3, 0xe1, 0xff, 0xff, 0x3f, 0xf3, 0xf1, 0xff, 0xff,
|
||||
0x3f, 0xf3, 0xf1, 0xfe, 0xbf, 0x37, 0xf3, 0x11, 0x1c, 0x1f, 0x30, 0xf3,
|
||||
0x01, 0x08, 0x8c, 0x20, 0xf3, 0x01, 0x00, 0xc0, 0x39, 0xf3, 0x81, 0xc7,
|
||||
0xc1, 0x39, 0xf3, 0xc1, 0xc7, 0xc9, 0x38, 0xf3, 0xc1, 0xc3, 0x19, 0x3c,
|
||||
0xe3, 0x89, 0x01, 0x98, 0x3f, 0xc7, 0x18, 0x00, 0x08, 0x3e, 0x0f, 0x3c,
|
||||
0x70, 0x1c, 0x30, 0x3f, 0xff, 0xfc, 0x87, 0x31, 0xff, 0xff, 0xbf, 0xc7,
|
||||
0x23, 0x01, 0x00, 0x00, 0xc6, 0x23, 0x03, 0x00, 0x00, 0x0e, 0x30, 0xff,
|
||||
0xff, 0x3f, 0x1f, 0x3c, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0x3f,
|
||||
0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f };
|
||||
|
||||
void draw(void) {
|
||||
// graphic commands to redraw the complete screen should be placed here
|
||||
u8g.drawXBMP( 0, 0, u8g_logo_width, u8g_logo_height, u8g_logo_bits);
|
||||
}
|
||||
|
||||
void setup(void) {
|
||||
// flip screen, if required
|
||||
// u8g.setRot180();
|
||||
}
|
||||
|
||||
void loop(void) {
|
||||
// picture loop
|
||||
u8g.firstPage();
|
||||
do {
|
||||
draw();
|
||||
} while( u8g.nextPage() );
|
||||
|
||||
// rebuild the picture after some delay
|
||||
delay(500);
|
||||
}
|
||||
|
@ -1,80 +0,0 @@
|
||||
|
||||
The U8glib code (http://code.google.com/p/u8glib/) is licensed under the terms of
|
||||
the new-bsd license (two-clause bsd license).
|
||||
See also: http://www.opensource.org/licenses/bsd-license.php
|
||||
|
||||
The repository and optionally the releases contain icons, which are
|
||||
derived from the WPZOOM Developer Icon Set:
|
||||
http://www.wpzoom.com/wpzoom/new-freebie-wpzoom-developer-icon-set-154-free-icons/
|
||||
WPZOOM Developer Icon Set by WPZOOM is licensed under a Creative Commons
|
||||
Attribution-ShareAlike 3.0 Unported License.
|
||||
|
||||
Fonts are licensed under different conditions.
|
||||
See http://code.google.com/p/u8glib/wiki/fontgroup for
|
||||
detailed information on the licensing conditions for each font.
|
||||
|
||||
============ X11 Fonts COUR, HELV, NCEN, TIM, SYMB ============
|
||||
|
||||
For fonts derived from the following files, the license below applies.
|
||||
COURB08.BDF COURB10.BDF COURB12.BDF COURB14.BDF COURB18.BDF
|
||||
COURB24.BDF COURR08.BDF COURR10.BDF COURR12.BDF COURR14.BDF
|
||||
COURR18.BDF COURR24.BDF HELVB08.BDF HELVB10.BDF HELVB12.BDF HELVB14.BDF
|
||||
HELVB18.BDF HELVB24.BDF HELVR08.BDF HELVR10.BDF HELVR12.BDF HELVR14.BDF
|
||||
HELVR18.BDF HELVR24.BDF NCENB08.BDF NCENB10.BDF NCENB12.BDF
|
||||
NCENB14.BDF NCENB18.BDF NCENB24.BDF NCENR08.BDF NCENR10.BDF
|
||||
NCENR12.BDF NCENR14.BDF NCENR18.BDF NCENR24.BDF SYMB08.BDF SYMB10.BDF
|
||||
SYMB12.BDF SYMB14.BDF SYMB18.BDF SYMB24.BDF TIMB08.BDF TIMB10.BDF
|
||||
TIMB12.BDF TIMB14.BDF TIMB18.BDF TIMB24.BDF TIMR08.BDF TIMR10.BDF
|
||||
TIMR12.BDF TIMR14.BDF TIMR18.BDF TIMR24.BDF
|
||||
|
||||
Copyright 1984-1989, 1994 Adobe Systems Incorporated.
|
||||
Copyright 1988, 1994 Digital Equipment Corporation.
|
||||
|
||||
Adobe is a trademark of Adobe Systems Incorporated which may be
|
||||
registered in certain jurisdictions.
|
||||
Permission to use these trademarks is hereby granted only in
|
||||
association with the images described in this file.
|
||||
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose and without fee is hereby
|
||||
granted, provided that the above copyright notices appear in all
|
||||
copies and that both those copyright notices and this permission
|
||||
notice appear in supporting documentation, and that the names of
|
||||
Adobe Systems and Digital Equipment Corporation not be used in
|
||||
advertising or publicity pertaining to distribution of the software
|
||||
without specific, written prior permission. Adobe Systems and
|
||||
Digital Equipment Corporation make no representations about the
|
||||
suitability of this software for any purpose. It is provided "as
|
||||
is" without express or implied warranty.
|
||||
|
||||
|
||||
============ BSD License for U8glib Code ============
|
||||
|
||||
Universal 8bit Graphics Library (http://code.google.com/p/u8glib/)
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,177 +0,0 @@
|
||||
/*
|
||||
|
||||
u8g_bitmap.c
|
||||
|
||||
Universal 8bit Graphics Library
|
||||
|
||||
Copyright (c) 2011, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "u8g.h"
|
||||
|
||||
void u8g_DrawHBitmap(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, const uint8_t *bitmap)
|
||||
{
|
||||
while( cnt > 0 )
|
||||
{
|
||||
u8g_Draw8Pixel(u8g, x, y, 0, *bitmap);
|
||||
bitmap++;
|
||||
cnt--;
|
||||
x+=8;
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawBitmap(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const uint8_t *bitmap)
|
||||
{
|
||||
if ( u8g_IsBBXIntersection(u8g, x, y, cnt*8, h) == 0 )
|
||||
return;
|
||||
while( h > 0 )
|
||||
{
|
||||
u8g_DrawHBitmap(u8g, x, y, cnt, bitmap);
|
||||
bitmap += cnt;
|
||||
y++;
|
||||
h--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void u8g_DrawHBitmapP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, const u8g_pgm_uint8_t *bitmap)
|
||||
{
|
||||
while( cnt > 0 )
|
||||
{
|
||||
u8g_Draw8Pixel(u8g, x, y, 0, u8g_pgm_read(bitmap));
|
||||
bitmap++;
|
||||
cnt--;
|
||||
x+=8;
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawBitmapP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
|
||||
{
|
||||
if ( u8g_IsBBXIntersection(u8g, x, y, cnt*8, h) == 0 )
|
||||
return;
|
||||
while( h > 0 )
|
||||
{
|
||||
u8g_DrawHBitmapP(u8g, x, y, cnt, bitmap);
|
||||
bitmap += cnt;
|
||||
y++;
|
||||
h--;
|
||||
}
|
||||
}
|
||||
|
||||
/*=========================================================================*/
|
||||
|
||||
static void u8g_DrawHXBM(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, const uint8_t *bitmap)
|
||||
{
|
||||
uint8_t d;
|
||||
x+=7;
|
||||
while( w >= 8 )
|
||||
{
|
||||
u8g_Draw8Pixel(u8g, x, y, 2, *bitmap);
|
||||
bitmap++;
|
||||
w-= 8;
|
||||
x+=8;
|
||||
}
|
||||
if ( w > 0 )
|
||||
{
|
||||
d = *bitmap;
|
||||
x -= 7;
|
||||
do
|
||||
{
|
||||
if ( d & 1 )
|
||||
u8g_DrawPixel(u8g, x, y);
|
||||
x++;
|
||||
w--;
|
||||
d >>= 1;
|
||||
} while ( w > 0 );
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawXBM(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const uint8_t *bitmap)
|
||||
{
|
||||
u8g_uint_t b;
|
||||
b = w;
|
||||
b += 7;
|
||||
b >>= 3;
|
||||
|
||||
if ( u8g_IsBBXIntersection(u8g, x, y, w, h) == 0 )
|
||||
return;
|
||||
|
||||
while( h > 0 )
|
||||
{
|
||||
u8g_DrawHXBM(u8g, x, y, w, bitmap);
|
||||
bitmap += b;
|
||||
y++;
|
||||
h--;
|
||||
}
|
||||
}
|
||||
|
||||
static void u8g_DrawHXBMP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, const u8g_pgm_uint8_t *bitmap)
|
||||
{
|
||||
uint8_t d;
|
||||
x+=7;
|
||||
while( w >= 8 )
|
||||
{
|
||||
u8g_Draw8Pixel(u8g, x, y, 2, u8g_pgm_read(bitmap));
|
||||
bitmap++;
|
||||
w-= 8;
|
||||
x+=8;
|
||||
}
|
||||
if ( w > 0 )
|
||||
{
|
||||
d = u8g_pgm_read(bitmap);
|
||||
x -= 7;
|
||||
do
|
||||
{
|
||||
if ( d & 1 )
|
||||
u8g_DrawPixel(u8g, x, y);
|
||||
x++;
|
||||
w--;
|
||||
d >>= 1;
|
||||
} while ( w > 0 );
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawXBMP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
|
||||
{
|
||||
u8g_uint_t b;
|
||||
b = w;
|
||||
b += 7;
|
||||
b >>= 3;
|
||||
|
||||
if ( u8g_IsBBXIntersection(u8g, x, y, w, h) == 0 )
|
||||
return;
|
||||
while( h > 0 )
|
||||
{
|
||||
u8g_DrawHXBMP(u8g, x, y, w, bitmap);
|
||||
bitmap += b;
|
||||
y++;
|
||||
h--;
|
||||
}
|
||||
}
|
@ -1,382 +0,0 @@
|
||||
/*
|
||||
|
||||
u8g_circle.c
|
||||
|
||||
Utility to draw empty and filled circles.
|
||||
|
||||
Universal 8bit Graphics Library
|
||||
|
||||
Copyright (c) 2011, bjthom@gmail.com
|
||||
u8g_DrawCircle & u8g_DrawDisc by olikraus@gmail.com
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Addition to the U8G Library 02/25/12
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "u8g.h"
|
||||
|
||||
#ifdef OLD_CODE
|
||||
|
||||
void circ_upperRight(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
|
||||
u8g_DrawPixel(u8g, x0 + x, y0 - y);
|
||||
u8g_DrawPixel(u8g, x0 + y, y0 - x);
|
||||
}
|
||||
|
||||
void circ_upperLeft(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
|
||||
u8g_DrawPixel(u8g, x0 - x, y0 - y);
|
||||
u8g_DrawPixel(u8g, x0 - y, y0 - x);
|
||||
}
|
||||
|
||||
void circ_lowerRight(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
|
||||
u8g_DrawPixel(u8g, x0 + x, y0 + y);
|
||||
u8g_DrawPixel(u8g, x0 + y, y0 + x);
|
||||
}
|
||||
|
||||
void circ_lowerLeft(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
|
||||
u8g_DrawPixel(u8g, x0 - x, y0 + y);
|
||||
u8g_DrawPixel(u8g, x0 - y, y0 + x);
|
||||
}
|
||||
|
||||
void circ_all(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
|
||||
circ_upperRight(u8g, x, y, x0, y0);
|
||||
circ_upperLeft(u8g, x, y, x0, y0);
|
||||
circ_lowerRight(u8g, x, y, x0, y0);
|
||||
circ_lowerLeft(u8g, x, y, x0, y0);
|
||||
}
|
||||
|
||||
void u8g_DrawEmpCirc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
if ( u8g_IsBBXIntersection(u8g, x0-rad-1, y0-rad-1, 2*rad+1, 2*rad+1) == 0)
|
||||
return;
|
||||
|
||||
int f = 1 - rad;
|
||||
int ddF_x = 1;
|
||||
int ddF_y = -2*rad;
|
||||
uint8_t x = 0;
|
||||
uint8_t y = rad;
|
||||
|
||||
void ( *circ_util )(u8g_t *, u8g_uint_t, u8g_uint_t, u8g_uint_t, u8g_uint_t);
|
||||
|
||||
switch (option)
|
||||
{
|
||||
case U8G_CIRC_UPPER_RIGHT:
|
||||
u8g_DrawPixel(u8g, x0, y0 - rad);
|
||||
u8g_DrawPixel(u8g, x0 + rad, y0);
|
||||
circ_util = circ_upperRight;
|
||||
break;
|
||||
case U8G_CIRC_UPPER_LEFT:
|
||||
u8g_DrawPixel(u8g, x0, y0 - rad);
|
||||
u8g_DrawPixel(u8g, x0 - rad, y0);
|
||||
circ_util = circ_upperLeft;
|
||||
break;
|
||||
case U8G_CIRC_LOWER_RIGHT:
|
||||
u8g_DrawPixel(u8g, x0, y0 + rad);
|
||||
u8g_DrawPixel(u8g, x0 + rad, y0);
|
||||
circ_util = circ_lowerRight;
|
||||
break;
|
||||
case U8G_CIRC_LOWER_LEFT:
|
||||
u8g_DrawPixel(u8g, x0, y0 + rad);
|
||||
u8g_DrawPixel(u8g, x0 - rad, y0);
|
||||
circ_util = circ_lowerLeft;
|
||||
break;
|
||||
default:
|
||||
case U8G_CIRC_ALL:
|
||||
u8g_DrawPixel(u8g, x0, y0 + rad);
|
||||
u8g_DrawPixel(u8g, x0, y0 - rad);
|
||||
u8g_DrawPixel(u8g, x0 + rad, y0);
|
||||
u8g_DrawPixel(u8g, x0 - rad, y0);
|
||||
circ_util = circ_all;
|
||||
break;
|
||||
}
|
||||
|
||||
while( x < y )
|
||||
{
|
||||
if(f >= 0)
|
||||
{
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
circ_util(u8g, x, y, x0, y0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void u8g_DrawFillCirc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
if ( u8g_IsBBXIntersection(u8g, x0-rad-1, y0-rad-1, 2*rad+1, 2*rad+1) == 0)
|
||||
return;
|
||||
|
||||
int f = 1 - rad;
|
||||
int ddF_x = 1;
|
||||
int ddF_y = -2*rad;
|
||||
uint8_t x = 0;
|
||||
uint8_t y = rad;
|
||||
|
||||
// Draw vertical diameter at the horiz. center
|
||||
// u8g_DrawVLine(u8g, x0, y0 - rad, 2*rad+1);
|
||||
|
||||
if (option == U8G_CIRC_UPPER_LEFT || option == U8G_CIRC_UPPER_RIGHT) {
|
||||
u8g_DrawVLine(u8g, x0, y0 - rad, rad+1);
|
||||
}
|
||||
else if (option == U8G_CIRC_LOWER_LEFT || option == U8G_CIRC_LOWER_RIGHT) {
|
||||
u8g_DrawVLine(u8g, x0, y0, rad+1);
|
||||
}
|
||||
else {
|
||||
u8g_DrawVLine(u8g, x0, y0 - rad, 2*rad+1);
|
||||
}
|
||||
|
||||
while( x < y )
|
||||
{
|
||||
if(f >= 0)
|
||||
{
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
//Draw vertical lines from one point to another
|
||||
|
||||
switch (option)
|
||||
{
|
||||
case U8G_CIRC_UPPER_RIGHT:
|
||||
u8g_DrawVLine(u8g, x0+x, y0-y, y+1);
|
||||
u8g_DrawVLine(u8g, x0+y, y0-x, x+1);
|
||||
break;
|
||||
case U8G_CIRC_UPPER_LEFT:
|
||||
u8g_DrawVLine(u8g, x0-x, y0-y, y+1);
|
||||
u8g_DrawVLine(u8g, x0-y, y0-x, x+1);
|
||||
break;
|
||||
case U8G_CIRC_LOWER_RIGHT:
|
||||
u8g_DrawVLine(u8g, x0+x, y0, y+1);
|
||||
u8g_DrawVLine(u8g, x0+y, y0, x+1);
|
||||
break;
|
||||
case U8G_CIRC_LOWER_LEFT:
|
||||
u8g_DrawVLine(u8g, x0-x, y0, y+1);
|
||||
u8g_DrawVLine(u8g, x0-y, y0, x+1);
|
||||
break;
|
||||
case U8G_CIRC_ALL:
|
||||
u8g_DrawVLine(u8g, x0+x, y0-y, 2*y+1);
|
||||
u8g_DrawVLine(u8g, x0-x, y0-y, 2*y+1);
|
||||
u8g_DrawVLine(u8g, x0+y, y0-x, 2*x+1);
|
||||
u8g_DrawVLine(u8g, x0-y, y0-x, 2*x+1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*=========================================================================*/
|
||||
|
||||
static void u8g_draw_circle_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option) U8G_NOINLINE;
|
||||
|
||||
static void u8g_draw_circle_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option)
|
||||
{
|
||||
/* upper right */
|
||||
if ( option & U8G_DRAW_UPPER_RIGHT )
|
||||
{
|
||||
u8g_DrawPixel(u8g, x0 + x, y0 - y);
|
||||
u8g_DrawPixel(u8g, x0 + y, y0 - x);
|
||||
}
|
||||
|
||||
/* upper left */
|
||||
if ( option & U8G_DRAW_UPPER_LEFT )
|
||||
{
|
||||
u8g_DrawPixel(u8g, x0 - x, y0 - y);
|
||||
u8g_DrawPixel(u8g, x0 - y, y0 - x);
|
||||
}
|
||||
|
||||
/* lower right */
|
||||
if ( option & U8G_DRAW_LOWER_RIGHT )
|
||||
{
|
||||
u8g_DrawPixel(u8g, x0 + x, y0 + y);
|
||||
u8g_DrawPixel(u8g, x0 + y, y0 + x);
|
||||
}
|
||||
|
||||
/* lower left */
|
||||
if ( option & U8G_DRAW_LOWER_LEFT )
|
||||
{
|
||||
u8g_DrawPixel(u8g, x0 - x, y0 + y);
|
||||
u8g_DrawPixel(u8g, x0 - y, y0 + x);
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_draw_circle(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
u8g_int_t f;
|
||||
u8g_int_t ddF_x;
|
||||
u8g_int_t ddF_y;
|
||||
u8g_uint_t x;
|
||||
u8g_uint_t y;
|
||||
|
||||
f = 1;
|
||||
f -= rad;
|
||||
ddF_x = 1;
|
||||
ddF_y = 0;
|
||||
ddF_y -= rad;
|
||||
ddF_y *= 2;
|
||||
x = 0;
|
||||
y = rad;
|
||||
|
||||
u8g_draw_circle_section(u8g, x, y, x0, y0, option);
|
||||
|
||||
while ( x < y )
|
||||
{
|
||||
if (f >= 0)
|
||||
{
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
u8g_draw_circle_section(u8g, x, y, x0, y0, option);
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawCircle(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
/* check for bounding box */
|
||||
{
|
||||
u8g_uint_t radp, radp2;
|
||||
|
||||
radp = rad;
|
||||
radp++;
|
||||
radp2 = radp;
|
||||
radp2 *= 2;
|
||||
|
||||
if ( u8g_IsBBXIntersection(u8g, x0-radp, y0-radp, radp2, radp2) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
/* draw circle */
|
||||
u8g_draw_circle(u8g, x0, y0, rad, option);
|
||||
}
|
||||
|
||||
static void u8g_draw_disc_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option) U8G_NOINLINE;
|
||||
|
||||
static void u8g_draw_disc_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option)
|
||||
{
|
||||
/* upper right */
|
||||
if ( option & U8G_DRAW_UPPER_RIGHT )
|
||||
{
|
||||
u8g_DrawVLine(u8g, x0+x, y0-y, y+1);
|
||||
u8g_DrawVLine(u8g, x0+y, y0-x, x+1);
|
||||
}
|
||||
|
||||
/* upper left */
|
||||
if ( option & U8G_DRAW_UPPER_LEFT )
|
||||
{
|
||||
u8g_DrawVLine(u8g, x0-x, y0-y, y+1);
|
||||
u8g_DrawVLine(u8g, x0-y, y0-x, x+1);
|
||||
}
|
||||
|
||||
/* lower right */
|
||||
if ( option & U8G_DRAW_LOWER_RIGHT )
|
||||
{
|
||||
u8g_DrawVLine(u8g, x0+x, y0, y+1);
|
||||
u8g_DrawVLine(u8g, x0+y, y0, x+1);
|
||||
}
|
||||
|
||||
/* lower left */
|
||||
if ( option & U8G_DRAW_LOWER_LEFT )
|
||||
{
|
||||
u8g_DrawVLine(u8g, x0-x, y0, y+1);
|
||||
u8g_DrawVLine(u8g, x0-y, y0, x+1);
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_draw_disc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
u8g_int_t f;
|
||||
u8g_int_t ddF_x;
|
||||
u8g_int_t ddF_y;
|
||||
u8g_uint_t x;
|
||||
u8g_uint_t y;
|
||||
|
||||
f = 1;
|
||||
f -= rad;
|
||||
ddF_x = 1;
|
||||
ddF_y = 0;
|
||||
ddF_y -= rad;
|
||||
ddF_y *= 2;
|
||||
x = 0;
|
||||
y = rad;
|
||||
|
||||
u8g_draw_disc_section(u8g, x, y, x0, y0, option);
|
||||
|
||||
while ( x < y )
|
||||
{
|
||||
if (f >= 0)
|
||||
{
|
||||
y--;
|
||||
ddF_y += 2;
|
||||
f += ddF_y;
|
||||
}
|
||||
x++;
|
||||
ddF_x += 2;
|
||||
f += ddF_x;
|
||||
|
||||
u8g_draw_disc_section(u8g, x, y, x0, y0, option);
|
||||
}
|
||||
}
|
||||
|
||||
void u8g_DrawDisc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
|
||||
{
|
||||
/* check for bounding box */
|
||||
{
|
||||
u8g_uint_t radp, radp2;
|
||||
|
||||
radp = rad;
|
||||
radp++;
|
||||
radp2 = radp;
|
||||
radp2 *= 2;
|
||||
|
||||
if ( u8g_IsBBXIntersection(u8g, x0-radp, y0-radp, radp2, radp2) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
/* draw disc */
|
||||
u8g_draw_disc(u8g, x0, y0, rad, option);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,156 +0,0 @@
|
||||
/*
|
||||
|
||||
u8g_clip.c
|
||||
|
||||
procedures for clipping
|
||||
taken over from procs in u8g_pb.c
|
||||
|
||||
Universal 8bit Graphics Library
|
||||
|
||||
Copyright (c) 2012, olikraus@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Notes
|
||||
|
||||
This is one of the most critical parts of u8glib. It must be fast, but still reliable.
|
||||
Based on the intersection program (see tools folder), there is minimized version of
|
||||
the condition for the intersaction test:
|
||||
minimized version
|
||||
---1----0 1 b1 <= a2 && b1 > b2
|
||||
-----1--0 1 b2 >= a1 && b1 > b2
|
||||
---1-1--- 1 b1 <= a2 && b2 >= a1
|
||||
It includes the assumption, that a1 <= a2 is always true (correct, because
|
||||
a1, a2 are the page dimensions.
|
||||
|
||||
The direct implementation of the above result is done in:
|
||||
uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
|
||||
However, this is slower than a decision tree version:
|
||||
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
|
||||
Also suprising is, that he the macro implementation is slower than the inlined version.
|
||||
|
||||
The decision tree is based on the expansion of the truth table.
|
||||
|
||||
*/
|
||||
|
||||
#include "u8g.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define U8G_ALWAYS_INLINE __attribute__((always_inline))
|
||||
#else
|
||||
#define U8G_ALWAYS_INLINE
|
||||
#endif
|
||||
|
||||
/*
|
||||
intersection assumptions:
|
||||
a1 <= a2 is always true
|
||||
|
||||
minimized version
|
||||
---1----0 1 b1 <= a2 && b1 > b2
|
||||
-----1--0 1 b2 >= a1 && b1 > b2
|
||||
---1-1--- 1 b1 <= a2 && b2 >= a1
|
||||
*/
|
||||
|
||||
#ifdef OLD_CODE_WHICH_IS_TOO_SLOW
|
||||
static uint8_t u8g_is_intersection_boolean(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
|
||||
{
|
||||
uint8_t c1, c2, c3, tmp;
|
||||
c1 = v0 <= a1;
|
||||
c2 = v1 >= a0;
|
||||
c3 = v0 > v1;
|
||||
|
||||
tmp = c1;
|
||||
c1 &= c2;
|
||||
c2 &= c3;
|
||||
c3 &= tmp;
|
||||
c1 |= c2;
|
||||
c1 |= c3;
|
||||
return c1 & 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1) ((uint8_t)( (v0) <= (a1) ) ? ( ( (v1) >= (a0) ) ? ( 1 ) : ( (v0) > (v1) ) ) : ( ( (v1) >= (a0) ) ? ( (v0) > (v1) ) : ( 0 ) ))
|
||||
|
||||
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1) U8G_ALWAYS_INLINE;
|
||||
static uint8_t u8g_is_intersection_decision_tree(u8g_uint_t a0, u8g_uint_t a1, u8g_uint_t v0, u8g_uint_t v1)
|
||||
{
|
||||
/* surprisingly the macro leads to larger code */
|
||||
/* return U8G_IS_INTERSECTION_MACRO(a0,a1,v0,v1); */
|
||||
if ( v0 <= a1 )
|
||||
{
|
||||
if ( v1 >= a0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( v0 > v1 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( v1 >= a0 )
|
||||
{
|
||||
if ( v0 > v1 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t u8g_IsBBXIntersection(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h)
|
||||
{
|
||||
register u8g_uint_t tmp;
|
||||
tmp = y;
|
||||
tmp += h;
|
||||
tmp--;
|
||||
if ( u8g_is_intersection_decision_tree(u8g->current_page.y0, u8g->current_page.y1, y, tmp) == 0 )
|
||||
return 0;
|
||||
|
||||
tmp = x;
|
||||
tmp += w;
|
||||
tmp--;
|
||||
return u8g_is_intersection_decision_tree(u8g->current_page.x0, u8g->current_page.x1, x, tmp);
|
||||
}
|
||||
|
||||
|