mirror of
https://github.com/sergeyyarkov/attiny45v_thermometer.git
synced 2026-10-11 02:08:56 +03:00
refactor
This commit is contained in:
parent
90f1f29aed
commit
cfba84e5d9
@ -0,0 +1 @@
|
|||||||
|
$(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer/firmware/tm1637.c
|
||||||
@ -0,0 +1 @@
|
|||||||
|
$(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer/firmware/twi.c
|
||||||
@ -0,0 +1 @@
|
|||||||
|
$(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer/firmware/tm1637.c
|
||||||
@ -0,0 +1 @@
|
|||||||
|
$(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer/firmware/twi.c
|
||||||
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
build/default/production/dstemperature.o.d \
|
build/default/production/dstemperature.o.d \
|
||||||
build/default/production/dstemperature.o: dstemperature.c \
|
build/default/production/dstemperature.o: dstemperature.c \
|
||||||
dstemperature.h onewire.h \
|
dstemperature.h onewire.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
||||||
@ -24,14 +24,14 @@ dstemperature.h:
|
|||||||
|
|
||||||
onewire.h:
|
onewire.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
||||||
|
|||||||
Binary file not shown.
@ -11,14 +11,15 @@ build/default/production/main.o.d build/default/production/main.o: main.c \
|
|||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/wdt.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/wdt.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h onewire.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h onewire.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
||||||
|
twi.h tm1637.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h \
|
||||||
dstemperature.h
|
dstemperature.h
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h:
|
||||||
@ -45,10 +46,6 @@ build/default/production/main.o.d build/default/production/main.o: main.c \
|
|||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/wdt.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/wdt.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h:
|
||||||
@ -63,4 +60,12 @@ onewire.h:
|
|||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
||||||
|
|
||||||
|
twi.h:
|
||||||
|
|
||||||
|
tm1637.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h:
|
||||||
|
|
||||||
dstemperature.h:
|
dstemperature.h:
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
build/default/production/onewire.o.d build/default/production/onewire.o: \
|
build/default/production/onewire.o.d build/default/production/onewire.o: \
|
||||||
onewire.c onewire.h \
|
onewire.c onewire.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
||||||
@ -21,14 +21,14 @@ build/default/production/onewire.o.d build/default/production/onewire.o: \
|
|||||||
|
|
||||||
onewire.h:
|
onewire.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h:
|
||||||
|
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
||||||
|
|||||||
BIN
firmware/build/default/production/tm1637.o
Normal file
BIN
firmware/build/default/production/tm1637.o
Normal file
Binary file not shown.
57
firmware/build/default/production/tm1637.o.d
Normal file
57
firmware/build/default/production/tm1637.o.d
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
build/default/production/tm1637.o.d build/default/production/tm1637.o: \
|
||||||
|
tm1637.c tm1637.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \
|
||||||
|
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h twi.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h
|
||||||
|
|
||||||
|
tm1637.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/pgmspace.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h:
|
||||||
|
|
||||||
|
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h:
|
||||||
|
|
||||||
|
twi.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h:
|
||||||
BIN
firmware/build/default/production/twi.o
Normal file
BIN
firmware/build/default/production/twi.o
Normal file
Binary file not shown.
48
firmware/build/default/production/twi.o.d
Normal file
48
firmware/build/default/production/twi.o.d
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
build/default/production/twi.o.d build/default/production/twi.o: twi.c \
|
||||||
|
twi.h /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \
|
||||||
|
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h
|
||||||
|
|
||||||
|
twi.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h:
|
||||||
|
|
||||||
|
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h:
|
||||||
|
|
||||||
|
/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h:
|
||||||
Binary file not shown.
@ -1,136 +1,137 @@
|
|||||||
:1000000013C01AC019C018C017C016C015C014C03C
|
:1000000013C01AC019C018C017C016C015C014C03C
|
||||||
:1000100013C012C011C010C00FC00EC00DC03F06EB
|
:1000100013C012C011C010C00FC00EC00DC03F06EB
|
||||||
:100020005B4F666D7D077F6F11241FBECFE5D1E06A
|
:100020005B4F666D7D077F6F11241FBECFE5D1E06A
|
||||||
:10003000DEBFCDBFEAD115C4E3CFF894C09AC29A0F
|
:10003000DEBFCDBF12D01CC4E3CF69D1882351F0FD
|
||||||
:100040008DE08A95F1F70000C0988DE08A95F1F770
|
:10004000813011F081E00895C19A81E090E0B5D24D
|
||||||
:100050000000C29878940895F894C298C0988DE0F2
|
:1000500081E00895C19880E00895CF93DF93CDB7F4
|
||||||
:100060008A95F1F70000C29A8DE08A95F1F70000B9
|
:10006000DEB766970FB6F894DEBF0FBECDBFB99A64
|
||||||
:10007000C09A78940895F8942DE02A95F1F700003D
|
:10007000C198A89588E199E20FB6F894A89581BD3A
|
||||||
:1000800098E00DC0C09886952DE02A95F1F7000004
|
:100080000FBE91BD6CE0CE01019606D128E042E0A2
|
||||||
:10009000C29A2DE02A95F1F70000915049F0C298DC
|
:1000900062E080E05ED287D22FEF80E792E02150CD
|
||||||
:1000A0002DE02A95F1F7000080FFECCFC09AEBCF4E
|
:1000A00080409040E1F700C00000789404E610E042
|
||||||
:1000B000B898C298C09A8DE08A95F1F7000086B38F
|
:1000B00013C08FE19EE40197F1F700C00000CE016C
|
||||||
:1000C000C29A9DE09A95F1F70000C2982DE02A951A
|
:1000C00001963FD18B899C89B801ABD32D8941E042
|
||||||
:1000D000F1F70000B89A7894809581700895CF93D5
|
:1000D00089899A89B5D2A895CE010196AEDF882389
|
||||||
:1000E000C82FABDF8C2FC7DFB7DFCF91089597B351
|
:1000E00041F32FE788E391E0215080409040E1F711
|
||||||
:1000F000A1E0B0E0FD0102C0EE0FFF1F8A95E2F71C
|
:1000F00000C00000A895F0CFF894BB9A8FEB93E076
|
||||||
:1001000002C0AA0FBB1F6A95E2F7EA2B9E2B97BB92
|
:100100000197F1F700C00000BB989AEB9A95F1F7C0
|
||||||
:1001100088B3E095E823E8BB842F8068822BDFDF7B
|
:1001100000C086B3E3E3F3E03197F1F700C00000DD
|
||||||
:100120000895CF93DF93C82FD62F80E4D8DF85DFE3
|
:10012000789483FB882780F991E08927089598E0E7
|
||||||
:100130008D2F806CA0DF8C2F9EDF8EDFDF91CF9123
|
:100130000DC0BB9A20EA2A95F1F7BB982AE12A95CF
|
||||||
:10014000089562E080E4EDDF61E080E4EADF60E0F2
|
:10014000F1F700C078948695915069F0F89480FF9B
|
||||||
:1001500080E4E7DF0895BF92CF92DF92EF92FF92A3
|
:10015000F0CFBB9A20E12A95F1F7BB982AEA2A95BD
|
||||||
:100160000F931F93CF93DF938C01EC01083E83E044
|
:10016000F1F700C0EFCF089598E080E007C022E9E2
|
||||||
:10017000180714F0C7EED3E0112354F00F2EF3E06C
|
:100170002A95F1F700C07894915071F0F894869523
|
||||||
:10018000DF2EF02D0F2EFAE0EF2EF12CF02D17C000
|
:10018000BB9A20E12A95F1F7BB9828E12A95F1F76F
|
||||||
:10019000D195C195D10960E080E4C3DFEFCFDA9457
|
:10019000B39BEDCF8068EBCF0895AEDF811101C036
|
||||||
:1001A000CE01B7014BD3B62EC72E825E9F4FFC0106
|
:1001A00008958CECC4DF81E0FBCF0F931F93CF93B6
|
||||||
:1001B00084916D2DB6DFCB2DDC2DDD2029F01123B0
|
:1001B000DF938C01A1DF811105C0DF91CF911F91E9
|
||||||
:1001C00074F7E1E0DE12EBCFDF91CF911F910F9139
|
:1001C0000F91089583E3B3DFE801085F1F4FCCDF91
|
||||||
:1001D000FF90EF90DF90CF90BF900895992384F027
|
:1001D0008993C017D107D9F781E0EFCFFC01680FF1
|
||||||
:1001E00021E08A30910554F021E0EAE0F0E0BF011F
|
:1001E000791F80E02CE80BC08695915029F080FFA4
|
||||||
:1001F00025D3CB012F5F6A307105CCF7822F08958C
|
:1001F000FBCF86958227F9CFE617F70721F091917B
|
||||||
:10020000919581959109ECCF7F928F929F92AF92B9
|
:10020000892798E0F4CF0895EF92FF920F931F9300
|
||||||
:10021000BF92CF92DF92EF92FF920F931F93CF93F3
|
:10021000CF93DF937C01C1DF982F811108C0892F14
|
||||||
:10022000DF9300D01F92CDB7DEB7F62E942EE22ECC
|
:10022000DF91CF911F910F91FF90EF9008958EEB8A
|
||||||
:1002300099230CF44DC021E0E11001C020E06C01D5
|
:100230007EDFE7018701085F1F4F96DF8993C017B4
|
||||||
:10024000883E934034F00F2EF7EECF2EF3E0DF2EF2
|
:10024000D107D9F768E070E0C701C8DFC82F8CDF9D
|
||||||
:10025000F02DE11008C0C601C1DFB82E52E08513B1
|
:1002500091E0C81721F390E0E2CF4EDF811101C099
|
||||||
:100260004CC010E04BC0E22E3FC00B2D63C0682D88
|
:1002600008959BDF88E463DF8FE19EE40197F1F757
|
||||||
:1002700080E457DF81E0800F1E2D96C0E3E0BE12C0
|
:1002700000C0000081E0F4CFCF93DF93EC018DDF6D
|
||||||
:10028000A2C0E11081C0A1107FC065C0882DE1101F
|
:100280008EE455DF888153DF898151DF8A814FDF1A
|
||||||
:10029000AAC0892DA8C0872D023009F080C074C083
|
:10029000E4DFDF91CF910895FF920F931F93CF93E7
|
||||||
:1002A000EF2DF0E0E25EFF4F8491612F3ADF0F9077
|
:1002A000DF9300D01F92CDB7DEB78C01F62EACDF06
|
||||||
:1002B0000F900F90DF91CF911F910F91FF90EF90D2
|
:1002B000F8018281898383818A83FAE0FF16B9F08D
|
||||||
:1002C000DF90CF90BF90AF909F908F907F900895D8
|
:1002C0008BE0F81689F0E9E0FE16A1F08FE78B834A
|
||||||
:1002D0006C01883E934034F00F2EF7EECF2EF3E002
|
:1002D000CE010196D1DF0F900F900F90DF91CF915B
|
||||||
:1002E000DF2EF02DEE24E394D194C194D108C60101
|
:1002E0001F910F91FF9008958FE58B83F1CF8FE3DE
|
||||||
:1002F00075DFB82E52E011E0851310E02AE030E0FF
|
:1002F0008B83EECF8FE18B83EBCFFEDE811101C0CC
|
||||||
:10030000C601B9019BD28B83CB01B90197D28A83F5
|
:1003000008958CEC14DF84E412DF81E0F9CFCF9301
|
||||||
:10031000C60164E670E092D2CB01B9018FD2A82E5B
|
:10031000DF93EC01F1DE811104C081E0DF91CF9128
|
||||||
:10032000898381E0B81609F4A0CF03E00B190330EC
|
:100320000895CE01089641DF8885883211F082E079
|
||||||
:1003300008F0B6CF82E090E06C01C918D1087E2C9D
|
:10033000F5CFCE0169DF882311F080E0EFCF83E0B5
|
||||||
:100340006894992497F8812C33C01C151D0409F476
|
:10034000EDCFCF93DF93EC015FDF811103C0DF912D
|
||||||
:1003500095CFA11015C0202F30E0E1E0F0E0EC0FC8
|
:10035000CF910895D2DF8823D1F32C81822F90E0B2
|
||||||
:10036000FD1FE20FF31F808181110AC042E050E0BF
|
:100360008095909580769927892B09F055C02FE7C5
|
||||||
:100370004C0F5D1F240F351FF901908191110FC0A3
|
:100370003FE482E1215030408040E1F700C00000BE
|
||||||
:10038000F1E0BF1609F487CFE1E0F0E0EC0FFD1FCC
|
:10038000CE0142DF882309F469C01D8A898190E08B
|
||||||
:10039000E00FF11DE081F0E0E25EFF4F8491612FFC
|
:100390004881242F382F33230CF463C035952795DB
|
||||||
:1003A000C0DE81E0800F1F5F0F5F833008F078CFE1
|
:1003A000359527953595279535952795398B288B44
|
||||||
:1003B000EE2059F2112309F45ACF1C151D0421F720
|
:1003B00080959095887F9927892B09F055C081E019
|
||||||
:1003C00083E0B81609F3E1E0F0E0EC0FFD1FE00F69
|
:1003C0008C8B4195488388818F70282F30E0C9013C
|
||||||
:1003D000F11DE081F0E0E25EFF4FE491F2E0892D53
|
:1003D000880F991F82959295907F9827807F982704
|
||||||
:1003E000BF1609F453CF8E2BDACF62D1882351F098
|
:1003E000821B930B880F991F880F991F820F931FF1
|
||||||
:1003F000813011F081E00895C19A81E090E0ABDE98
|
:1003F000880F991F880F991F880F991F9C019923B7
|
||||||
:1004000081E00895C19880E00895CF93DF93CDB740
|
:10040000ACF13595279535952795359527953595F3
|
||||||
:10041000DEB766970FB6F894DEBF0FBECDBFB99AB0
|
:1004100027953B8B2A8B9BCF26FF0AC09FEB27E2B9
|
||||||
:10042000C198A89588E199E20FB6F894A89581BD86
|
:1004200039E0915020403040E1F700C00000A8CFF3
|
||||||
:100430000FBE91BD6CE0CE010196FFD028E042E0F6
|
:1004300025FF0AC08FEF96E924E0815090402040CC
|
||||||
:1004400062E080E054DE7DDE2FEF80E792E0215015
|
:10044000E1F700C000009CCF3FE78BE492E0315021
|
||||||
:1004500080409040E1F700C0000004E610E013C0C7
|
:1004500080409040E1F700C0000092CF81E08D8B9A
|
||||||
:100460008FE19EE40197F1F700C00000CE010196F4
|
:1004600076CF215F3F4F9ACF1C8AADCF215F3F4FA0
|
||||||
:1004700039D18B899C89B801CDD12D8941E08989F9
|
:10047000C8CFF894C09AC29A8DE08A95F1F700002F
|
||||||
:100480009A89C2DEA895CE010196AFDF882341F399
|
:10048000C0988DE08A95F1F70000C298789408959D
|
||||||
:100490002FE788E391E0215080409040E1F700C0D1
|
:10049000F894C298C0988DE08A95F1F70000C29A4E
|
||||||
:1004A0000000A895F0CFF894BB9A8FEB93E00197EA
|
:1004A0008DE08A95F1F70000C09A78940895F89449
|
||||||
:1004B000F1F700C00000BB989AEB9A95F1F700C0E5
|
:1004B0002DE02A95F1F7000098E00DC0C0988695D0
|
||||||
:1004C00086B3E3E3F3E03197F1F700C000007894DE
|
:1004C0002DE02A95F1F70000C29A2DE02A95F1F768
|
||||||
:1004D00083FB882780F991E08927089598E00DC073
|
:1004D0000000915049F0C2982DE02A95F1F70000F4
|
||||||
:1004E000BB9A20EA2A95F1F7BB982AE12A95F1F701
|
:1004E00080FFECCFC09AEBCFB898C298C09A8DE04D
|
||||||
:1004F00000C078948695915069F0F89480FFF0CF11
|
:1004F0008A95F1F7000086B3C29A9DE09A95F1F7CC
|
||||||
:10050000BB9A20E12A95F1F7BB982AEA2A95F1F7E0
|
:100500000000C2982DE02A95F1F70000B89A78947F
|
||||||
:1005100000C0EFCF089598E080E007C022E92A9557
|
:10051000809581700895992384F021E08A309105B7
|
||||||
:10052000F1F700C07894915071F0F8948695BB9AD9
|
:1005200054F021E0EAE0F0E0BF018FD1CB012F5F72
|
||||||
:1005300020E12A95F1F7BB9828E12A95F1F7B39BC2
|
:100530006A307105CCF7822F0895919581959109C4
|
||||||
:10054000EDCF8068EBCF0895AEDF811101C0089533
|
:10054000ECCFCF93C82F95DF8C2FB1DFA1DFCF91F8
|
||||||
:100550008CECC4DF81E0FBCF0F931F93CF93DF932D
|
:10055000089597B3A1E0B0E0FD0102C0EE0FFF1FC8
|
||||||
:100560008C01A1DF811105C0DF91CF911F910F9107
|
:100560008A95E2F702C0AA0FBB1F6A95E2F7EA2B51
|
||||||
:10057000089583E3B3DFE801085F1F4FCCDF899361
|
:100570009E2B97BB88B3E095E823E8BB842F806867
|
||||||
:10058000C017D107D9F781E0EFCFFC01680F791FC1
|
:10058000822BDFDF0895CF93DF93C82FD62F80E42F
|
||||||
:1005900080E02CE80BC08695915029F080FFFBCFBE
|
:10059000D8DF6FDF8D2F806C8ADF8C2F88DF78DFCC
|
||||||
:1005A00086958227F9CFE617F70721F091918927E1
|
:1005A000DF91CF91089562E080E4EDDF61E080E4C7
|
||||||
:1005B00098E0F4CF0895EF92FF920F931F93CF939B
|
:1005B000EADF60E080E4E7DF0895BF92CF92DF9248
|
||||||
:1005C000DF937C01C1DF982F811108C0892FDF9153
|
:1005C000EF92FF920F931F93CF93DF938C01EC0177
|
||||||
:1005D000CF911F910F91FF90EF9008958EEB7EDFEA
|
:1005D000083E83E0180714F0C7EED3E0112354F06F
|
||||||
:1005E000E7018701085F1F4F96DF8993C017D10786
|
:1005E0000F2EF3E0DF2EF02D0F2EFAE0EF2EF12C80
|
||||||
:1005F000D9F768E070E0C701C8DFC82F8CDF91E051
|
:1005F000F02D17C0D195C195D10960E080E4C3DF2B
|
||||||
:10060000C81721F390E0E2CF4EDF811101C00895B9
|
:10060000EFCFDA94CE01B70120D1B62EC72E825E8D
|
||||||
:100610009BDF88E463DF81E0FACFCF93DF93EC01C7
|
:100610009F4FFC0184916D2DB6DFCB2DDC2DDD20AD
|
||||||
:1006200093DF8EE45BDF888159DF898157DF8A8120
|
:1006200029F0112374F7E1E0DE12EBCFDF91CF91D7
|
||||||
:1006300055DFEADFDF91CF910895FF920F931F936B
|
:100630001F910F91FF90EF90DF90CF90BF900895A2
|
||||||
:10064000CF93DF9300D01F92CDB7DEB78C01F62E8B
|
:100640007F928F929F92AF92BF92CF92DF92EF9262
|
||||||
:10065000B2DFF8018281898383818A83FAE0FF1601
|
:10065000FF920F931F93CF93DF9300D01F92CDB7DC
|
||||||
:10066000B9F08BE0F81689F0E9E0FE16A1F08FE70B
|
:10066000DEB7F62E942EE22E99230CF44DC021E035
|
||||||
:100670008B83CE010196D1DF0F900F900F90DF9109
|
:10067000E11001C020E06C01883E934034F00F2E61
|
||||||
:10068000CF911F910F91FF9008958FE58B83F1CF4C
|
:10068000F7EECF2EF3E0DF2EF02DE11008C0C6010B
|
||||||
:100690008FE38B83EECF8FE18B83EBCF04DF811170
|
:1006900042DFB82E52E085134CC010E04BC0E22E72
|
||||||
:1006A00001C008958CEC1ADF84E418DF81E0F9CFF3
|
:1006A0003FC00B2D63C0682D80E46DDF81E0800FBB
|
||||||
:1006B000CF93DF93EC01F7DE811104C081E0DF917D
|
:1006B0001E2D96C0E3E0BE12A2C0E11081C0A110C1
|
||||||
:1006C000CF910895CE01089647DF8885883211F0D2
|
:1006C0007FC065C0882DE110AAC0892DA8C0872DE4
|
||||||
:1006D00082E0F5CFCE016FDF882311F080E0EFCF0D
|
:1006D000023009F080C074C0EF2DF0E0E25EFF4F01
|
||||||
:1006E00083E0EDCFCF93DF93EC0165DF811103C091
|
:1006E0008491612F50DF0F900F900F90DF91CF9189
|
||||||
:1006F000DF91CF910895D2DF8823D1F32C81822F0F
|
:1006F0001F910F91FF90EF90DF90CF90BF90AF9040
|
||||||
:1007000090E08095909580769927892B09F055C0C7
|
:100700009F908F907F9008956C01883E934034F0C5
|
||||||
:100710002FE73FE482E1215030408040E1F700C004
|
:100710000F2EF7EECF2EF3E0DF2EF02DEE24E39434
|
||||||
:100720000000CE0148DF882309F469C01D8A898151
|
:10072000D194C194D108C601F6DEB82E52E011E092
|
||||||
:1007300090E04881242F382F33230CF463C0359583
|
:10073000851310E02AE030E0C601B90186D08B8332
|
||||||
:100740002795359527953595279535952795398B97
|
:10074000CB01B90182D08A83C60164E670E07DD016
|
||||||
:10075000288B80959095887F9927892B09F055C023
|
:10075000CB01B9017AD0A82E898381E0B81609F4BB
|
||||||
:1007600081E08C8B4195488388818F70282F30E001
|
:10076000A0CF03E00B19033008F0B6CF82E090E091
|
||||||
:10077000C901880F991F82959295907F9827807F55
|
:100770006C01C918D1087E2C6894992497F8812CB3
|
||||||
:100780009827821B930B880F991F880F991F820F40
|
:1007800033C01C151D0409F495CFA11015C0202FEE
|
||||||
:10079000931F880F991F880F991F880F991F9C011D
|
:1007900030E0E1E0F0E0EC0FFD1FE20FF31F80819D
|
||||||
:1007A0009923ACF13595279535952795359527955E
|
:1007A00081110AC042E050E04C0F5D1F240F351F3D
|
||||||
:1007B000359527953B8B2A8B9BCF26FF0AC09FEB55
|
:1007B000F901908191110FC0F1E0BF1609F487CFC4
|
||||||
:1007C00027E239E0915020403040E1F700C00000BE
|
:1007C000E1E0F0E0EC0FFD1FE00FF11DE081F0E053
|
||||||
:1007D000A8CF25FF0AC08FEF96E924E08150904012
|
:1007D000E25EFF4F8491612FD6DE81E0800F1F5FC4
|
||||||
:1007E0002040E1F700C000009CCF3FE78BE492E09F
|
:1007E0000F5F833008F078CFEE2059F2112309F41F
|
||||||
:1007F000315080409040E1F700C0000092CF81E08E
|
:1007F0005ACF1C151D0421F783E0B81609F3E1E078
|
||||||
:100800008D8B76CF215F3F4F9ACF1C8AADCF215F72
|
:10080000F0E0EC0FFD1FE00FF11DE081F0E0E25E93
|
||||||
:100810003F4FC8CFAA1BBB1B51E107C0AA1FBB1F7C
|
:10081000FF4FE491F2E0892DBF1609F453CF8E2BE0
|
||||||
:10082000A617B70710F0A61BB70B881F991F5A957C
|
:10082000DACFAA1BBB1B51E107C0AA1FBB1FA6172B
|
||||||
:10083000A9F780959095BC01CD01089597FB072EEF
|
:10083000B70710F0A61BB70B881F991F5A95A9F789
|
||||||
:1008400016F4009406D077FD08D0E4DF07FC05D04D
|
:1008400080959095BC01CD01089597FB072E16F475
|
||||||
:100850003EF4909581959F4F0895709561957F4FD7
|
:10085000009406D077FD08D0E4DF07FC05D03EF415
|
||||||
:060860000895F894FFCF9B
|
:10086000909581959F4F0895709561957F4F08955C
|
||||||
|
:04087000F894FFCF2A
|
||||||
:00000001FF
|
:00000001FF
|
||||||
|
|||||||
2181
firmware/dist/default/production/firmware.production.lss
vendored
2181
firmware/dist/default/production/firmware.production.lss
vendored
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ Archive member included to satisfy reference by file (symbol)
|
|||||||
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
||||||
build/default/production/main.o (__udivmodhi4)
|
build/default/production/main.o (__udivmodhi4)
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
|
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
|
||||||
build/default/production/main.o (__divmodhi4)
|
build/default/production/tm1637.o (__divmodhi4)
|
||||||
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
||||||
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o (exit)
|
/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o (exit)
|
||||||
|
|
||||||
@ -20,6 +20,12 @@ Discarded input sections
|
|||||||
.text 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
.text 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
||||||
.data 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
.data 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
||||||
.bss 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
.bss 0x0000000000000000 0x0 build/default/production/dstemperature.o
|
||||||
|
.text 0x0000000000000000 0x0 build/default/production/twi.o
|
||||||
|
.data 0x0000000000000000 0x0 build/default/production/twi.o
|
||||||
|
.bss 0x0000000000000000 0x0 build/default/production/twi.o
|
||||||
|
.text 0x0000000000000000 0x0 build/default/production/tm1637.o
|
||||||
|
.data 0x0000000000000000 0x0 build/default/production/tm1637.o
|
||||||
|
.bss 0x0000000000000000 0x0 build/default/production/tm1637.o
|
||||||
.text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
.text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
||||||
.data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
.data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
||||||
.bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
.bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
||||||
@ -83,6 +89,8 @@ LOAD /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny4
|
|||||||
LOAD build/default/production/main.o
|
LOAD build/default/production/main.o
|
||||||
LOAD build/default/production/onewire.o
|
LOAD build/default/production/onewire.o
|
||||||
LOAD build/default/production/dstemperature.o
|
LOAD build/default/production/dstemperature.o
|
||||||
|
LOAD build/default/production/twi.o
|
||||||
|
LOAD build/default/production/tm1637.o
|
||||||
0x0000000000000001 __MPLAB_BUILD = 0x1
|
0x0000000000000001 __MPLAB_BUILD = 0x1
|
||||||
START GROUP
|
START GROUP
|
||||||
LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a
|
LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a
|
||||||
@ -193,7 +201,7 @@ END GROUP
|
|||||||
.rela.plt
|
.rela.plt
|
||||||
*(.rela.plt)
|
*(.rela.plt)
|
||||||
|
|
||||||
.text 0x0000000000000000 0x866
|
.text 0x0000000000000000 0x874
|
||||||
*(.vectors)
|
*(.vectors)
|
||||||
.vectors 0x0000000000000000 0x1e /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o
|
.vectors 0x0000000000000000 0x1e /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o
|
||||||
0x0000000000000000 __vectors
|
0x0000000000000000 __vectors
|
||||||
@ -210,7 +218,7 @@ END GROUP
|
|||||||
*libc.a:*(.progmem.data)
|
*libc.a:*(.progmem.data)
|
||||||
*(.progmem*)
|
*(.progmem*)
|
||||||
.progmem.data.display_symbols
|
.progmem.data.display_symbols
|
||||||
0x000000000000001e 0xa build/default/production/main.o
|
0x000000000000001e 0xa build/default/production/tm1637.o
|
||||||
0x0000000000000028 . = ALIGN (0x2)
|
0x0000000000000028 . = ALIGN (0x2)
|
||||||
*(.jumptables)
|
*(.jumptables)
|
||||||
*(.jumptables*)
|
*(.jumptables*)
|
||||||
@ -267,92 +275,92 @@ END GROUP
|
|||||||
0x0000000000000038 __vector_10
|
0x0000000000000038 __vector_10
|
||||||
0x000000000000003a . = ALIGN (0x2)
|
0x000000000000003a . = ALIGN (0x2)
|
||||||
*(.text.*)
|
*(.text.*)
|
||||||
.text.TWI_Start
|
|
||||||
0x000000000000003a 0x1e build/default/production/main.o
|
|
||||||
0x000000000000003a TWI_Start
|
|
||||||
.text.TWI_Stop
|
|
||||||
0x0000000000000058 0x1e build/default/production/main.o
|
|
||||||
0x0000000000000058 TWI_Stop
|
|
||||||
.text.TWI_WriteByte
|
|
||||||
0x0000000000000076 0x68 build/default/production/main.o
|
|
||||||
0x0000000000000076 TWI_WriteByte
|
|
||||||
.text.TM1637_WriteByte
|
|
||||||
0x00000000000000de 0x10 build/default/production/main.o
|
|
||||||
0x00000000000000de TM1637_WriteByte
|
|
||||||
.text.TM1637_Init
|
|
||||||
0x00000000000000ee 0x34 build/default/production/main.o
|
|
||||||
0x00000000000000ee TM1637_Init
|
|
||||||
.text.TM1637_DisplaySymbol
|
|
||||||
0x0000000000000122 0x20 build/default/production/main.o
|
|
||||||
0x0000000000000122 TM1637_DisplaySymbol
|
|
||||||
.text.TM1637_DisplayLine
|
|
||||||
0x0000000000000142 0x14 build/default/production/main.o
|
|
||||||
0x0000000000000142 TM1637_DisplayLine
|
|
||||||
.text.TM1637_DisplayInt
|
|
||||||
0x0000000000000156 0x86 build/default/production/main.o
|
|
||||||
0x0000000000000156 TM1637_DisplayInt
|
|
||||||
.text.get_int_length
|
|
||||||
0x00000000000001dc 0x2c build/default/production/main.o
|
|
||||||
0x00000000000001dc get_int_length
|
|
||||||
.text.TM1637_DisplayFixedNum
|
|
||||||
0x0000000000000208 0x1e2 build/default/production/main.o
|
|
||||||
0x0000000000000208 TM1637_DisplayFixedNum
|
|
||||||
.text.SensorErrorHandler
|
.text.SensorErrorHandler
|
||||||
0x00000000000003ea 0x20 build/default/production/main.o
|
0x000000000000003a 0x20 build/default/production/main.o
|
||||||
0x00000000000003ea SensorErrorHandler
|
0x000000000000003a SensorErrorHandler
|
||||||
.text.main 0x000000000000040a 0x9c build/default/production/main.o
|
.text.main 0x000000000000005a 0x9e build/default/production/main.o
|
||||||
0x000000000000040a main
|
0x000000000000005a main
|
||||||
.text.OneWire_Presence
|
.text.OneWire_Presence
|
||||||
0x00000000000004a6 0x36 build/default/production/onewire.o
|
0x00000000000000f8 0x36 build/default/production/onewire.o
|
||||||
0x00000000000004a6 OneWire_Presence
|
0x00000000000000f8 OneWire_Presence
|
||||||
.text.OneWire_WriteByte
|
.text.OneWire_WriteByte
|
||||||
0x00000000000004dc 0x3a build/default/production/onewire.o
|
0x000000000000012e 0x3a build/default/production/onewire.o
|
||||||
0x00000000000004dc OneWire_WriteByte
|
0x000000000000012e OneWire_WriteByte
|
||||||
.text.OneWire_ReadByte
|
.text.OneWire_ReadByte
|
||||||
0x0000000000000516 0x32 build/default/production/onewire.o
|
0x0000000000000168 0x32 build/default/production/onewire.o
|
||||||
0x0000000000000516 OneWire_ReadByte
|
0x0000000000000168 OneWire_ReadByte
|
||||||
.text.OneWire_SkipROM
|
.text.OneWire_SkipROM
|
||||||
0x0000000000000548 0x10 build/default/production/onewire.o
|
0x000000000000019a 0x10 build/default/production/onewire.o
|
||||||
0x0000000000000548 OneWire_SkipROM
|
0x000000000000019a OneWire_SkipROM
|
||||||
.text.OneWire_ReadROM
|
.text.OneWire_ReadROM
|
||||||
0x0000000000000558 0x32 build/default/production/onewire.o
|
0x00000000000001aa 0x32 build/default/production/onewire.o
|
||||||
0x0000000000000558 OneWire_ReadROM
|
0x00000000000001aa OneWire_ReadROM
|
||||||
.text.OneWire_CRC8_Update
|
.text.OneWire_CRC8_Update
|
||||||
0x000000000000058a 0x2c build/default/production/onewire.o
|
0x00000000000001dc 0x2c build/default/production/onewire.o
|
||||||
0x000000000000058a OneWire_CRC8_Update
|
0x00000000000001dc OneWire_CRC8_Update
|
||||||
.text.DallasTemp_ReadScratchpad
|
.text.DallasTemp_ReadScratchpad
|
||||||
0x00000000000005b6 0x52 build/default/production/dstemperature.o
|
0x0000000000000208 0x52 build/default/production/dstemperature.o
|
||||||
0x00000000000005b6 DallasTemp_ReadScratchpad
|
0x0000000000000208 DallasTemp_ReadScratchpad
|
||||||
.text.DallasTemp_CopyScratchpad
|
.text.DallasTemp_CopyScratchpad
|
||||||
0x0000000000000608 0x12 build/default/production/dstemperature.o
|
0x000000000000025a 0x1e build/default/production/dstemperature.o
|
||||||
0x0000000000000608 DallasTemp_CopyScratchpad
|
0x000000000000025a DallasTemp_CopyScratchpad
|
||||||
.text.DallasTemp_WriteScratchpad
|
.text.DallasTemp_WriteScratchpad
|
||||||
0x000000000000061a 0x20 build/default/production/dstemperature.o
|
0x0000000000000278 0x20 build/default/production/dstemperature.o
|
||||||
0x000000000000061a DallasTemp_WriteScratchpad
|
0x0000000000000278 DallasTemp_WriteScratchpad
|
||||||
.text.DallasTemp_SetResolution
|
.text.DallasTemp_SetResolution
|
||||||
0x000000000000063a 0x62 build/default/production/dstemperature.o
|
0x0000000000000298 0x62 build/default/production/dstemperature.o
|
||||||
0x000000000000063a DallasTemp_SetResolution
|
0x0000000000000298 DallasTemp_SetResolution
|
||||||
.text.DallasTemp_Convert
|
.text.DallasTemp_Convert
|
||||||
0x000000000000069c 0x14 build/default/production/dstemperature.o
|
0x00000000000002fa 0x14 build/default/production/dstemperature.o
|
||||||
0x000000000000069c DallasTemp_Convert
|
0x00000000000002fa DallasTemp_Convert
|
||||||
.text.DallasTemp_CheckError
|
.text.DallasTemp_CheckError
|
||||||
0x00000000000006b0 0x34 build/default/production/dstemperature.o
|
0x000000000000030e 0x34 build/default/production/dstemperature.o
|
||||||
0x00000000000006b0 DallasTemp_CheckError
|
0x000000000000030e DallasTemp_CheckError
|
||||||
.text.DallasTemp_GetTemperature
|
.text.DallasTemp_GetTemperature
|
||||||
0x00000000000006e4 0x130 build/default/production/dstemperature.o
|
0x0000000000000342 0x130 build/default/production/dstemperature.o
|
||||||
0x00000000000006e4 DallasTemp_GetTemperature
|
0x0000000000000342 DallasTemp_GetTemperature
|
||||||
|
.text.TWI_Start
|
||||||
|
0x0000000000000472 0x1e build/default/production/twi.o
|
||||||
|
0x0000000000000472 TWI_Start
|
||||||
|
.text.TWI_Stop
|
||||||
|
0x0000000000000490 0x1e build/default/production/twi.o
|
||||||
|
0x0000000000000490 TWI_Stop
|
||||||
|
.text.TWI_WriteByte
|
||||||
|
0x00000000000004ae 0x68 build/default/production/twi.o
|
||||||
|
0x00000000000004ae TWI_WriteByte
|
||||||
|
.text.get_int_length
|
||||||
|
0x0000000000000516 0x2c build/default/production/tm1637.o
|
||||||
|
0x0000000000000516 get_int_length
|
||||||
|
.text.TM1637_WriteByte
|
||||||
|
0x0000000000000542 0x10 build/default/production/tm1637.o
|
||||||
|
0x0000000000000542 TM1637_WriteByte
|
||||||
|
.text.TM1637_Init
|
||||||
|
0x0000000000000552 0x34 build/default/production/tm1637.o
|
||||||
|
0x0000000000000552 TM1637_Init
|
||||||
|
.text.TM1637_DisplaySymbol
|
||||||
|
0x0000000000000586 0x20 build/default/production/tm1637.o
|
||||||
|
0x0000000000000586 TM1637_DisplaySymbol
|
||||||
|
.text.TM1637_DisplayLine
|
||||||
|
0x00000000000005a6 0x14 build/default/production/tm1637.o
|
||||||
|
0x00000000000005a6 TM1637_DisplayLine
|
||||||
|
.text.TM1637_DisplayInt
|
||||||
|
0x00000000000005ba 0x86 build/default/production/tm1637.o
|
||||||
|
0x00000000000005ba TM1637_DisplayInt
|
||||||
|
.text.TM1637_DisplayFixedNum
|
||||||
|
0x0000000000000640 0x1e2 build/default/production/tm1637.o
|
||||||
|
0x0000000000000640 TM1637_DisplayFixedNum
|
||||||
.text.libgcc.div
|
.text.libgcc.div
|
||||||
0x0000000000000814 0x28 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
0x0000000000000822 0x28 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
|
||||||
0x0000000000000814 __udivmodhi4
|
0x0000000000000822 __udivmodhi4
|
||||||
.text.libgcc.div
|
.text.libgcc.div
|
||||||
0x000000000000083c 0x26 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
|
0x000000000000084a 0x26 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
|
||||||
0x000000000000083c __divmodhi4
|
0x000000000000084a __divmodhi4
|
||||||
0x000000000000083c _div
|
0x000000000000084a _div
|
||||||
0x0000000000000862 . = ALIGN (0x2)
|
0x0000000000000870 . = ALIGN (0x2)
|
||||||
*(.fini9)
|
*(.fini9)
|
||||||
.fini9 0x0000000000000862 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
.fini9 0x0000000000000870 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
||||||
0x0000000000000862 exit
|
0x0000000000000870 exit
|
||||||
0x0000000000000862 _exit
|
0x0000000000000870 _exit
|
||||||
*(.fini9)
|
*(.fini9)
|
||||||
*(.fini8)
|
*(.fini8)
|
||||||
*(.fini8)
|
*(.fini8)
|
||||||
@ -371,11 +379,11 @@ END GROUP
|
|||||||
*(.fini1)
|
*(.fini1)
|
||||||
*(.fini1)
|
*(.fini1)
|
||||||
*(.fini0)
|
*(.fini0)
|
||||||
.fini0 0x0000000000000862 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
.fini0 0x0000000000000870 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
|
||||||
*(.fini0)
|
*(.fini0)
|
||||||
0x0000000000000866 _etext = .
|
0x0000000000000874 _etext = .
|
||||||
|
|
||||||
.data 0x0000000000800060 0x0 load address 0x0000000000000866
|
.data 0x0000000000800060 0x0 load address 0x0000000000000874
|
||||||
[!provide] PROVIDE (__data_start, .)
|
[!provide] PROVIDE (__data_start, .)
|
||||||
*(.data)
|
*(.data)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
@ -393,8 +401,8 @@ END GROUP
|
|||||||
*(.bss*)
|
*(.bss*)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
[!provide] PROVIDE (__bss_end, .)
|
[!provide] PROVIDE (__bss_end, .)
|
||||||
0x0000000000000866 __data_load_start = LOADADDR (.data)
|
0x0000000000000874 __data_load_start = LOADADDR (.data)
|
||||||
0x0000000000000866 __data_load_end = (__data_load_start + SIZEOF (.data))
|
0x0000000000000874 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||||
|
|
||||||
.noinit 0x0000000000800060 0x0
|
.noinit 0x0000000000800060 0x0
|
||||||
[!provide] PROVIDE (__noinit_start, .)
|
[!provide] PROVIDE (__noinit_start, .)
|
||||||
@ -446,6 +454,8 @@ END GROUP
|
|||||||
0x31 (size before relaxing)
|
0x31 (size before relaxing)
|
||||||
.comment 0x0000000000000030 0x31 build/default/production/onewire.o
|
.comment 0x0000000000000030 0x31 build/default/production/onewire.o
|
||||||
.comment 0x0000000000000030 0x31 build/default/production/dstemperature.o
|
.comment 0x0000000000000030 0x31 build/default/production/dstemperature.o
|
||||||
|
.comment 0x0000000000000030 0x31 build/default/production/twi.o
|
||||||
|
.comment 0x0000000000000030 0x31 build/default/production/tm1637.o
|
||||||
|
|
||||||
.note.gnu.avr.deviceinfo
|
.note.gnu.avr.deviceinfo
|
||||||
0x0000000000000000 0x3c
|
0x0000000000000000 0x3c
|
||||||
|
|||||||
@ -21,7 +21,7 @@ uint8_t DallasTemp_CopyScratchpad(void) {
|
|||||||
if (!OneWire_Presence()) return 0;
|
if (!OneWire_Presence()) return 0;
|
||||||
OneWire_SkipROM();
|
OneWire_SkipROM();
|
||||||
OneWire_WriteByte(DS18B20_CMD_CPSCRATCHPAD);
|
OneWire_WriteByte(DS18B20_CMD_CPSCRATCHPAD);
|
||||||
// _delay_ms(10); если паразитное питание то ждем 10мс и далее делать сброс
|
_delay_ms(10); // если паразитное питание то далее делать сброс
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
231
firmware/main.c
231
firmware/main.c
@ -1,241 +1,16 @@
|
|||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
#include "onewire.h"
|
#include "onewire.h"
|
||||||
|
#include "twi.h"
|
||||||
|
#include "tm1637.h"
|
||||||
#include "dstemperature.h"
|
#include "dstemperature.h"
|
||||||
|
|
||||||
#define ENABLE_ERROR_HANDLER 1
|
#define ENABLE_ERROR_HANDLER 1
|
||||||
|
|
||||||
#define DDR_TWI DDRB
|
|
||||||
#define PORT_TWI PORTB
|
|
||||||
#define PIN_TWI PINB
|
|
||||||
#define PORT_TWI_DIO PB0
|
|
||||||
#define PORT_TWI_CLK PB2
|
|
||||||
#define PIN_TWI_DIO PINB0
|
|
||||||
#define PIN_TWI_CLK PINB2
|
|
||||||
#define TWI_DELAY 5 // uS
|
|
||||||
|
|
||||||
#define PIN_LED_ERR PB1
|
#define PIN_LED_ERR PB1
|
||||||
|
|
||||||
#define TM1637_DIGITS_COUNT 3
|
|
||||||
|
|
||||||
#define TM1637_DATA_CMD 0x40 // Data command setting
|
|
||||||
#define TM1637_DISP_CMD 0x80 // Display and control command setting
|
|
||||||
#define TM1637_ADDR_CMD 0xc0 // Address command setting
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Data write and read mode settings
|
|
||||||
*/
|
|
||||||
#define TM1637_WR_DATA 0x00 // Write data to display register
|
|
||||||
#define TM1637_RD_SCAN_DATA 0x02 // Read key scan data
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address adding mode setting
|
|
||||||
*/
|
|
||||||
#define TM1637_ADDR_AUTO 0x00 // Automatic address adding
|
|
||||||
#define TM1637_ADDR_FIXED 0x04 // Fix address
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test mode setting (for internal)
|
|
||||||
*/
|
|
||||||
#define TM1637_MODE_NORMAL 0x00 // Normal mode
|
|
||||||
#define TM1637_MODE_TEST 0x08 // Test mode
|
|
||||||
|
|
||||||
#define TM1637_DISP_OFF 0x00 // Display off
|
|
||||||
#define TM1637_DISP_ON 0x08 // Display on
|
|
||||||
|
|
||||||
#define TM1637_BRIGHTNESS_1 1
|
|
||||||
#define TM1637_BRIGHTNESS_2 2
|
|
||||||
#define TM1637_BRIGHTNESS_3 3
|
|
||||||
#define TM1637_BRIGHTNESS_4 4
|
|
||||||
#define TM1637_BRIGHTNESS_5 5
|
|
||||||
#define TM1637_BRIGHTNESS_6 6
|
|
||||||
#define TM1637_BRIGHTNESS_7 7
|
|
||||||
|
|
||||||
#define dio_high() (PORT_TWI |= (_BV(PORT_TWI_DIO)))
|
|
||||||
#define dio_low() (PORT_TWI &= (~_BV(PORT_TWI_DIO)))
|
|
||||||
#define dio_input() (DDR_TWI &= (~_BV(PORT_TWI_DIO)))
|
|
||||||
#define dio_output() (DDR_TWI |= (_BV(PORT_TWI_DIO)))
|
|
||||||
#define clk_high() (PORT_TWI |= (_BV(PORT_TWI_CLK)))
|
|
||||||
#define clk_low() (PORT_TWI &= (~_BV(PORT_TWI_CLK)))
|
|
||||||
|
|
||||||
#define get_symbol(index) (pgm_read_byte_near(&display_symbols[index]))
|
|
||||||
|
|
||||||
static const uint8_t display_symbols[] PROGMEM =
|
|
||||||
{
|
|
||||||
0x3F, // 0
|
|
||||||
0x06, // 1
|
|
||||||
0x5B, // 2
|
|
||||||
0x4F, // 3
|
|
||||||
0x66, // 4
|
|
||||||
0x6D, // 5
|
|
||||||
0x7D, // 6
|
|
||||||
0x07, // 7
|
|
||||||
0x7F, // 8
|
|
||||||
0x6F, // 9
|
|
||||||
};
|
|
||||||
|
|
||||||
void TWI_Start(void) {
|
|
||||||
cli();
|
|
||||||
dio_high();
|
|
||||||
clk_high();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
dio_low();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
clk_low();
|
|
||||||
sei();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TWI_Stop(void) {
|
|
||||||
cli();
|
|
||||||
clk_low();
|
|
||||||
dio_low();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
clk_high();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
dio_high();
|
|
||||||
sei();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t TWI_WriteByte(uint8_t byte) {
|
|
||||||
uint8_t i = 8;
|
|
||||||
uint8_t ack = 0;
|
|
||||||
|
|
||||||
cli();
|
|
||||||
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
|
|
||||||
do {
|
|
||||||
clk_low();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
byte & 0x01 ? dio_high() : dio_low();
|
|
||||||
byte >>= 1;
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
clk_high();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
} while (--i);
|
|
||||||
|
|
||||||
dio_input();
|
|
||||||
clk_low();
|
|
||||||
dio_high();
|
|
||||||
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
ack = bit_is_clear(PIN_TWI, PIN_TWI_DIO);
|
|
||||||
|
|
||||||
clk_high();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
clk_low();
|
|
||||||
_delay_us(TWI_DELAY);
|
|
||||||
dio_output();
|
|
||||||
|
|
||||||
sei();
|
|
||||||
|
|
||||||
return ack;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_WriteByte(uint8_t data) {
|
|
||||||
TWI_Start();
|
|
||||||
TWI_WriteByte(data);
|
|
||||||
TWI_Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_Init(uint8_t DIO_PIN, uint8_t CLK_PIN, uint8_t brightness, uint8_t enabled) {
|
|
||||||
DDR_TWI |= _BV(DIO_PIN) | _BV(CLK_PIN);
|
|
||||||
PORT_TWI &= ~(_BV(DIO_PIN) | _BV(CLK_PIN));
|
|
||||||
TM1637_WriteByte(TM1637_DISP_CMD | (enabled | brightness));
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_DisplaySymbol(uint8_t symbol, uint8_t pos) {
|
|
||||||
TM1637_WriteByte(TM1637_DATA_CMD);
|
|
||||||
TWI_Start();
|
|
||||||
TWI_WriteByte(TM1637_ADDR_CMD | pos);
|
|
||||||
TWI_WriteByte(symbol);
|
|
||||||
TWI_Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_DisplayLine(void) {
|
|
||||||
uint8_t i = TM1637_DIGITS_COUNT;
|
|
||||||
do {
|
|
||||||
TM1637_DisplaySymbol(0x40, i - 1);
|
|
||||||
} while (--i);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_DisplayInt(int16_t num) {
|
|
||||||
uint8_t is_signed = num < 0;
|
|
||||||
int16_t tmp = num > 999 ? 999 : num;
|
|
||||||
uint8_t i = TM1637_DIGITS_COUNT;
|
|
||||||
|
|
||||||
if (is_signed) {
|
|
||||||
tmp = -tmp;
|
|
||||||
TM1637_DisplaySymbol(0x40, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (is_signed && i == 1) break;
|
|
||||||
TM1637_DisplaySymbol(pgm_read_byte_near(&display_symbols[tmp % 10]), i - 1);
|
|
||||||
tmp /= 10;
|
|
||||||
} while (--i);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t get_int_length(int16_t num) {
|
|
||||||
uint8_t l = 1;
|
|
||||||
if (num < 0) num = -num;
|
|
||||||
while (num > 9) {
|
|
||||||
num /= 10;
|
|
||||||
l++;
|
|
||||||
}
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TM1637_DisplayFixedNum(int16_t num, uint8_t frac, uint8_t presicion, uint8_t sign) {
|
|
||||||
uint8_t is_signed = (num < 0) || (sign);
|
|
||||||
num = num > 999 ? 999 : num;
|
|
||||||
|
|
||||||
if (is_signed) {
|
|
||||||
num = -num;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t length = get_int_length(num);
|
|
||||||
uint8_t is_overflow = length + 1 == TM1637_DIGITS_COUNT;
|
|
||||||
uint8_t i = TM1637_DIGITS_COUNT, j = is_overflow && is_signed ? 1 : 0;
|
|
||||||
uint8_t buffer[TM1637_DIGITS_COUNT];
|
|
||||||
|
|
||||||
do {
|
|
||||||
buffer[i - 1] = num % 10;
|
|
||||||
num /= 10;
|
|
||||||
} while (--i);
|
|
||||||
|
|
||||||
if (length != 1) {
|
|
||||||
i = TM1637_DIGITS_COUNT - length;
|
|
||||||
} else {
|
|
||||||
i = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (i < TM1637_DIGITS_COUNT) {
|
|
||||||
if (is_signed && j == 0) {
|
|
||||||
TM1637_DisplaySymbol(0x40, 0);
|
|
||||||
i++;
|
|
||||||
j++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
TM1637_DisplaySymbol(
|
|
||||||
(j == TM1637_DIGITS_COUNT - 1 - presicion && TM1637_DIGITS_COUNT != length)
|
|
||||||
? get_symbol(buffer[i]) | (is_overflow && is_signed ? 0 : 0x80) // точка
|
|
||||||
: (!is_signed &&
|
|
||||||
((buffer[0] == 0 && buffer[i] == 0 && buffer[i + 1] != 0) || (length == 1 && i != TM1637_DIGITS_COUNT - 1)) // убираем вывод нулей
|
|
||||||
? 0x00
|
|
||||||
: get_symbol(buffer[i])
|
|
||||||
),
|
|
||||||
j);
|
|
||||||
i++;
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
|
|
||||||
TM1637_DisplaySymbol(get_symbol(frac), j);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Обработка ошибки одного датчика
|
* Обработка ошибки одного датчика
|
||||||
* @param Sensor - датчик
|
* @param Sensor - датчик
|
||||||
@ -278,6 +53,8 @@ int main(void) {
|
|||||||
|
|
||||||
_delay_ms(100);
|
_delay_ms(100);
|
||||||
|
|
||||||
|
sei();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
#if ENABLE_ERROR_HANDLER
|
#if ENABLE_ERROR_HANDLER
|
||||||
if (SensorErrorHandler(&Sensor_01)) {
|
if (SensorErrorHandler(&Sensor_01)) {
|
||||||
|
|||||||
@ -57,17 +57,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
|
|||||||
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
|
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
|
||||||
|
|
||||||
# Source Files Quoted if spaced
|
# Source Files Quoted if spaced
|
||||||
SOURCEFILES_QUOTED_IF_SPACED=main.c onewire.c dstemperature.c
|
SOURCEFILES_QUOTED_IF_SPACED=main.c onewire.c dstemperature.c twi.c tm1637.c
|
||||||
|
|
||||||
# Object Files Quoted if spaced
|
# Object Files Quoted if spaced
|
||||||
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o ${OBJECTDIR}/dstemperature.o
|
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o ${OBJECTDIR}/dstemperature.o ${OBJECTDIR}/twi.o ${OBJECTDIR}/tm1637.o
|
||||||
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d ${OBJECTDIR}/onewire.o.d ${OBJECTDIR}/dstemperature.o.d
|
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d ${OBJECTDIR}/onewire.o.d ${OBJECTDIR}/dstemperature.o.d ${OBJECTDIR}/twi.o.d ${OBJECTDIR}/tm1637.o.d
|
||||||
|
|
||||||
# Object Files
|
# Object Files
|
||||||
OBJECTFILES=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o ${OBJECTDIR}/dstemperature.o
|
OBJECTFILES=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o ${OBJECTDIR}/dstemperature.o ${OBJECTDIR}/twi.o ${OBJECTDIR}/tm1637.o
|
||||||
|
|
||||||
# Source Files
|
# Source Files
|
||||||
SOURCEFILES=main.c onewire.c dstemperature.c
|
SOURCEFILES=main.c onewire.c dstemperature.c twi.c tm1637.c
|
||||||
|
|
||||||
# Pack Options
|
# Pack Options
|
||||||
PACK_COMPILER_OPTIONS=-I "${DFP_DIR}/include"
|
PACK_COMPILER_OPTIONS=-I "${DFP_DIR}/include"
|
||||||
@ -128,6 +128,18 @@ ${OBJECTDIR}/dstemperature.o: dstemperature.c .generated_files/flags/default/69
|
|||||||
@${RM} ${OBJECTDIR}/dstemperature.o
|
@${RM} ${OBJECTDIR}/dstemperature.o
|
||||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/dstemperature.o.d" -MT "${OBJECTDIR}/dstemperature.o.d" -MT ${OBJECTDIR}/dstemperature.o -o ${OBJECTDIR}/dstemperature.o dstemperature.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/dstemperature.o.d" -MT "${OBJECTDIR}/dstemperature.o.d" -MT ${OBJECTDIR}/dstemperature.o -o ${OBJECTDIR}/dstemperature.o dstemperature.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
|
${OBJECTDIR}/twi.o: twi.c .generated_files/flags/default/d596a418b2941f91dfcb39d40e0cfd3f525afd03 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
||||||
|
@${MKDIR} "${OBJECTDIR}"
|
||||||
|
@${RM} ${OBJECTDIR}/twi.o.d
|
||||||
|
@${RM} ${OBJECTDIR}/twi.o
|
||||||
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/twi.o.d" -MT "${OBJECTDIR}/twi.o.d" -MT ${OBJECTDIR}/twi.o -o ${OBJECTDIR}/twi.o twi.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
|
${OBJECTDIR}/tm1637.o: tm1637.c .generated_files/flags/default/8caab7d1f321339335cad158b786d3a8a151da8d .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
||||||
|
@${MKDIR} "${OBJECTDIR}"
|
||||||
|
@${RM} ${OBJECTDIR}/tm1637.o.d
|
||||||
|
@${RM} ${OBJECTDIR}/tm1637.o
|
||||||
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/tm1637.o.d" -MT "${OBJECTDIR}/tm1637.o.d" -MT ${OBJECTDIR}/tm1637.o -o ${OBJECTDIR}/tm1637.o tm1637.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
else
|
else
|
||||||
${OBJECTDIR}/main.o: main.c .generated_files/flags/default/e8b0a82687c5817bdc823aa0198151107a4c0b07 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
${OBJECTDIR}/main.o: main.c .generated_files/flags/default/e8b0a82687c5817bdc823aa0198151107a4c0b07 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
||||||
@${MKDIR} "${OBJECTDIR}"
|
@${MKDIR} "${OBJECTDIR}"
|
||||||
@ -147,6 +159,18 @@ ${OBJECTDIR}/dstemperature.o: dstemperature.c .generated_files/flags/default/dd
|
|||||||
@${RM} ${OBJECTDIR}/dstemperature.o
|
@${RM} ${OBJECTDIR}/dstemperature.o
|
||||||
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/dstemperature.o.d" -MT "${OBJECTDIR}/dstemperature.o.d" -MT ${OBJECTDIR}/dstemperature.o -o ${OBJECTDIR}/dstemperature.o dstemperature.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/dstemperature.o.d" -MT "${OBJECTDIR}/dstemperature.o.d" -MT ${OBJECTDIR}/dstemperature.o -o ${OBJECTDIR}/dstemperature.o dstemperature.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
|
${OBJECTDIR}/twi.o: twi.c .generated_files/flags/default/4301bd1a2a4981da7b459539bb87110266e22c69 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
||||||
|
@${MKDIR} "${OBJECTDIR}"
|
||||||
|
@${RM} ${OBJECTDIR}/twi.o.d
|
||||||
|
@${RM} ${OBJECTDIR}/twi.o
|
||||||
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/twi.o.d" -MT "${OBJECTDIR}/twi.o.d" -MT ${OBJECTDIR}/twi.o -o ${OBJECTDIR}/twi.o twi.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
|
${OBJECTDIR}/tm1637.o: tm1637.c .generated_files/flags/default/14e85bf2b5c38862ce0be771f34802e5d6a15ad1 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f
|
||||||
|
@${MKDIR} "${OBJECTDIR}"
|
||||||
|
@${RM} ${OBJECTDIR}/tm1637.o.d
|
||||||
|
@${RM} ${OBJECTDIR}/tm1637.o
|
||||||
|
${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/tm1637.o.d" -MT "${OBJECTDIR}/tm1637.o.d" -MT ${OBJECTDIR}/tm1637.o -o ${OBJECTDIR}/tm1637.o tm1637.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
#
|
#
|
||||||
#Mon Aug 07 20:30:36 MSK 2023
|
#Wed Aug 09 22:08:43 MSK 2023
|
||||||
default.languagetoolchain.version=7.3.0
|
default.languagetoolchain.version=7.3.0
|
||||||
default.Pack.dfplocation=/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151
|
default.Pack.dfplocation=/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151
|
||||||
default.com-microchip-mplab-nbide-toolchain-avr-AVRLanguageToolchain.md5=f7c8f2a9c7d7748a6cb97af5c32efadd
|
default.com-microchip-mplab-nbide-toolchain-avr-AVRLanguageToolchain.md5=f7c8f2a9c7d7748a6cb97af5c32efadd
|
||||||
conf.ids=default
|
conf.ids=default
|
||||||
default.languagetoolchain.dir=/opt/avr8-gnu-toolchain-linux_x86_64/bin
|
default.languagetoolchain.dir=/opt/avr8-gnu-toolchain-linux_x86_64/bin
|
||||||
host.id=hdtj-iuke-f
|
host.id=qc3j-gmtd-y
|
||||||
configurations-xml=d1bd56b6b541f41583a2af96dac4f51f
|
configurations-xml=e6919adf631f390ddd7b4242d05bcc5f
|
||||||
default.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=eaa336cefb7fc46db8b50b7b2b6e54ca
|
default.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=eaa336cefb7fc46db8b50b7b2b6e54ca
|
||||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b
|
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b
|
||||||
user-defined-mime-resolver-xml=none
|
user-defined-mime-resolver-xml=none
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>onewire.h</itemPath>
|
<itemPath>onewire.h</itemPath>
|
||||||
<itemPath>dstemperature.h</itemPath>
|
<itemPath>dstemperature.h</itemPath>
|
||||||
|
<itemPath>twi.h</itemPath>
|
||||||
|
<itemPath>tm1637.h</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="LinkerScript"
|
<logicalFolder name="LinkerScript"
|
||||||
displayName="Linker Files"
|
displayName="Linker Files"
|
||||||
@ -17,6 +19,8 @@
|
|||||||
<itemPath>main.c</itemPath>
|
<itemPath>main.c</itemPath>
|
||||||
<itemPath>onewire.c</itemPath>
|
<itemPath>onewire.c</itemPath>
|
||||||
<itemPath>dstemperature.c</itemPath>
|
<itemPath>dstemperature.c</itemPath>
|
||||||
|
<itemPath>twi.c</itemPath>
|
||||||
|
<itemPath>tm1637.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
|||||||
118
firmware/tm1637.c
Normal file
118
firmware/tm1637.c
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
#include "tm1637.h"
|
||||||
|
|
||||||
|
#define get_symbol(index) (pgm_read_byte_near(&display_symbols[index]))
|
||||||
|
|
||||||
|
static const uint8_t display_symbols[] PROGMEM =
|
||||||
|
{
|
||||||
|
0x3F, // 0
|
||||||
|
0x06, // 1
|
||||||
|
0x5B, // 2
|
||||||
|
0x4F, // 3
|
||||||
|
0x66, // 4
|
||||||
|
0x6D, // 5
|
||||||
|
0x7D, // 6
|
||||||
|
0x07, // 7
|
||||||
|
0x7F, // 8
|
||||||
|
0x6F, // 9
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t get_int_length(int16_t num) {
|
||||||
|
uint8_t l = 1;
|
||||||
|
if (num < 0) num = -num;
|
||||||
|
while (num > 9) {
|
||||||
|
num /= 10;
|
||||||
|
l++;
|
||||||
|
}
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_WriteByte(uint8_t data) {
|
||||||
|
TWI_Start();
|
||||||
|
TWI_WriteByte(data);
|
||||||
|
TWI_Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_Init(uint8_t DIO_PIN, uint8_t CLK_PIN, uint8_t brightness, uint8_t enabled) {
|
||||||
|
DDR_TWI |= _BV(DIO_PIN) | _BV(CLK_PIN);
|
||||||
|
PORT_TWI &= ~(_BV(DIO_PIN) | _BV(CLK_PIN));
|
||||||
|
TM1637_WriteByte(TM1637_DISP_CMD | (enabled | brightness));
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_DisplaySymbol(uint8_t symbol, uint8_t pos) {
|
||||||
|
TM1637_WriteByte(TM1637_DATA_CMD);
|
||||||
|
TWI_Start();
|
||||||
|
TWI_WriteByte(TM1637_ADDR_CMD | pos);
|
||||||
|
TWI_WriteByte(symbol);
|
||||||
|
TWI_Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_DisplayLine(void) {
|
||||||
|
uint8_t i = TM1637_DIGITS_COUNT;
|
||||||
|
do {
|
||||||
|
TM1637_DisplaySymbol(0x40, i - 1);
|
||||||
|
} while (--i);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_DisplayInt(int16_t num) {
|
||||||
|
uint8_t is_signed = num < 0;
|
||||||
|
int16_t tmp = num > 999 ? 999 : num;
|
||||||
|
uint8_t i = TM1637_DIGITS_COUNT;
|
||||||
|
|
||||||
|
if (is_signed) {
|
||||||
|
tmp = -tmp;
|
||||||
|
TM1637_DisplaySymbol(0x40, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (is_signed && i == 1) break;
|
||||||
|
TM1637_DisplaySymbol(pgm_read_byte_near(&display_symbols[tmp % 10]), i - 1);
|
||||||
|
tmp /= 10;
|
||||||
|
} while (--i);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TM1637_DisplayFixedNum(int16_t num, uint8_t frac, uint8_t presicion, uint8_t sign) {
|
||||||
|
uint8_t is_signed = (num < 0) || (sign);
|
||||||
|
num = num > 999 ? 999 : num;
|
||||||
|
|
||||||
|
if (is_signed) {
|
||||||
|
num = -num;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t length = get_int_length(num);
|
||||||
|
uint8_t is_overflow = length + 1 == TM1637_DIGITS_COUNT;
|
||||||
|
uint8_t i = TM1637_DIGITS_COUNT, j = is_overflow && is_signed ? 1 : 0;
|
||||||
|
uint8_t buffer[TM1637_DIGITS_COUNT];
|
||||||
|
|
||||||
|
do {
|
||||||
|
buffer[i - 1] = num % 10;
|
||||||
|
num /= 10;
|
||||||
|
} while (--i);
|
||||||
|
|
||||||
|
if (length != 1) {
|
||||||
|
i = TM1637_DIGITS_COUNT - length;
|
||||||
|
} else {
|
||||||
|
i = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (i < TM1637_DIGITS_COUNT) {
|
||||||
|
if (is_signed && j == 0) {
|
||||||
|
TM1637_DisplaySymbol(0x40, 0);
|
||||||
|
i++;
|
||||||
|
j++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
TM1637_DisplaySymbol(
|
||||||
|
(j == TM1637_DIGITS_COUNT - 1 - presicion && TM1637_DIGITS_COUNT != length)
|
||||||
|
? get_symbol(buffer[i]) | (is_overflow && is_signed ? 0 : 0x80) // точка
|
||||||
|
: (!is_signed &&
|
||||||
|
((buffer[0] == 0 && buffer[i] == 0 && buffer[i + 1] != 0) || (length == 1 && i != TM1637_DIGITS_COUNT - 1)) // убираем вывод нулей
|
||||||
|
? 0x00
|
||||||
|
: get_symbol(buffer[i])
|
||||||
|
),
|
||||||
|
j);
|
||||||
|
i++;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
|
||||||
|
TM1637_DisplaySymbol(get_symbol(frac), j);
|
||||||
|
}
|
||||||
50
firmware/tm1637.h
Normal file
50
firmware/tm1637.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#include "twi.h"
|
||||||
|
|
||||||
|
#define TM1637_DIGITS_COUNT 3
|
||||||
|
|
||||||
|
#define TM1637_DATA_CMD 0x40 // Data command setting
|
||||||
|
#define TM1637_DISP_CMD 0x80 // Display and control command setting
|
||||||
|
#define TM1637_ADDR_CMD 0xc0 // Address command setting
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data write and read mode settings
|
||||||
|
*/
|
||||||
|
#define TM1637_WR_DATA 0x00 // Write data to display register
|
||||||
|
#define TM1637_RD_SCAN_DATA 0x02 // Read key scan data
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address adding mode setting
|
||||||
|
*/
|
||||||
|
#define TM1637_ADDR_AUTO 0x00 // Automatic address adding
|
||||||
|
#define TM1637_ADDR_FIXED 0x04 // Fix address
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test mode setting (for internal)
|
||||||
|
*/
|
||||||
|
#define TM1637_MODE_NORMAL 0x00 // Normal mode
|
||||||
|
#define TM1637_MODE_TEST 0x08 // Test mode
|
||||||
|
|
||||||
|
#define TM1637_DISP_OFF 0x00 // Display off
|
||||||
|
#define TM1637_DISP_ON 0x08 // Display on
|
||||||
|
|
||||||
|
#define TM1637_BRIGHTNESS_1 1
|
||||||
|
#define TM1637_BRIGHTNESS_2 2
|
||||||
|
#define TM1637_BRIGHTNESS_3 3
|
||||||
|
#define TM1637_BRIGHTNESS_4 4
|
||||||
|
#define TM1637_BRIGHTNESS_5 5
|
||||||
|
#define TM1637_BRIGHTNESS_6 6
|
||||||
|
#define TM1637_BRIGHTNESS_7 7
|
||||||
|
|
||||||
|
#ifndef TM1637_H
|
||||||
|
#define TM1637_H
|
||||||
|
|
||||||
|
void TM1637_WriteByte(uint8_t data);
|
||||||
|
void TM1637_Init(uint8_t DIO_PIN, uint8_t CLK_PIN, uint8_t brightness, uint8_t enabled);
|
||||||
|
void TM1637_DisplaySymbol(uint8_t symbol, uint8_t pos);
|
||||||
|
void TM1637_DisplayLine(void);
|
||||||
|
void TM1637_DisplayInt(int16_t num);
|
||||||
|
void TM1637_DisplayFixedNum(int16_t num, uint8_t frac, uint8_t presicion, uint8_t sign);
|
||||||
|
|
||||||
|
#endif /* TM1637_H */
|
||||||
|
|
||||||
59
firmware/twi.c
Normal file
59
firmware/twi.c
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#include "twi.h"
|
||||||
|
|
||||||
|
void TWI_Start(void) {
|
||||||
|
cli();
|
||||||
|
dio_high();
|
||||||
|
clk_high();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
dio_low();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
clk_low();
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TWI_Stop(void) {
|
||||||
|
cli();
|
||||||
|
clk_low();
|
||||||
|
dio_low();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
clk_high();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
dio_high();
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t TWI_WriteByte(uint8_t byte) {
|
||||||
|
uint8_t i = 8;
|
||||||
|
uint8_t ack = 0;
|
||||||
|
|
||||||
|
cli();
|
||||||
|
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
|
||||||
|
do {
|
||||||
|
clk_low();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
byte & 0x01 ? dio_high() : dio_low();
|
||||||
|
byte >>= 1;
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
clk_high();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
} while (--i);
|
||||||
|
|
||||||
|
dio_input();
|
||||||
|
clk_low();
|
||||||
|
dio_high();
|
||||||
|
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
ack = bit_is_clear(PIN_TWI, PIN_TWI_DIO);
|
||||||
|
|
||||||
|
clk_high();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
clk_low();
|
||||||
|
_delay_us(TWI_DELAY);
|
||||||
|
dio_output();
|
||||||
|
|
||||||
|
sei();
|
||||||
|
|
||||||
|
return ack;
|
||||||
|
}
|
||||||
29
firmware/twi.h
Normal file
29
firmware/twi.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
|
||||||
|
#define DDR_TWI DDRB
|
||||||
|
#define PORT_TWI PORTB
|
||||||
|
#define PIN_TWI PINB
|
||||||
|
#define PORT_TWI_DIO PB0
|
||||||
|
#define PORT_TWI_CLK PB2
|
||||||
|
#define PIN_TWI_DIO PINB0
|
||||||
|
#define PIN_TWI_CLK PINB2
|
||||||
|
#define TWI_DELAY 5 // uS
|
||||||
|
|
||||||
|
#define dio_high() (PORT_TWI |= (_BV(PORT_TWI_DIO)))
|
||||||
|
#define dio_low() (PORT_TWI &= (~_BV(PORT_TWI_DIO)))
|
||||||
|
#define dio_input() (DDR_TWI &= (~_BV(PORT_TWI_DIO)))
|
||||||
|
#define dio_output() (DDR_TWI |= (_BV(PORT_TWI_DIO)))
|
||||||
|
#define clk_high() (PORT_TWI |= (_BV(PORT_TWI_CLK)))
|
||||||
|
#define clk_low() (PORT_TWI &= (~_BV(PORT_TWI_CLK)))
|
||||||
|
|
||||||
|
#ifndef TWI_H
|
||||||
|
#define TWI_H
|
||||||
|
|
||||||
|
void TWI_Start(void);
|
||||||
|
void TWI_Stop(void);
|
||||||
|
uint8_t TWI_WriteByte(uint8_t byte);
|
||||||
|
|
||||||
|
#endif /* TWI_H */
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user