├── README.md ├── bom ├── farnell.csv ├── other.txt └── reichelt.csv ├── images ├── 22780314_1206666822799181_4845087505472371951_n.jpg ├── 22780624_1207215072744356_6448307703032848811_n.jpg ├── 22851997_1206666786132518_3949441219433421302_n.jpg ├── 22885966_1207940582671805_9052044658180000451_n.jpg ├── 23131607_1213188442147019_5008004252267984808_n.jpg ├── 23131890_1213188468813683_2381276653004583966_n.jpg ├── 23244059_1218023491663514_6128260922593770176_n.jpg ├── 23380218_1219804668152063_8622113328646516671_n.jpg ├── 23380257_1223416981124165_4793755427854490814_n.jpg ├── 23559460_1223772024421994_2585757183464992038_n.jpg ├── 23559568_1223771867755343_5931761190105667111_n.jpg ├── DSC00244.JPG ├── Spectacle.Tw9321.png └── lcd.png ├── kicad ├── beamer1-cache.lib ├── beamer1.kicad_pcb ├── beamer1.net ├── beamer1.pdf ├── beamer1.pro ├── beamer1.sch └── gerber │ ├── README.txt │ ├── beamer1-B.Cu.gbl │ ├── beamer1-B.Mask.gbs │ ├── beamer1-B.SilkS.gbo │ ├── beamer1-Edge.Cuts.gm1 │ ├── beamer1-F.Cu.gtl │ ├── beamer1-F.Mask.gts │ ├── beamer1-F.SilkS.gto │ └── beamer1.drl ├── src ├── .cproject ├── .project ├── .settings │ └── language.settings.xml ├── ArduinoJson │ ├── Configuration.hpp │ ├── Data │ │ ├── Encoding.hpp │ │ ├── JsonBufferAllocated.hpp │ │ ├── JsonFloat.hpp │ │ ├── JsonInteger.hpp │ │ ├── JsonVariantAs.hpp │ │ ├── JsonVariantComparer.hpp │ │ ├── JsonVariantContent.hpp │ │ ├── JsonVariantDefault.hpp │ │ ├── JsonVariantType.hpp │ │ ├── List.hpp │ │ ├── ListConstIterator.hpp │ │ ├── ListIterator.hpp │ │ ├── ListNode.hpp │ │ ├── ReferenceType.hpp │ │ └── ValueSetter.hpp │ ├── Deserialization │ │ ├── Comments.hpp │ │ ├── JsonParser.hpp │ │ ├── JsonParserImpl.hpp │ │ └── StringWriter.hpp │ ├── DynamicJsonBuffer.hpp │ ├── JsonArray.hpp │ ├── JsonArrayImpl.hpp │ ├── JsonArraySubscript.hpp │ ├── JsonBuffer.hpp │ ├── JsonBufferBase.hpp │ ├── JsonBufferImpl.hpp │ ├── JsonObject.hpp │ ├── JsonObjectImpl.hpp │ ├── JsonObjectSubscript.hpp │ ├── JsonPair.hpp │ ├── JsonVariant.hpp │ ├── JsonVariantBase.hpp │ ├── JsonVariantComparisons.hpp │ ├── JsonVariantImpl.hpp │ ├── Polyfills │ │ ├── attributes.hpp │ │ ├── ctype.hpp │ │ ├── isFloat.hpp │ │ ├── isInteger.hpp │ │ ├── math.hpp │ │ ├── normalize.hpp │ │ ├── parseFloat.hpp │ │ └── parseInteger.hpp │ ├── RawJson.hpp │ ├── Serialization │ │ ├── DummyPrint.hpp │ │ ├── DynamicStringBuilder.hpp │ │ ├── IndentedPrint.hpp │ │ ├── JsonPrintable.hpp │ │ ├── JsonSerializer.hpp │ │ ├── JsonSerializerImpl.hpp │ │ ├── JsonWriter.hpp │ │ ├── Prettyfier.hpp │ │ ├── StaticStringBuilder.hpp │ │ └── StreamPrintAdapter.hpp │ ├── StaticJsonBuffer.hpp │ ├── StringTraits │ │ ├── ArduinoStream.hpp │ │ ├── CharPointer.hpp │ │ ├── FlashString.hpp │ │ ├── StdStream.hpp │ │ ├── StdString.hpp │ │ └── StringTraits.hpp │ └── TypeTraits │ │ ├── EnableIf.hpp │ │ ├── FloatTraits.hpp │ │ ├── IsArray.hpp │ │ ├── IsBaseOf.hpp │ │ ├── IsChar.hpp │ │ ├── IsConst.hpp │ │ ├── IsFloatingPoint.hpp │ │ ├── IsIntegral.hpp │ │ ├── IsSame.hpp │ │ ├── IsSignedIntegral.hpp │ │ ├── IsUnsignedIntegral.hpp │ │ ├── RemoveConst.hpp │ │ └── RemoveReference.hpp ├── Release │ ├── STM32_USB-FS-Device_Driver │ │ └── src │ │ │ ├── subdir.mk │ │ │ ├── usb_core.d │ │ │ ├── usb_core.o │ │ │ ├── usb_init.d │ │ │ ├── usb_init.o │ │ │ ├── usb_int.d │ │ │ ├── usb_int.o │ │ │ ├── usb_mem.d │ │ │ ├── usb_mem.o │ │ │ ├── usb_regs.d │ │ │ ├── usb_regs.o │ │ │ ├── usb_sil.d │ │ │ └── usb_sil.o │ ├── beamer1.bin │ ├── beamer1.hex │ ├── beamer1.map │ ├── makefile │ ├── objects.mk │ ├── sources.mk │ ├── src │ │ ├── Timer.d │ │ ├── Timer.o │ │ ├── _write.d │ │ ├── _write.o │ │ ├── font12x16_reduced.d │ │ ├── font12x16_reduced.o │ │ ├── font5x7.d │ │ ├── font5x7.o │ │ ├── gpio.d │ │ ├── gpio.o │ │ ├── i2c.d │ │ ├── i2c.o │ │ ├── icons.d │ │ ├── icons.o │ │ ├── ir.d │ │ ├── ir.o │ │ ├── irmp.d │ │ ├── irmp.o │ │ ├── json.d │ │ ├── json.o │ │ ├── lcd64x32.d │ │ ├── lcd64x32.o │ │ ├── main.d │ │ ├── main.o │ │ ├── rotenc.d │ │ ├── rotenc.o │ │ ├── rtc.d │ │ ├── subdir.mk │ │ ├── tim.d │ │ ├── tim.o │ │ ├── ugui.d │ │ ├── ugui.o │ │ ├── usb.d │ │ └── usb.o │ ├── system │ │ └── src │ │ │ ├── cmsis │ │ │ ├── subdir.mk │ │ │ ├── system_stm32f10x.d │ │ │ ├── system_stm32f10x.o │ │ │ ├── vectors_stm32f10x.d │ │ │ └── vectors_stm32f10x.o │ │ │ ├── cortexm │ │ │ ├── _initialize_hardware.d │ │ │ ├── _initialize_hardware.o │ │ │ ├── _reset_hardware.d │ │ │ ├── _reset_hardware.o │ │ │ ├── exception_handlers.d │ │ │ ├── exception_handlers.o │ │ │ └── subdir.mk │ │ │ ├── diag │ │ │ ├── Trace.d │ │ │ ├── Trace.o │ │ │ ├── subdir.mk │ │ │ ├── trace_impl.d │ │ │ └── trace_impl.o │ │ │ ├── newlib │ │ │ ├── _cxx.d │ │ │ ├── _cxx.o │ │ │ ├── _exit.d │ │ │ ├── _exit.o │ │ │ ├── _sbrk.d │ │ │ ├── _sbrk.o │ │ │ ├── _startup.d │ │ │ ├── _startup.o │ │ │ ├── _syscalls.d │ │ │ ├── _syscalls.o │ │ │ ├── assert.d │ │ │ ├── assert.o │ │ │ └── subdir.mk │ │ │ └── stm32f1-stdperiph │ │ │ ├── misc.d │ │ │ ├── misc.o │ │ │ ├── stm32f10x_bkp.d │ │ │ ├── stm32f10x_bkp.o │ │ │ ├── stm32f10x_gpio.d │ │ │ ├── stm32f10x_gpio.o │ │ │ ├── stm32f10x_i2c.d │ │ │ ├── stm32f10x_i2c.o │ │ │ ├── stm32f10x_pwr.d │ │ │ ├── stm32f10x_pwr.o │ │ │ ├── stm32f10x_rcc.d │ │ │ ├── stm32f10x_rcc.o │ │ │ ├── stm32f10x_rtc.d │ │ │ ├── stm32f10x_rtc.o │ │ │ ├── stm32f10x_tim.d │ │ │ ├── stm32f10x_tim.o │ │ │ └── subdir.mk │ └── vcp │ │ └── src │ │ ├── hw_config.d │ │ ├── hw_config.o │ │ ├── stm32_it.d │ │ ├── stm32_it.o │ │ ├── subdir.mk │ │ ├── usb_desc.d │ │ ├── usb_desc.o │ │ ├── usb_endp.d │ │ ├── usb_endp.o │ │ ├── usb_istr.d │ │ ├── usb_istr.o │ │ ├── usb_prop.d │ │ ├── usb_prop.o │ │ ├── usb_pwr.d │ │ └── usb_pwr.o ├── STM32_USB-FS-Device_Driver │ ├── Release_Notes.html │ ├── inc │ │ ├── usb_core.h │ │ ├── usb_def.h │ │ ├── usb_init.h │ │ ├── usb_int.h │ │ ├── usb_lib.h │ │ ├── usb_mem.h │ │ ├── usb_regs.h │ │ ├── usb_sil.h │ │ └── usb_type.h │ └── src │ │ ├── usb_core.c │ │ ├── usb_init.c │ │ ├── usb_int.c │ │ ├── usb_mem.c │ │ ├── usb_regs.c │ │ └── usb_sil.c ├── include │ ├── ArduinoJson.h │ ├── ArduinoJson.hpp │ ├── Timer.h │ ├── font5x7.h │ ├── gpio.h │ ├── i2c.h │ ├── icons.h │ ├── ir.h │ ├── irmp.h │ ├── irmpconfig.h │ ├── irmpprotocols.h │ ├── irmpsystem.h │ ├── json.h │ ├── lcd64x32.h │ ├── main.h │ ├── rotenc.h │ ├── rtc.h │ ├── stm32f10x_conf.h │ ├── tim.h │ ├── ugui.h │ ├── ugui_config.h │ └── usb.h ├── ldscripts │ ├── libs.ld │ ├── mem.ld │ └── sections.ld ├── myboard.cfg ├── src │ ├── Timer.cpp │ ├── _write.c │ ├── font12x16_reduced.c │ ├── font5x7.c │ ├── gpio.cpp │ ├── i2c.cpp │ ├── icons.cpp │ ├── ir.cpp │ ├── irmp.c │ ├── json.cpp │ ├── lcd64x32.cpp │ ├── main.cpp │ ├── rotenc.cpp │ ├── rtc.cpp │ ├── tim.cpp │ ├── ugui.c │ └── usb.cpp ├── system │ ├── include │ │ ├── arm │ │ │ └── semihosting.h │ │ ├── cmsis │ │ │ ├── README_DEVICE.txt │ │ │ ├── arm_common_tables.h │ │ │ ├── arm_const_structs.h │ │ │ ├── arm_math.h │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armcc_V6.h │ │ │ ├── cmsis_device.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_cmFunc.h │ │ │ ├── core_cmInstr.h │ │ │ ├── core_cmSimd.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── stm32f10x.h │ │ │ └── system_stm32f10x.h │ │ ├── cortexm │ │ │ └── ExceptionHandlers.h │ │ ├── diag │ │ │ └── Trace.h │ │ └── stm32f1-stdperiph │ │ │ ├── README_STDPERIPH.txt │ │ │ ├── misc.h │ │ │ ├── stm32f10x_adc.h │ │ │ ├── stm32f10x_bkp.h │ │ │ ├── stm32f10x_can.h │ │ │ ├── stm32f10x_cec.h │ │ │ ├── stm32f10x_crc.h │ │ │ ├── stm32f10x_dac.h │ │ │ ├── stm32f10x_dbgmcu.h │ │ │ ├── stm32f10x_dma.h │ │ │ ├── stm32f10x_exti.h │ │ │ ├── stm32f10x_flash.h │ │ │ ├── stm32f10x_fsmc.h │ │ │ ├── stm32f10x_gpio.h │ │ │ ├── stm32f10x_i2c.h │ │ │ ├── stm32f10x_iwdg.h │ │ │ ├── stm32f10x_pwr.h │ │ │ ├── stm32f10x_rcc.h │ │ │ ├── stm32f10x_rtc.h │ │ │ ├── stm32f10x_sdio.h │ │ │ ├── stm32f10x_spi.h │ │ │ ├── stm32f10x_tim.h │ │ │ ├── stm32f10x_usart.h │ │ │ └── stm32f10x_wwdg.h │ └── src │ │ ├── cmsis │ │ ├── README_DEVICE.txt │ │ ├── system_stm32f10x.c │ │ └── vectors_stm32f10x.c │ │ ├── cortexm │ │ ├── _initialize_hardware.c │ │ ├── _reset_hardware.c │ │ └── exception_handlers.c │ │ ├── diag │ │ ├── Trace.c │ │ └── trace_impl.c │ │ ├── newlib │ │ ├── README.txt │ │ ├── _cxx.cpp │ │ ├── _exit.c │ │ ├── _sbrk.c │ │ ├── _startup.c │ │ ├── _syscalls.c │ │ └── assert.c │ │ └── stm32f1-stdperiph │ │ ├── README_STDPERIPH.txt │ │ ├── misc.c │ │ ├── stm32f10x_adc.c │ │ ├── stm32f10x_bkp.c │ │ ├── stm32f10x_can.c │ │ ├── stm32f10x_cec.c │ │ ├── stm32f10x_crc.c │ │ ├── stm32f10x_dac.c │ │ ├── stm32f10x_dbgmcu.c │ │ ├── stm32f10x_dma.c │ │ ├── stm32f10x_exti.c │ │ ├── stm32f10x_flash.c │ │ ├── stm32f10x_fsmc.c │ │ ├── stm32f10x_gpio.c │ │ ├── stm32f10x_i2c.c │ │ ├── stm32f10x_iwdg.c │ │ ├── stm32f10x_pwr.c │ │ ├── stm32f10x_rcc.c │ │ ├── stm32f10x_rtc.c │ │ ├── stm32f10x_sdio.c │ │ ├── stm32f10x_spi.c │ │ ├── stm32f10x_tim.c │ │ ├── stm32f10x_usart.c │ │ └── stm32f10x_wwdg.c └── vcp │ ├── inc │ ├── hw_config.h │ ├── platform_config.h │ ├── stm32_it.h │ ├── stm32l1xx_conf.h │ ├── usb_conf.h │ ├── usb_desc.h │ ├── usb_istr.h │ ├── usb_prop.h │ └── usb_pwr.h │ └── src │ ├── hw_config.c │ ├── stm32_it.c │ ├── usb_desc.c │ ├── usb_endp.c │ ├── usb_istr.c │ ├── usb_prop.c │ └── usb_pwr.c └── stl ├── assembly.png ├── case_bottom.stl ├── case_foot.stl ├── case_top_cmount.stl ├── case_top_emount.stl ├── knob_smooth.stl ├── know.stl ├── lcd_holder.stl └── spacer.stl /README.md: -------------------------------------------------------------------------------- 1 | # DIY Night Projector Clock 2 | 3 | GitHub-Repository to this project web-site: 4 | 5 | https://microengineer.eu/2018/05/01/diy-night-clock-projector/ 6 | -------------------------------------------------------------------------------- /bom/farnell.csv: -------------------------------------------------------------------------------- 1 | 1635847;1 2 | 1759043;2 3 | 1812489;1 4 | 2057774;1 5 | 2064978;1 6 | 2251407;1 7 | 2293753;2 8 | 2307892;1 9 | 2362048;1 10 | 2430082;1 11 | 2463458;1 12 | 2466266;1 13 | 2467864;1 14 | 2769261;1 15 | 9227865;2 16 | -------------------------------------------------------------------------------- /bom/other.txt: -------------------------------------------------------------------------------- 1 | 12.5mm objective: 2 | search on ebay for 25mm c-mount CCTV lens ... Should cost about < $15 3 | 4 | condensor: 5 | https://www.aliexpress.com/item/Cree-XPG-lens-Diameter-23-5mm-Belt-holder-5-degrees-LED-Lens-glass-Condenser-lens/1322969782.html?spm=a2g0s.9042311.0.0.MU73Ll 6 | 7 | LCD: 8 | (search on ebay for LCD 64x32) e.g. 9 | GLS Neu LCD-VATN 64x32 3V ST7567A I2C 15x12x2mm [LCD-AG-064032V-VIW W/KKK-E6] 10 | 11 | 12 | -------------------------------------------------------------------------------- /bom/reichelt.csv: -------------------------------------------------------------------------------- 1 | BC 807-40W SMD;1 2 | BC 817-40 SMD;1 3 | KEM X7R1206 10U;2 4 | KEM X7R1206 2,2U;1 5 | KEM Y5V1206 1,0U;2 6 | LM 1117 IMP-3.3;1 7 | RND 0805 1 1,5K;1 8 | RND 0805 1 10;2 9 | RND 0805 1 100;3 10 | RND 0805 1 22;1 11 | RND 0805 1 36K;1 12 | RND 1206 1 10K;3 13 | RND 1206 1 2,2K;2 14 | SL 1X10G 1,27;1 15 | SL 2X10G SMD2,54;2 16 | SMD 1/4W 4,7;1 17 | SMD 1/4W 4,7K;3 18 | SMD-0805 10,0K;2 19 | STM32 F103C8T6;1 20 | TASTER 9313;1 21 | X7R-G0805 100N;8 22 | X7R-G1206 100N;1 23 | XO32 8,00000;1 24 | -------------------------------------------------------------------------------- /images/22780314_1206666822799181_4845087505472371951_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/22780314_1206666822799181_4845087505472371951_n.jpg -------------------------------------------------------------------------------- /images/22780624_1207215072744356_6448307703032848811_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/22780624_1207215072744356_6448307703032848811_n.jpg -------------------------------------------------------------------------------- /images/22851997_1206666786132518_3949441219433421302_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/22851997_1206666786132518_3949441219433421302_n.jpg -------------------------------------------------------------------------------- /images/22885966_1207940582671805_9052044658180000451_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/22885966_1207940582671805_9052044658180000451_n.jpg -------------------------------------------------------------------------------- /images/23131607_1213188442147019_5008004252267984808_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23131607_1213188442147019_5008004252267984808_n.jpg -------------------------------------------------------------------------------- /images/23131890_1213188468813683_2381276653004583966_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23131890_1213188468813683_2381276653004583966_n.jpg -------------------------------------------------------------------------------- /images/23244059_1218023491663514_6128260922593770176_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23244059_1218023491663514_6128260922593770176_n.jpg -------------------------------------------------------------------------------- /images/23380218_1219804668152063_8622113328646516671_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23380218_1219804668152063_8622113328646516671_n.jpg -------------------------------------------------------------------------------- /images/23380257_1223416981124165_4793755427854490814_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23380257_1223416981124165_4793755427854490814_n.jpg -------------------------------------------------------------------------------- /images/23559460_1223772024421994_2585757183464992038_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23559460_1223772024421994_2585757183464992038_n.jpg -------------------------------------------------------------------------------- /images/23559568_1223771867755343_5931761190105667111_n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/23559568_1223771867755343_5931761190105667111_n.jpg -------------------------------------------------------------------------------- /images/DSC00244.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/DSC00244.JPG -------------------------------------------------------------------------------- /images/Spectacle.Tw9321.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/Spectacle.Tw9321.png -------------------------------------------------------------------------------- /images/lcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/images/lcd.png -------------------------------------------------------------------------------- /kicad/beamer1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/kicad/beamer1.pdf -------------------------------------------------------------------------------- /kicad/beamer1.pro: -------------------------------------------------------------------------------- 1 | update=Di 01 Mai 2018 14:18:16 CEST 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir= 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=transistors 35 | LibName4=conn 36 | LibName5=linear 37 | LibName6=regul 38 | LibName7=74xx 39 | LibName8=cmos4000 40 | LibName9=adc-dac 41 | LibName10=memory 42 | LibName11=xilinx 43 | LibName12=microcontrollers 44 | LibName13=dsp 45 | LibName14=microchip 46 | LibName15=analog_switches 47 | LibName16=motorola 48 | LibName17=texas 49 | LibName18=intel 50 | LibName19=audio 51 | LibName20=interface 52 | LibName21=digital-audio 53 | LibName22=philips 54 | LibName23=display 55 | LibName24=cypress 56 | LibName25=siliconi 57 | LibName26=opto 58 | LibName27=atmel 59 | LibName28=contrib 60 | LibName29=valves 61 | LibName30=/home/thomas/btsync/work/kicad/libs/maxim 62 | LibName31=/home/thomas/btsync/work/kicad/libs/mylib 63 | LibName32=/home/thomas/btsync/work/kicad/libs/net-tie 64 | LibName33=/home/thomas/btsync/work/kicad/libs/ph2-cache 65 | LibName34=/home/thomas/btsync/work/kicad/libs/stm32 66 | LibName35=/home/thomas/btsync/work/kicad/libs/Symbols_DCDC-ACDC-Converter_RevC_29Aug2014 67 | LibName36=/home/thomas/btsync/work/kicad/clock_mini_v3/clock-cache 68 | [schematic_editor] 69 | version=1 70 | PageLayoutDescrFile= 71 | PlotDirectoryName= 72 | SubpartIdSeparator=0 73 | SubpartFirstId=65 74 | NetFmtName= 75 | SpiceForceRefPrefix=0 76 | SpiceUseNetNumbers=0 77 | LabSize=60 78 | -------------------------------------------------------------------------------- /kicad/gerber/README.txt: -------------------------------------------------------------------------------- 1 | For best fitting, please make PCB with 0.5mm height. 2 | -------------------------------------------------------------------------------- /kicad/gerber/beamer1-B.Mask.gbs: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7-e2-6376~58~ubuntu17.04.1) date Sat May 5 16:48:04 2018* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,2.400000*% 11 | %ADD12R,3.400000X3.400000*% 12 | %ADD13C,1.400000*% 13 | %ADD14R,1.400000X1.400000*% 14 | %ADD15O,1.400000X1.400000*% 15 | %ADD16R,1.800000X2.500000*% 16 | %ADD17O,0.800000X3.400000*% 17 | G04 APERTURE END LIST* 18 | D10* 19 | D11* 20 | X106500000Y-123000000D03* 21 | X106500000Y-125500000D03* 22 | X106500000Y-120500000D03* 23 | D12* 24 | X107750000Y-128850000D03* 25 | X107750000Y-117150000D03* 26 | D11* 27 | X109000000Y-125500000D03* 28 | X109000000Y-120500000D03* 29 | D13* 30 | X124305025Y-123719238D03* 31 | X125719239Y-122305025D03* 32 | X125012132Y-123012131D03* 33 | D14* 34 | X102750000Y-115540000D03* 35 | D15* 36 | X102750000Y-114270000D03* 37 | X102750000Y-113000000D03* 38 | X102750000Y-111730000D03* 39 | X102750000Y-110460000D03* 40 | D16* 41 | X103043000Y-142449000D03* 42 | X107493000Y-142449000D03* 43 | X107493000Y-133349000D03* 44 | X103043000Y-133349000D03* 45 | D17* 46 | X129554000Y-94080000D03* 47 | X128854000Y-94080000D03* 48 | X128154000Y-94080000D03* 49 | X127454000Y-94080000D03* 50 | X126754000Y-94080000D03* 51 | X126054000Y-94080000D03* 52 | X125354000Y-94080000D03* 53 | X124654000Y-94080000D03* 54 | X123954000Y-94080000D03* 55 | X123254000Y-94080000D03* 56 | X122554000Y-94080000D03* 57 | X121854000Y-94080000D03* 58 | X121154000Y-94080000D03* 59 | X120454000Y-94080000D03* 60 | D13* 61 | X130004000Y-90805000D03* 62 | X120004000Y-90805000D03* 63 | M02* 64 | -------------------------------------------------------------------------------- /kicad/gerber/beamer1-B.SilkS.gbo: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Legend,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.7-e2-6376~58~ubuntu17.04.1) date Sat May 5 16:48:04 2018* 5 | %MOMM*% 6 | %LPD*% 7 | G01* 8 | G04 APERTURE LIST* 9 | %ADD10C,0.100000*% 10 | %ADD11C,0.150000*% 11 | G04 APERTURE END LIST* 12 | D10* 13 | D11* 14 | X106993000Y-137899000D02* 15 | G75* 16 | G03X106993000Y-137899000I-1750000J0D01* 17 | G01* 18 | X108243000Y-140899000D02* 19 | X108243000Y-134899000D01* 20 | X108243000Y-134899000D02* 21 | X102243000Y-134899000D01* 22 | X102243000Y-134899000D02* 23 | X102243000Y-140899000D01* 24 | X102243000Y-140899000D02* 25 | X108243000Y-140899000D01* 26 | X124604000Y-72005000D02* 27 | X125404000Y-72005000D01* 28 | X125004000Y-71605000D02* 29 | X125004000Y-72405000D01* 30 | X130604000Y-74795000D02* 31 | X119404000Y-74795000D01* 32 | X131294000Y-68515000D02* 33 | X118714000Y-68515000D01* 34 | X132254000Y-76305000D02* 35 | X117754000Y-76305000D01* 36 | X130604000Y-69215000D02* 37 | X130604000Y-74795000D01* 38 | X132704000Y-78305000D02* 39 | X132304000Y-78305000D01* 40 | X132754000Y-80105000D02* 41 | X132754000Y-78305000D01* 42 | X131104000Y-80105000D02* 43 | X132704000Y-80105000D01* 44 | X121104000Y-89305000D02* 45 | X119504000Y-89305000D01* 46 | X121604000Y-79305000D02* 47 | X121604000Y-88805000D01* 48 | X130604000Y-88605000D02* 49 | X130604000Y-89005000D01* 50 | X130604000Y-80605000D02* 51 | X130604000Y-88605000D01* 52 | X132254000Y-79305000D02* 53 | X130604000Y-79305000D01* 54 | X132254000Y-67705000D02* 55 | X132254000Y-79305000D01* 56 | X117754000Y-67705000D02* 57 | X132254000Y-67705000D01* 58 | X117754000Y-79305000D02* 59 | X117754000Y-67705000D01* 60 | X130604000Y-79305000D02* 61 | X117754000Y-79305000D01* 62 | X119004000Y-89805000D02* 63 | G75* 64 | G02X119504000Y-89305000I500000J0D01* 65 | G01* 66 | X131004000Y-94805000D02* 67 | X131004000Y-89805000D01* 68 | X119004000Y-94805000D02* 69 | X119004000Y-89805000D01* 70 | X131004000Y-94805000D02* 71 | X119004000Y-94805000D01* 72 | X130803999Y-89405000D02* 73 | G75* 74 | G02X131004000Y-89805000I-299999J-400000D01* 75 | G01* 76 | X121604000Y-88805000D02* 77 | G75* 78 | G02X121104000Y-89305000I-500000J0D01* 79 | G01* 80 | X130803999Y-89405000D02* 81 | G75* 82 | G02X130603998Y-89005000I299999J400000D01* 83 | G01* 84 | X130604000Y-80605000D02* 85 | G75* 86 | G02X131104000Y-80105000I500000J0D01* 87 | G01* 88 | X119404000Y-69215000D02* 89 | X119404000Y-74795000D01* 90 | X131294000Y-68515000D02* 91 | X131294000Y-75495000D01* 92 | X118714000Y-68515000D02* 93 | X118714000Y-75495000D01* 94 | X130604000Y-69215000D02* 95 | X119404000Y-69215000D01* 96 | X131294000Y-75495000D02* 97 | X118714000Y-75495000D01* 98 | M02* 99 | -------------------------------------------------------------------------------- /src/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | beamer1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | org.eclipse.cdt.core.ccnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/Encoding.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | class Encoding { 14 | public: 15 | // Optimized for code size on a 8-bit AVR 16 | static char escapeChar(char c) { 17 | const char *p = escapeTable(false); 18 | while (p[0] && p[1] != c) { 19 | p += 2; 20 | } 21 | return p[0]; 22 | } 23 | 24 | // Optimized for code size on a 8-bit AVR 25 | static char unescapeChar(char c) { 26 | const char *p = escapeTable(true); 27 | for (;;) { 28 | if (p[0] == '\0') return c; 29 | if (p[0] == c) return p[1]; 30 | p += 2; 31 | } 32 | } 33 | 34 | private: 35 | static const char *escapeTable(bool excludeIdenticals) { 36 | return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0]; 37 | } 38 | }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonBufferAllocated.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../JsonBuffer.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | class JsonBufferAllocated { 16 | public: 17 | void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() { 18 | if (!jsonBuffer) return NULL; 19 | return jsonBuffer->alloc(n); 20 | } 21 | 22 | void operator delete(void *, JsonBuffer *)throw() {} 23 | }; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonFloat.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | #if ARDUINOJSON_USE_DOUBLE 16 | typedef double JsonFloat; 17 | #else 18 | typedef float JsonFloat; 19 | #endif 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonInteger.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | #if ARDUINOJSON_USE_LONG_LONG 16 | typedef long long JsonInteger; 17 | typedef unsigned long long JsonUInt; 18 | #elif ARDUINOJSON_USE_INT64 19 | typedef __int64 JsonInteger; 20 | typedef unsigned _int64 JsonUInt; 21 | #else 22 | typedef long JsonInteger; 23 | typedef unsigned long JsonUInt; 24 | #endif 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonVariantAs.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A metafunction that returns the type of the value returned by 14 | // JsonVariant::as() 15 | template 16 | struct JsonVariantAs { 17 | typedef T type; 18 | }; 19 | 20 | template <> 21 | struct JsonVariantAs { 22 | typedef const char* type; 23 | }; 24 | 25 | template <> 26 | struct JsonVariantAs { 27 | typedef JsonArray& type; 28 | }; 29 | 30 | template <> 31 | struct JsonVariantAs { 32 | typedef const JsonArray& type; 33 | }; 34 | 35 | template <> 36 | struct JsonVariantAs { 37 | typedef JsonObject& type; 38 | }; 39 | 40 | template <> 41 | struct JsonVariantAs { 42 | typedef const JsonObject& type; 43 | }; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonVariantComparer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../JsonVariantBase.hpp" 11 | #include "../StringTraits/StringTraits.hpp" 12 | #include "../TypeTraits/EnableIf.hpp" 13 | 14 | namespace ArduinoJson { 15 | namespace Internals { 16 | template 17 | struct JsonVariantComparer {}; 18 | 19 | template 20 | struct JsonVariantComparer< 21 | TString, 22 | typename TypeTraits::EnableIf::value>::type> { 23 | template 24 | static bool equals(const JsonVariantBase &variant, 25 | const TString &comparand) { 26 | const char *value = variant.template as(); 27 | return Internals::StringTraits::equals(comparand, value); 28 | } 29 | }; 30 | 31 | template 32 | struct JsonVariantComparer< 33 | TComparand, typename TypeTraits::EnableIf< 34 | !TypeTraits::IsVariant::value && 35 | !TypeTraits::IsString::value>::type> { 36 | template 37 | static bool equals(const JsonVariantBase &variant, 38 | const TComparand &comparand) { 39 | return variant.template as() == comparand; 40 | } 41 | }; 42 | 43 | template 44 | struct JsonVariantComparer::value>::type> { 47 | template 48 | static bool equals(const JsonVariantBase &left, 49 | const TVariant2 &right) { 50 | if (left.template is() && right.template is()) 51 | return left.template as() == right.template as(); 52 | if (left.template is() && right.template is()) 53 | return left.template as() == 54 | right.template as(); 55 | if (left.template is() && right.template is()) 56 | return left.template as() == right.template as(); 57 | if (left.template is() && right.template is()) 58 | return left.template as() == right.template as(); 59 | if (left.template is() && right.template is()) 60 | return left.template as() == right.template as(); 61 | if (left.template is() && right.template is()) 62 | return strcmp(left.template as(), right.template as()) == 63 | 0; 64 | 65 | return false; 66 | } 67 | }; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonVariantContent.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonFloat.hpp" 11 | #include "JsonInteger.hpp" 12 | 13 | namespace ArduinoJson { 14 | 15 | // Forward declarations 16 | class JsonArray; 17 | class JsonObject; 18 | 19 | namespace Internals { 20 | // A union that defines the actual content of a JsonVariant. 21 | // The enum JsonVariantType determines which member is in use. 22 | union JsonVariantContent { 23 | JsonFloat asFloat; // used for double and float 24 | JsonUInt asInteger; // used for bool, char, short, int and longs 25 | const char* asString; // asString can be null 26 | JsonArray* asArray; // asArray cannot be null 27 | JsonObject* asObject; // asObject cannot be null 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonVariantDefault.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | template 14 | struct JsonVariantDefault { 15 | static T get() { 16 | return T(); 17 | } 18 | }; 19 | 20 | template 21 | struct JsonVariantDefault : JsonVariantDefault {}; 22 | 23 | template 24 | struct JsonVariantDefault : JsonVariantDefault {}; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/JsonVariantType.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | class JsonArray; 12 | class JsonObject; 13 | 14 | namespace Internals { 15 | 16 | // Enumerated type to know the current type of a JsonVariant. 17 | // The value determines which member of JsonVariantContent is used. 18 | enum JsonVariantType { 19 | JSON_UNDEFINED, // JsonVariant has not been initialized 20 | JSON_UNPARSED, // JsonVariant contains an unparsed string 21 | JSON_STRING, // JsonVariant stores a const char* 22 | JSON_BOOLEAN, // JsonVariant stores a bool 23 | JSON_POSITIVE_INTEGER, // JsonVariant stores an JsonUInt 24 | JSON_NEGATIVE_INTEGER, // JsonVariant stores an JsonUInt that must be negated 25 | JSON_ARRAY, // JsonVariant stores a pointer to a JsonArray 26 | JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject 27 | JSON_FLOAT // JsonVariant stores a JsonFloat 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/List.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../JsonBuffer.hpp" 11 | #include "ListConstIterator.hpp" 12 | #include "ListIterator.hpp" 13 | 14 | namespace ArduinoJson { 15 | namespace Internals { 16 | 17 | // A singly linked list of T. 18 | // The linked list is composed of ListNode. 19 | // It is derived by JsonArray and JsonObject 20 | template 21 | class List { 22 | public: 23 | typedef T value_type; 24 | typedef ListNode node_type; 25 | typedef ListIterator iterator; 26 | typedef ListConstIterator const_iterator; 27 | 28 | // Creates an empty List attached to a JsonBuffer. 29 | // The JsonBuffer allows to allocate new nodes. 30 | // When buffer is NULL, the List is not able to grow and success() returns 31 | // false. This is used to identify bad memory allocations and parsing 32 | // failures. 33 | explicit List(JsonBuffer *buffer) : _buffer(buffer), _firstNode(NULL) {} 34 | 35 | // Returns true if the object is valid 36 | // Would return false in the following situation: 37 | // - the memory allocation failed (StaticJsonBuffer was too small) 38 | // - the JSON parsing failed 39 | bool success() const { 40 | return _buffer != NULL; 41 | } 42 | 43 | // Returns the numbers of elements in the list. 44 | // For a JsonObject, it would return the number of key-value pairs 45 | size_t size() const { 46 | size_t nodeCount = 0; 47 | for (node_type *node = _firstNode; node; node = node->next) nodeCount++; 48 | return nodeCount; 49 | } 50 | 51 | iterator add() { 52 | node_type *newNode = new (_buffer) node_type(); 53 | 54 | if (_firstNode) { 55 | node_type *lastNode = _firstNode; 56 | while (lastNode->next) lastNode = lastNode->next; 57 | lastNode->next = newNode; 58 | } else { 59 | _firstNode = newNode; 60 | } 61 | 62 | return iterator(newNode); 63 | } 64 | 65 | iterator begin() { 66 | return iterator(_firstNode); 67 | } 68 | iterator end() { 69 | return iterator(NULL); 70 | } 71 | 72 | const_iterator begin() const { 73 | return const_iterator(_firstNode); 74 | } 75 | const_iterator end() const { 76 | return const_iterator(NULL); 77 | } 78 | 79 | void remove(iterator it) { 80 | node_type *nodeToRemove = it._node; 81 | if (!nodeToRemove) return; 82 | if (nodeToRemove == _firstNode) { 83 | _firstNode = nodeToRemove->next; 84 | } else { 85 | for (node_type *node = _firstNode; node; node = node->next) 86 | if (node->next == nodeToRemove) node->next = nodeToRemove->next; 87 | } 88 | } 89 | 90 | protected: 91 | JsonBuffer *_buffer; 92 | 93 | private: 94 | node_type *_firstNode; 95 | }; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/ListConstIterator.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "ListNode.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | // A read-only forward itertor for List 16 | template 17 | class ListConstIterator { 18 | public: 19 | explicit ListConstIterator(const ListNode *node = NULL) : _node(node) {} 20 | 21 | const T &operator*() const { 22 | return _node->content; 23 | } 24 | const T *operator->() { 25 | return &_node->content; 26 | } 27 | 28 | bool operator==(const ListConstIterator &other) const { 29 | return _node == other._node; 30 | } 31 | 32 | bool operator!=(const ListConstIterator &other) const { 33 | return _node != other._node; 34 | } 35 | 36 | ListConstIterator &operator++() { 37 | if (_node) _node = _node->next; 38 | return *this; 39 | } 40 | 41 | ListConstIterator &operator+=(size_t distance) { 42 | while (_node && distance) { 43 | _node = _node->next; 44 | --distance; 45 | } 46 | return *this; 47 | } 48 | 49 | private: 50 | const ListNode *_node; 51 | }; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/ListIterator.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "ListConstIterator.hpp" 11 | #include "ListNode.hpp" 12 | 13 | namespace ArduinoJson { 14 | namespace Internals { 15 | 16 | template 17 | class List; 18 | 19 | // A read-write forward iterator for List 20 | template 21 | class ListIterator { 22 | friend class List; 23 | 24 | public: 25 | explicit ListIterator(ListNode *node = NULL) : _node(node) {} 26 | 27 | T &operator*() const { 28 | return _node->content; 29 | } 30 | T *operator->() { 31 | return &_node->content; 32 | } 33 | 34 | bool operator==(const ListIterator &other) const { 35 | return _node == other._node; 36 | } 37 | 38 | bool operator!=(const ListIterator &other) const { 39 | return _node != other._node; 40 | } 41 | 42 | ListIterator &operator++() { 43 | if (_node) _node = _node->next; 44 | return *this; 45 | } 46 | 47 | ListIterator &operator+=(size_t distance) { 48 | while (_node && distance) { 49 | _node = _node->next; 50 | --distance; 51 | } 52 | return *this; 53 | } 54 | 55 | operator ListConstIterator() const { 56 | return ListConstIterator(_node); 57 | } 58 | 59 | private: 60 | ListNode *_node; 61 | }; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/ListNode.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include // for NULL 11 | 12 | #include "JsonBufferAllocated.hpp" 13 | 14 | namespace ArduinoJson { 15 | namespace Internals { 16 | 17 | // A node for a singly-linked list. 18 | // Used by List and its iterators. 19 | template 20 | struct ListNode : public Internals::JsonBufferAllocated { 21 | ListNode() : next(NULL) {} 22 | 23 | ListNode *next; 24 | T content; 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/ReferenceType.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A type that is meant to be used by reference only (JsonArray and JsonObject) 14 | class ReferenceType { 15 | public: 16 | bool operator==(const ReferenceType& other) const { 17 | // two JsonArray are equal if they are the same instance 18 | // (we don't compare the content) 19 | return this == &other; 20 | } 21 | 22 | bool operator!=(const ReferenceType& other) const { 23 | return this != &other; 24 | } 25 | 26 | protected: 27 | ReferenceType() {} 28 | 29 | private: 30 | // copy constructor is private 31 | ReferenceType(const ReferenceType&); 32 | 33 | // copy operator is private 34 | ReferenceType& operator=(const ReferenceType&); 35 | }; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/ArduinoJson/Data/ValueSetter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../JsonBuffer.hpp" 11 | #include "../JsonVariant.hpp" 12 | #include "../StringTraits/StringTraits.hpp" 13 | #include "../TypeTraits/EnableIf.hpp" 14 | 15 | namespace ArduinoJson { 16 | namespace Internals { 17 | 18 | template 19 | struct ValueSetter { 20 | template 21 | static bool set(JsonBuffer*, TDestination& destination, TSourceRef source) { 22 | destination = source; 23 | return true; 24 | } 25 | }; 26 | 27 | template 28 | struct ValueSetter::should_duplicate>::type> { 30 | template 31 | static bool set(JsonBuffer* buffer, TDestination& destination, 32 | TSourceRef source) { 33 | const char* copy = buffer->strdup(source); 34 | if (!copy) return false; 35 | destination = copy; 36 | return true; 37 | } 38 | }; 39 | 40 | template 41 | struct ValueSetter::should_duplicate>::type> { 43 | template 44 | static bool set(JsonBuffer*, TDestination& destination, TSourceRef source) { 45 | // unsigned char* -> char* 46 | destination = reinterpret_cast(source); 47 | return true; 48 | } 49 | }; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/ArduinoJson/Deserialization/Comments.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | template 13 | void skipSpacesAndComments(TInput& input) { 14 | for (;;) { 15 | switch (input.current()) { 16 | // spaces 17 | case ' ': 18 | case '\t': 19 | case '\r': 20 | case '\n': 21 | input.move(); 22 | continue; 23 | 24 | // comments 25 | case '/': 26 | switch (input.next()) { 27 | // C-style block comment 28 | case '*': 29 | input.move(); // skip '/' 30 | // no need to skip '*' 31 | for (;;) { 32 | input.move(); 33 | if (input.current() == '\0') return; 34 | if (input.current() == '*' && input.next() == '/') { 35 | input.move(); // skip '*' 36 | input.move(); // skip '/' 37 | break; 38 | } 39 | } 40 | break; 41 | 42 | // C++-style line comment 43 | case '/': 44 | // not need to skip "//" 45 | for (;;) { 46 | input.move(); 47 | if (input.current() == '\0') return; 48 | if (input.current() == '\n') break; 49 | } 50 | break; 51 | 52 | // not a comment, just a '/' 53 | default: 54 | return; 55 | } 56 | break; 57 | 58 | default: 59 | return; 60 | } 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/ArduinoJson/Deserialization/StringWriter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | template 14 | class StringWriter { 15 | public: 16 | class String { 17 | public: 18 | String(TChar** ptr) : _writePtr(ptr), _startPtr(*ptr) {} 19 | 20 | void append(char c) { 21 | *(*_writePtr)++ = TChar(c); 22 | } 23 | 24 | const char* c_str() const { 25 | *(*_writePtr)++ = 0; 26 | return reinterpret_cast(_startPtr); 27 | } 28 | 29 | private: 30 | TChar** _writePtr; 31 | TChar* _startPtr; 32 | }; 33 | 34 | StringWriter(TChar* buffer) : _ptr(buffer) {} 35 | 36 | String startString() { 37 | return String(&_ptr); 38 | } 39 | 40 | private: 41 | TChar* _ptr; 42 | }; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/ArduinoJson/JsonArrayImpl.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonArray.hpp" 11 | #include "JsonArraySubscript.hpp" 12 | #include "JsonObject.hpp" 13 | 14 | namespace ArduinoJson { 15 | 16 | inline JsonArray &JsonArray::createNestedArray() { 17 | if (!_buffer) return JsonArray::invalid(); 18 | JsonArray &array = _buffer->createArray(); 19 | add(array); 20 | return array; 21 | } 22 | 23 | inline JsonObject &JsonArray::createNestedObject() { 24 | if (!_buffer) return JsonObject::invalid(); 25 | JsonObject &object = _buffer->createObject(); 26 | add(object); 27 | return object; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/ArduinoJson/JsonBuffer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include // for size_t 11 | #include // for uint8_t 12 | #include 13 | 14 | #include "JsonVariant.hpp" 15 | #include "TypeTraits/EnableIf.hpp" 16 | #include "TypeTraits/IsArray.hpp" 17 | 18 | #if defined(__clang__) 19 | #pragma clang diagnostic push 20 | #pragma clang diagnostic ignored "-Wnon-virtual-dtor" 21 | #elif defined(__GNUC__) 22 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 23 | #pragma GCC diagnostic push 24 | #endif 25 | #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" 26 | #endif 27 | 28 | namespace ArduinoJson { 29 | class JsonArray; 30 | class JsonObject; 31 | 32 | // Entry point for using the library. 33 | // 34 | // Handle the memory management (done in derived classes) and calls the parser. 35 | // This abstract class is implemented by StaticJsonBuffer which implements a 36 | // fixed memory allocation. 37 | class JsonBuffer { 38 | public: 39 | // CAUTION: NO VIRTUAL DESTRUCTOR! 40 | // If we add a virtual constructor the Arduino compiler will add malloc() and 41 | // free() to the binary, adding 706 useless bytes. 42 | // virtual ~JsonBuffer() {} 43 | 44 | // Allocates an empty JsonArray. 45 | // 46 | // Returns a reference to the new JsonArray or JsonArray::invalid() if the 47 | // allocation fails. 48 | JsonArray &createArray(); 49 | 50 | // Allocates an empty JsonObject. 51 | // 52 | // Returns a reference to the new JsonObject or JsonObject::invalid() if the 53 | // allocation fails. 54 | JsonObject &createObject(); 55 | 56 | // Duplicates a string 57 | // 58 | // char* strdup(TValue); 59 | // TValue = const std::string&, const String&, 60 | template 61 | typename TypeTraits::EnableIf::value, 62 | char *>::type 63 | strdup(const TString &src) { 64 | return Internals::StringTraits::duplicate(src, this); 65 | } 66 | // 67 | // char* strdup(TValue); 68 | // TValue = const char*, const char[N], const FlashStringHelper* 69 | template 70 | char *strdup(const TString *src) { 71 | return Internals::StringTraits::duplicate(src, this); 72 | } 73 | 74 | // Allocates n bytes in the JsonBuffer. 75 | // Return a pointer to the allocated memory or NULL if allocation fails. 76 | virtual void *alloc(size_t size) = 0; 77 | 78 | protected: 79 | // Preserve aligment if necessary 80 | static FORCE_INLINE size_t round_size_up(size_t bytes) { 81 | #if ARDUINOJSON_ENABLE_ALIGNMENT 82 | const size_t x = sizeof(void *) - 1; 83 | return (bytes + x) & ~x; 84 | #else 85 | return bytes; 86 | #endif 87 | } 88 | }; 89 | } 90 | 91 | #if defined(__clang__) 92 | #pragma clang diagnostic pop 93 | #elif defined(__GNUC__) 94 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 95 | #pragma GCC diagnostic pop 96 | #endif 97 | #endif 98 | -------------------------------------------------------------------------------- /src/ArduinoJson/JsonBufferImpl.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "Deserialization/JsonParser.hpp" 11 | 12 | inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() { 13 | JsonArray *ptr = new (this) JsonArray(this); 14 | return ptr ? *ptr : JsonArray::invalid(); 15 | } 16 | 17 | inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() { 18 | JsonObject *ptr = new (this) JsonObject(this); 19 | return ptr ? *ptr : JsonObject::invalid(); 20 | } 21 | -------------------------------------------------------------------------------- /src/ArduinoJson/JsonObjectImpl.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonArray.hpp" 11 | #include "JsonObject.hpp" 12 | #include "JsonObjectSubscript.hpp" 13 | 14 | namespace ArduinoJson { 15 | 16 | template 17 | inline JsonArray &JsonObject::createNestedArray_impl(TStringRef key) { 18 | if (!_buffer) return JsonArray::invalid(); 19 | JsonArray &array = _buffer->createArray(); 20 | set(key, array); 21 | return array; 22 | } 23 | 24 | template 25 | inline JsonObject &JsonObject::createNestedObject_impl(TStringRef key) { 26 | if (!_buffer) return JsonObject::invalid(); 27 | JsonObject &object = _buffer->createObject(); 28 | set(key, object); 29 | return object; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/ArduinoJson/JsonPair.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonVariant.hpp" 11 | 12 | namespace ArduinoJson { 13 | 14 | // A key value pair for JsonObject. 15 | struct JsonPair { 16 | const char* key; 17 | JsonVariant value; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/attributes.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #ifdef _MSC_VER // Visual Studio 11 | 12 | #define FORCE_INLINE __forceinline 13 | #define NO_INLINE __declspec(noinline) 14 | #define DEPRECATED(msg) __declspec(deprecated(msg)) 15 | 16 | #elif defined(__GNUC__) // GCC or Clang 17 | 18 | #define FORCE_INLINE __attribute__((always_inline)) 19 | #define NO_INLINE __attribute__((noinline)) 20 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) 21 | #define DEPRECATED(msg) __attribute__((deprecated(msg))) 22 | #else 23 | #define DEPRECATED(msg) __attribute__((deprecated)) 24 | #endif 25 | 26 | #else // Other compilers 27 | 28 | #define FORCE_INLINE 29 | #define NO_INLINE 30 | #define DEPRECATED(msg) 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/ctype.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Polyfills { 12 | 13 | inline bool isdigit(char c) { 14 | return '0' <= c && c <= '9'; 15 | } 16 | 17 | inline bool issign(char c) { 18 | return '-' == c || c == '+'; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/isFloat.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include // for strcmp 11 | #include "./ctype.hpp" 12 | 13 | namespace ArduinoJson { 14 | namespace Polyfills { 15 | 16 | inline bool isFloat(const char* s) { 17 | if (!s) return false; 18 | 19 | if (!strcmp(s, "NaN")) return true; 20 | if (issign(*s)) s++; 21 | if (!strcmp(s, "Infinity")) return true; 22 | if (*s == '\0') return false; 23 | 24 | while (isdigit(*s)) s++; 25 | 26 | if (*s == '.') { 27 | s++; 28 | while (isdigit(*s)) s++; 29 | } 30 | 31 | if (*s == 'e' || *s == 'E') { 32 | s++; 33 | if (issign(*s)) s++; 34 | if (!isdigit(*s)) return false; 35 | while (isdigit(*s)) s++; 36 | } 37 | 38 | return *s == '\0'; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/isInteger.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "./ctype.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Polyfills { 14 | 15 | inline bool isInteger(const char* s) { 16 | if (!s) return false; 17 | if (issign(*s)) s++; 18 | while (isdigit(*s)) s++; 19 | return *s == '\0'; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/math.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Polyfills { 12 | template 13 | bool isNaN(T x) { 14 | return x != x; 15 | } 16 | 17 | template 18 | bool isInfinity(T x) { 19 | return x != 0.0 && x * 2 == x; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/normalize.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Polyfills { 14 | template 15 | int16_t normalize(T& value) { 16 | int16_t powersOf10 = 0; 17 | 18 | if (value >= ARDUINOJSON_POSITIVE_EXPONENTIATION_THRESHOLD) { 19 | #if ARDUINOJSON_DOUBLE_IS_64BITS 20 | if (value >= 1e256) { 21 | value /= 1e256; 22 | powersOf10 = int16_t(powersOf10 + 256); 23 | } 24 | if (value >= 1e128) { 25 | value /= 1e128; 26 | powersOf10 = int16_t(powersOf10 + 128); 27 | } 28 | if (value >= 1e64) { 29 | value /= 1e64; 30 | powersOf10 = int16_t(powersOf10 + 64); 31 | } 32 | #endif 33 | if (value >= 1e32) { 34 | value /= 1e32; 35 | powersOf10 = int16_t(powersOf10 + 32); 36 | } 37 | if (value >= 1e16) { 38 | value /= 1e16; 39 | powersOf10 = int16_t(powersOf10 + 16); 40 | } 41 | if (value >= 1e8) { 42 | value /= 1e8; 43 | powersOf10 = int16_t(powersOf10 + 8); 44 | } 45 | if (value >= 1e4) { 46 | value /= 1e4; 47 | powersOf10 = int16_t(powersOf10 + 4); 48 | } 49 | if (value >= 1e2) { 50 | value /= 1e2; 51 | powersOf10 = int16_t(powersOf10 + 2); 52 | } 53 | if (value >= 1e1) { 54 | value /= 1e1; 55 | powersOf10 = int16_t(powersOf10 + 1); 56 | } 57 | } 58 | 59 | if (value > 0 && value <= ARDUINOJSON_NEGATIVE_EXPONENTIATION_THRESHOLD) { 60 | #if ARDUINOJSON_DOUBLE_IS_64BITS 61 | if (value < 1e-255) { 62 | value *= 1e256; 63 | powersOf10 = int16_t(powersOf10 - 256); 64 | } 65 | if (value < 1e-127) { 66 | value *= 1e128; 67 | powersOf10 = int16_t(powersOf10 - 128); 68 | } 69 | if (value < 1e-63) { 70 | value *= 1e64; 71 | powersOf10 = int16_t(powersOf10 - 64); 72 | } 73 | #endif 74 | if (value < 1e-31) { 75 | value *= 1e32; 76 | powersOf10 = int16_t(powersOf10 - 32); 77 | } 78 | if (value < 1e-15) { 79 | value *= 1e16; 80 | powersOf10 = int16_t(powersOf10 - 16); 81 | } 82 | if (value < 1e-7) { 83 | value *= 1e8; 84 | powersOf10 = int16_t(powersOf10 - 8); 85 | } 86 | if (value < 1e-3) { 87 | value *= 1e4; 88 | powersOf10 = int16_t(powersOf10 - 4); 89 | } 90 | if (value < 1e-1) { 91 | value *= 1e2; 92 | powersOf10 = int16_t(powersOf10 - 2); 93 | } 94 | if (value < 1e0) { 95 | value *= 1e1; 96 | powersOf10 = int16_t(powersOf10 - 1); 97 | } 98 | } 99 | 100 | return powersOf10; 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/parseFloat.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../TypeTraits/FloatTraits.hpp" 11 | #include "./ctype.hpp" 12 | #include "./math.hpp" 13 | 14 | namespace ArduinoJson { 15 | namespace Polyfills { 16 | 17 | template 18 | inline T parseFloat(const char* s) { 19 | typedef TypeTraits::FloatTraits traits; 20 | typedef typename traits::mantissa_type mantissa_t; 21 | typedef typename traits::exponent_type exponent_t; 22 | 23 | if (!s) return 0; // NULL 24 | 25 | bool negative_result = false; 26 | switch (*s) { 27 | case '-': 28 | negative_result = true; 29 | case '+': 30 | s++; 31 | } 32 | 33 | if (*s == 't') return 1; // true 34 | if (*s == 'n' || *s == 'N') return traits::nan(); 35 | if (*s == 'i' || *s == 'I') 36 | return negative_result ? -traits::inf() : traits::inf(); 37 | 38 | mantissa_t mantissa = 0; 39 | exponent_t exponent_offset = 0; 40 | 41 | while (isdigit(*s)) { 42 | if (mantissa < traits::mantissa_max / 10) 43 | mantissa = mantissa * 10 + (*s - '0'); 44 | else 45 | exponent_offset++; 46 | s++; 47 | } 48 | 49 | if (*s == '.') { 50 | s++; 51 | while (isdigit(*s)) { 52 | if (mantissa < traits::mantissa_max / 10) { 53 | mantissa = mantissa * 10 + (*s - '0'); 54 | exponent_offset--; 55 | } 56 | s++; 57 | } 58 | } 59 | 60 | int exponent = 0; 61 | if (*s == 'e' || *s == 'E') { 62 | s++; 63 | bool negative_exponent = false; 64 | if (*s == '-') { 65 | negative_exponent = true; 66 | s++; 67 | } else if (*s == '+') { 68 | s++; 69 | } 70 | 71 | while (isdigit(*s)) { 72 | exponent = exponent * 10 + (*s - '0'); 73 | if (exponent + exponent_offset > traits::exponent_max) { 74 | if (negative_exponent) 75 | return negative_result ? -0.0f : 0.0f; 76 | else 77 | return negative_result ? -traits::inf() : traits::inf(); 78 | } 79 | s++; 80 | } 81 | if (negative_exponent) exponent = -exponent; 82 | } 83 | exponent += exponent_offset; 84 | 85 | T result = traits::make_float(static_cast(mantissa), exponent); 86 | 87 | return negative_result ? -result : result; 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/ArduinoJson/Polyfills/parseInteger.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "../Configuration.hpp" 13 | #include "./ctype.hpp" 14 | 15 | namespace ArduinoJson { 16 | namespace Polyfills { 17 | template 18 | T parseInteger(const char *s) { 19 | if (!s) return 0; // NULL 20 | 21 | if (*s == 't') return 1; // "true" 22 | 23 | T result = 0; 24 | bool negative_result = false; 25 | 26 | switch (*s) { 27 | case '-': 28 | negative_result = true; 29 | case '+': 30 | s++; 31 | break; 32 | } 33 | 34 | while (isdigit(*s)) { 35 | result = T(result * 10 + T(*s - '0')); 36 | s++; 37 | } 38 | 39 | return negative_result ? T(~result + 1) : result; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/ArduinoJson/RawJson.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | 12 | // A special type of data that can be used to insert pregenerated JSON portions. 13 | class RawJson { 14 | public: 15 | explicit RawJson(const char* str) : _str(str) {} 16 | operator const char*() const { 17 | return _str; 18 | } 19 | 20 | private: 21 | const char* _str; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/DummyPrint.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A dummy Print implementation used in JsonPrintable::measureLength() 14 | class DummyPrint { 15 | public: 16 | size_t print(char) { 17 | return 1; 18 | } 19 | 20 | size_t print(const char* s) { 21 | return strlen(s); 22 | } 23 | }; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/DynamicStringBuilder.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../StringTraits/StringTraits.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | // A Print implementation that allows to write in a String 16 | template 17 | class DynamicStringBuilder { 18 | public: 19 | DynamicStringBuilder(TString &str) : _str(str) {} 20 | 21 | size_t print(char c) { 22 | StringTraits::append(_str, c); 23 | return 1; 24 | } 25 | 26 | size_t print(const char *s) { 27 | size_t initialLen = _str.length(); 28 | StringTraits::append(_str, s); 29 | return _str.length() - initialLen; 30 | } 31 | 32 | private: 33 | DynamicStringBuilder &operator=(const DynamicStringBuilder &); 34 | 35 | TString &_str; 36 | }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/IndentedPrint.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // Decorator on top of Print to allow indented output. 14 | // This class is used by JsonPrintable::prettyPrintTo() but can also be used 15 | // for your own purpose, like logging. 16 | template 17 | class IndentedPrint { 18 | public: 19 | explicit IndentedPrint(Print &p) : sink(&p) { 20 | level = 0; 21 | tabSize = 2; 22 | isNewLine = true; 23 | } 24 | 25 | size_t print(char c) { 26 | size_t n = 0; 27 | if (isNewLine) n += writeTabs(); 28 | n += sink->print(c); 29 | isNewLine = c == '\n'; 30 | return n; 31 | } 32 | 33 | size_t print(const char *s) { 34 | // TODO: optimize 35 | size_t n = 0; 36 | while (*s) n += print(*s++); 37 | return n; 38 | } 39 | 40 | // Adds one level of indentation 41 | void indent() { 42 | if (level < MAX_LEVEL) level++; 43 | } 44 | 45 | // Removes one level of indentation 46 | void unindent() { 47 | if (level > 0) level--; 48 | } 49 | 50 | // Set the number of space printed for each level of indentation 51 | void setTabSize(uint8_t n) { 52 | if (n < MAX_TAB_SIZE) tabSize = n & MAX_TAB_SIZE; 53 | } 54 | 55 | private: 56 | Print *sink; 57 | uint8_t level : 4; 58 | uint8_t tabSize : 3; 59 | bool isNewLine : 1; 60 | 61 | size_t writeTabs() { 62 | size_t n = 0; 63 | for (int i = 0; i < level * tabSize; i++) n += sink->print(' '); 64 | return n; 65 | } 66 | 67 | static const int MAX_LEVEL = 15; // because it's only 4 bits 68 | static const int MAX_TAB_SIZE = 7; // because it's only 3 bits 69 | }; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/JsonSerializer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonWriter.hpp" 11 | 12 | namespace ArduinoJson { 13 | 14 | class JsonArray; 15 | class JsonArraySubscript; 16 | class JsonObject; 17 | template 18 | class JsonObjectSubscript; 19 | class JsonVariant; 20 | 21 | namespace Internals { 22 | 23 | template 24 | class JsonSerializer { 25 | public: 26 | static void serialize(const JsonArray &, Writer &); 27 | static void serialize(const JsonArraySubscript &, Writer &); 28 | static void serialize(const JsonObject &, Writer &); 29 | template 30 | static void serialize(const JsonObjectSubscript &, Writer &); 31 | static void serialize(const JsonVariant &, Writer &); 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/JsonSerializerImpl.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../JsonArray.hpp" 11 | #include "../JsonArraySubscript.hpp" 12 | #include "../JsonObject.hpp" 13 | #include "../JsonObjectSubscript.hpp" 14 | #include "../JsonVariant.hpp" 15 | #include "JsonSerializer.hpp" 16 | 17 | template 18 | inline void ArduinoJson::Internals::JsonSerializer::serialize( 19 | const JsonArray& array, Writer& writer) { 20 | writer.beginArray(); 21 | 22 | JsonArray::const_iterator it = array.begin(); 23 | while (it != array.end()) { 24 | serialize(*it, writer); 25 | 26 | ++it; 27 | if (it == array.end()) break; 28 | 29 | writer.writeComma(); 30 | } 31 | 32 | writer.endArray(); 33 | } 34 | 35 | template 36 | inline void ArduinoJson::Internals::JsonSerializer::serialize( 37 | const JsonArraySubscript& arraySubscript, Writer& writer) { 38 | serialize(arraySubscript.as(), writer); 39 | } 40 | 41 | template 42 | inline void ArduinoJson::Internals::JsonSerializer::serialize( 43 | const JsonObject& object, Writer& writer) { 44 | writer.beginObject(); 45 | 46 | JsonObject::const_iterator it = object.begin(); 47 | while (it != object.end()) { 48 | writer.writeString(it->key); 49 | writer.writeColon(); 50 | serialize(it->value, writer); 51 | 52 | ++it; 53 | if (it == object.end()) break; 54 | 55 | writer.writeComma(); 56 | } 57 | 58 | writer.endObject(); 59 | } 60 | 61 | template 62 | template 63 | inline void ArduinoJson::Internals::JsonSerializer::serialize( 64 | const JsonObjectSubscript& objectSubscript, Writer& writer) { 65 | serialize(objectSubscript.template as(), writer); 66 | } 67 | 68 | template 69 | inline void ArduinoJson::Internals::JsonSerializer::serialize( 70 | const JsonVariant& variant, Writer& writer) { 71 | switch (variant._type) { 72 | case JSON_FLOAT: 73 | writer.writeFloat(variant._content.asFloat); 74 | return; 75 | 76 | case JSON_ARRAY: 77 | serialize(*variant._content.asArray, writer); 78 | return; 79 | 80 | case JSON_OBJECT: 81 | serialize(*variant._content.asObject, writer); 82 | return; 83 | 84 | case JSON_STRING: 85 | writer.writeString(variant._content.asString); 86 | return; 87 | 88 | case JSON_UNPARSED: 89 | writer.writeRaw(variant._content.asString); 90 | return; 91 | 92 | case JSON_NEGATIVE_INTEGER: 93 | writer.writeRaw('-'); 94 | case JSON_POSITIVE_INTEGER: 95 | writer.writeInteger(variant._content.asInteger); 96 | return; 97 | 98 | case JSON_BOOLEAN: 99 | writer.writeBoolean(variant._content.asInteger != 0); 100 | return; 101 | 102 | default: // JSON_UNDEFINED 103 | return; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/Prettyfier.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "IndentedPrint.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | 15 | // Converts a compact JSON string into an indented one. 16 | template 17 | class Prettyfier { 18 | public: 19 | explicit Prettyfier(IndentedPrint& p) : _sink(p) { 20 | _previousChar = 0; 21 | _inString = false; 22 | } 23 | 24 | size_t print(char c) { 25 | size_t n = _inString ? handleStringChar(c) : handleMarkupChar(c); 26 | _previousChar = c; 27 | return n; 28 | } 29 | 30 | size_t print(const char* s) { 31 | // TODO: optimize 32 | size_t n = 0; 33 | while (*s) n += print(*s++); 34 | return n; 35 | } 36 | 37 | private: 38 | Prettyfier& operator=(const Prettyfier&); // cannot be assigned 39 | 40 | bool inEmptyBlock() { 41 | return _previousChar == '{' || _previousChar == '['; 42 | } 43 | 44 | size_t handleStringChar(char c) { 45 | bool isQuote = c == '"' && _previousChar != '\\'; 46 | 47 | if (isQuote) _inString = false; 48 | 49 | return _sink.print(c); 50 | } 51 | 52 | size_t handleMarkupChar(char c) { 53 | switch (c) { 54 | case '{': 55 | case '[': 56 | return writeBlockOpen(c); 57 | 58 | case '}': 59 | case ']': 60 | return writeBlockClose(c); 61 | 62 | case ':': 63 | return writeColon(); 64 | 65 | case ',': 66 | return writeComma(); 67 | 68 | case '"': 69 | return writeQuoteOpen(); 70 | 71 | default: 72 | return writeNormalChar(c); 73 | } 74 | } 75 | 76 | size_t writeBlockClose(char c) { 77 | size_t n = 0; 78 | n += unindentIfNeeded(); 79 | n += _sink.print(c); 80 | return n; 81 | } 82 | 83 | size_t writeBlockOpen(char c) { 84 | size_t n = 0; 85 | n += indentIfNeeded(); 86 | n += _sink.print(c); 87 | return n; 88 | } 89 | 90 | size_t writeColon() { 91 | size_t n = 0; 92 | n += _sink.print(": "); 93 | return n; 94 | } 95 | 96 | size_t writeComma() { 97 | size_t n = 0; 98 | n += _sink.print(",\r\n"); 99 | return n; 100 | } 101 | 102 | size_t writeQuoteOpen() { 103 | _inString = true; 104 | size_t n = 0; 105 | n += indentIfNeeded(); 106 | n += _sink.print('"'); 107 | return n; 108 | } 109 | 110 | size_t writeNormalChar(char c) { 111 | size_t n = 0; 112 | n += indentIfNeeded(); 113 | n += _sink.print(c); 114 | return n; 115 | } 116 | 117 | size_t indentIfNeeded() { 118 | if (!inEmptyBlock()) return 0; 119 | 120 | _sink.indent(); 121 | return _sink.print("\r\n"); 122 | } 123 | 124 | size_t unindentIfNeeded() { 125 | if (inEmptyBlock()) return 0; 126 | 127 | _sink.unindent(); 128 | return _sink.print("\r\n"); 129 | } 130 | 131 | char _previousChar; 132 | IndentedPrint& _sink; 133 | bool _inString; 134 | }; 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/StaticStringBuilder.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A Print implementation that allows to write in a char[] 14 | class StaticStringBuilder { 15 | public: 16 | StaticStringBuilder(char *buf, size_t size) : end(buf + size - 1), p(buf) { 17 | *p = '\0'; 18 | } 19 | 20 | size_t print(char c) { 21 | if (p >= end) return 0; 22 | *p++ = c; 23 | *p = '\0'; 24 | return 1; 25 | } 26 | 27 | size_t print(const char *s) { 28 | char *begin = p; 29 | while (p < end && *s) *p++ = *s++; 30 | *p = '\0'; 31 | return size_t(p - begin); 32 | } 33 | 34 | private: 35 | char *end; 36 | char *p; 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/ArduinoJson/Serialization/StreamPrintAdapter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | 12 | #if ARDUINOJSON_ENABLE_STD_STREAM 13 | 14 | #include 15 | 16 | namespace ArduinoJson { 17 | namespace Internals { 18 | 19 | class StreamPrintAdapter { 20 | public: 21 | explicit StreamPrintAdapter(std::ostream& os) : _os(os) {} 22 | 23 | size_t print(char c) { 24 | _os << c; 25 | return 1; 26 | } 27 | 28 | size_t print(const char* s) { 29 | _os << s; 30 | return strlen(s); 31 | } 32 | 33 | private: 34 | // cannot be assigned 35 | StreamPrintAdapter& operator=(const StreamPrintAdapter&); 36 | 37 | std::ostream& _os; 38 | }; 39 | } 40 | } 41 | 42 | #endif // ARDUINOJSON_ENABLE_STD_STREAM 43 | -------------------------------------------------------------------------------- /src/ArduinoJson/StaticJsonBuffer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "JsonBufferBase.hpp" 11 | 12 | #if defined(__clang__) 13 | #pragma clang diagnostic push 14 | #pragma clang diagnostic ignored "-Wnon-virtual-dtor" 15 | #elif defined(__GNUC__) 16 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 17 | #pragma GCC diagnostic push 18 | #endif 19 | #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" 20 | #endif 21 | 22 | namespace ArduinoJson { 23 | 24 | class StaticJsonBufferBase : public JsonBufferBase { 25 | public: 26 | class String { 27 | public: 28 | String(StaticJsonBufferBase* parent) : _parent(parent) { 29 | _start = parent->_buffer + parent->_size; 30 | } 31 | 32 | void append(char c) { 33 | if (_parent->canAlloc(1)) { 34 | char* last = static_cast(_parent->doAlloc(1)); 35 | *last = c; 36 | } 37 | } 38 | 39 | const char* c_str() const { 40 | if (_parent->canAlloc(1)) { 41 | char* last = static_cast(_parent->doAlloc(1)); 42 | *last = '\0'; 43 | return _start; 44 | } else { 45 | return NULL; 46 | } 47 | } 48 | 49 | private: 50 | StaticJsonBufferBase* _parent; 51 | char* _start; 52 | }; 53 | 54 | StaticJsonBufferBase(char* buffer, size_t capa) 55 | : _buffer(buffer), _capacity(capa), _size(0) {} 56 | 57 | size_t capacity() const { 58 | return _capacity; 59 | } 60 | size_t size() const { 61 | return _size; 62 | } 63 | 64 | virtual void* alloc(size_t bytes) { 65 | alignNextAlloc(); 66 | if (!canAlloc(bytes)) return NULL; 67 | return doAlloc(bytes); 68 | } 69 | 70 | String startString() { 71 | return String(this); 72 | } 73 | 74 | private: 75 | void alignNextAlloc() { 76 | _size = round_size_up(_size); 77 | } 78 | 79 | bool canAlloc(size_t bytes) const { 80 | return _size + bytes <= _capacity; 81 | } 82 | 83 | void* doAlloc(size_t bytes) { 84 | void* p = &_buffer[_size]; 85 | _size += bytes; 86 | return p; 87 | } 88 | 89 | char* _buffer; 90 | size_t _capacity; 91 | size_t _size; 92 | }; 93 | 94 | // Implements a JsonBuffer with fixed memory allocation. 95 | // The template paramenter CAPACITY specifies the capacity of the buffer in 96 | // bytes. 97 | template 98 | class StaticJsonBuffer : public StaticJsonBufferBase { 99 | public: 100 | explicit StaticJsonBuffer() : StaticJsonBufferBase(_buffer, CAPACITY) {} 101 | 102 | private: 103 | char _buffer[CAPACITY]; 104 | }; 105 | } 106 | 107 | #if defined(__clang__) 108 | #pragma clang diagnostic pop 109 | #elif defined(__GNUC__) 110 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 111 | #pragma GCC diagnostic pop 112 | #endif 113 | #endif 114 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/ArduinoStream.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #if ARDUINOJSON_ENABLE_ARDUINO_STREAM 11 | 12 | #include 13 | 14 | namespace ArduinoJson { 15 | namespace Internals { 16 | 17 | struct ArduinoStreamTraits { 18 | class Reader { 19 | Stream& _stream; 20 | char _current, _next; 21 | 22 | public: 23 | Reader(Stream& stream) : _stream(stream), _current(0), _next(0) {} 24 | 25 | void move() { 26 | _current = _next; 27 | _next = 0; 28 | } 29 | 30 | char current() { 31 | if (!_current) _current = read(); 32 | return _current; 33 | } 34 | 35 | char next() { 36 | // assumes that current() has been called 37 | if (!_next) _next = read(); 38 | return _next; 39 | } 40 | 41 | private: 42 | char read() { 43 | // don't use _stream.read() as it ignores the timeout 44 | char c = 0; 45 | _stream.readBytes(&c, 1); 46 | return c; 47 | } 48 | }; 49 | }; 50 | 51 | template 52 | struct StringTraits::type>::value>::type> 57 | : ArduinoStreamTraits {}; 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/CharPointer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | template 14 | struct CharPointerTraits { 15 | class Reader { 16 | const TChar* _ptr; 17 | 18 | public: 19 | Reader(const TChar* ptr) 20 | : _ptr(ptr ? ptr : reinterpret_cast("")) {} 21 | 22 | void move() { 23 | ++_ptr; 24 | } 25 | 26 | char current() const { 27 | return char(_ptr[0]); 28 | } 29 | 30 | char next() const { 31 | return char(_ptr[1]); 32 | } 33 | }; 34 | 35 | static bool equals(const TChar* str, const char* expected) { 36 | return strcmp(reinterpret_cast(str), expected) == 0; 37 | } 38 | 39 | template 40 | static char* duplicate(const TChar* str, Buffer* buffer) { 41 | if (!str) return NULL; 42 | size_t size = strlen(reinterpret_cast(str)) + 1; 43 | void* dup = buffer->alloc(size); 44 | if (dup != NULL) memcpy(dup, str, size); 45 | return static_cast(dup); 46 | } 47 | 48 | static const bool has_append = false; 49 | static const bool has_equals = true; 50 | static const bool should_duplicate = false; 51 | }; 52 | 53 | template 54 | struct StringTraits::value>::type> 56 | : CharPointerTraits {}; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/FlashString.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #if ARDUINOJSON_ENABLE_PROGMEM 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | template <> 15 | struct StringTraits { 16 | class Reader { 17 | const char* _ptr; 18 | 19 | public: 20 | Reader(const __FlashStringHelper* ptr) 21 | : _ptr(reinterpret_cast(ptr)) {} 22 | 23 | void move() { 24 | _ptr++; 25 | } 26 | 27 | char current() const { 28 | return pgm_read_byte_near(_ptr); 29 | } 30 | 31 | char next() const { 32 | return pgm_read_byte_near(_ptr + 1); 33 | } 34 | }; 35 | 36 | static bool equals(const __FlashStringHelper* str, const char* expected) { 37 | return strcmp_P(expected, (PGM_P)str) == 0; 38 | } 39 | 40 | template 41 | static char* duplicate(const __FlashStringHelper* str, Buffer* buffer) { 42 | if (!str) return NULL; 43 | size_t size = strlen_P((PGM_P)str) + 1; 44 | void* dup = buffer->alloc(size); 45 | if (dup != NULL) memcpy_P(dup, (PGM_P)str, size); 46 | return static_cast(dup); 47 | } 48 | 49 | static const bool has_append = false; 50 | static const bool has_equals = true; 51 | static const bool should_duplicate = true; 52 | }; 53 | } 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/StdStream.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #if ARDUINOJSON_ENABLE_STD_STREAM 11 | 12 | #include 13 | 14 | namespace ArduinoJson { 15 | namespace Internals { 16 | 17 | struct StdStreamTraits { 18 | class Reader { 19 | std::istream& _stream; 20 | char _current, _next; 21 | 22 | public: 23 | Reader(std::istream& stream) : _stream(stream), _current(0), _next(0) {} 24 | 25 | void move() { 26 | _current = _next; 27 | _next = 0; 28 | } 29 | 30 | char current() { 31 | if (!_current) _current = read(); 32 | return _current; 33 | } 34 | 35 | char next() { 36 | // assumes that current() has been called 37 | if (!_next) _next = read(); 38 | return _next; 39 | } 40 | 41 | private: 42 | Reader& operator=(const Reader&); // Visual Studio C4512 43 | 44 | char read() { 45 | return _stream.eof() ? '\0' : static_cast(_stream.get()); 46 | } 47 | }; 48 | }; 49 | 50 | template 51 | struct StringTraits::type>::value>::type> 56 | : StdStreamTraits {}; 57 | } 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/StdString.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #if ARDUINOJSON_ENABLE_STD_STRING || ARDUINOJSON_ENABLE_ARDUINO_STRING 11 | 12 | #if ARDUINOJSON_ENABLE_ARDUINO_STRING 13 | #include 14 | #endif 15 | 16 | #if ARDUINOJSON_ENABLE_STD_STRING 17 | #include 18 | #endif 19 | 20 | namespace ArduinoJson { 21 | namespace Internals { 22 | 23 | template 24 | struct StdStringTraits { 25 | template 26 | static char* duplicate(const TString& str, Buffer* buffer) { 27 | if (!str.c_str()) return NULL; // <- Arduino string can return NULL 28 | size_t size = str.length() + 1; 29 | void* dup = buffer->alloc(size); 30 | if (dup != NULL) memcpy(dup, str.c_str(), size); 31 | return static_cast(dup); 32 | } 33 | 34 | struct Reader : CharPointerTraits::Reader { 35 | Reader(const TString& str) : CharPointerTraits::Reader(str.c_str()) {} 36 | }; 37 | 38 | static bool equals(const TString& str, const char* expected) { 39 | return 0 == strcmp(str.c_str(), expected); 40 | } 41 | 42 | static void append(TString& str, char c) { 43 | str += c; 44 | } 45 | 46 | static void append(TString& str, const char* s) { 47 | str += s; 48 | } 49 | 50 | static const bool has_append = true; 51 | static const bool has_equals = true; 52 | static const bool should_duplicate = true; 53 | }; 54 | 55 | #if ARDUINOJSON_ENABLE_ARDUINO_STRING 56 | template <> 57 | struct StringTraits : StdStringTraits {}; 58 | template <> 59 | struct StringTraits : StdStringTraits { 60 | }; 61 | #endif 62 | 63 | #if ARDUINOJSON_ENABLE_STD_STRING 64 | template <> 65 | struct StringTraits : StdStringTraits {}; 66 | #endif 67 | } 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /src/ArduinoJson/StringTraits/StringTraits.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include 11 | #include "../Configuration.hpp" 12 | #include "../TypeTraits/EnableIf.hpp" 13 | #include "../TypeTraits/IsBaseOf.hpp" 14 | #include "../TypeTraits/IsChar.hpp" 15 | #include "../TypeTraits/RemoveReference.hpp" 16 | 17 | namespace ArduinoJson { 18 | namespace Internals { 19 | 20 | template 21 | struct StringTraits {}; 22 | 23 | template 24 | struct StringTraits : StringTraits {}; 25 | 26 | template 27 | struct StringTraits : StringTraits {}; 28 | } 29 | } 30 | 31 | #include "ArduinoStream.hpp" 32 | #include "CharPointer.hpp" 33 | #include "FlashString.hpp" 34 | #include "StdStream.hpp" 35 | #include "StdString.hpp" 36 | 37 | namespace ArduinoJson { 38 | namespace TypeTraits { 39 | template 40 | struct IsString { 41 | static const bool value = false; 42 | }; 43 | 44 | template 45 | struct IsString::has_equals>::type> { 47 | static const bool value = Internals::StringTraits::has_equals; 48 | }; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/EnableIf.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that return the type T if Condition is true. 14 | template 15 | struct EnableIf {}; 16 | 17 | template 18 | struct EnableIf { 19 | typedef T type; 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/FloatTraits.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include 11 | #include // for size_t 12 | #include "../Configuration.hpp" 13 | #include "../Polyfills/math.hpp" 14 | 15 | namespace ArduinoJson { 16 | namespace TypeTraits { 17 | 18 | template 19 | struct FloatTraits {}; 20 | 21 | #if ARDUINOJSON_DOUBLE_IS_64BITS 22 | template 23 | struct FloatTraits { 24 | typedef int64_t mantissa_type; 25 | static const short mantissa_bits = 52; 26 | static const mantissa_type mantissa_max = 27 | (static_cast(1) << mantissa_bits) - 1; 28 | 29 | typedef int16_t exponent_type; 30 | static const exponent_type exponent_max = 308; 31 | 32 | template 33 | static T make_float(T m, TExponent e) { 34 | if (e >= 0) 35 | return m * (e & 1 ? 1e1 : 1) * (e & 2 ? 1e2 : 1) * (e & 4 ? 1e4 : 1) * 36 | (e & 8 ? 1e8 : 1) * (e & 16 ? 1e16 : 1) * (e & 32 ? 1e32 : 1) * 37 | (e & 64 ? 1e64 : 1) * (e & 128 ? 1e128 : 1) * 38 | (e & 256 ? 1e256 : 1); 39 | e = TExponent(-e); 40 | return m * (e & 1 ? 1e-1 : 1) * (e & 2 ? 1e-2 : 1) * (e & 4 ? 1e-4 : 1) * 41 | (e & 8 ? 1e-8 : 1) * (e & 16 ? 1e-16 : 1) * (e & 32 ? 1e-32 : 1) * 42 | (e & 64 ? 1e-64 : 1) * (e & 128 ? 1e-128 : 1) * 43 | (e & 256 ? 1e-256 : 1); 44 | } 45 | 46 | static T nan() { 47 | uint64_t x = uint64_t(0x7ff8) << 48; 48 | return *reinterpret_cast(&x); 49 | } 50 | 51 | static T inf() { 52 | uint64_t x = uint64_t(0x7ff0) << 48; 53 | return *reinterpret_cast(&x); 54 | } 55 | }; 56 | #endif 57 | 58 | template 59 | struct FloatTraits { 60 | typedef int32_t mantissa_type; 61 | static const short mantissa_bits = 23; 62 | static const mantissa_type mantissa_max = 63 | (static_cast(1) << mantissa_bits) - 1; 64 | 65 | typedef int8_t exponent_type; 66 | static const exponent_type exponent_max = 38; 67 | 68 | template 69 | static T make_float(T m, TExponent e) { 70 | if (e > 0) 71 | return m * (e & 1 ? 1e1f : 1) * (e & 2 ? 1e2f : 1) * (e & 4 ? 1e4f : 1) * 72 | (e & 8 ? 1e8f : 1) * (e & 16 ? 1e16f : 1) * (e & 32 ? 1e32f : 1); 73 | e = -e; 74 | return m * (e & 1 ? 1e-1f : 1) * (e & 2 ? 1e-2f : 1) * (e & 4 ? 1e-4f : 1) * 75 | (e & 8 ? 1e-8f : 1) * (e & 16 ? 1e-16f : 1) * (e & 32 ? 1e-32f : 1); 76 | } 77 | 78 | static T nan() { 79 | uint32_t x = 0x7fc00000; 80 | return *reinterpret_cast(&x); 81 | } 82 | 83 | static T inf() { 84 | uint32_t x = 0x7f800000; 85 | return *reinterpret_cast(&x); 86 | } 87 | }; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsArray.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that return the type T without the const modifier 14 | template 15 | struct IsArray { 16 | static const bool value = false; 17 | }; 18 | template 19 | struct IsArray { 20 | static const bool value = true; 21 | }; 22 | template 23 | struct IsArray { 24 | static const bool value = true; 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsBaseOf.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that returns true if Derived inherits from TBase is an 14 | // integral type. 15 | template 16 | class IsBaseOf { 17 | protected: // <- to avoid GCC's "all member functions in class are private" 18 | typedef char Yes[1]; 19 | typedef char No[2]; 20 | 21 | static Yes &probe(const TBase *); 22 | static No &probe(...); 23 | 24 | public: 25 | enum { 26 | value = sizeof(probe(reinterpret_cast(0))) == sizeof(Yes) 27 | }; 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsChar.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "IsSame.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace TypeTraits { 14 | 15 | // A meta-function that returns true if T is a charater 16 | template 17 | struct IsChar { 18 | static const bool value = IsSame::value || 19 | IsSame::value || 20 | IsSame::value; 21 | }; 22 | 23 | template 24 | struct IsChar : IsChar {}; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsConst.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that return the type T without the const modifier 14 | template 15 | struct IsConst { 16 | static const bool value = false; 17 | }; 18 | 19 | template 20 | struct IsConst { 21 | static const bool value = true; 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsFloatingPoint.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "IsSame.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace TypeTraits { 14 | 15 | // A meta-function that returns true if T is a floating point type 16 | template 17 | struct IsFloatingPoint { 18 | static const bool value = IsSame::value || IsSame::value; 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsIntegral.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "IsSame.hpp" 11 | #include "IsSignedIntegral.hpp" 12 | #include "IsUnsignedIntegral.hpp" 13 | 14 | namespace ArduinoJson { 15 | namespace TypeTraits { 16 | 17 | // A meta-function that returns true if T is an integral type. 18 | template 19 | struct IsIntegral { 20 | static const bool value = TypeTraits::IsSignedIntegral::value || 21 | TypeTraits::IsUnsignedIntegral::value || 22 | TypeTraits::IsSame::value; 23 | // CAUTION: differs from std::is_integral as it doesn't include bool 24 | }; 25 | 26 | template 27 | struct IsIntegral : IsIntegral {}; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsSame.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that returns true if types T and U are the same. 14 | template 15 | struct IsSame { 16 | static const bool value = false; 17 | }; 18 | 19 | template 20 | struct IsSame { 21 | static const bool value = true; 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | #include "IsSame.hpp" 12 | 13 | namespace ArduinoJson { 14 | namespace TypeTraits { 15 | 16 | // A meta-function that returns true if T is an integral type. 17 | template 18 | struct IsSignedIntegral { 19 | static const bool value = TypeTraits::IsSame::value || 20 | TypeTraits::IsSame::value || 21 | TypeTraits::IsSame::value || 22 | TypeTraits::IsSame::value || 23 | #if ARDUINOJSON_USE_LONG_LONG 24 | TypeTraits::IsSame::value || 25 | #endif 26 | 27 | #if ARDUINOJSON_USE_INT64 28 | TypeTraits::IsSame::value || 29 | #endif 30 | false; 31 | }; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "../Configuration.hpp" 11 | #include "IsSame.hpp" 12 | 13 | namespace ArduinoJson { 14 | namespace TypeTraits { 15 | 16 | // A meta-function that returns true if T is an integral type. 17 | template 18 | struct IsUnsignedIntegral { 19 | static const bool value = TypeTraits::IsSame::value || 20 | TypeTraits::IsSame::value || 21 | TypeTraits::IsSame::value || 22 | TypeTraits::IsSame::value || 23 | #if ARDUINOJSON_USE_LONG_LONG 24 | TypeTraits::IsSame::value || 25 | #endif 26 | 27 | #if ARDUINOJSON_USE_INT64 28 | TypeTraits::IsSame::value || 29 | #endif 30 | false; 31 | }; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/RemoveConst.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that return the type T without the const modifier 14 | template 15 | struct RemoveConst { 16 | typedef T type; 17 | }; 18 | template 19 | struct RemoveConst { 20 | typedef T type; 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/ArduinoJson/TypeTraits/RemoveReference.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | namespace ArduinoJson { 11 | namespace TypeTraits { 12 | 13 | // A meta-function that return the type T without the reference modifier. 14 | template 15 | struct RemoveReference { 16 | typedef T type; 17 | }; 18 | template 19 | struct RemoveReference { 20 | typedef T type; 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../STM32_USB-FS-Device_Driver/src/usb_core.c \ 8 | ../STM32_USB-FS-Device_Driver/src/usb_init.c \ 9 | ../STM32_USB-FS-Device_Driver/src/usb_int.c \ 10 | ../STM32_USB-FS-Device_Driver/src/usb_mem.c \ 11 | ../STM32_USB-FS-Device_Driver/src/usb_regs.c \ 12 | ../STM32_USB-FS-Device_Driver/src/usb_sil.c 13 | 14 | OBJS += \ 15 | ./STM32_USB-FS-Device_Driver/src/usb_core.o \ 16 | ./STM32_USB-FS-Device_Driver/src/usb_init.o \ 17 | ./STM32_USB-FS-Device_Driver/src/usb_int.o \ 18 | ./STM32_USB-FS-Device_Driver/src/usb_mem.o \ 19 | ./STM32_USB-FS-Device_Driver/src/usb_regs.o \ 20 | ./STM32_USB-FS-Device_Driver/src/usb_sil.o 21 | 22 | C_DEPS += \ 23 | ./STM32_USB-FS-Device_Driver/src/usb_core.d \ 24 | ./STM32_USB-FS-Device_Driver/src/usb_init.d \ 25 | ./STM32_USB-FS-Device_Driver/src/usb_int.d \ 26 | ./STM32_USB-FS-Device_Driver/src/usb_mem.d \ 27 | ./STM32_USB-FS-Device_Driver/src/usb_regs.d \ 28 | ./STM32_USB-FS-Device_Driver/src/usb_sil.d 29 | 30 | 31 | # Each subdirectory must supply rules for building sources it contributes 32 | STM32_USB-FS-Device_Driver/src/%.o: ../STM32_USB-FS-Device_Driver/src/%.c 33 | @echo 'Building file: $<' 34 | @echo 'Invoking: Cross ARM GNU C Compiler' 35 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 36 | @echo 'Finished building: $<' 37 | @echo ' ' 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_core.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_core.o -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_init.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_init.o -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_int.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_int.o -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_mem.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_mem.o -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_regs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_regs.o -------------------------------------------------------------------------------- /src/Release/STM32_USB-FS-Device_Driver/src/usb_sil.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/STM32_USB-FS-Device_Driver/src/usb_sil.o -------------------------------------------------------------------------------- /src/Release/beamer1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/beamer1.bin -------------------------------------------------------------------------------- /src/Release/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include vcp/src/subdir.mk 12 | -include system/src/stm32f1-stdperiph/subdir.mk 13 | -include system/src/newlib/subdir.mk 14 | -include system/src/diag/subdir.mk 15 | -include system/src/cortexm/subdir.mk 16 | -include system/src/cmsis/subdir.mk 17 | -include src/subdir.mk 18 | -include STM32_USB-FS-Device_Driver/src/subdir.mk 19 | -include subdir.mk 20 | -include objects.mk 21 | 22 | ifneq ($(MAKECMDGOALS),clean) 23 | ifneq ($(strip $(CC_DEPS)),) 24 | -include $(CC_DEPS) 25 | endif 26 | ifneq ($(strip $(C++_DEPS)),) 27 | -include $(C++_DEPS) 28 | endif 29 | ifneq ($(strip $(CL_DEPS)),) 30 | -include $(CL_DEPS) 31 | endif 32 | ifneq ($(strip $(C_UPPER_DEPS)),) 33 | -include $(C_UPPER_DEPS) 34 | endif 35 | ifneq ($(strip $(CXX_DEPS)),) 36 | -include $(CXX_DEPS) 37 | endif 38 | ifneq ($(strip $(ASM_DEPS)),) 39 | -include $(ASM_DEPS) 40 | endif 41 | ifneq ($(strip $(S_UPPER_DEPS)),) 42 | -include $(S_UPPER_DEPS) 43 | endif 44 | ifneq ($(strip $(C_DEPS)),) 45 | -include $(C_DEPS) 46 | endif 47 | ifneq ($(strip $(CPP_DEPS)),) 48 | -include $(CPP_DEPS) 49 | endif 50 | endif 51 | 52 | -include ../makefile.defs 53 | 54 | # Add inputs and outputs from these tool invocations to the build variables 55 | SECONDARY_FLASH += \ 56 | beamer1.hex \ 57 | 58 | SECONDARY_SIZE += \ 59 | beamer1.siz \ 60 | 61 | 62 | # All Target 63 | all: beamer1.elf secondary-outputs 64 | 65 | # Tool invocations 66 | beamer1.elf: $(OBJS) $(USER_OBJS) 67 | @echo 'Building target: $@' 68 | @echo 'Invoking: Cross ARM GNU C++ Linker' 69 | arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"beamer1.map" -o "beamer1.elf" $(OBJS) $(USER_OBJS) $(LIBS) 70 | @echo 'Finished building target: $@' 71 | @echo ' ' 72 | 73 | beamer1.hex: beamer1.elf 74 | @echo 'Invoking: Cross ARM GNU Create Flash Image' 75 | arm-none-eabi-objcopy -O ihex "beamer1.elf" "beamer1.hex" 76 | @echo 'Finished building: $@' 77 | @echo ' ' 78 | 79 | beamer1.siz: beamer1.elf 80 | @echo 'Invoking: Cross ARM GNU Print Size' 81 | arm-none-eabi-size --format=berkeley "beamer1.elf" 82 | @echo 'Finished building: $@' 83 | @echo ' ' 84 | 85 | # Other Targets 86 | clean: 87 | -$(RM) $(CC_DEPS)$(C++_DEPS)$(CL_DEPS)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(SECONDARY_FLASH)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS) beamer1.elf 88 | -@echo ' ' 89 | 90 | secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_SIZE) 91 | 92 | .PHONY: all clean dependents 93 | .SECONDARY: 94 | 95 | -include ../makefile.targets 96 | -------------------------------------------------------------------------------- /src/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /src/Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ELF_SRCS := 6 | C_UPPER_SRCS := 7 | CXX_SRCS := 8 | CL_SRCS := 9 | C++_SRCS := 10 | OBJ_SRCS := 11 | CC_SRCS := 12 | ASM_SRCS := 13 | C_SRCS := 14 | CPP_SRCS := 15 | S_UPPER_SRCS := 16 | O_SRCS := 17 | CC_DEPS := 18 | C++_DEPS := 19 | CL_DEPS := 20 | OBJS := 21 | C_UPPER_DEPS := 22 | CXX_DEPS := 23 | SECONDARY_FLASH := 24 | SECONDARY_SIZE := 25 | ASM_DEPS := 26 | S_UPPER_DEPS := 27 | C_DEPS := 28 | CPP_DEPS := 29 | 30 | # Every subdirectory with source files must be described here 31 | SUBDIRS := \ 32 | STM32_USB-FS-Device_Driver/src \ 33 | src \ 34 | system/src/cmsis \ 35 | system/src/cortexm \ 36 | system/src/diag \ 37 | system/src/newlib \ 38 | system/src/stm32f1-stdperiph \ 39 | vcp/src \ 40 | 41 | -------------------------------------------------------------------------------- /src/Release/src/Timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/Timer.o -------------------------------------------------------------------------------- /src/Release/src/_write.d: -------------------------------------------------------------------------------- 1 | src/_write.o: ../src/_write.c 2 | -------------------------------------------------------------------------------- /src/Release/src/_write.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/_write.o -------------------------------------------------------------------------------- /src/Release/src/font12x16_reduced.d: -------------------------------------------------------------------------------- 1 | src/font12x16_reduced.o: ../src/font12x16_reduced.c ../include/ugui.h \ 2 | ../include/ugui_config.h 3 | 4 | ../include/ugui.h: 5 | 6 | ../include/ugui_config.h: 7 | -------------------------------------------------------------------------------- /src/Release/src/font12x16_reduced.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/font12x16_reduced.o -------------------------------------------------------------------------------- /src/Release/src/font5x7.d: -------------------------------------------------------------------------------- 1 | src/font5x7.o: ../src/font5x7.c ../include/font5x7.h 2 | 3 | ../include/font5x7.h: 4 | -------------------------------------------------------------------------------- /src/Release/src/font5x7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/font5x7.o -------------------------------------------------------------------------------- /src/Release/src/gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/gpio.o -------------------------------------------------------------------------------- /src/Release/src/i2c.d: -------------------------------------------------------------------------------- 1 | src/i2c.o: ../src/i2c.cpp \ 2 | ../system/include/stm32f1-stdperiph/stm32f10x_i2c.h \ 3 | ../system/include/cmsis/stm32f10x.h ../system/include/cmsis/core_cm3.h \ 4 | ../system/include/cmsis/core_cmInstr.h \ 5 | ../system/include/cmsis/cmsis_gcc.h \ 6 | ../system/include/cmsis/core_cmFunc.h \ 7 | ../system/include/cmsis/system_stm32f10x.h ../include/stm32f10x_conf.h \ 8 | ../system/include/stm32f1-stdperiph/stm32f10x_adc.h \ 9 | ../system/include/stm32f1-stdperiph/stm32f10x_bkp.h \ 10 | ../system/include/stm32f1-stdperiph/stm32f10x_can.h \ 11 | ../system/include/stm32f1-stdperiph/stm32f10x_cec.h \ 12 | ../system/include/stm32f1-stdperiph/stm32f10x_crc.h \ 13 | ../system/include/stm32f1-stdperiph/stm32f10x_dac.h \ 14 | ../system/include/stm32f1-stdperiph/stm32f10x_dbgmcu.h \ 15 | ../system/include/stm32f1-stdperiph/stm32f10x_dma.h \ 16 | ../system/include/stm32f1-stdperiph/stm32f10x_exti.h \ 17 | ../system/include/stm32f1-stdperiph/stm32f10x_flash.h \ 18 | ../system/include/stm32f1-stdperiph/stm32f10x_fsmc.h \ 19 | ../system/include/stm32f1-stdperiph/stm32f10x_gpio.h \ 20 | ../system/include/stm32f1-stdperiph/stm32f10x_iwdg.h \ 21 | ../system/include/stm32f1-stdperiph/stm32f10x_pwr.h \ 22 | ../system/include/stm32f1-stdperiph/stm32f10x_rcc.h \ 23 | ../system/include/stm32f1-stdperiph/stm32f10x_rtc.h \ 24 | ../system/include/stm32f1-stdperiph/stm32f10x_sdio.h \ 25 | ../system/include/stm32f1-stdperiph/stm32f10x_spi.h \ 26 | ../system/include/stm32f1-stdperiph/stm32f10x_tim.h \ 27 | ../system/include/stm32f1-stdperiph/stm32f10x_usart.h \ 28 | ../system/include/stm32f1-stdperiph/stm32f10x_wwdg.h \ 29 | ../system/include/stm32f1-stdperiph/misc.h 30 | 31 | ../system/include/stm32f1-stdperiph/stm32f10x_i2c.h: 32 | 33 | ../system/include/cmsis/stm32f10x.h: 34 | 35 | ../system/include/cmsis/core_cm3.h: 36 | 37 | ../system/include/cmsis/core_cmInstr.h: 38 | 39 | ../system/include/cmsis/cmsis_gcc.h: 40 | 41 | ../system/include/cmsis/core_cmFunc.h: 42 | 43 | ../system/include/cmsis/system_stm32f10x.h: 44 | 45 | ../include/stm32f10x_conf.h: 46 | 47 | ../system/include/stm32f1-stdperiph/stm32f10x_adc.h: 48 | 49 | ../system/include/stm32f1-stdperiph/stm32f10x_bkp.h: 50 | 51 | ../system/include/stm32f1-stdperiph/stm32f10x_can.h: 52 | 53 | ../system/include/stm32f1-stdperiph/stm32f10x_cec.h: 54 | 55 | ../system/include/stm32f1-stdperiph/stm32f10x_crc.h: 56 | 57 | ../system/include/stm32f1-stdperiph/stm32f10x_dac.h: 58 | 59 | ../system/include/stm32f1-stdperiph/stm32f10x_dbgmcu.h: 60 | 61 | ../system/include/stm32f1-stdperiph/stm32f10x_dma.h: 62 | 63 | ../system/include/stm32f1-stdperiph/stm32f10x_exti.h: 64 | 65 | ../system/include/stm32f1-stdperiph/stm32f10x_flash.h: 66 | 67 | ../system/include/stm32f1-stdperiph/stm32f10x_fsmc.h: 68 | 69 | ../system/include/stm32f1-stdperiph/stm32f10x_gpio.h: 70 | 71 | ../system/include/stm32f1-stdperiph/stm32f10x_iwdg.h: 72 | 73 | ../system/include/stm32f1-stdperiph/stm32f10x_pwr.h: 74 | 75 | ../system/include/stm32f1-stdperiph/stm32f10x_rcc.h: 76 | 77 | ../system/include/stm32f1-stdperiph/stm32f10x_rtc.h: 78 | 79 | ../system/include/stm32f1-stdperiph/stm32f10x_sdio.h: 80 | 81 | ../system/include/stm32f1-stdperiph/stm32f10x_spi.h: 82 | 83 | ../system/include/stm32f1-stdperiph/stm32f10x_tim.h: 84 | 85 | ../system/include/stm32f1-stdperiph/stm32f10x_usart.h: 86 | 87 | ../system/include/stm32f1-stdperiph/stm32f10x_wwdg.h: 88 | 89 | ../system/include/stm32f1-stdperiph/misc.h: 90 | -------------------------------------------------------------------------------- /src/Release/src/i2c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/i2c.o -------------------------------------------------------------------------------- /src/Release/src/icons.d: -------------------------------------------------------------------------------- 1 | src/icons.o: ../src/icons.cpp 2 | -------------------------------------------------------------------------------- /src/Release/src/icons.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/icons.o -------------------------------------------------------------------------------- /src/Release/src/ir.d: -------------------------------------------------------------------------------- 1 | src/ir.o: ../src/ir.cpp 2 | -------------------------------------------------------------------------------- /src/Release/src/ir.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/ir.o -------------------------------------------------------------------------------- /src/Release/src/irmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/irmp.o -------------------------------------------------------------------------------- /src/Release/src/json.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/json.o -------------------------------------------------------------------------------- /src/Release/src/lcd64x32.d: -------------------------------------------------------------------------------- 1 | src/lcd64x32.o: ../src/lcd64x32.cpp ../include/ugui.h \ 2 | ../include/ugui_config.h ../include/i2c.h ../include/lcd64x32.h \ 3 | ../include/ugui.h 4 | 5 | ../include/ugui.h: 6 | 7 | ../include/ugui_config.h: 8 | 9 | ../include/i2c.h: 10 | 11 | ../include/lcd64x32.h: 12 | 13 | ../include/ugui.h: 14 | -------------------------------------------------------------------------------- /src/Release/src/lcd64x32.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/lcd64x32.o -------------------------------------------------------------------------------- /src/Release/src/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/main.o -------------------------------------------------------------------------------- /src/Release/src/rotenc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/rotenc.o -------------------------------------------------------------------------------- /src/Release/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/_write.c \ 8 | ../src/font12x16_reduced.c \ 9 | ../src/font5x7.c \ 10 | ../src/irmp.c \ 11 | ../src/ugui.c 12 | 13 | CPP_SRCS += \ 14 | ../src/Timer.cpp \ 15 | ../src/gpio.cpp \ 16 | ../src/i2c.cpp \ 17 | ../src/icons.cpp \ 18 | ../src/ir.cpp \ 19 | ../src/json.cpp \ 20 | ../src/lcd64x32.cpp \ 21 | ../src/main.cpp \ 22 | ../src/rotenc.cpp \ 23 | ../src/rtc.cpp \ 24 | ../src/tim.cpp \ 25 | ../src/usb.cpp 26 | 27 | OBJS += \ 28 | ./src/Timer.o \ 29 | ./src/_write.o \ 30 | ./src/font12x16_reduced.o \ 31 | ./src/font5x7.o \ 32 | ./src/gpio.o \ 33 | ./src/i2c.o \ 34 | ./src/icons.o \ 35 | ./src/ir.o \ 36 | ./src/irmp.o \ 37 | ./src/json.o \ 38 | ./src/lcd64x32.o \ 39 | ./src/main.o \ 40 | ./src/rotenc.o \ 41 | ./src/rtc.o \ 42 | ./src/tim.o \ 43 | ./src/ugui.o \ 44 | ./src/usb.o 45 | 46 | C_DEPS += \ 47 | ./src/_write.d \ 48 | ./src/font12x16_reduced.d \ 49 | ./src/font5x7.d \ 50 | ./src/irmp.d \ 51 | ./src/ugui.d 52 | 53 | CPP_DEPS += \ 54 | ./src/Timer.d \ 55 | ./src/gpio.d \ 56 | ./src/i2c.d \ 57 | ./src/icons.d \ 58 | ./src/ir.d \ 59 | ./src/json.d \ 60 | ./src/lcd64x32.d \ 61 | ./src/main.d \ 62 | ./src/rotenc.d \ 63 | ./src/rtc.d \ 64 | ./src/tim.d \ 65 | ./src/usb.d 66 | 67 | 68 | # Each subdirectory must supply rules for building sources it contributes 69 | src/%.o: ../src/%.cpp 70 | @echo 'Building file: $<' 71 | @echo 'Invoking: Cross ARM GNU C++ Compiler' 72 | arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 73 | @echo 'Finished building: $<' 74 | @echo ' ' 75 | 76 | src/%.o: ../src/%.c 77 | @echo 'Building file: $<' 78 | @echo 'Invoking: Cross ARM GNU C Compiler' 79 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 80 | @echo 'Finished building: $<' 81 | @echo ' ' 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/Release/src/tim.d: -------------------------------------------------------------------------------- 1 | src/tim.o: ../src/tim.cpp \ 2 | ../system/include/stm32f1-stdperiph/stm32f10x_tim.h \ 3 | ../system/include/cmsis/stm32f10x.h ../system/include/cmsis/core_cm3.h \ 4 | ../system/include/cmsis/core_cmInstr.h \ 5 | ../system/include/cmsis/cmsis_gcc.h \ 6 | ../system/include/cmsis/core_cmFunc.h \ 7 | ../system/include/cmsis/system_stm32f10x.h ../include/stm32f10x_conf.h \ 8 | ../system/include/stm32f1-stdperiph/stm32f10x_adc.h \ 9 | ../system/include/stm32f1-stdperiph/stm32f10x_bkp.h \ 10 | ../system/include/stm32f1-stdperiph/stm32f10x_can.h \ 11 | ../system/include/stm32f1-stdperiph/stm32f10x_cec.h \ 12 | ../system/include/stm32f1-stdperiph/stm32f10x_crc.h \ 13 | ../system/include/stm32f1-stdperiph/stm32f10x_dac.h \ 14 | ../system/include/stm32f1-stdperiph/stm32f10x_dbgmcu.h \ 15 | ../system/include/stm32f1-stdperiph/stm32f10x_dma.h \ 16 | ../system/include/stm32f1-stdperiph/stm32f10x_exti.h \ 17 | ../system/include/stm32f1-stdperiph/stm32f10x_flash.h \ 18 | ../system/include/stm32f1-stdperiph/stm32f10x_fsmc.h \ 19 | ../system/include/stm32f1-stdperiph/stm32f10x_gpio.h \ 20 | ../system/include/stm32f1-stdperiph/stm32f10x_i2c.h \ 21 | ../system/include/stm32f1-stdperiph/stm32f10x_iwdg.h \ 22 | ../system/include/stm32f1-stdperiph/stm32f10x_pwr.h \ 23 | ../system/include/stm32f1-stdperiph/stm32f10x_rcc.h \ 24 | ../system/include/stm32f1-stdperiph/stm32f10x_rtc.h \ 25 | ../system/include/stm32f1-stdperiph/stm32f10x_sdio.h \ 26 | ../system/include/stm32f1-stdperiph/stm32f10x_spi.h \ 27 | ../system/include/stm32f1-stdperiph/stm32f10x_usart.h \ 28 | ../system/include/stm32f1-stdperiph/stm32f10x_wwdg.h \ 29 | ../system/include/stm32f1-stdperiph/misc.h 30 | 31 | ../system/include/stm32f1-stdperiph/stm32f10x_tim.h: 32 | 33 | ../system/include/cmsis/stm32f10x.h: 34 | 35 | ../system/include/cmsis/core_cm3.h: 36 | 37 | ../system/include/cmsis/core_cmInstr.h: 38 | 39 | ../system/include/cmsis/cmsis_gcc.h: 40 | 41 | ../system/include/cmsis/core_cmFunc.h: 42 | 43 | ../system/include/cmsis/system_stm32f10x.h: 44 | 45 | ../include/stm32f10x_conf.h: 46 | 47 | ../system/include/stm32f1-stdperiph/stm32f10x_adc.h: 48 | 49 | ../system/include/stm32f1-stdperiph/stm32f10x_bkp.h: 50 | 51 | ../system/include/stm32f1-stdperiph/stm32f10x_can.h: 52 | 53 | ../system/include/stm32f1-stdperiph/stm32f10x_cec.h: 54 | 55 | ../system/include/stm32f1-stdperiph/stm32f10x_crc.h: 56 | 57 | ../system/include/stm32f1-stdperiph/stm32f10x_dac.h: 58 | 59 | ../system/include/stm32f1-stdperiph/stm32f10x_dbgmcu.h: 60 | 61 | ../system/include/stm32f1-stdperiph/stm32f10x_dma.h: 62 | 63 | ../system/include/stm32f1-stdperiph/stm32f10x_exti.h: 64 | 65 | ../system/include/stm32f1-stdperiph/stm32f10x_flash.h: 66 | 67 | ../system/include/stm32f1-stdperiph/stm32f10x_fsmc.h: 68 | 69 | ../system/include/stm32f1-stdperiph/stm32f10x_gpio.h: 70 | 71 | ../system/include/stm32f1-stdperiph/stm32f10x_i2c.h: 72 | 73 | ../system/include/stm32f1-stdperiph/stm32f10x_iwdg.h: 74 | 75 | ../system/include/stm32f1-stdperiph/stm32f10x_pwr.h: 76 | 77 | ../system/include/stm32f1-stdperiph/stm32f10x_rcc.h: 78 | 79 | ../system/include/stm32f1-stdperiph/stm32f10x_rtc.h: 80 | 81 | ../system/include/stm32f1-stdperiph/stm32f10x_sdio.h: 82 | 83 | ../system/include/stm32f1-stdperiph/stm32f10x_spi.h: 84 | 85 | ../system/include/stm32f1-stdperiph/stm32f10x_usart.h: 86 | 87 | ../system/include/stm32f1-stdperiph/stm32f10x_wwdg.h: 88 | 89 | ../system/include/stm32f1-stdperiph/misc.h: 90 | -------------------------------------------------------------------------------- /src/Release/src/tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/tim.o -------------------------------------------------------------------------------- /src/Release/src/ugui.d: -------------------------------------------------------------------------------- 1 | src/ugui.o: ../src/ugui.c ../include/ugui.h ../include/ugui_config.h 2 | 3 | ../include/ugui.h: 4 | 5 | ../include/ugui_config.h: 6 | -------------------------------------------------------------------------------- /src/Release/src/ugui.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/ugui.o -------------------------------------------------------------------------------- /src/Release/src/usb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/src/usb.o -------------------------------------------------------------------------------- /src/Release/system/src/cmsis/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../system/src/cmsis/system_stm32f10x.c \ 8 | ../system/src/cmsis/vectors_stm32f10x.c 9 | 10 | OBJS += \ 11 | ./system/src/cmsis/system_stm32f10x.o \ 12 | ./system/src/cmsis/vectors_stm32f10x.o 13 | 14 | C_DEPS += \ 15 | ./system/src/cmsis/system_stm32f10x.d \ 16 | ./system/src/cmsis/vectors_stm32f10x.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | system/src/cmsis/%.o: ../system/src/cmsis/%.c 21 | @echo 'Building file: $<' 22 | @echo 'Invoking: Cross ARM GNU C Compiler' 23 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 24 | @echo 'Finished building: $<' 25 | @echo ' ' 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Release/system/src/cmsis/system_stm32f10x.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/cmsis/system_stm32f10x.o -------------------------------------------------------------------------------- /src/Release/system/src/cmsis/vectors_stm32f10x.d: -------------------------------------------------------------------------------- 1 | system/src/cmsis/vectors_stm32f10x.o: \ 2 | ../system/src/cmsis/vectors_stm32f10x.c \ 3 | ../system/include/cortexm/ExceptionHandlers.h 4 | 5 | ../system/include/cortexm/ExceptionHandlers.h: 6 | -------------------------------------------------------------------------------- /src/Release/system/src/cmsis/vectors_stm32f10x.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/cmsis/vectors_stm32f10x.o -------------------------------------------------------------------------------- /src/Release/system/src/cortexm/_initialize_hardware.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/cortexm/_initialize_hardware.o -------------------------------------------------------------------------------- /src/Release/system/src/cortexm/_reset_hardware.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/cortexm/_reset_hardware.o -------------------------------------------------------------------------------- /src/Release/system/src/cortexm/exception_handlers.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/cortexm/exception_handlers.o -------------------------------------------------------------------------------- /src/Release/system/src/cortexm/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../system/src/cortexm/_initialize_hardware.c \ 8 | ../system/src/cortexm/_reset_hardware.c \ 9 | ../system/src/cortexm/exception_handlers.c 10 | 11 | OBJS += \ 12 | ./system/src/cortexm/_initialize_hardware.o \ 13 | ./system/src/cortexm/_reset_hardware.o \ 14 | ./system/src/cortexm/exception_handlers.o 15 | 16 | C_DEPS += \ 17 | ./system/src/cortexm/_initialize_hardware.d \ 18 | ./system/src/cortexm/_reset_hardware.d \ 19 | ./system/src/cortexm/exception_handlers.d 20 | 21 | 22 | # Each subdirectory must supply rules for building sources it contributes 23 | system/src/cortexm/%.o: ../system/src/cortexm/%.c 24 | @echo 'Building file: $<' 25 | @echo 'Invoking: Cross ARM GNU C Compiler' 26 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 27 | @echo 'Finished building: $<' 28 | @echo ' ' 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Release/system/src/diag/Trace.d: -------------------------------------------------------------------------------- 1 | system/src/diag/Trace.o: ../system/src/diag/Trace.c 2 | -------------------------------------------------------------------------------- /src/Release/system/src/diag/Trace.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/diag/Trace.o -------------------------------------------------------------------------------- /src/Release/system/src/diag/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../system/src/diag/Trace.c \ 8 | ../system/src/diag/trace_impl.c 9 | 10 | OBJS += \ 11 | ./system/src/diag/Trace.o \ 12 | ./system/src/diag/trace_impl.o 13 | 14 | C_DEPS += \ 15 | ./system/src/diag/Trace.d \ 16 | ./system/src/diag/trace_impl.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | system/src/diag/%.o: ../system/src/diag/%.c 21 | @echo 'Building file: $<' 22 | @echo 'Invoking: Cross ARM GNU C Compiler' 23 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 24 | @echo 'Finished building: $<' 25 | @echo ' ' 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Release/system/src/diag/trace_impl.d: -------------------------------------------------------------------------------- 1 | system/src/diag/trace_impl.o: ../system/src/diag/trace_impl.c 2 | -------------------------------------------------------------------------------- /src/Release/system/src/diag/trace_impl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/diag/trace_impl.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_cxx.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/_cxx.o: ../system/src/newlib/_cxx.cpp \ 2 | ../system/include/diag/Trace.h 3 | 4 | ../system/include/diag/Trace.h: 5 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_cxx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/_cxx.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_exit.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/_exit.o: ../system/src/newlib/_exit.c \ 2 | ../system/include/diag/Trace.h 3 | 4 | ../system/include/diag/Trace.h: 5 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_exit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/_exit.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_sbrk.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/_sbrk.o: ../system/src/newlib/_sbrk.c 2 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_sbrk.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/_sbrk.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_startup.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/_startup.o: ../system/src/newlib/_startup.c 2 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_startup.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/_startup.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_syscalls.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/_syscalls.o: ../system/src/newlib/_syscalls.c \ 2 | ../system/include/arm/semihosting.h 3 | 4 | ../system/include/arm/semihosting.h: 5 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/_syscalls.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/_syscalls.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/assert.d: -------------------------------------------------------------------------------- 1 | system/src/newlib/assert.o: ../system/src/newlib/assert.c \ 2 | ../system/include/diag/Trace.h 3 | 4 | ../system/include/diag/Trace.h: 5 | -------------------------------------------------------------------------------- /src/Release/system/src/newlib/assert.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/newlib/assert.o -------------------------------------------------------------------------------- /src/Release/system/src/newlib/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../system/src/newlib/_exit.c \ 8 | ../system/src/newlib/_sbrk.c \ 9 | ../system/src/newlib/_startup.c \ 10 | ../system/src/newlib/_syscalls.c \ 11 | ../system/src/newlib/assert.c 12 | 13 | CPP_SRCS += \ 14 | ../system/src/newlib/_cxx.cpp 15 | 16 | OBJS += \ 17 | ./system/src/newlib/_cxx.o \ 18 | ./system/src/newlib/_exit.o \ 19 | ./system/src/newlib/_sbrk.o \ 20 | ./system/src/newlib/_startup.o \ 21 | ./system/src/newlib/_syscalls.o \ 22 | ./system/src/newlib/assert.o 23 | 24 | C_DEPS += \ 25 | ./system/src/newlib/_exit.d \ 26 | ./system/src/newlib/_sbrk.d \ 27 | ./system/src/newlib/_startup.d \ 28 | ./system/src/newlib/_syscalls.d \ 29 | ./system/src/newlib/assert.d 30 | 31 | CPP_DEPS += \ 32 | ./system/src/newlib/_cxx.d 33 | 34 | 35 | # Each subdirectory must supply rules for building sources it contributes 36 | system/src/newlib/%.o: ../system/src/newlib/%.cpp 37 | @echo 'Building file: $<' 38 | @echo 'Invoking: Cross ARM GNU C++ Compiler' 39 | arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 40 | @echo 'Finished building: $<' 41 | @echo ' ' 42 | 43 | system/src/newlib/%.o: ../system/src/newlib/%.c 44 | @echo 'Building file: $<' 45 | @echo 'Invoking: Cross ARM GNU C Compiler' 46 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 47 | @echo 'Finished building: $<' 48 | @echo ' ' 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/misc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/misc.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_bkp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_bkp.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_gpio.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_i2c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_i2c.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_pwr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_pwr.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_rcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_rcc.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_rtc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_rtc.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/stm32f10x_tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/system/src/stm32f1-stdperiph/stm32f10x_tim.o -------------------------------------------------------------------------------- /src/Release/system/src/stm32f1-stdperiph/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../system/src/stm32f1-stdperiph/misc.c \ 8 | ../system/src/stm32f1-stdperiph/stm32f10x_bkp.c \ 9 | ../system/src/stm32f1-stdperiph/stm32f10x_gpio.c \ 10 | ../system/src/stm32f1-stdperiph/stm32f10x_i2c.c \ 11 | ../system/src/stm32f1-stdperiph/stm32f10x_pwr.c \ 12 | ../system/src/stm32f1-stdperiph/stm32f10x_rcc.c \ 13 | ../system/src/stm32f1-stdperiph/stm32f10x_rtc.c \ 14 | ../system/src/stm32f1-stdperiph/stm32f10x_tim.c 15 | 16 | OBJS += \ 17 | ./system/src/stm32f1-stdperiph/misc.o \ 18 | ./system/src/stm32f1-stdperiph/stm32f10x_bkp.o \ 19 | ./system/src/stm32f1-stdperiph/stm32f10x_gpio.o \ 20 | ./system/src/stm32f1-stdperiph/stm32f10x_i2c.o \ 21 | ./system/src/stm32f1-stdperiph/stm32f10x_pwr.o \ 22 | ./system/src/stm32f1-stdperiph/stm32f10x_rcc.o \ 23 | ./system/src/stm32f1-stdperiph/stm32f10x_rtc.o \ 24 | ./system/src/stm32f1-stdperiph/stm32f10x_tim.o 25 | 26 | C_DEPS += \ 27 | ./system/src/stm32f1-stdperiph/misc.d \ 28 | ./system/src/stm32f1-stdperiph/stm32f10x_bkp.d \ 29 | ./system/src/stm32f1-stdperiph/stm32f10x_gpio.d \ 30 | ./system/src/stm32f1-stdperiph/stm32f10x_i2c.d \ 31 | ./system/src/stm32f1-stdperiph/stm32f10x_pwr.d \ 32 | ./system/src/stm32f1-stdperiph/stm32f10x_rcc.d \ 33 | ./system/src/stm32f1-stdperiph/stm32f10x_rtc.d \ 34 | ./system/src/stm32f1-stdperiph/stm32f10x_tim.d 35 | 36 | 37 | # Each subdirectory must supply rules for building sources it contributes 38 | system/src/stm32f1-stdperiph/%.o: ../system/src/stm32f1-stdperiph/%.c 39 | @echo 'Building file: $<' 40 | @echo 'Invoking: Cross ARM GNU C Compiler' 41 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 42 | @echo 'Finished building: $<' 43 | @echo ' ' 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/Release/vcp/src/hw_config.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/hw_config.o -------------------------------------------------------------------------------- /src/Release/vcp/src/stm32_it.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/stm32_it.o -------------------------------------------------------------------------------- /src/Release/vcp/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../vcp/src/hw_config.c \ 8 | ../vcp/src/stm32_it.c \ 9 | ../vcp/src/usb_desc.c \ 10 | ../vcp/src/usb_endp.c \ 11 | ../vcp/src/usb_istr.c \ 12 | ../vcp/src/usb_prop.c \ 13 | ../vcp/src/usb_pwr.c 14 | 15 | OBJS += \ 16 | ./vcp/src/hw_config.o \ 17 | ./vcp/src/stm32_it.o \ 18 | ./vcp/src/usb_desc.o \ 19 | ./vcp/src/usb_endp.o \ 20 | ./vcp/src/usb_istr.o \ 21 | ./vcp/src/usb_prop.o \ 22 | ./vcp/src/usb_pwr.o 23 | 24 | C_DEPS += \ 25 | ./vcp/src/hw_config.d \ 26 | ./vcp/src/stm32_it.d \ 27 | ./vcp/src/usb_desc.d \ 28 | ./vcp/src/usb_endp.d \ 29 | ./vcp/src/usb_istr.d \ 30 | ./vcp/src/usb_prop.d \ 31 | ./vcp/src/usb_pwr.d 32 | 33 | 34 | # Each subdirectory must supply rules for building sources it contributes 35 | vcp/src/%.o: ../vcp/src/%.c 36 | @echo 'Building file: $<' 37 | @echo 'Invoking: Cross ARM GNU C Compiler' 38 | arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -I"/home/ne23kaj2/git/diy-projector-clock/src/STM32_USB-FS-Device_Driver/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src/vcp/inc" -I"/home/ne23kaj2/git/diy-projector-clock/src" -std=gnu11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<" 39 | @echo 'Finished building: $<' 40 | @echo ' ' 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Release/vcp/src/usb_desc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/usb_desc.o -------------------------------------------------------------------------------- /src/Release/vcp/src/usb_endp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/usb_endp.o -------------------------------------------------------------------------------- /src/Release/vcp/src/usb_istr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/usb_istr.o -------------------------------------------------------------------------------- /src/Release/vcp/src/usb_prop.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/usb_prop.o -------------------------------------------------------------------------------- /src/Release/vcp/src/usb_pwr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/Release/vcp/src/usb_pwr.o -------------------------------------------------------------------------------- /src/STM32_USB-FS-Device_Driver/inc/usb_int.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usb_int.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief Endpoint CTR (Low and High) interrupt's service routines prototypes 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __USB_INT_H 41 | #define __USB_INT_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | /* Exported types ------------------------------------------------------------*/ 45 | /* Exported constants --------------------------------------------------------*/ 46 | /* Exported macro ------------------------------------------------------------*/ 47 | /* Exported functions ------------------------------------------------------- */ 48 | void CTR_LP(void); 49 | void CTR_HP(void); 50 | 51 | /* External variables --------------------------------------------------------*/ 52 | 53 | #endif /* __USB_INT_H */ 54 | 55 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 56 | -------------------------------------------------------------------------------- /src/STM32_USB-FS-Device_Driver/inc/usb_lib.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usb_lib.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief USB library include files 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __USB_LIB_H 41 | #define __USB_LIB_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | #include "hw_config.h" 45 | #include "usb_type.h" 46 | #include "usb_regs.h" 47 | #include "usb_def.h" 48 | #include "usb_core.h" 49 | #include "usb_init.h" 50 | #include "usb_sil.h" 51 | #include "usb_mem.h" 52 | #include "usb_int.h" 53 | 54 | /* Exported types ------------------------------------------------------------*/ 55 | /* Exported constants --------------------------------------------------------*/ 56 | /* Exported macro ------------------------------------------------------------*/ 57 | /* Exported functions ------------------------------------------------------- */ 58 | /* External variables --------------------------------------------------------*/ 59 | 60 | #endif /* __USB_LIB_H */ 61 | 62 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 63 | -------------------------------------------------------------------------------- /src/STM32_USB-FS-Device_Driver/inc/usb_mem.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usb_mem.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief Utility prototypes functions for memory/PMA transfers 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __USB_MEM_H 41 | #define __USB_MEM_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | /* Exported types ------------------------------------------------------------*/ 45 | /* Exported constants --------------------------------------------------------*/ 46 | /* Exported macro ------------------------------------------------------------*/ 47 | /* Exported functions ------------------------------------------------------- */ 48 | void UserToPMABufferCopy(uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes); 49 | void PMAToUserBufferCopy(uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes); 50 | /* External variables --------------------------------------------------------*/ 51 | 52 | #endif /*__USB_MEM_H*/ 53 | 54 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 55 | -------------------------------------------------------------------------------- /src/STM32_USB-FS-Device_Driver/inc/usb_sil.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usb_sil.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief Simplified Interface Layer function prototypes. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __USB_SIL_H 41 | #define __USB_SIL_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | /* Exported types ------------------------------------------------------------*/ 45 | /* Exported constants --------------------------------------------------------*/ 46 | /* Exported macro ------------------------------------------------------------*/ 47 | /* Exported functions ------------------------------------------------------- */ 48 | 49 | uint32_t USB_SIL_Init(void); 50 | uint32_t USB_SIL_Write(uint8_t bEpAddr, uint8_t* pBufferPointer, uint32_t wBufferSize); 51 | uint32_t USB_SIL_Read(uint8_t bEpAddr, uint8_t* pBufferPointer); 52 | 53 | /* External variables --------------------------------------------------------*/ 54 | 55 | #endif /* __USB_SIL_H */ 56 | 57 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 58 | -------------------------------------------------------------------------------- /src/STM32_USB-FS-Device_Driver/inc/usb_type.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file usb_type.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief Type definitions used by the USB Library 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __USB_TYPE_H 41 | #define __USB_TYPE_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | #include "usb_conf.h" 45 | 46 | /* Exported types ------------------------------------------------------------*/ 47 | /* Exported constants --------------------------------------------------------*/ 48 | #ifndef NULL 49 | #define NULL ((void *)0) 50 | #endif 51 | #if 0 52 | typedef enum 53 | { 54 | FALSE = 0, TRUE = !FALSE 55 | } 56 | bool; 57 | #endif 58 | /* Exported macro ------------------------------------------------------------*/ 59 | /* Exported functions ------------------------------------------------------- */ 60 | /* External variables --------------------------------------------------------*/ 61 | 62 | #endif /* __USB_TYPE_H */ 63 | 64 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 65 | -------------------------------------------------------------------------------- /src/include/ArduinoJson.h: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "ArduinoJson.hpp" 11 | 12 | using namespace ArduinoJson; 13 | -------------------------------------------------------------------------------- /src/include/ArduinoJson.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Benoit Blanchon 2014-2017 2 | // MIT License 3 | // 4 | // Arduino JSON library 5 | // https://bblanchon.github.io/ArduinoJson/ 6 | // If you like this project, please add a star! 7 | 8 | #pragma once 9 | 10 | #include "ArduinoJson/DynamicJsonBuffer.hpp" 11 | #include "ArduinoJson/JsonArray.hpp" 12 | #include "ArduinoJson/JsonObject.hpp" 13 | #include "ArduinoJson/JsonVariantComparisons.hpp" 14 | #include "ArduinoJson/StaticJsonBuffer.hpp" 15 | 16 | #include "ArduinoJson/Deserialization/JsonParserImpl.hpp" 17 | #include "ArduinoJson/JsonArrayImpl.hpp" 18 | #include "ArduinoJson/JsonBufferImpl.hpp" 19 | #include "ArduinoJson/JsonObjectImpl.hpp" 20 | #include "ArduinoJson/JsonVariantImpl.hpp" 21 | #include "ArduinoJson/Serialization/JsonSerializerImpl.hpp" 22 | -------------------------------------------------------------------------------- /src/include/Timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the GNU ARM Eclipse distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | #ifndef TIMER_H_ 7 | #define TIMER_H_ 8 | 9 | #include "cmsis_device.h" 10 | 11 | // ---------------------------------------------------------------------------- 12 | 13 | #define TIMER_FREQUENCY_HZ (1000u) 14 | 15 | typedef uint32_t timer_ticks_t; 16 | 17 | extern volatile timer_ticks_t timer_delayCount; 18 | 19 | extern void 20 | timer_start (void); 21 | 22 | extern void 23 | timer_sleep (timer_ticks_t ticks); 24 | 25 | // ---------------------------------------------------------------------------- 26 | 27 | #endif // TIMER_H_ 28 | -------------------------------------------------------------------------------- /src/include/font5x7.h: -------------------------------------------------------------------------------- 1 | //***************************************************************************** 2 | // 3 | // File Name : 'font5x7.h' 4 | // Title : Graphic LCD Font (Ascii Charaters) 5 | // Author : Pascal Stang 6 | // Date : 10/19/2001 7 | // Revised : 10/19/2001 8 | // Version : 0.1 9 | // Target MCU : Atmel AVR 10 | // Editor Tabs : 4 11 | // 12 | //***************************************************************************** 13 | 14 | #ifndef FONT5X7_H 15 | #define FONT5X7_H 16 | 17 | extern unsigned char Numbers3x5[]; 18 | extern unsigned char Font5x7[]; 19 | #endif 20 | -------------------------------------------------------------------------------- /src/include/i2c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * i2c.h 3 | * 4 | * Created on: 26.10.2017 5 | * Author: thomas 6 | */ 7 | 8 | #ifndef I2C_H_ 9 | #define I2C_H_ 10 | 11 | void i2c_init(); 12 | void I2C_write(uint8_t Register_Adress, uint8_t Data); 13 | uint8_t I2C_read(uint8_t Register_Adress); 14 | 15 | 16 | #endif /* I2C_H_ */ 17 | -------------------------------------------------------------------------------- /src/include/icons.h: -------------------------------------------------------------------------------- 1 | /* 2 | * icons.h 3 | * 4 | * Created on: 09.11.2017 5 | * Author: ne23kaj2 6 | */ 7 | 8 | #ifndef ICONS_H_ 9 | #define ICONS_H_ 10 | 11 | /* 12 | * icons.c 13 | * 14 | * Created on: 09.11.2017 15 | * Author: ne23kaj2 16 | */ 17 | 18 | extern const char* icon_time; 19 | extern const char* icon_date; 20 | extern const char* icon_contrast; 21 | extern const char* icon_brightness; 22 | extern const char* icon_timer; 23 | extern const char* icon_back; 24 | 25 | 26 | 27 | 28 | #endif /* ICONS_H_ */ 29 | -------------------------------------------------------------------------------- /src/include/ir.h: -------------------------------------------------------------------------------- 1 | #ifndef __IR_H__ 2 | #define __IR_H__ 3 | 4 | #include "main.h" 5 | #include "irmp.h" 6 | 7 | 8 | #define CMD_QUICK 0x17 9 | #define CMD_FADE 0x07 10 | #define CMD_SLOW 0x13 11 | #define CMD_RED 0x58 12 | #define CMD_GREEN 0x59 13 | #define CMD_FLASH 0x0B 14 | #define CMD_PLUS1 0x41 15 | #define CMD_PLUS2 0x16 16 | #define CMD_MINUS 0x12 17 | #define CMD_SET 0x40 18 | #define CMD_RPLUS 0x14 19 | #define CMD_RMINUS 0x10 20 | #define CMD_GPLUS 0x15 21 | #define CMD_GMINUS 0x11 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/include/json.h: -------------------------------------------------------------------------------- 1 | /* 2 | * json.h 3 | * 4 | * Created on: 03.09.2017 5 | * Author: thomas 6 | */ 7 | 8 | #ifndef JSON_H_ 9 | #define JSON_H_ 10 | 11 | 12 | uint8_t process_json_c(char* rxbuf); 13 | uint8_t json_process(char* rxbuf); 14 | 15 | 16 | #endif /* JSON_H_ */ 17 | -------------------------------------------------------------------------------- /src/include/lcd64x32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcd64x32.h 3 | * 4 | * Created on: 26.10.2017 5 | * Author: thomas 6 | */ 7 | 8 | #ifndef LCD64X32_H_ 9 | #define LCD64X32_H_ 10 | 11 | #include "ugui.h" 12 | 13 | #define SCREEN_WIDTH 64 14 | #define SCREEN_HEIGHT 32 15 | 16 | 17 | #define CMD_DISPLAY_OFF 0xAE 18 | #define CMD_DISPLAY_ON 0xAF 19 | 20 | #define CMD_SET_DISP_START_LINE 0x40 21 | #define CMD_SET_PAGE 0xB0 22 | 23 | #define CMD_SET_COLUMN_UPPER 0x10 24 | #define CMD_SET_COLUMN_LOWER 0x00 25 | 26 | #define CMD_SET_ADC_NORMAL 0xA0 27 | #define CMD_SET_ADC_REVERSE 0xA1 28 | 29 | #define CMD_SET_DISP_NORMAL 0xA6 30 | #define CMD_SET_DISP_REVERSE 0xA7 31 | 32 | #define CMD_SET_ALLPTS_NORMAL 0xA4 33 | #define CMD_SET_ALLPTS_ON 0xA5 34 | #define CMD_SET_BIAS_9 0xA2 35 | #define CMD_SET_BIAS_6 0xA2 36 | #define CMD_SET_BIAS_7 0xA3 37 | 38 | #define CMD_RMW 0xE0 39 | #define CMD_RMW_CLEAR 0xEE 40 | #define CMD_INTERNAL_RESET 0xE2 41 | #define CMD_SET_COM_NORMAL 0xC0 42 | #define CMD_SET_COM_REVERSE 0xC8 43 | #define CMD_SET_POWER_CONTROL 0x28 44 | #define CMD_SET_RESISTOR_RATIO 0x20 45 | #define CMD_SET_VOLUME_FIRST 0x81 46 | #define CMD_SET_VOLUME_SECOND 0 47 | #define CMD_SET_STATIC_OFF 0xAC 48 | #define CMD_SET_STATIC_ON 0xAD 49 | #define CMD_SET_STATIC_REG 0x0 50 | #define CMD_SET_BOOSTER_FIRST 0xF8 51 | #define CMD_SET_BOOSTER_234 0 52 | #define CMD_SET_BOOSTER_5 1 53 | #define CMD_SET_BOOSTER_6 3 54 | #define CMD_NOP 0xE3 55 | #define CMD_TEST 0xF0 56 | 57 | 58 | 59 | 60 | void lcd_setPixel(int x, int y); 61 | void lcd_clearPixel(int x, int y); 62 | void lcd_drawPixel(UG_S16 x, UG_S16 y, UG_COLOR col); 63 | void lcd_UG_PutStringf(UG_S16 x, UG_S16 y, const char* format, ...); 64 | void lcd_update(); 65 | void lcd_clear(uint8_t update); 66 | void lcd_init(); 67 | void lcd_putIcon(int x, int y, const char* data); 68 | void lcd_setContrast(uint8_t val); 69 | 70 | void lcd_putChar5x7(int x, int y, char c); 71 | void lcd_putString5x7(int x, int y, char* buf); 72 | void lcd_putString5x7f(int x, int y, const char* format, ...); 73 | 74 | 75 | #endif /* LCD64X32_H_ */ 76 | -------------------------------------------------------------------------------- /src/include/rotenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rotenc.h 3 | * 4 | * Created on: 14.11.2017 5 | * Author: ne23kaj2 6 | */ 7 | 8 | #ifndef ROTENC_H_ 9 | #define ROTENC_H_ 10 | 11 | 12 | 13 | void rotenc_irq_process(); 14 | void rotenc_init(); 15 | int8_t rotenc_read1(void); 16 | 17 | 18 | #endif /* ROTENC_H_ */ 19 | -------------------------------------------------------------------------------- /src/include/rtc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rtc.h 3 | * 4 | * Created on: 10.10.2017 5 | * Author: ne23kaj2 6 | */ 7 | 8 | #ifndef RTC_H_ 9 | #define RTC_H_ 10 | 11 | #define RTC_H12_AM ((uint8_t)0x00) 12 | #define RTC_H12_PM ((uint8_t)0x40) 13 | #define RTC_H24 ((uint8_t) 0x80) 14 | 15 | 16 | typedef struct { 17 | uint8_t RTC_Hours; 18 | uint8_t RTC_Minutes; 19 | uint8_t RTC_Seconds; 20 | uint8_t RTC_H12; 21 | 22 | } RTC_TimeTypeDef_H12; 23 | 24 | typedef struct { 25 | uint8_t RTC_Hours; 26 | uint8_t RTC_Minutes; 27 | uint8_t RTC_Seconds; 28 | } RTC_TimeTypeDef_H24; 29 | 30 | typedef struct { 31 | uint8_t RTC_WeekDay; 32 | uint8_t RTC_Month; 33 | uint8_t RTC_Date; 34 | uint8_t RTC_Year; 35 | } RTC_DateTypeDef; 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | void rtc_init(); 42 | 43 | void rtc_adjustTime(RTC_TimeTypeDef_H24* t, int d); 44 | void rtc_adjustDate(RTC_DateTypeDef* date, int d); 45 | uint8_t rtc_isLeapYear(uint16_t nYear); 46 | void rtc_setTime12(RTC_TimeTypeDef_H12* time); 47 | void rtc_getTime12(RTC_TimeTypeDef_H12* time); 48 | void rtc_setTime24(RTC_TimeTypeDef_H24* time24); 49 | void rtc_getTime24(RTC_TimeTypeDef_H24* time24); 50 | void rtc_setDate(RTC_DateTypeDef* date); 51 | void rtc_getDate(RTC_DateTypeDef* date); 52 | void rtc_checkUpdateDate(RTC_TimeTypeDef_H24* time, RTC_DateTypeDef* date); 53 | int rtc_weekday(int year, int month, int day); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* RTC_H_ */ 60 | -------------------------------------------------------------------------------- /src/include/tim.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tim.h 3 | * 4 | * Created on: 09.10.2017 5 | * Author: ne23kaj2 6 | */ 7 | 8 | #ifndef TIM_H_ 9 | #define TIM_H_ 10 | 11 | 12 | void timer_init(); 13 | 14 | 15 | #endif /* TIM_H_ */ 16 | -------------------------------------------------------------------------------- /src/include/ugui_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __UGUI_CONFIG_H 2 | #define __UGUI_CONFIG_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* -------------------------------------------------------------------------------- */ 11 | /* -- CONFIG SECTION -- */ 12 | /* -------------------------------------------------------------------------------- */ 13 | 14 | /* Enable needed fonts here */ 15 | //#define USE_FONT_4X6 16 | //#define USE_FONT_5X8 17 | //#define USE_FONT_5X12 18 | //#define USE_FONT_6X8 19 | #define USE_FONT_6X10 20 | //#define USE_FONT_7X12 21 | //#define USE_FONT_8X8 22 | //#define USE_FONT_8X12 23 | //#define USE_FONT_8X14 24 | //#define USE_FONT_10X16 25 | //#define USE_FONT_12X16 26 | //#define USE_FONT_12X20 27 | //#define USE_FONT_16X26 28 | //#define USE_FONT_22X36 29 | //#define USE_FONT_24X40 30 | //#define USE_FONT_32X53 31 | 32 | /* Specify platform-dependent integer types here */ 33 | 34 | #define __UG_FONT_DATA const 35 | typedef uint8_t UG_U8; 36 | typedef int8_t UG_S8; 37 | typedef uint16_t UG_U16; 38 | typedef int16_t UG_S16; 39 | typedef uint32_t UG_U32; 40 | typedef int32_t UG_S32; 41 | 42 | 43 | /* -------------------------------------------------------------------------------- */ 44 | /* -------------------------------------------------------------------------------- */ 45 | 46 | 47 | /* Feature enablers */ 48 | #define USE_PRERENDER_EVENT 49 | #define USE_POSTRENDER_EVENT 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/include/usb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * usb.h 3 | * 4 | * Created on: 14.11.2017 5 | * Author: ne23kaj2 6 | */ 7 | 8 | #ifndef USB_H_ 9 | #define USB_H_ 10 | 11 | #include 12 | 13 | extern "C" void usb_CDCReceiveCallback(uint8_t* Receive_Buffer, uint32_t Receive_length); 14 | extern "C" void usb_transmitString(char* msg); 15 | 16 | void usb_init(); 17 | void usb_process(); 18 | uint8_t usb_isConfigured(); 19 | 20 | 21 | #endif /* USB_H_ */ 22 | -------------------------------------------------------------------------------- /src/ldscripts/libs.ld: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Placeholder to list other libraries required by the application. 4 | 5 | GROUP( 6 | ) 7 | 8 | */ 9 | -------------------------------------------------------------------------------- /src/ldscripts/mem.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Memory Spaces Definitions. 3 | * 4 | * Need modifying for a specific board. 5 | * FLASH.ORIGIN: starting address of flash 6 | * FLASH.LENGTH: length of flash 7 | * RAM.ORIGIN: starting address of RAM bank 0 8 | * RAM.LENGTH: length of RAM bank 0 9 | * 10 | * The values below can be addressed in further linker scripts 11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'. 12 | */ 13 | 14 | MEMORY 15 | { 16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K 17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0 18 | FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K 19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0 21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0 23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0 24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0 25 | } 26 | 27 | /* 28 | * For external ram use something like: 29 | 30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K 31 | 32 | */ 33 | -------------------------------------------------------------------------------- /src/myboard.cfg: -------------------------------------------------------------------------------- 1 | 2 | source [find interface/stlink-v2.cfg] 3 | 4 | #set WORKAREASIZE 0x5000 5 | #transport select "hla_swd" 6 | #adapter_khz 4000 7 | 8 | source [find target/stm32f1x_stlink.cfg] 9 | 10 | # use hardware reset, connect under reset 11 | reset_config none separate 12 | #reset_config srst_only srst_nogate -------------------------------------------------------------------------------- /src/src/Timer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the GNU ARM Eclipse distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | #include "Timer.h" 7 | #include "cortexm/ExceptionHandlers.h" 8 | 9 | // ---------------------------------------------------------------------------- 10 | 11 | #if defined(USE_HAL_DRIVER) 12 | void HAL_IncTick(void); 13 | #endif 14 | 15 | // Forward declarations. 16 | 17 | void 18 | timer_tick (void); 19 | 20 | // ---------------------------------------------------------------------------- 21 | 22 | volatile timer_ticks_t timer_delayCount; 23 | volatile timer_ticks_t ticks; 24 | // ---------------------------------------------------------------------------- 25 | 26 | void 27 | timer_start (void) 28 | { 29 | // Use SysTick as reference for the delay loops. 30 | SysTick_Config (SystemCoreClock / TIMER_FREQUENCY_HZ); 31 | } 32 | 33 | void 34 | timer_sleep (timer_ticks_t ticks) 35 | { 36 | timer_delayCount = ticks; 37 | 38 | // Busy wait until the SysTick decrements the counter to zero. 39 | while (timer_delayCount != 0u) 40 | ; 41 | } 42 | 43 | void 44 | timer_tick (void) 45 | { 46 | ticks++; 47 | // Decrement to zero the counter used by the delay routine. 48 | if (timer_delayCount != 0u) 49 | { 50 | --timer_delayCount; 51 | } 52 | } 53 | 54 | // ----- SysTick_Handler() ---------------------------------------------------- 55 | 56 | void 57 | SysTick_Handler (void) 58 | { 59 | #if defined(USE_HAL_DRIVER) 60 | HAL_IncTick(); 61 | #endif 62 | timer_tick (); 63 | } 64 | 65 | // ---------------------------------------------------------------------------- 66 | -------------------------------------------------------------------------------- /src/src/_write.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // Do not include on semihosting and when freestanding 7 | #if !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0) 8 | 9 | // ---------------------------------------------------------------------------- 10 | 11 | #include 12 | #include "diag/Trace.h" 13 | 14 | // ---------------------------------------------------------------------------- 15 | 16 | // When using retargetted configurations, the standard write() system call, 17 | // after a long way inside newlib, finally calls this implementation function. 18 | 19 | // Based on the file descriptor, it can send arrays of characters to 20 | // different physical devices. 21 | 22 | // Currently only the output and error file descriptors are tested, 23 | // and the characters are forwarded to the trace device, mainly 24 | // for demonstration purposes. Adjust it for your specific needs. 25 | 26 | // For freestanding applications this file is not used and can be safely 27 | // ignored. 28 | 29 | ssize_t 30 | _write (int fd, const char* buf, size_t nbyte); 31 | 32 | ssize_t 33 | _write (int fd __attribute__((unused)), const char* buf __attribute__((unused)), 34 | size_t nbyte __attribute__((unused))) 35 | { 36 | #if defined(TRACE) 37 | // STDOUT and STDERR are routed to the trace device 38 | if (fd == 1 || fd == 2) 39 | { 40 | return trace_write (buf, nbyte); 41 | } 42 | #endif // TRACE 43 | 44 | errno = ENOSYS; 45 | return -1; 46 | } 47 | 48 | // ---------------------------------------------------------------------------- 49 | 50 | #endif // !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0) 51 | -------------------------------------------------------------------------------- /src/src/gpio.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of DIY-Projector-Clock 3 | * www.microengineer.eu 4 | * 5 | * If you like my work, please consider to donate IOTAs to: 6 | * LLEYMHRKXWSPMGCMZFPKKTHSEMYJTNAZXSAYZGQUEXLXEEWPXUNWBFDWESOJVLHQHXOPQEYXGIRBYTLRWHMJAOSHUY 7 | * 8 | * 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, version 3. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | #include "gpio.h" 24 | #include "stm32f10x_gpio.h" 25 | 26 | void gpio_init(void) { 27 | 28 | GPIO_InitTypeDef GPIO_InitStruct; 29 | 30 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); 31 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); 32 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); 33 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); 34 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); 35 | 36 | GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE); 37 | GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); 38 | 39 | /*Configure GPIO pin Output Level */ 40 | GPIO_ResetBits(GPIOB, GPIO_Pin_2); 41 | /*Configure GPIO pin Output Level */ 42 | GPIO_ResetBits(GPIOA, GPIO_Pin_2); 43 | GPIO_SetBits(GPIOA, GPIO_Pin_3); 44 | /*Configure GPIO pins : PB2 PB14 PB15 */ 45 | GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2; 46 | GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP; 47 | GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz; 48 | GPIO_Init(GPIOB, &GPIO_InitStruct); 49 | 50 | /*Configure GPIO pin : PA8 */ 51 | GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3; 52 | GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP; 53 | GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz; 54 | GPIO_Init(GPIOA, &GPIO_InitStruct); 55 | 56 | /*Configure GPIO pin : PB12 */ 57 | GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7; 58 | GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN_FLOATING; 59 | GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz; 60 | GPIO_Init(GPIOB, &GPIO_InitStruct); 61 | 62 | // timer pwm 63 | GPIO_InitStruct.GPIO_Pin = GPIO_Pin_4; 64 | GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP; 65 | //GPIO_InitStruct.GPIO_Pull = GPIO_NOPULL; 66 | // GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; 67 | GPIO_Init(GPIOB, &GPIO_InitStruct); 68 | GPIO_PinRemapConfig(GPIO_PartialRemap_TIM3, ENABLE); 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/src/ir.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/src/ir.cpp -------------------------------------------------------------------------------- /src/src/irmp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/src/src/irmp.c -------------------------------------------------------------------------------- /src/src/json.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of DIY-Projector-Clock 3 | * www.microengineer.eu 4 | * 5 | * If you like my work, please consider to donate IOTAs to: 6 | * LLEYMHRKXWSPMGCMZFPKKTHSEMYJTNAZXSAYZGQUEXLXEEWPXUNWBFDWESOJVLHQHXOPQEYXGIRBYTLRWHMJAOSHUY 7 | * 8 | * 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, version 3. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | #include "stm32f10x.h" 24 | #include "ArduinoJson.h" 25 | #include 26 | #include 27 | #include "rtc.h" 28 | #include "main.h" 29 | extern "C" void usb_transmitString(char* msg); 30 | 31 | extern RTC_TimeTypeDef_H12 RTC_TimeStructure; 32 | extern RTC_DateTypeDef RTC_DateStructure; 33 | 34 | static char weekdays[8][4]={"", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; 35 | 36 | 37 | static char txbuf[512]; 38 | static int txwrptr; 39 | 40 | void getScreenString(char* buf) { 41 | *buf=0; 42 | } 43 | 44 | void add(const char* format, ...) { 45 | va_list args; 46 | va_start(args, format); 47 | int written = vsnprintf(&txbuf[txwrptr], 512 - txwrptr, format, args); 48 | if (written < 512 - txwrptr && written > 0) 49 | txwrptr += written; 50 | va_end(args); 51 | } 52 | 53 | static char dayNames[][12] = { "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So" }; 54 | 55 | uint8_t json_process(char* rxbuf) { 56 | StaticJsonBuffer<512> jsonIn; 57 | JsonObject& root = jsonIn.parseObject(rxbuf); 58 | 59 | txwrptr = 0; 60 | memset(txbuf, 0, sizeof(txbuf)); 61 | 62 | do { 63 | if (!root.success()) { 64 | add("{"); 65 | add("'cmd':'status',"); 66 | add("'status':'error'"); 67 | add("}"); 68 | //printf("%.*s", sbuf.pcount(), sbuf.str()); 69 | usb_transmitString(txbuf); 70 | break; 71 | } 72 | 73 | add("{"); 74 | add("'cmd':'%s',", (const char*) root["cmd"]); 75 | do { 76 | int weekday = rtc_weekday(RTC_DateStructure.RTC_Year + 2000, RTC_DateStructure.RTC_Month, 77 | RTC_DateStructure.RTC_Date); 78 | 79 | if (root["cmd"] == "status") { 80 | add("'time':'%d:%02d:%02d',", 81 | RTC_TimeStructure.RTC_Hours, 82 | RTC_TimeStructure.RTC_Minutes, 83 | RTC_TimeStructure.RTC_Seconds); 84 | add("'date':'%04d-%02d-%02d %s',", 85 | RTC_DateStructure.RTC_Year + 2000, 86 | RTC_DateStructure.RTC_Month, 87 | RTC_DateStructure.RTC_Date, 88 | dayNames[weekday] 89 | ); 90 | /* add("'pwmw':%d,", fadectrw); 91 | add("'pwmr':%d,", fadectrr); 92 | add("'display':%d,", displaystate); 93 | */ 94 | char screen[128]={0}; 95 | getScreenString(screen); 96 | add("'screen':'%s',", screen); 97 | } 98 | } while (0); 99 | add("'status':'ok'"); 100 | add("}"); 101 | usb_transmitString(txbuf); 102 | 103 | } while (0); 104 | 105 | return 1; 106 | } 107 | 108 | extern "C" uint8_t process_json_c(char* rxbuf) { 109 | return json_process(rxbuf); 110 | } 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /src/src/rotenc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of DIY-Projector-Clock 3 | * www.microengineer.eu 4 | * 5 | * If you like my work, please consider to donate IOTAs to: 6 | * LLEYMHRKXWSPMGCMZFPKKTHSEMYJTNAZXSAYZGQUEXLXEEWPXUNWBFDWESOJVLHQHXOPQEYXGIRBYTLRWHMJAOSHUY 7 | * 8 | * 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, version 3. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | // rotation-encoder is based on: 24 | // https://www.mikrocontroller.net/articles/Drehgeber 25 | 26 | #include "main.h" 27 | 28 | static volatile int8_t enc_delta; // -128 ... 127 29 | static int8_t last; 30 | 31 | #define PHASE_A (GPIO_ReadInputDataBit(GPIO_PHASEA) == Bit_SET) 32 | #define PHASE_B (GPIO_ReadInputDataBit(GPIO_PHASEB) == Bit_SET) 33 | 34 | void rotenc_irq_process() { 35 | int8_t _new, diff; 36 | 37 | _new = 0; 38 | if (PHASE_A) 39 | _new = 3; 40 | if (PHASE_B) 41 | _new ^= 1; // convert gray to binary 42 | diff = last - _new; // difference last - new 43 | if (diff & 1) { // bit 0 = value (1) 44 | last = _new; // store new as next last 45 | enc_delta += (diff & 2) - 1; // bit 1 = direction (+/-) 46 | } 47 | 48 | } 49 | 50 | 51 | void rotenc_init() { 52 | int8_t _new; 53 | 54 | _new = 0; 55 | if ( PHASE_A) 56 | _new = 3; 57 | if ( PHASE_B) 58 | _new ^= 1; // convert gray to binary 59 | last = _new; // power on state 60 | enc_delta = 0; 61 | } 62 | 63 | int8_t rotenc_read1(void) // read single step encoders 64 | { 65 | int8_t val; 66 | 67 | __disable_irq(); 68 | val = enc_delta; 69 | enc_delta = 0; 70 | __enable_irq(); 71 | return val; // counts since last call 72 | } 73 | -------------------------------------------------------------------------------- /src/src/tim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of DIY-Projector-Clock 3 | * www.microengineer.eu 4 | * 5 | * If you like my work, please consider to donate IOTAs to: 6 | * LLEYMHRKXWSPMGCMZFPKKTHSEMYJTNAZXSAYZGQUEXLXEEWPXUNWBFDWESOJVLHQHXOPQEYXGIRBYTLRWHMJAOSHUY 7 | * 8 | * 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, version 3. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | 24 | #include "stm32f10x_tim.h" 25 | #include 26 | 27 | void timer_init() { 28 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); 29 | 30 | TIM_TimeBaseInitTypeDef timerInitStructure; 31 | timerInitStructure.TIM_Prescaler = 0; 32 | timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up; 33 | timerInitStructure.TIM_Period = 3000; // 16kHz 34 | timerInitStructure.TIM_ClockDivision = TIM_CKD_DIV1; 35 | timerInitStructure.TIM_RepetitionCounter = 0; 36 | TIM_TimeBaseInit(TIM3, &timerInitStructure); 37 | TIM_Cmd(TIM3, ENABLE); 38 | TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE); 39 | 40 | // TIM_OCInitTypeDef outputChannelInit = { 0, }; 41 | TIM_OCInitTypeDef outputChannelInit; 42 | memset(&outputChannelInit, 0, sizeof(TIM_OCInitTypeDef)); 43 | outputChannelInit.TIM_OCMode = TIM_OCMode_PWM2; 44 | outputChannelInit.TIM_Pulse = 200; 45 | outputChannelInit.TIM_OutputState = TIM_OutputState_Enable; 46 | outputChannelInit.TIM_OCPolarity = TIM_OCPolarity_Low; 47 | 48 | TIM_OC1Init(TIM3, &outputChannelInit); 49 | TIM_OC1PreloadConfig(TIM3, TIM_OCPreload_Enable); 50 | 51 | /* TIM_OC2Init(TIM3, &outputChannelInit); 52 | TIM_OC2PreloadConfig(TIM3, TIM_OCPreload_Enable); 53 | */ 54 | 55 | NVIC_InitTypeDef nvicStructure; 56 | nvicStructure.NVIC_IRQChannel = TIM3_IRQn; 57 | nvicStructure.NVIC_IRQChannelPreemptionPriority = 0; 58 | nvicStructure.NVIC_IRQChannelSubPriority = 1; 59 | nvicStructure.NVIC_IRQChannelCmd = ENABLE; 60 | NVIC_Init(&nvicStructure); 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/src/usb.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of DIY-Projector-Clock 3 | * www.microengineer.eu 4 | * 5 | * If you like my work, please consider to donate IOTAs to: 6 | * LLEYMHRKXWSPMGCMZFPKKTHSEMYJTNAZXSAYZGQUEXLXEEWPXUNWBFDWESOJVLHQHXOPQEYXGIRBYTLRWHMJAOSHUY 7 | * 8 | * 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, version 3. 13 | * 14 | * This program is distributed in the hope that it will be useful, but 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | 24 | #include 25 | 26 | #include "main.h" 27 | #include "hw_config.h" 28 | #include "usb_lib.h" 29 | #include "usb_desc.h" 30 | #include "usb_pwr.h" 31 | #include "json.h" 32 | 33 | #define RXBUFSIZE 512 34 | 35 | uint32_t packet_sent = 1; 36 | uint32_t packet_receive = 1; 37 | 38 | static uint8_t rxbuf[RXBUFSIZE]; 39 | static uint32_t rxbufrdptr = 0; 40 | static uint32_t rxbufwrptr = 0; 41 | static char usbrxbuf[256]; 42 | static char* usbwrptr; 43 | 44 | extern "C" void usb_CDCReceiveCallback(uint8_t* Receive_Buffer, uint32_t Receive_length) { 45 | for (uint32_t i = 0; i < Receive_length; i++) { 46 | rxbuf[rxbufwrptr % RXBUFSIZE] = Receive_Buffer[i]; 47 | rxbufwrptr++; 48 | } 49 | } 50 | 51 | // TODO move to json and make it better 52 | extern "C" void usb_transmitString(char* msg) { 53 | char strbuf[256] = { 0 }; 54 | if (strlen(msg) > sizeof(strbuf) - 5) // not likely to happen 55 | return; 56 | memcpy((void*) strbuf, (void*) msg, strlen(msg)); 57 | char* p = &strbuf[strlen(msg)]; 58 | *p++ = '\r'; 59 | *p++ = '\n'; 60 | *p = 0; 61 | uint32_t tosend = strlen(strbuf); 62 | uint8_t* cptr = (uint8_t*) strbuf; 63 | uint32_t maxsize = VIRTUAL_COM_PORT_DATA_SIZE - 1; 64 | while (tosend) { 65 | int chunklen = min(maxsize, tosend); 66 | while (GetEPTxStatus(ENDP1) != EP_TX_NAK) 67 | ; 68 | CDC_Send_DATA(cptr, chunklen); 69 | cptr += chunklen; 70 | tosend -= chunklen; 71 | } 72 | } 73 | 74 | 75 | 76 | uint8_t parseCmd(char* rxbuf) { 77 | return json_process(rxbuf); 78 | } 79 | 80 | void usb_process() { 81 | CDC_Receive_DATA(); 82 | for (; rxbufrdptr < rxbufwrptr; rxbufrdptr++) { 83 | *usbwrptr = rxbuf[rxbufrdptr % RXBUFSIZE]; 84 | if (*usbwrptr == '\n') 85 | continue; 86 | if (*usbwrptr == '\r') { 87 | *usbwrptr = 0; 88 | if (!parseCmd(usbrxbuf)) 89 | usb_transmitString("error"); 90 | usbwrptr = &usbrxbuf[0]; 91 | } else { 92 | usbwrptr++; 93 | if ((int) usbwrptr - (int) &usbrxbuf > (int) sizeof(usbrxbuf) - 2) { 94 | memset(usbrxbuf, 0, sizeof(usbrxbuf)); 95 | usbwrptr = &usbrxbuf[0]; 96 | usb_transmitString("error"); 97 | } 98 | } 99 | } 100 | } 101 | 102 | uint8_t usb_isConfigured() { 103 | return bDeviceState == CONFIGURED; 104 | } 105 | 106 | void usb_init() { 107 | Set_System(); 108 | Set_USBClock(); 109 | USB_Interrupts_Config(); 110 | USB_Init(); 111 | 112 | usbwrptr = &usbrxbuf[0]; 113 | } 114 | -------------------------------------------------------------------------------- /src/system/include/cmsis/README_DEVICE.txt: -------------------------------------------------------------------------------- 1 | The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip, 2 | the folder: 3 | 4 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x 5 | 6 | The cmsis_device.h is added for convenience. 7 | 8 | -------------------------------------------------------------------------------- /src/system/include/cmsis/cmsis_device.h: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | #ifndef STM32F1_CMSIS_DEVICE_H_ 7 | #define STM32F1_CMSIS_DEVICE_H_ 8 | 9 | #include "stm32f10x.h" 10 | 11 | #endif // STM32F1_CMSIS_DEVICE_H_ 12 | -------------------------------------------------------------------------------- /src/system/include/cmsis/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /src/system/include/cortexm/ExceptionHandlers.h: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | #ifndef CORTEXM_EXCEPTION_HANDLERS_H_ 7 | #define CORTEXM_EXCEPTION_HANDLERS_H_ 8 | 9 | #include 10 | 11 | #if defined(DEBUG) 12 | #define __DEBUG_BKPT() asm volatile ("bkpt 0") 13 | #endif 14 | 15 | // ---------------------------------------------------------------------------- 16 | 17 | #if defined(__cplusplus) 18 | extern "C" 19 | { 20 | #endif 21 | 22 | // External references to cortexm_handlers.c 23 | 24 | extern void 25 | Reset_Handler (void); 26 | extern void 27 | NMI_Handler (void); 28 | extern void 29 | HardFault_Handler (void); 30 | 31 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 32 | extern void 33 | MemManage_Handler (void); 34 | extern void 35 | BusFault_Handler (void); 36 | extern void 37 | UsageFault_Handler (void); 38 | extern void 39 | DebugMon_Handler (void); 40 | #endif 41 | 42 | extern void 43 | SVC_Handler (void); 44 | 45 | extern void 46 | PendSV_Handler (void); 47 | extern void 48 | SysTick_Handler (void); 49 | 50 | // Exception Stack Frame of the Cortex-M3 or Cortex-M4 processor. 51 | typedef struct 52 | { 53 | uint32_t r0; 54 | uint32_t r1; 55 | uint32_t r2; 56 | uint32_t r3; 57 | uint32_t r12; 58 | uint32_t lr; 59 | uint32_t pc; 60 | uint32_t psr; 61 | #if defined(__ARM_ARCH_7EM__) 62 | uint32_t s[16]; 63 | #endif 64 | } ExceptionStackFrame; 65 | 66 | #if defined(TRACE) 67 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 68 | void 69 | dumpExceptionStack (ExceptionStackFrame* frame, uint32_t cfsr, uint32_t mmfar, 70 | uint32_t bfar, uint32_t lr); 71 | #endif // defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 72 | #if defined(__ARM_ARCH_6M__) 73 | void 74 | dumpExceptionStack (ExceptionStackFrame* frame, uint32_t lr); 75 | #endif // defined(__ARM_ARCH_6M__) 76 | #endif // defined(TRACE) 77 | 78 | void 79 | HardFault_Handler_C (ExceptionStackFrame* frame, uint32_t lr); 80 | 81 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 82 | void 83 | UsageFault_Handler_C (ExceptionStackFrame* frame, uint32_t lr); 84 | void 85 | BusFault_Handler_C (ExceptionStackFrame* frame, uint32_t lr); 86 | #endif // defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 87 | 88 | #if defined(__cplusplus) 89 | } 90 | #endif 91 | 92 | // ---------------------------------------------------------------------------- 93 | 94 | #endif // CORTEXM_EXCEPTION_HANDLERS_H_ 95 | -------------------------------------------------------------------------------- /src/system/include/stm32f1-stdperiph/README_STDPERIPH.txt: -------------------------------------------------------------------------------- 1 | These files are from stsw-stm32054.zip, the folder: 2 | 3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc 4 | 5 | -------------------------------------------------------------------------------- /src/system/include/stm32f1-stdperiph/stm32f10x_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_crc.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_CRC_H 25 | #define __STM32F10x_CRC_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup CRC 39 | * @{ 40 | */ 41 | 42 | /** @defgroup CRC_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup CRC_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup CRC_Exported_Macros 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup CRC_Exported_Functions 67 | * @{ 68 | */ 69 | 70 | void CRC_ResetDR(void); 71 | uint32_t CRC_CalcCRC(uint32_t Data); 72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 73 | uint32_t CRC_GetCRC(void); 74 | void CRC_SetIDRegister(uint8_t IDValue); 75 | uint8_t CRC_GetIDRegister(void); 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif /* __STM32F10x_CRC_H */ 82 | /** 83 | * @} 84 | */ 85 | 86 | /** 87 | * @} 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 95 | -------------------------------------------------------------------------------- /src/system/include/stm32f1-stdperiph/stm32f10x_wwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_wwdg.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the WWDG firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_WWDG_H 25 | #define __STM32F10x_WWDG_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup WWDG 39 | * @{ 40 | */ 41 | 42 | /** @defgroup WWDG_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup WWDG_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup WWDG_Prescaler 55 | * @{ 56 | */ 57 | 58 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 59 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 60 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 61 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 62 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 63 | ((PRESCALER) == WWDG_Prescaler_2) || \ 64 | ((PRESCALER) == WWDG_Prescaler_4) || \ 65 | ((PRESCALER) == WWDG_Prescaler_8)) 66 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 67 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | /** @defgroup WWDG_Exported_Macros 78 | * @{ 79 | */ 80 | /** 81 | * @} 82 | */ 83 | 84 | /** @defgroup WWDG_Exported_Functions 85 | * @{ 86 | */ 87 | 88 | void WWDG_DeInit(void); 89 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 90 | void WWDG_SetWindowValue(uint8_t WindowValue); 91 | void WWDG_EnableIT(void); 92 | void WWDG_SetCounter(uint8_t Counter); 93 | void WWDG_Enable(uint8_t Counter); 94 | FlagStatus WWDG_GetFlagStatus(void); 95 | void WWDG_ClearFlag(void); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /* __STM32F10x_WWDG_H */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | 115 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 116 | -------------------------------------------------------------------------------- /src/system/src/cmsis/README_DEVICE.txt: -------------------------------------------------------------------------------- 1 | The system_stm32f10x.c file is from stsw-stm32054.zip, the folder: 2 | 3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x 4 | 5 | The vectors_stm32f10x.c was created to conform to the startup_stm32f10x_xx*.s. -------------------------------------------------------------------------------- /src/system/src/cortexm/_initialize_hardware.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | #include "cmsis_device.h" 9 | 10 | // ---------------------------------------------------------------------------- 11 | 12 | extern unsigned int __vectors_start; 13 | 14 | // Forward declarations. 15 | 16 | void 17 | __initialize_hardware_early(void); 18 | 19 | void 20 | __initialize_hardware(void); 21 | 22 | // ---------------------------------------------------------------------------- 23 | 24 | // This is the early hardware initialisation routine, it can be 25 | // redefined in the application for more complex cases that 26 | // require early inits (before BSS init). 27 | // 28 | // Called early from _start(), right before data & bss init. 29 | // 30 | // After Reset the Cortex-M processor is in Thread mode, 31 | // priority is Privileged, and the Stack is set to Main. 32 | 33 | void 34 | __attribute__((weak)) 35 | __initialize_hardware_early(void) 36 | { 37 | // Call the CSMSIS system initialisation routine. 38 | SystemInit(); 39 | 40 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) 41 | // Set VTOR to the actual address, provided by the linker script. 42 | // Override the manual, possibly wrong, SystemInit() setting. 43 | SCB->VTOR = (uint32_t)(&__vectors_start); 44 | #endif 45 | 46 | // The current version of SystemInit() leaves the value of the clock 47 | // in a RAM variable (SystemCoreClock), which will be cleared shortly, 48 | // so it needs to be recomputed after the RAM initialisations 49 | // are completed. 50 | 51 | #if defined(OS_INCLUDE_STARTUP_INIT_FP) || (defined (__VFP_FP__) && !defined (__SOFTFP__)) 52 | 53 | // Normally FP init is done by SystemInit(). In case this is not done 54 | // there, it is possible to force its inclusion by defining 55 | // OS_INCLUDE_STARTUP_INIT_FP. 56 | 57 | // Enable the Cortex-M4 FPU only when -mfloat-abi=hard. 58 | // Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C) 59 | 60 | // Set bits 20-23 to enable CP10 and CP11 coprocessor 61 | SCB->CPACR |= (0xF << 20); 62 | 63 | #endif // (__VFP_FP__) && !(__SOFTFP__) 64 | 65 | #if defined(OS_DEBUG_SEMIHOSTING_FAULTS) 66 | SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk; 67 | #endif 68 | } 69 | 70 | // This is the second hardware initialisation routine, it can be 71 | // redefined in the application for more complex cases that 72 | // require custom inits (before constructors), otherwise these can 73 | // be done in main(). 74 | // 75 | // Called from _start(), right after data & bss init, before 76 | // constructors. 77 | 78 | void 79 | __attribute__((weak)) 80 | __initialize_hardware(void) 81 | { 82 | // Call the CSMSIS system clock routine to store the clock frequency 83 | // in the SystemCoreClock global RAM location. 84 | SystemCoreClockUpdate(); 85 | } 86 | 87 | // ---------------------------------------------------------------------------- 88 | -------------------------------------------------------------------------------- /src/system/src/cortexm/_reset_hardware.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | #include "cmsis_device.h" 9 | 10 | // ---------------------------------------------------------------------------- 11 | 12 | extern void 13 | __attribute__((noreturn)) 14 | NVIC_SystemReset(void); 15 | 16 | // ---------------------------------------------------------------------------- 17 | 18 | // Forward declarations 19 | 20 | void 21 | __reset_hardware(void); 22 | 23 | // ---------------------------------------------------------------------------- 24 | 25 | // This is the default hardware reset routine; it can be 26 | // redefined in the application for more complex applications. 27 | // 28 | // Called from _exit(). 29 | 30 | void 31 | __attribute__((weak,noreturn)) 32 | __reset_hardware() 33 | { 34 | NVIC_SystemReset(); 35 | } 36 | 37 | // ---------------------------------------------------------------------------- 38 | -------------------------------------------------------------------------------- /src/system/src/diag/Trace.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | #if defined(TRACE) 9 | 10 | #include 11 | #include 12 | #include "diag/Trace.h" 13 | #include "string.h" 14 | 15 | #ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE 16 | #define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (128) 17 | #endif 18 | 19 | // ---------------------------------------------------------------------------- 20 | 21 | int 22 | trace_printf(const char* format, ...) 23 | { 24 | int ret; 25 | va_list ap; 26 | 27 | va_start (ap, format); 28 | 29 | // TODO: rewrite it to no longer use newlib, it is way too heavy 30 | 31 | static char buf[OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE]; 32 | 33 | // Print to the local buffer 34 | ret = vsnprintf (buf, sizeof(buf), format, ap); 35 | if (ret > 0) 36 | { 37 | // Transfer the buffer to the device 38 | ret = trace_write (buf, (size_t)ret); 39 | } 40 | 41 | va_end (ap); 42 | return ret; 43 | } 44 | 45 | int 46 | trace_puts(const char *s) 47 | { 48 | trace_write(s, strlen(s)); 49 | return trace_write("\n", 1); 50 | } 51 | 52 | int 53 | trace_putchar(int c) 54 | { 55 | trace_write((const char*)&c, 1); 56 | return c; 57 | } 58 | 59 | void 60 | trace_dump_args(int argc, char* argv[]) 61 | { 62 | trace_printf("main(argc=%d, argv=[", argc); 63 | for (int i = 0; i < argc; ++i) 64 | { 65 | if (i != 0) 66 | { 67 | trace_printf(", "); 68 | } 69 | trace_printf("\"%s\"", argv[i]); 70 | } 71 | trace_printf("]);\n"); 72 | } 73 | 74 | // ---------------------------------------------------------------------------- 75 | 76 | #endif // TRACE 77 | -------------------------------------------------------------------------------- /src/system/src/newlib/README.txt: -------------------------------------------------------------------------------- 1 | 2 | The following files extend or replace some of the the newlib functionality: 3 | 4 | _startup.c: a customised startup sequence, written in C 5 | 6 | _exit.c: a customised exit() implementation 7 | 8 | _syscalls.c: local versions of the libnosys/librdimon code 9 | 10 | _sbrk.c: a custom _sbrk() to match the actual linker scripts 11 | 12 | assert.c: implementation for the asserion macros 13 | 14 | _cxx.cpp: local versions of some C++ support, to avoid references to 15 | large functions. 16 | 17 | -------------------------------------------------------------------------------- /src/system/src/newlib/_cxx.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | // These functions are redefined locally, to avoid references to some 9 | // heavy implementations in the standard C++ library. 10 | 11 | // ---------------------------------------------------------------------------- 12 | 13 | #include 14 | #include 15 | #include "diag/Trace.h" 16 | 17 | // ---------------------------------------------------------------------------- 18 | 19 | namespace __gnu_cxx 20 | { 21 | void 22 | __attribute__((noreturn)) 23 | __verbose_terminate_handler(); 24 | 25 | void 26 | __verbose_terminate_handler() 27 | { 28 | trace_puts(__func__); 29 | abort(); 30 | } 31 | } 32 | 33 | // ---------------------------------------------------------------------------- 34 | 35 | extern "C" 36 | { 37 | void 38 | __attribute__((noreturn)) 39 | __cxa_pure_virtual(); 40 | 41 | void 42 | __cxa_pure_virtual() 43 | { 44 | trace_puts(__func__); 45 | abort(); 46 | } 47 | } 48 | 49 | // ---------------------------------------------------------------------------- 50 | 51 | -------------------------------------------------------------------------------- /src/system/src/newlib/_exit.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | #include 9 | #include "diag/Trace.h" 10 | 11 | // ---------------------------------------------------------------------------- 12 | 13 | #if !defined(DEBUG) 14 | extern void 15 | __attribute__((noreturn)) 16 | __reset_hardware(void); 17 | #endif 18 | 19 | // ---------------------------------------------------------------------------- 20 | 21 | // Forward declaration 22 | 23 | void 24 | _exit(int code); 25 | 26 | // ---------------------------------------------------------------------------- 27 | 28 | // On Release, call the hardware reset procedure. 29 | // On Debug we just enter an infinite loop, to be used as landmark when halting 30 | // the debugger. 31 | // 32 | // It can be redefined in the application, if more functionality 33 | // is required. 34 | 35 | void 36 | __attribute__((weak)) 37 | _exit(int code __attribute__((unused))) 38 | { 39 | #if !defined(DEBUG) 40 | __reset_hardware(); 41 | #endif 42 | 43 | // TODO: write on trace 44 | while (1) 45 | ; 46 | } 47 | 48 | // ---------------------------------------------------------------------------- 49 | 50 | void 51 | __attribute__((weak,noreturn)) 52 | abort(void) 53 | { 54 | trace_puts("abort(), exiting..."); 55 | 56 | _exit(1); 57 | } 58 | 59 | // ---------------------------------------------------------------------------- 60 | -------------------------------------------------------------------------------- /src/system/src/newlib/_sbrk.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | // ---------------------------------------------------------------------------- 7 | 8 | #include 9 | #include 10 | 11 | // ---------------------------------------------------------------------------- 12 | 13 | caddr_t 14 | _sbrk(int incr); 15 | 16 | // ---------------------------------------------------------------------------- 17 | 18 | // The definitions used here should be kept in sync with the 19 | // stack definitions in the linker script. 20 | 21 | caddr_t 22 | _sbrk(int incr) 23 | { 24 | extern char _Heap_Begin; // Defined by the linker. 25 | extern char _Heap_Limit; // Defined by the linker. 26 | 27 | static char* current_heap_end; 28 | char* current_block_address; 29 | 30 | if (current_heap_end == 0) 31 | { 32 | current_heap_end = &_Heap_Begin; 33 | } 34 | 35 | current_block_address = current_heap_end; 36 | 37 | // Need to align heap to word boundary, else will get 38 | // hard faults on Cortex-M0. So we assume that heap starts on 39 | // word boundary, hence make sure we always add a multiple of 40 | // 4 to it. 41 | incr = (incr + 3) & (~3); // align value to 4 42 | if (current_heap_end + incr > &_Heap_Limit) 43 | { 44 | // Some of the libstdc++-v3 tests rely upon detecting 45 | // out of memory errors, so do not abort here. 46 | #if 0 47 | extern void abort (void); 48 | 49 | _write (1, "_sbrk: Heap and stack collision\n", 32); 50 | 51 | abort (); 52 | #else 53 | // Heap has overflowed 54 | errno = ENOMEM; 55 | return (caddr_t) - 1; 56 | #endif 57 | } 58 | 59 | current_heap_end += incr; 60 | 61 | return (caddr_t) current_block_address; 62 | } 63 | 64 | // ---------------------------------------------------------------------------- 65 | 66 | -------------------------------------------------------------------------------- /src/system/src/newlib/assert.c: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of the µOS++ III distribution. 3 | // Copyright (c) 2014 Liviu Ionescu. 4 | // 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include "diag/Trace.h" 11 | 12 | // ---------------------------------------------------------------------------- 13 | 14 | void 15 | __attribute__((noreturn)) 16 | __assert_func (const char *file, int line, const char *func, 17 | const char *failedexpr) 18 | { 19 | trace_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 20 | failedexpr, file, line, func ? ", function: " : "", 21 | func ? func : ""); 22 | abort (); 23 | /* NOTREACHED */ 24 | } 25 | 26 | // ---------------------------------------------------------------------------- 27 | 28 | // This is STM32 specific, but can be used on other platforms too. 29 | // If you need it, add the following to your application header: 30 | 31 | //#ifdef USE_FULL_ASSERT 32 | //#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 33 | //void assert_failed(uint8_t* file, uint32_t line); 34 | //#else 35 | //#define assert_param(expr) ((void)0) 36 | //#endif // USE_FULL_ASSERT 37 | 38 | #if defined(USE_FULL_ASSERT) 39 | 40 | void 41 | assert_failed (uint8_t* file, uint32_t line); 42 | 43 | // Called from the assert_param() macro, usually defined in the stm32f*_conf.h 44 | void 45 | __attribute__((noreturn, weak)) 46 | assert_failed (uint8_t* file, uint32_t line) 47 | { 48 | trace_printf ("assert_param() failed: file \"%s\", line %d\n", file, line); 49 | abort (); 50 | /* NOTREACHED */ 51 | } 52 | 53 | #endif // defined(USE_FULL_ASSERT) 54 | 55 | // ---------------------------------------------------------------------------- 56 | -------------------------------------------------------------------------------- /src/system/src/stm32f1-stdperiph/README_STDPERIPH.txt: -------------------------------------------------------------------------------- 1 | These files are from stsw-stm32054.zip, the folder: 2 | 3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src 4 | 5 | -------------------------------------------------------------------------------- /src/vcp/inc/stm32_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32_it.h 4 | * @author MCD Application Team 5 | * @version V4.1.0 6 | * @date 26-May-2017 7 | * @brief This file contains the headers of the interrupt handlers. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT(c) 2017 STMicroelectronics

12 | * 13 | * Redistribution and use in source and binary forms, with or without modification, 14 | * are permitted provided that the following conditions are met: 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | * 35 | ****************************************************************************** 36 | */ 37 | 38 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ 40 | #ifndef __STM32_IT_H 41 | #define __STM32_IT_H 42 | 43 | /* Includes ------------------------------------------------------------------*/ 44 | #include "platform_config.h" 45 | 46 | /* Exported types ------------------------------------------------------------*/ 47 | /* Exported constants --------------------------------------------------------*/ 48 | /* Exported macro ------------------------------------------------------------*/ 49 | /* Exported functions ------------------------------------------------------- */ 50 | 51 | void NMI_Handler(void); 52 | void HardFault_Handler(void); 53 | void MemManage_Handler(void); 54 | void BusFault_Handler(void); 55 | void UsageFault_Handler(void); 56 | void SVC_Handler(void); 57 | void DebugMon_Handler(void); 58 | void PendSV_Handler(void); 59 | void SysTick_Handler(void); 60 | void USBWakeUp_IRQHandler(void); 61 | void USB_FS_WKUP_IRQHandler(void); 62 | 63 | #endif /* __STM32_IT_H */ 64 | 65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 66 | -------------------------------------------------------------------------------- /stl/assembly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/assembly.png -------------------------------------------------------------------------------- /stl/case_bottom.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/case_bottom.stl -------------------------------------------------------------------------------- /stl/case_foot.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/case_foot.stl -------------------------------------------------------------------------------- /stl/case_top_cmount.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/case_top_cmount.stl -------------------------------------------------------------------------------- /stl/case_top_emount.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/case_top_emount.stl -------------------------------------------------------------------------------- /stl/knob_smooth.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/knob_smooth.stl -------------------------------------------------------------------------------- /stl/know.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/know.stl -------------------------------------------------------------------------------- /stl/lcd_holder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/lcd_holder.stl -------------------------------------------------------------------------------- /stl/spacer.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shufps/diy-projector-clock/67b28d7980a767fedc22786be03422edd878822c/stl/spacer.stl --------------------------------------------------------------------------------