├── .cproject ├── .git.7z ├── .gitattributes ├── .gitignore ├── .project ├── .settings ├── language.settings.xml ├── org.eclipse.core.resources.prefs └── org.eclipse.ltk.core.refactoring.prefs ├── Debug ├── GUICore │ └── src │ │ └── subdir.mk ├── driver │ └── src │ │ └── subdir.mk ├── example │ └── keil │ │ ├── StdLib │ │ ├── CMSIS │ │ │ ├── CoreSupport │ │ │ │ └── subdir.mk │ │ │ ├── Device │ │ │ │ └── ST │ │ │ │ │ └── STM32F2xx │ │ │ │ │ └── Source │ │ │ │ │ └── Templates │ │ │ │ │ ├── TASKING │ │ │ │ │ └── subdir.mk │ │ │ │ │ └── subdir.mk │ │ │ └── STM32F2xx │ │ │ │ └── subdir.mk │ │ └── STM32F2xx_StdPeriph_Driver │ │ │ └── src │ │ │ └── subdir.mk │ │ ├── TNKernel │ │ ├── CortexM3 │ │ │ └── subdir.mk │ │ └── subdir.mk │ │ ├── appGUI │ │ └── subdir.mk │ │ ├── bspStdLib │ │ └── src │ │ │ └── subdir.mk │ │ └── user │ │ └── subdir.mk ├── makefile ├── objects.mk ├── sources.mk ├── utils │ └── src │ │ └── subdir.mk └── wigets │ └── src │ └── subdir.mk ├── GUICore ├── inc │ ├── font_tables │ │ ├── ArialBold_16.h │ │ ├── ArialBold_24.h │ │ ├── ArialBold_64.h │ │ ├── ArialNarrow_15.h │ │ ├── ArialNarrow_21.h │ │ ├── Arial_11.h │ │ ├── Arial_12.h │ │ ├── Calibri_10.h │ │ ├── LucidaConsolas_8.h │ │ ├── font_template.h │ │ └── fwLucida_12.h │ ├── gui.h │ ├── guiColor.h │ ├── guiFonts.h │ ├── guiPrimitives.h │ ├── guiText.h │ └── widget.h └── src │ ├── guiColor.c │ ├── guiFonts.c │ ├── guiFontsMin.c │ ├── guiPrimitives.c │ ├── guiText.c │ └── widget.c ├── LICENSE.TXT ├── driver ├── inc │ ├── ads7843.h │ ├── beeper.h │ ├── ee_emul.h │ ├── lcdHAL.h │ ├── lcdHAL_HX8347A.h │ ├── lcdHAL_ILI9320.h │ ├── lcdHAL_SSD1298.h │ └── mkDriver.h └── src │ ├── ads7843.c │ ├── ads7843_207Z.c │ ├── beeper.c │ ├── ee_emul.c │ ├── lcdHAL.c │ ├── lcdHAL_9320.c │ ├── lcdHAL_HX8347A.c │ ├── lcdHAL_ILI9320.c │ ├── lcdHAL_SSD1298.c │ ├── lcdHAL_universal.c │ ├── mkDriver.c │ └── mkDriver_207Z.c ├── example └── keil │ ├── StdLib │ ├── CMSIS │ │ ├── CMSIS END USER LICENCE AGREEMENT.pdf │ │ ├── CoreSupport │ │ │ ├── core_cm3.c │ │ │ └── core_cm3.h │ │ ├── Device │ │ │ └── ST │ │ │ │ └── STM32F2xx │ │ │ │ ├── Include │ │ │ │ ├── stm32f2xx.h │ │ │ │ └── system_stm32f2xx.h │ │ │ │ ├── Release_Notes.html │ │ │ │ └── Source │ │ │ │ └── Templates │ │ │ │ ├── TASKING │ │ │ │ └── cstart_thumb2.asm │ │ │ │ ├── TrueSTUDIO │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ ├── arm │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ ├── gcc_ride7 │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ ├── iar │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ └── system_stm32f2xx.c │ │ ├── Documentation │ │ │ ├── CMSIS-SVD_Schema_1_0.xsd │ │ │ ├── CMSIS_CM4_SIMD.htm │ │ │ ├── CMSIS_Core.htm │ │ │ ├── CMSIS_DebugSupport.htm │ │ │ ├── CMSIS_History.htm │ │ │ ├── CMSIS_Logo_Final.jpg │ │ │ └── CMSIS_System_View_Description.htm │ │ ├── Include │ │ │ ├── arm_common_tables.h │ │ │ ├── arm_math.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm4_simd.h │ │ │ ├── core_cmFunc.h │ │ │ └── core_cmInstr.h │ │ ├── README.txt │ │ ├── STM32F2xx │ │ │ ├── Release_Notes.html │ │ │ ├── startup │ │ │ │ ├── TrueSTUDIO │ │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ ├── arm │ │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ ├── gcc_ride7 │ │ │ │ │ └── startup_stm32f2xx.s │ │ │ │ └── iar │ │ │ │ │ └── startup_stm32f2xx.s │ │ │ ├── stm32f2xx.h │ │ │ ├── system_stm32f2xx.c │ │ │ └── system_stm32f2xx.h │ │ └── index.htm │ └── STM32F2xx_StdPeriph_Driver │ │ ├── Release_Notes.html │ │ ├── inc │ │ ├── misc.h │ │ ├── stm32f2xx_adc.h │ │ ├── stm32f2xx_can.h │ │ ├── stm32f2xx_crc.h │ │ ├── stm32f2xx_cryp.h │ │ ├── stm32f2xx_dac.h │ │ ├── stm32f2xx_dbgmcu.h │ │ ├── stm32f2xx_dcmi.h │ │ ├── stm32f2xx_dma.h │ │ ├── stm32f2xx_exti.h │ │ ├── stm32f2xx_flash.h │ │ ├── stm32f2xx_fsmc.h │ │ ├── stm32f2xx_gpio.h │ │ ├── stm32f2xx_hash.h │ │ ├── stm32f2xx_i2c.h │ │ ├── stm32f2xx_iwdg.h │ │ ├── stm32f2xx_pwr.h │ │ ├── stm32f2xx_rcc.h │ │ ├── stm32f2xx_rng.h │ │ ├── stm32f2xx_rtc.h │ │ ├── stm32f2xx_sdio.h │ │ ├── stm32f2xx_spi.h │ │ ├── stm32f2xx_syscfg.h │ │ ├── stm32f2xx_tim.h │ │ ├── stm32f2xx_usart.h │ │ └── stm32f2xx_wwdg.h │ │ └── src │ │ ├── misc.c │ │ ├── stm32f2xx_adc.c │ │ ├── stm32f2xx_can.c │ │ ├── stm32f2xx_crc.c │ │ ├── stm32f2xx_cryp.c │ │ ├── stm32f2xx_cryp_aes.c │ │ ├── stm32f2xx_cryp_des.c │ │ ├── stm32f2xx_cryp_tdes.c │ │ ├── stm32f2xx_dac.c │ │ ├── stm32f2xx_dbgmcu.c │ │ ├── stm32f2xx_dcmi.c │ │ ├── stm32f2xx_dma.c │ │ ├── stm32f2xx_exti.c │ │ ├── stm32f2xx_flash.c │ │ ├── stm32f2xx_fsmc.c │ │ ├── stm32f2xx_gpio.c │ │ ├── stm32f2xx_hash.c │ │ ├── stm32f2xx_hash_md5.c │ │ ├── stm32f2xx_hash_sha1.c │ │ ├── stm32f2xx_i2c.c │ │ ├── stm32f2xx_iwdg.c │ │ ├── stm32f2xx_pwr.c │ │ ├── stm32f2xx_rcc.c │ │ ├── stm32f2xx_rng.c │ │ ├── stm32f2xx_rtc.c │ │ ├── stm32f2xx_sdio.c │ │ ├── stm32f2xx_spi.c │ │ ├── stm32f2xx_syscfg.c │ │ ├── stm32f2xx_tim.c │ │ ├── stm32f2xx_usart.c │ │ └── stm32f2xx_wwdg.c │ ├── TNKernel │ ├── CortexM3 │ │ ├── tn_port_cm3.c │ │ ├── tn_port_cm3_armcc.s │ │ ├── tn_port_cm3_gcc.s │ │ └── tn_port_cm3_iar.s │ ├── README_FIRST.txt │ ├── tn.c │ ├── tn.h │ ├── tn_dqueue.c │ ├── tn_event.c │ ├── tn_mem.c │ ├── tn_mutex.c │ ├── tn_port.h │ ├── tn_sem.c │ ├── tn_tasks.c │ ├── tn_utils.c │ └── tn_utils.h │ ├── appGUI │ ├── .cproject │ ├── .project │ ├── HMI_Control.c │ ├── HMI_Control.h │ ├── appGUI.h │ ├── appGui.c │ ├── winMain.c │ ├── winMain.h │ ├── winPlot.c │ ├── winPlot.h │ ├── winUartCfg.c │ └── winUartCfg.h │ ├── bspStdLib │ ├── inc │ │ ├── ADS7843_spi.h │ │ ├── HAL_Calender.h │ │ ├── at26df.h │ │ ├── button.h │ │ ├── crcm.h │ │ ├── dem240320h_hx8347.h │ │ ├── hx8347.h │ │ ├── i2c_eeprom.h │ │ ├── tn_task_usart.h │ │ └── uartdrv.h │ └── src │ │ ├── ADS7843_spi.c │ │ ├── HAL_Calender.c │ │ ├── at26df.c │ │ ├── button.c │ │ ├── crcm.c │ │ ├── hx8347.c │ │ ├── i2c_eeprom.c │ │ ├── tn_task_usart.c │ │ └── uartdrv.c │ ├── scvn.map │ ├── scvn.sct │ ├── scvn.tra │ ├── scvn.uvgui.Andrey │ ├── scvn.uvopt │ ├── scvn.uvproj │ ├── scvn_scvn.dep │ ├── scvn_test.dep │ ├── startup_stm32f2xx.s │ ├── test.map │ └── user │ ├── globals.h │ ├── hw_config.h │ ├── hw_init.c │ ├── main.c │ ├── startup_hardware_init.s │ ├── stm32f2xx_conf.h │ ├── tn_user.c │ ├── types.h │ └── utils_uart.c ├── tools └── TheDotFactory │ ├── AboutForm.Designer.cs │ ├── AboutForm.cs │ ├── AboutForm.resx │ ├── InputBox.cs │ ├── InputBox.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── OutputConfigurationForm.Designer.cs │ ├── OutputConfigurationForm.cs │ ├── OutputConfigurationForm.resx │ ├── OutputConfigurationManager.cs │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── Settings.cs │ ├── TheDotFactory.csproj │ ├── TheDotFactory.sln │ ├── TheDotFactory.v11.suo │ ├── app.config │ ├── bin │ └── Debug │ │ ├── OutputConfigs.xml │ │ ├── TheDotFactory.exe │ │ ├── TheDotFactory.exe.config │ │ ├── TheDotFactory.pdb │ │ ├── TheDotFactory.vshost.exe │ │ ├── TheDotFactory.vshost.exe.config │ │ ├── TheDotFactory.vshost.exe.manifest │ │ └── Настройки AFGUI.png │ ├── license.txt │ └── obj │ └── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── TempPE │ └── Properties.Resources.Designer.cs.dll │ ├── TheDotFactory.AboutForm.resources │ ├── TheDotFactory.InputBoxDialog.resources │ ├── TheDotFactory.MainForm.resources │ ├── TheDotFactory.OutputConfigurationForm.resources │ ├── TheDotFactory.Properties.Resources.resources │ ├── TheDotFactory.csproj.FileListAbsolute.txt │ ├── TheDotFactory.csproj.GenerateResource.Cache │ ├── TheDotFactory.csprojResolveAssemblyReference.cache │ ├── TheDotFactory.exe │ └── TheDotFactory.pdb ├── utils ├── inc │ └── afTime.h └── src │ └── afTime.c ├── version.txt └── wigets ├── inc ├── guiChart.h ├── guiCheckBox.h ├── guiEditBox.h ├── guiKeyBoard.h ├── guiLabel.h ├── guiRadioGroup.h ├── guiTerminalBlock.h ├── guiTextButton.h ├── guiTouchCalibration.h └── guiUpDownBox.h └── src ├── guiChart.c ├── guiCheckBox.c ├── guiEditBox.c ├── guiKeyBoard.c ├── guiLabel.c ├── guiRadioGroup.c ├── guiTerminalBlock.c ├── guiTextButton.c ├── guiTouchCalibration.c └── guiUpDownBox.c /.git.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/.git.7z -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | 31 | # ========================= 32 | # Operating System Files 33 | # ========================= 34 | 35 | # OSX 36 | # ========================= 37 | 38 | .DS_Store 39 | .AppleDouble 40 | .LSOverride 41 | 42 | # Thumbnails 43 | ._* 44 | 45 | # Files that might appear on external disk 46 | .Spotlight-V100 47 | .Trashes 48 | 49 | # Directories potentially created on remote AFP share 50 | .AppleDB 51 | .AppleDesktop 52 | Network Trash Folder 53 | Temporary Items 54 | .apdisk 55 | 56 | # Windows 57 | # ========================= 58 | 59 | # Windows image file caches 60 | Thumbs.db 61 | ehthumbs.db 62 | 63 | # Folder config file 64 | Desktop.ini 65 | 66 | # Recycle Bin used on file shares 67 | $RECYCLE.BIN/ 68 | 69 | # Windows Installer files 70 | *.cab 71 | *.msi 72 | *.msm 73 | *.msp 74 | 75 | # Windows shortcuts 76 | *.lnk 77 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AFGUI 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 | 26 | 27 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//GUICore/src/guiFonts.c=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /Debug/GUICore/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 | ../GUICore/src/guiColor.c \ 8 | ../GUICore/src/guiFonts.c \ 9 | ../GUICore/src/guiFontsMin.c \ 10 | ../GUICore/src/guiPrimitives.c \ 11 | ../GUICore/src/guiText.c \ 12 | ../GUICore/src/widget.c 13 | 14 | OBJS += \ 15 | ./GUICore/src/guiColor.o \ 16 | ./GUICore/src/guiFonts.o \ 17 | ./GUICore/src/guiFontsMin.o \ 18 | ./GUICore/src/guiPrimitives.o \ 19 | ./GUICore/src/guiText.o \ 20 | ./GUICore/src/widget.o 21 | 22 | C_DEPS += \ 23 | ./GUICore/src/guiColor.d \ 24 | ./GUICore/src/guiFonts.d \ 25 | ./GUICore/src/guiFontsMin.d \ 26 | ./GUICore/src/guiPrimitives.d \ 27 | ./GUICore/src/guiText.d \ 28 | ./GUICore/src/widget.d 29 | 30 | 31 | # Each subdirectory must supply rules for building sources it contributes 32 | GUICore/src/%.o: ../GUICore/src/%.c 33 | @echo 'Building file: $<' 34 | @echo 'Invoking: Cross GCC Compiler' 35 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 36 | @echo 'Finished building: $<' 37 | @echo ' ' 38 | 39 | 40 | -------------------------------------------------------------------------------- /Debug/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 | ../driver/src/ads7843.c \ 8 | ../driver/src/ads7843_207Z.c \ 9 | ../driver/src/beeper.c \ 10 | ../driver/src/ee_emul.c \ 11 | ../driver/src/lcdHAL.c \ 12 | ../driver/src/lcdHAL_9320.c \ 13 | ../driver/src/lcdHAL_HX8347A.c \ 14 | ../driver/src/lcdHAL_ILI9320.c \ 15 | ../driver/src/lcdHAL_universal.c \ 16 | ../driver/src/mkDriver.c \ 17 | ../driver/src/mkDriver_207Z.c 18 | 19 | OBJS += \ 20 | ./driver/src/ads7843.o \ 21 | ./driver/src/ads7843_207Z.o \ 22 | ./driver/src/beeper.o \ 23 | ./driver/src/ee_emul.o \ 24 | ./driver/src/lcdHAL.o \ 25 | ./driver/src/lcdHAL_9320.o \ 26 | ./driver/src/lcdHAL_HX8347A.o \ 27 | ./driver/src/lcdHAL_ILI9320.o \ 28 | ./driver/src/lcdHAL_universal.o \ 29 | ./driver/src/mkDriver.o \ 30 | ./driver/src/mkDriver_207Z.o 31 | 32 | C_DEPS += \ 33 | ./driver/src/ads7843.d \ 34 | ./driver/src/ads7843_207Z.d \ 35 | ./driver/src/beeper.d \ 36 | ./driver/src/ee_emul.d \ 37 | ./driver/src/lcdHAL.d \ 38 | ./driver/src/lcdHAL_9320.d \ 39 | ./driver/src/lcdHAL_HX8347A.d \ 40 | ./driver/src/lcdHAL_ILI9320.d \ 41 | ./driver/src/lcdHAL_universal.d \ 42 | ./driver/src/mkDriver.d \ 43 | ./driver/src/mkDriver_207Z.d 44 | 45 | 46 | # Each subdirectory must supply rules for building sources it contributes 47 | driver/src/%.o: ../driver/src/%.c 48 | @echo 'Building file: $<' 49 | @echo 'Invoking: Cross GCC Compiler' 50 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 51 | @echo 'Finished building: $<' 52 | @echo ' ' 53 | 54 | 55 | -------------------------------------------------------------------------------- /Debug/example/keil/StdLib/CMSIS/CoreSupport/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 | ../example/keil/StdLib/CMSIS/CoreSupport/core_cm3.c 8 | 9 | OBJS += \ 10 | ./example/keil/StdLib/CMSIS/CoreSupport/core_cm3.o 11 | 12 | C_DEPS += \ 13 | ./example/keil/StdLib/CMSIS/CoreSupport/core_cm3.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | example/keil/StdLib/CMSIS/CoreSupport/%.o: ../example/keil/StdLib/CMSIS/CoreSupport/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Debug/example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/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 | ASM_SRCS += \ 7 | ../example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/cstart_thumb2.asm 8 | 9 | OBJS += \ 10 | ./example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/cstart_thumb2.o 11 | 12 | 13 | # Each subdirectory must supply rules for building sources it contributes 14 | example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/%.o: ../example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/%.asm 15 | @echo 'Building file: $<' 16 | @echo 'Invoking: Cross GCC Assembler' 17 | as -o "$@" "$<" 18 | @echo 'Finished building: $<' 19 | @echo ' ' 20 | 21 | 22 | -------------------------------------------------------------------------------- /Debug/example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/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 | ../example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c 8 | 9 | OBJS += \ 10 | ./example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.o 11 | 12 | C_DEPS += \ 13 | ./example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/%.o: ../example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Debug/example/keil/StdLib/CMSIS/STM32F2xx/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 | ../example/keil/StdLib/CMSIS/STM32F2xx/system_stm32f2xx.c 8 | 9 | OBJS += \ 10 | ./example/keil/StdLib/CMSIS/STM32F2xx/system_stm32f2xx.o 11 | 12 | C_DEPS += \ 13 | ./example/keil/StdLib/CMSIS/STM32F2xx/system_stm32f2xx.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | example/keil/StdLib/CMSIS/STM32F2xx/%.o: ../example/keil/StdLib/CMSIS/STM32F2xx/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Debug/example/keil/TNKernel/CortexM3/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 | ../example/keil/TNKernel/CortexM3/tn_port_cm3.c 8 | 9 | OBJS += \ 10 | ./example/keil/TNKernel/CortexM3/tn_port_cm3.o 11 | 12 | C_DEPS += \ 13 | ./example/keil/TNKernel/CortexM3/tn_port_cm3.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | example/keil/TNKernel/CortexM3/%.o: ../example/keil/TNKernel/CortexM3/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Debug/example/keil/TNKernel/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 | ../example/keil/TNKernel/tn.c \ 8 | ../example/keil/TNKernel/tn_dqueue.c \ 9 | ../example/keil/TNKernel/tn_event.c \ 10 | ../example/keil/TNKernel/tn_mem.c \ 11 | ../example/keil/TNKernel/tn_mutex.c \ 12 | ../example/keil/TNKernel/tn_sem.c \ 13 | ../example/keil/TNKernel/tn_tasks.c \ 14 | ../example/keil/TNKernel/tn_utils.c 15 | 16 | OBJS += \ 17 | ./example/keil/TNKernel/tn.o \ 18 | ./example/keil/TNKernel/tn_dqueue.o \ 19 | ./example/keil/TNKernel/tn_event.o \ 20 | ./example/keil/TNKernel/tn_mem.o \ 21 | ./example/keil/TNKernel/tn_mutex.o \ 22 | ./example/keil/TNKernel/tn_sem.o \ 23 | ./example/keil/TNKernel/tn_tasks.o \ 24 | ./example/keil/TNKernel/tn_utils.o 25 | 26 | C_DEPS += \ 27 | ./example/keil/TNKernel/tn.d \ 28 | ./example/keil/TNKernel/tn_dqueue.d \ 29 | ./example/keil/TNKernel/tn_event.d \ 30 | ./example/keil/TNKernel/tn_mem.d \ 31 | ./example/keil/TNKernel/tn_mutex.d \ 32 | ./example/keil/TNKernel/tn_sem.d \ 33 | ./example/keil/TNKernel/tn_tasks.d \ 34 | ./example/keil/TNKernel/tn_utils.d 35 | 36 | 37 | # Each subdirectory must supply rules for building sources it contributes 38 | example/keil/TNKernel/%.o: ../example/keil/TNKernel/%.c 39 | @echo 'Building file: $<' 40 | @echo 'Invoking: Cross GCC Compiler' 41 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 42 | @echo 'Finished building: $<' 43 | @echo ' ' 44 | 45 | 46 | -------------------------------------------------------------------------------- /Debug/example/keil/appGUI/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 | ../example/keil/appGUI/HMI_Control.c \ 8 | ../example/keil/appGUI/appGui.c \ 9 | ../example/keil/appGUI/winMain.c \ 10 | ../example/keil/appGUI/winPlot.c \ 11 | ../example/keil/appGUI/winUartCfg.c 12 | 13 | OBJS += \ 14 | ./example/keil/appGUI/HMI_Control.o \ 15 | ./example/keil/appGUI/appGui.o \ 16 | ./example/keil/appGUI/winMain.o \ 17 | ./example/keil/appGUI/winPlot.o \ 18 | ./example/keil/appGUI/winUartCfg.o 19 | 20 | C_DEPS += \ 21 | ./example/keil/appGUI/HMI_Control.d \ 22 | ./example/keil/appGUI/appGui.d \ 23 | ./example/keil/appGUI/winMain.d \ 24 | ./example/keil/appGUI/winPlot.d \ 25 | ./example/keil/appGUI/winUartCfg.d 26 | 27 | 28 | # Each subdirectory must supply rules for building sources it contributes 29 | example/keil/appGUI/%.o: ../example/keil/appGUI/%.c 30 | @echo 'Building file: $<' 31 | @echo 'Invoking: Cross GCC Compiler' 32 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 33 | @echo 'Finished building: $<' 34 | @echo ' ' 35 | 36 | 37 | -------------------------------------------------------------------------------- /Debug/example/keil/bspStdLib/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 | ../example/keil/bspStdLib/src/ADS7843_spi.c \ 8 | ../example/keil/bspStdLib/src/HAL_Calender.c \ 9 | ../example/keil/bspStdLib/src/at26df.c \ 10 | ../example/keil/bspStdLib/src/button.c \ 11 | ../example/keil/bspStdLib/src/crcm.c \ 12 | ../example/keil/bspStdLib/src/hx8347.c \ 13 | ../example/keil/bspStdLib/src/i2c_eeprom.c \ 14 | ../example/keil/bspStdLib/src/tn_task_usart.c \ 15 | ../example/keil/bspStdLib/src/uartdrv.c 16 | 17 | OBJS += \ 18 | ./example/keil/bspStdLib/src/ADS7843_spi.o \ 19 | ./example/keil/bspStdLib/src/HAL_Calender.o \ 20 | ./example/keil/bspStdLib/src/at26df.o \ 21 | ./example/keil/bspStdLib/src/button.o \ 22 | ./example/keil/bspStdLib/src/crcm.o \ 23 | ./example/keil/bspStdLib/src/hx8347.o \ 24 | ./example/keil/bspStdLib/src/i2c_eeprom.o \ 25 | ./example/keil/bspStdLib/src/tn_task_usart.o \ 26 | ./example/keil/bspStdLib/src/uartdrv.o 27 | 28 | C_DEPS += \ 29 | ./example/keil/bspStdLib/src/ADS7843_spi.d \ 30 | ./example/keil/bspStdLib/src/HAL_Calender.d \ 31 | ./example/keil/bspStdLib/src/at26df.d \ 32 | ./example/keil/bspStdLib/src/button.d \ 33 | ./example/keil/bspStdLib/src/crcm.d \ 34 | ./example/keil/bspStdLib/src/hx8347.d \ 35 | ./example/keil/bspStdLib/src/i2c_eeprom.d \ 36 | ./example/keil/bspStdLib/src/tn_task_usart.d \ 37 | ./example/keil/bspStdLib/src/uartdrv.d 38 | 39 | 40 | # Each subdirectory must supply rules for building sources it contributes 41 | example/keil/bspStdLib/src/%.o: ../example/keil/bspStdLib/src/%.c 42 | @echo 'Building file: $<' 43 | @echo 'Invoking: Cross GCC Compiler' 44 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 45 | @echo 'Finished building: $<' 46 | @echo ' ' 47 | 48 | 49 | -------------------------------------------------------------------------------- /Debug/example/keil/user/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 | ../example/keil/user/hw_init.c \ 8 | ../example/keil/user/main.c \ 9 | ../example/keil/user/tn_user.c \ 10 | ../example/keil/user/utils_uart.c 11 | 12 | OBJS += \ 13 | ./example/keil/user/hw_init.o \ 14 | ./example/keil/user/main.o \ 15 | ./example/keil/user/tn_user.o \ 16 | ./example/keil/user/utils_uart.o 17 | 18 | C_DEPS += \ 19 | ./example/keil/user/hw_init.d \ 20 | ./example/keil/user/main.d \ 21 | ./example/keil/user/tn_user.d \ 22 | ./example/keil/user/utils_uart.d 23 | 24 | 25 | # Each subdirectory must supply rules for building sources it contributes 26 | example/keil/user/%.o: ../example/keil/user/%.c 27 | @echo 'Building file: $<' 28 | @echo 'Invoking: Cross GCC Compiler' 29 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 30 | @echo 'Finished building: $<' 31 | @echo ' ' 32 | 33 | 34 | -------------------------------------------------------------------------------- /Debug/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 wigets/src/subdir.mk 12 | -include utils/src/subdir.mk 13 | -include example/keil/user/subdir.mk 14 | -include example/keil/bspStdLib/src/subdir.mk 15 | -include example/keil/appGUI/subdir.mk 16 | -include example/keil/TNKernel/CortexM3/subdir.mk 17 | -include example/keil/TNKernel/subdir.mk 18 | -include example/keil/StdLib/STM32F2xx_StdPeriph_Driver/src/subdir.mk 19 | -include example/keil/StdLib/CMSIS/STM32F2xx/subdir.mk 20 | -include example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/subdir.mk 21 | -include example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/subdir.mk 22 | -include example/keil/StdLib/CMSIS/CoreSupport/subdir.mk 23 | -include driver/src/subdir.mk 24 | -include GUICore/src/subdir.mk 25 | -include subdir.mk 26 | -include objects.mk 27 | 28 | ifneq ($(MAKECMDGOALS),clean) 29 | ifneq ($(strip $(C_DEPS)),) 30 | -include $(C_DEPS) 31 | endif 32 | endif 33 | 34 | -include ../makefile.defs 35 | 36 | # Add inputs and outputs from these tool invocations to the build variables 37 | 38 | # All Target 39 | all: AFGUI 40 | 41 | # Tool invocations 42 | AFGUI: $(OBJS) $(USER_OBJS) 43 | @echo 'Building target: $@' 44 | @echo 'Invoking: Cross GCC Linker' 45 | gcc -o "AFGUI" $(OBJS) $(USER_OBJS) $(LIBS) 46 | @echo 'Finished building target: $@' 47 | @echo ' ' 48 | 49 | # Other Targets 50 | clean: 51 | -$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) AFGUI 52 | -@echo ' ' 53 | 54 | .PHONY: all clean dependents 55 | .SECONDARY: 56 | 57 | -include ../makefile.targets 58 | -------------------------------------------------------------------------------- /Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | O_SRCS := 6 | C_SRCS := 7 | S_UPPER_SRCS := 8 | OBJ_SRCS := 9 | ASM_SRCS := 10 | OBJS := 11 | C_DEPS := 12 | EXECUTABLES := 13 | 14 | # Every subdirectory with source files must be described here 15 | SUBDIRS := \ 16 | wigets/src \ 17 | utils/src \ 18 | example/keil/user \ 19 | example/keil/bspStdLib/src \ 20 | example/keil/appGUI \ 21 | example/keil/TNKernel \ 22 | example/keil/TNKernel/CortexM3 \ 23 | example/keil/StdLib/STM32F2xx_StdPeriph_Driver/src \ 24 | example/keil/StdLib/CMSIS/STM32F2xx \ 25 | example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates \ 26 | example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING \ 27 | example/keil/StdLib/CMSIS/CoreSupport \ 28 | driver/src \ 29 | GUICore/src \ 30 | 31 | -------------------------------------------------------------------------------- /Debug/utils/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 | ../utils/src/afTime.c 8 | 9 | OBJS += \ 10 | ./utils/src/afTime.o 11 | 12 | C_DEPS += \ 13 | ./utils/src/afTime.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | utils/src/%.o: ../utils/src/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Debug/wigets/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 | ../wigets/src/guiChart.c \ 8 | ../wigets/src/guiCheckBox.c \ 9 | ../wigets/src/guiLabel.c \ 10 | ../wigets/src/guiRadioGroup.c \ 11 | ../wigets/src/guiTerminalBlock.c \ 12 | ../wigets/src/guiTextButton.c \ 13 | ../wigets/src/guiTouchCalibration.c \ 14 | ../wigets/src/guiUpDownBox.c 15 | 16 | OBJS += \ 17 | ./wigets/src/guiChart.o \ 18 | ./wigets/src/guiCheckBox.o \ 19 | ./wigets/src/guiLabel.o \ 20 | ./wigets/src/guiRadioGroup.o \ 21 | ./wigets/src/guiTerminalBlock.o \ 22 | ./wigets/src/guiTextButton.o \ 23 | ./wigets/src/guiTouchCalibration.o \ 24 | ./wigets/src/guiUpDownBox.o 25 | 26 | C_DEPS += \ 27 | ./wigets/src/guiChart.d \ 28 | ./wigets/src/guiCheckBox.d \ 29 | ./wigets/src/guiLabel.d \ 30 | ./wigets/src/guiRadioGroup.d \ 31 | ./wigets/src/guiTerminalBlock.d \ 32 | ./wigets/src/guiTextButton.d \ 33 | ./wigets/src/guiTouchCalibration.d \ 34 | ./wigets/src/guiUpDownBox.d 35 | 36 | 37 | # Each subdirectory must supply rules for building sources it contributes 38 | wigets/src/%.o: ../wigets/src/%.c 39 | @echo 'Building file: $<' 40 | @echo 'Invoking: Cross GCC Compiler' 41 | gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 42 | @echo 'Finished building: $<' 43 | @echo ' ' 44 | 45 | 46 | -------------------------------------------------------------------------------- /GUICore/inc/font_tables/ArialBold_16.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/ArialBold_16.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/ArialBold_24.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/ArialBold_24.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/ArialBold_64.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/ArialBold_64.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/ArialNarrow_15.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/ArialNarrow_15.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/ArialNarrow_21.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/ArialNarrow_21.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/Arial_11.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/Arial_11.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/Arial_12.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/Arial_12.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/Calibri_10.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/Calibri_10.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/LucidaConsolas_8.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/LucidaConsolas_8.h -------------------------------------------------------------------------------- /GUICore/inc/font_tables/font_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | * font_template.h 3 | * 4 | * Created on: 26.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef FONT_TEMPLATE_H_ 9 | #define FONT_TEMPLATE_H_ 10 | 11 | const uint8_t Font_16_SymbolTable[] = 12 | { 13 | 14 | 15 | }; 16 | 17 | const uint8_t Font_16_WidthTable[] = 18 | { 19 | 20 | }; 21 | 22 | const uint16_t Font_16_OffsetTable[] = 23 | { 24 | 25 | }; 26 | 27 | 28 | 29 | #endif /* FONT_TEMPLATE_H_ */ 30 | -------------------------------------------------------------------------------- /GUICore/inc/font_tables/fwLucida_12.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/font_tables/fwLucida_12.h -------------------------------------------------------------------------------- /GUICore/inc/gui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gui.h 3 | * 4 | * Created on: 17.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUI_H_ 9 | #define GUI_H_ 10 | 11 | #ifndef __stdint_h 12 | 13 | #define int8_t char 14 | #define int16_t short 15 | #define int32_t int 16 | 17 | #define uint8_t unsigned char 18 | #define uint16_t unsigned short 19 | #define uint32_t unsigned int 20 | #endif 21 | 22 | #include "guiColor.h" 23 | #include "guiFonts.h" 24 | 25 | // Driver 26 | #include "ads7843.h" 27 | #include "mkDriver.h" 28 | #include "lcdHAL.h" 29 | #include "beeper.h" 30 | 31 | // Core 32 | #include "guiPrimitives.h" 33 | #include "afTime.h" 34 | 35 | 36 | // Widgets 37 | #include "widget.h" 38 | #include "guiTextButton.h" 39 | #include "guiCheckBox.h" 40 | #include "guiLabel.h" 41 | #include "guiText.h" 42 | #include "guiChart.h" 43 | #include "guiUpDownBox.h" 44 | #include "guiRadioGroup.h" 45 | #include "guiTouchCalibration.h" 46 | #include "guiTerminalBlock.h" 47 | #include "guiKeyBoard.h" 48 | #include "guiEditBox.h" 49 | 50 | // Default 51 | #define LCD_DEFAULT_FONT GL_ArialNarrow_15 52 | 53 | // Defines 54 | #define H_ALIGN_LEFT 0 55 | #define H_ALIGN_CENTER 1 56 | #define H_ALIGN_RIGHT 2 57 | 58 | #define V_ALIGN_TOP 0 59 | #define V_ALIGN_CENTER 1 60 | #define V_ALIGN_BOTTOM 2 61 | 62 | #define DIR_LEFT_TO_RIGHT 0 63 | #define DIR_RIGHT_TO_LEFT 1 64 | 65 | #define ROTATE_0 0 66 | #define ROTATE_90 1 67 | #define ROTATE_180 2 68 | #define ROTATE_270 3 69 | 70 | #define FLIP_NO 0 71 | #define FLIP_YES 1 72 | 73 | #define LCD_DIR_HORIZONTAL 0x0000 74 | #define LCD_DIR_VERTICAL 0x0001 75 | 76 | 77 | 78 | 79 | #endif /* GUI_H_ */ 80 | -------------------------------------------------------------------------------- /GUICore/inc/guiColor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * colors.h 3 | * 4 | * Created on: 17.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef COLORS_H_ 9 | #define COLORS_H_ 10 | 11 | 12 | typedef struct 13 | { 14 | unsigned BLUE : 4; 15 | unsigned GREEN : 6; 16 | unsigned RED : 6; 17 | } GUI_COLOR; 18 | 19 | 20 | extern uint16_t guiChangeColorLight(uint16_t color, uint16_t percent); 21 | enum LCD_COLOR_MODE {colorIndex, colorRGB}; 22 | enum LCD_COLOR_GRAM {lcdColorRGB_565, lcdColorRGB_666, lcdColorARGB_a888}; 23 | 24 | //****************************************************************************************** 25 | // Color function 26 | extern void LCD_SetColorMode(enum LCD_COLOR_MODE _colorMode); 27 | extern void LCD_SetColorGRAM(enum LCD_COLOR_GRAM _colorGRAM); 28 | extern enum LCD_COLOR_MODE LCD_GetColorMode(void); 29 | extern enum LCD_COLOR_GRAM LCD_GetColorGRAM(void); 30 | 31 | extern void LCD_SetColors(volatile uint16_t _TextColor, volatile uint16_t _BackColor); 32 | extern void LCD_GetColors(volatile uint16_t *_TextColor, volatile uint16_t *_BackColor); 33 | extern void LCD_SetTextColor(volatile uint16_t Color); 34 | extern void LCD_SetBackColor(volatile uint16_t Color); 35 | 36 | 37 | 38 | #define COLOR_RED_MASK_565 0xF8 39 | #define COLOR_GREEN_MASK_565 0xFC 40 | #define COLOR_BLUE_MASK_565 0xF8 41 | 42 | #define COLOR_RED_OFFSET_565 0x08 43 | #define COLOR_GREEN_OFFSET_565 0x03 44 | #define COLOR_BLUE_OFFSET_565 0x03 45 | 46 | #define COLOR_RED_MASK_666 0xFC 47 | #define COLOR_GREEN_MASK_666 0xFC 48 | #define COLOR_BLUE_MASK_666 0xFC 49 | 50 | #define COLOR_RED_OFFSET_666 24 51 | #define COLOR_GREEN_OFFSET_666 18 52 | #define COLOR_BLUE_OFFSET_666 12 53 | 54 | #endif /* COLORS_H_ */ 55 | -------------------------------------------------------------------------------- /GUICore/inc/guiFonts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiFonts.h 3 | * 4 | * Created on: 17.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUIFONTS_H_ 9 | #define GUIFONTS_H_ 10 | 11 | typedef struct 12 | { 13 | const uint8_t * table; 14 | uint16_t Width; 15 | uint16_t Height; 16 | } S_FONT; 17 | 18 | 19 | typedef struct 20 | { 21 | const uint8_t * table; 22 | uint16_t Width; 23 | uint16_t Height; 24 | const uint8_t * tableSymbWidth; 25 | const uint16_t * tableSymbIndex; 26 | uint16_t Offset; 27 | uint16_t NumSymb; 28 | uint16_t SymbolSpace; 29 | } V_FONT; 30 | 31 | 32 | 33 | extern V_FONT GL_ArialBold_16; 34 | extern V_FONT GL_ArialNarrow_15; 35 | extern V_FONT GL_ArialNarrow_21; 36 | extern V_FONT GL_ArialBold_24; 37 | extern V_FONT GL_ArialBold_64; 38 | extern V_FONT GL_Arial_12; 39 | extern V_FONT GL_Arial_11; 40 | extern V_FONT GL_Lucida_8; 41 | extern V_FONT GL_Calibri_10; 42 | 43 | extern V_FONT GS_Lucida_12; 44 | 45 | #endif /* GUIFONTS_H_ */ 46 | -------------------------------------------------------------------------------- /GUICore/inc/guiPrimitives.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcdHAL.h 3 | * 4 | * Created on: 18.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUIPRIMITIVES_H_ 9 | #define GUIPRIMITIVES_H_ 10 | 11 | #include "gui.h" 12 | 13 | 14 | // GPIO config 15 | // LCD reset 16 | 17 | 18 | //********************************************************************************* 19 | // global extern 20 | 21 | typedef struct 22 | { 23 | int16_t X; 24 | int16_t Y; 25 | } Point, * pPoint; 26 | 27 | 28 | 29 | #define ASSEMBLE_RGB(R ,G, B) ((((R)& 0xFC) << 8) | (((G) & 0xFC) << 2) | (((B) & 0xF0) >> 4)) 30 | #define MAX_POLY_CORNERS 200 31 | 32 | 33 | typedef struct 34 | { 35 | unsigned clRed : 6; 36 | unsigned clGreen : 6; 37 | unsigned clBlue : 4; 38 | } RGB16; 39 | 40 | typedef struct 41 | { 42 | unsigned clRed : 6; 43 | unsigned clGreen : 6; 44 | unsigned clBlue : 6; 45 | } RGB32; 46 | 47 | 48 | //***************************************************************************** 49 | // PROTOTIPES 50 | 51 | 52 | 53 | // high level primitives 54 | 55 | 56 | // 57 | //extern void LCD_ClearLine(uint16_t Line); 58 | 59 | //extern void LCD_SetCursor(uint16_t Xpos, uint16_t Ypos); 60 | extern void LCD_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Height, uint16_t Width); 61 | extern void LCD_WindowModeDisable(void); 62 | extern void LCD_ASCII(V_FONT * vFont); 63 | 64 | //************************************************************************** 65 | extern void LCD_DrawTransparentChar(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar); 66 | extern void LCD_Clear(uint16_t Color); 67 | extern void LCD_DrawString(char * text, uint16_t len, uint16_t Xpos, uint16_t Ypos); 68 | extern void LCD_DrawLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction); 69 | extern void LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width); 70 | extern void LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); 71 | extern void LCD_DrawFullCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); 72 | extern void LCD_DrawQuadRound(uint16_t Xpos, uint16_t Ypos, uint16_t Radius, uint16_t Quadrant); 73 | extern void LCD_DrawRoundedRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height, uint16_t LineWidth); 74 | extern void LCD_DrawUniLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); 75 | extern void LCD_DrawFullRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); 76 | extern void LCD_PolyLine(pPoint Points, uint16_t PointCount); 77 | extern void LCD_PolyLineRelative(pPoint Points, uint16_t PointCount); 78 | extern void LCD_ClosedPolyLine(pPoint Points, uint16_t PointCount); 79 | extern void LCD_ClosedPolyLineRelative(pPoint Points, uint16_t PointCount); 80 | extern void LCD_FillPolyLine(pPoint Points, uint16_t PointCount); 81 | 82 | //************************************************************************** 83 | 84 | 85 | 86 | 87 | 88 | #endif /* LCDHAL_H_ */ 89 | -------------------------------------------------------------------------------- /GUICore/inc/guiText.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/guiText.h -------------------------------------------------------------------------------- /GUICore/inc/widget.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/inc/widget.h -------------------------------------------------------------------------------- /GUICore/src/guiFonts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiFonts.c 3 | * 4 | * Created on: 18.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #include "gui.h" 9 | //#include "..\inc\font_tables\ArialBold_64.h" 10 | #include "..\inc\font_tables\ArialBold_24.h" 11 | #include "..\inc\font_tables\ArialBold_16.h" 12 | #include "..\inc\font_tables\ArialNarrow_15.h" 13 | #include "..\inc\font_tables\ArialNarrow_21.h" 14 | #include "..\inc\font_tables\Arial_11.h" 15 | #include "..\inc\font_tables\Arial_12.h" 16 | #include "..\inc\font_tables\Calibri_10.h" 17 | #include "..\inc\font_tables\LucidaConsolas_8.h" 18 | 19 | //V_FONT GL_ArialBold_64 = 20 | // { 21 | // ArialBold_64_SymbolTable, 22 | // 0, // Width 23 | // 64, // Height 24 | // ArialBold_64_WidthTable, // *tableSymbWidth; 25 | // ArialBold_64_OffsetTable, // *tableSymbOffset; 26 | // 32, // Offset; 27 | // 224, // NumSymb; 28 | // 4 // Symbol Space 29 | // }; 30 | 31 | V_FONT GL_ArialBold_24 = 32 | { 33 | ArialBold_24_SymbolTable, 34 | 0, // Width 35 | 24, // Height 36 | ArialBold_24_WidthTable, // *tableSymbWidth; 37 | ArialBold_24_OffsetTable, // *tableSymbOffset; 38 | 32, // Offset; 39 | 224, // NumSymb; 40 | 2 // Symbol Space 41 | }; 42 | 43 | 44 | V_FONT GL_ArialBold_16 = 45 | { 46 | ArialBold_16_SymbolTable, 47 | 0, // Width 48 | 16, // Height 49 | ArialBold_16_WidthTable, // *tableSymbWidth; 50 | ArialBold_16_OffsetTable, // *tableSymbOffset; 51 | 32, // Offset; 52 | 224, // NumSymb; 53 | 1 // Symbol Space 54 | }; 55 | 56 | V_FONT GL_ArialNarrow_15 = 57 | { 58 | ArialNarrow_15_SymbolTable, 59 | 0, // Width 60 | 15, // Height 61 | ArialNarrow_15_WidthTable, // *tableSymbWidth; 62 | ArialNarrow_15_OffsetTable, // *tableSymbOffset; 63 | 32, // Offset; 64 | 224, // NumSymb; 65 | 1 // Symbol Space 66 | }; 67 | 68 | V_FONT GL_ArialNarrow_21 = 69 | { 70 | ArialNarrow_21_SymbolTable, 71 | 0, // Width 72 | 21, // Height 73 | ArialNarrow_21_WidthTable, // *tableSymbWidth; 74 | ArialNarrow_21_OffsetTable, // *tableSymbOffset; 75 | 32, // Offset; 76 | 224, // NumSymb; 77 | 1 // Symbol Space 78 | }; 79 | 80 | 81 | V_FONT GL_Arial_12 = 82 | { 83 | Arial_12_SymbolTable, 84 | 0, // Width 85 | 12, // Height 86 | Arial_12_WidthTable, // *tableSymbWidth; 87 | Arial_12_OffsetTable, // *tableSymbOffset; 88 | 32, // Offset; 89 | 224, // NumSymb; 90 | 1 // Symbol Space 91 | }; 92 | 93 | V_FONT GL_Arial_11 = 94 | { 95 | Arial_11_SymbolTable, 96 | 0, // Width 97 | 11, // Height 98 | Arial_11_WidthTable, // *tableSymbWidth; 99 | Arial_11_OffsetTable, // *tableSymbOffset; 100 | 32, // Offset; 101 | 224, // NumSymb; 102 | 1 // Symbol Space 103 | }; 104 | 105 | V_FONT GL_Calibri_10 = 106 | { 107 | Calibri_10_SymbolTable, 108 | 0, // Width 109 | 10, // Height 110 | Calibri_10_WidthTable, // *tableSymbWidth; 111 | Calibri_10_OffsetTable, // *tableSymbOffset; 112 | 32, // Offset; 113 | 224, // NumSymb; 114 | 1 // Symbol Space 115 | }; 116 | 117 | V_FONT GL_Lucida_8 = 118 | { 119 | LucidaConsolas_8_SymbolTable, 120 | 0, // Width 121 | 8, // Height 122 | LucidaConsolas_8_WidthTable, // *tableSymbWidth; 123 | LucidaConsolas_8_OffsetTable, // *tableSymbOffset; 124 | 32, // Offset; 125 | 224, // NumSymb; 126 | 1 // Symbol Space 127 | }; 128 | -------------------------------------------------------------------------------- /GUICore/src/guiFontsMin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiFonts.c 3 | * 4 | * Created on: 18.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #include "gui.h" 9 | //#include "..\inc\font_tables\ArialBold_64.h" 10 | //#include "..\inc\font_tables\ArialBold_24.h" 11 | //#include "..\inc\font_tables\ArialBold_16.h" 12 | #include "..\inc\font_tables\ArialNarrow_15.h" 13 | //#include "..\inc\font_tables\ArialNarrow_21.h" 14 | //#include "..\inc\font_tables\Arial_11.h" 15 | #include "..\inc\font_tables\Arial_12.h" 16 | //#include "..\inc\font_tables\Calibri_10.h" 17 | //#include "..\inc\font_tables\LucidaConsolas_8.h" 18 | #include "..\inc\font_tables\fwLucida_12.h" 19 | 20 | 21 | V_FONT GS_Lucida_12 = 22 | { 23 | fwLucida_12_SymbolTable, 24 | 8, // Width 25 | 9, // Height 26 | 0, // *tableSymbWidth; 27 | fwLucida_12_OffsetTable, // *tableSymbOffset; 28 | 32, // Offset; 29 | 224, // NumSymb; 30 | 0 // Symbol Space 31 | }; 32 | 33 | //S_FONT GS_Lucida_12 = 34 | //{ 35 | // fwLucida_12_SymbolTable, 36 | // 10, 37 | // 12 38 | //}; 39 | 40 | //V_FONT GL_ArialBold_64 = 41 | // { 42 | // ArialBold_64_SymbolTable, 43 | // 0, // Width 44 | // 64, // Height 45 | // ArialBold_64_WidthTable, // *tableSymbWidth; 46 | // ArialBold_64_OffsetTable, // *tableSymbOffset; 47 | // 32, // Offset; 48 | // 224, // NumSymb; 49 | // 4 // Symbol Space 50 | // }; 51 | 52 | //V_FONT GL_ArialBold_24 = 53 | // { 54 | // ArialBold_24_SymbolTable, 55 | // 0, // Width 56 | // 24, // Height 57 | // ArialBold_24_WidthTable, // *tableSymbWidth; 58 | // ArialBold_24_OffsetTable, // *tableSymbOffset; 59 | // 32, // Offset; 60 | // 224, // NumSymb; 61 | // 2 // Symbol Space 62 | // }; 63 | 64 | 65 | //V_FONT GL_ArialBold_16 = 66 | // { 67 | // ArialBold_16_SymbolTable, 68 | // 0, // Width 69 | // 16, // Height 70 | // ArialBold_16_WidthTable, // *tableSymbWidth; 71 | // ArialBold_16_OffsetTable, // *tableSymbOffset; 72 | // 32, // Offset; 73 | // 224, // NumSymb; 74 | // 1 // Symbol Space 75 | // }; 76 | 77 | V_FONT GL_ArialNarrow_15 = 78 | { 79 | ArialNarrow_15_SymbolTable, 80 | 0, // Width 81 | 15, // Height 82 | ArialNarrow_15_WidthTable, // *tableSymbWidth; 83 | ArialNarrow_15_OffsetTable, // *tableSymbOffset; 84 | 32, // Offset; 85 | 224, // NumSymb; 86 | 1 // Symbol Space 87 | }; 88 | 89 | //V_FONT GL_ArialNarrow_21 = 90 | // { 91 | // ArialNarrow_21_SymbolTable, 92 | // 0, // Width 93 | // 21, // Height 94 | // ArialNarrow_21_WidthTable, // *tableSymbWidth; 95 | // ArialNarrow_21_OffsetTable, // *tableSymbOffset; 96 | // 32, // Offset; 97 | // 224, // NumSymb; 98 | // 1 // Symbol Space 99 | // }; 100 | // 101 | // 102 | V_FONT GL_Arial_12 = 103 | { 104 | Arial_12_SymbolTable, 105 | 0, // Width 106 | 12, // Height 107 | Arial_12_WidthTable, // *tableSymbWidth; 108 | Arial_12_OffsetTable, // *tableSymbOffset; 109 | 32, // Offset; 110 | 224, // NumSymb; 111 | 1 // Symbol Space 112 | }; 113 | // 114 | //V_FONT GL_Arial_11 = 115 | // { 116 | // Arial_11_SymbolTable, 117 | // 0, // Width 118 | // 11, // Height 119 | // Arial_11_WidthTable, // *tableSymbWidth; 120 | // Arial_11_OffsetTable, // *tableSymbOffset; 121 | // 32, // Offset; 122 | // 224, // NumSymb; 123 | // 1 // Symbol Space 124 | // }; 125 | // 126 | //V_FONT GL_Calibri_10 = 127 | // { 128 | // Calibri_10_SymbolTable, 129 | // 0, // Width 130 | // 10, // Height 131 | // Calibri_10_WidthTable, // *tableSymbWidth; 132 | // Calibri_10_OffsetTable, // *tableSymbOffset; 133 | // 32, // Offset; 134 | // 224, // NumSymb; 135 | // 1 // Symbol Space 136 | // }; 137 | // 138 | //V_FONT GL_Lucida_8 = 139 | // { 140 | // LucidaConsolas_8_SymbolTable, 141 | // 0, // Width 142 | // 8, // Height 143 | // LucidaConsolas_8_WidthTable, // *tableSymbWidth; 144 | // LucidaConsolas_8_OffsetTable, // *tableSymbOffset; 145 | // 32, // Offset; 146 | // 224, // NumSymb; 147 | // 1 // Symbol Space 148 | // }; 149 | -------------------------------------------------------------------------------- /GUICore/src/guiText.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/src/guiText.c -------------------------------------------------------------------------------- /GUICore/src/widget.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/GUICore/src/widget.c -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | Copyright (c) 2012, Fursov Andrey 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | Neither the name of the "Fursov Andrey" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 11 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 12 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 13 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 14 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /driver/inc/ads7843.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ads7843.h 3 | * 4 | * Created on: 11.01.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef ADS7843_H_ 9 | #define ADS7843_H_ 10 | 11 | 12 | 13 | #define EE_ADR_COEF 0x10 14 | 15 | extern void TP_SPI_Config(void); 16 | extern void touchGetSense(int16_t * x, int16_t * y); 17 | extern void touchSetCoef(int16_t ax, int16_t bx, int16_t ay, int16_t by); 18 | extern uint16_t touchVerifyCoef(void); 19 | 20 | extern int16_t touchGetX(void); 21 | extern int16_t touchGetY(void); 22 | extern uint16_t getTouchState(void); 23 | 24 | #endif /* ADS7843_H_ */ 25 | -------------------------------------------------------------------------------- /driver/inc/beeper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * beeper.h 3 | * 4 | * Created on: 25.03.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef BEEPER_H_ 9 | #define BEEPER_H_ 10 | 11 | typedef struct 12 | { 13 | uint32_t ShortDownCounter; 14 | uint32_t intSoundCounter; 15 | uint32_t intPauseCounter; 16 | 17 | unsigned intSoundOn : 1; 18 | unsigned shortSoundOn : 1; 19 | unsigned intSoundEnable : 1; 20 | } BEEP; 21 | 22 | extern void Beeper_Init(void); 23 | extern void Beeper_ShortOn(uint32_t time_ms); 24 | extern void Beeper_Off(void); 25 | extern void Beeper_InterruptOn(void); 26 | 27 | 28 | 29 | 30 | #endif /* BEEPER_H_ */ 31 | -------------------------------------------------------------------------------- /driver/inc/ee_emul.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file EEPROM_Emulation/inc/eeprom.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 10-June-2011 7 | * @brief This file contains all the functions prototypes for the EEPROM 8 | * emulation firmware 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 __EE_EMUL_H 25 | #define __EE_EMUL_H 26 | 27 | /* Includes ------------------------------------------------------------------*/ 28 | 29 | /* Exported constants --------------------------------------------------------*/ 30 | /* Define the size of the sectors to be used */ 31 | #define PAGE_SIZE (uint32_t)0x4000 /* Page size = 16KByte */ 32 | 33 | /* Device voltage range supposed to be [2.7V to 3.6V], the operation will 34 | be done by word */ 35 | #define VOLTAGE_RANGE (uint8_t)VoltageRange_3 36 | 37 | /* EEPROM start address in Flash */ 38 | #define EEPROM_START_ADDRESS ((uint32_t)0x08008000) /* EEPROM emulation start address: 39 | from sector2 : after 16KByte of used 40 | Flash memory */ 41 | 42 | /* Pages 0 and 1 base and end addresses */ 43 | #define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x0000)) 44 | #define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1))) 45 | #define PAGE0_ID FLASH_Sector_2 46 | 47 | #define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x4000)) 48 | #define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1))) 49 | #define PAGE1_ID FLASH_Sector_3 50 | 51 | /* Used Flash pages for EEPROM emulation */ 52 | #define PAGE0 ((uint16_t)0x0000) 53 | #define PAGE1 ((uint16_t)0x0001) 54 | 55 | /* No valid page define */ 56 | #define NO_VALID_PAGE ((uint16_t)0x00AB) 57 | 58 | /* Page status definitions */ 59 | #define ERASED ((uint16_t)0xFFFF) /* Page is empty */ 60 | #define RECEIVE_DATA ((uint16_t)0xEEEE) /* Page is marked to receive data */ 61 | #define VALID_PAGE ((uint16_t)0x0000) /* Page containing valid data */ 62 | 63 | /* Valid pages in read and write defines */ 64 | #define READ_FROM_VALID_PAGE ((uint8_t)0x00) 65 | #define WRITE_IN_VALID_PAGE ((uint8_t)0x01) 66 | 67 | /* Page full define */ 68 | #define PAGE_FULL ((uint8_t)0x80) 69 | 70 | /* Variables' number */ 71 | #define NB_OF_VAR ((uint8_t)0x04) 72 | 73 | /* Exported types ------------------------------------------------------------*/ 74 | /* Exported macro ------------------------------------------------------------*/ 75 | /* Exported functions ------------------------------------------------------- */ 76 | //uint16_t EE_Init(void); 77 | 78 | uint16_t EE_ReadBuf(uint16_t EEAddress, uint16_t* Data, uint16_t len); 79 | uint16_t EE_WriteBuf(uint16_t EEAddress, uint16_t* Data, uint16_t len); 80 | 81 | 82 | #endif /* __EEPROM_H */ 83 | 84 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 85 | -------------------------------------------------------------------------------- /driver/inc/lcdHAL.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcdHAL.h 3 | * 4 | * Created on: 08.01.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef LCDHAL_H_ 9 | #define LCDHAL_H_ 10 | 11 | #define LCD_PIXEL_WIDTH 320 12 | #define LCD_PIXEL_HEIGHT 240 13 | 14 | #define LCD_COLOR_WHITE 0 15 | #define LCD_COLOR_TEAL 1 16 | #define LCD_COLOR_PURPLE 2 17 | #define LCD_COLOR_BLUE 3 18 | #define LCD_COLOR_GREYL 4 19 | #define LCD_COLOR_GREYD 5 20 | #define LCD_COLOR_TEALD 6 21 | #define LCD_COLOR_PURPLED 7 22 | #define LCD_COLOR_BLUED 8 23 | #define LCD_COLOR_YELLOW 9 24 | #define LCD_COLOR_GREEN 10 25 | #define LCD_COLOR_YELLOWD 11 26 | #define LCD_COLOR_GREEND 12 27 | #define LCD_COLOR_RED 13 28 | #define LCD_COLOR_REDD 14 29 | #define LCD_COLOR_BLACK 15 30 | 31 | #define COLOR_24B_WHITE 0x00FFFFFFU 32 | #define COLOR_24B_TEAL 0x0000FFFFU 33 | #define COLOR_24B_PURPLE 0x00FF00FFU 34 | #define COLOR_24B_BLUE 0x000000FFU 35 | #define COLOR_24B_GREYL 0x00C0C0C0U 36 | #define COLOR_24B_GREYD 0x00808080U 37 | #define COLOR_24B_TEALD 0x00008080U 38 | #define COLOR_24B_PURPLED 0x00800080U 39 | #define COLOR_24B_BLUED 0x00000080U 40 | #define COLOR_24B_YELLOW 0x00FFFF00U 41 | #define COLOR_24B_GREEN 0x0000FF00U 42 | #define COLOR_24B_YELLOWD 0x00808000U 43 | #define COLOR_24B_GREEND 0x00008000U 44 | #define COLOR_24B_RED 0x00FF0000U 45 | #define COLOR_24B_REDD 0x00800000U 46 | #define COLOR_24B_BLACK 0x00000000U 47 | 48 | 49 | //****************************************************************************************** 50 | // Init 51 | extern void LCD_Init(void); 52 | 53 | 54 | //****************************************************************************************** 55 | // Font functions 56 | extern void LCD_SetFont(V_FONT *fonts); 57 | extern V_FONT *LCD_GetFont(void); 58 | 59 | 60 | //****************************************************************************************** 61 | // LowLevel Function 62 | extern void LCD_SetWindow(uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy); 63 | extern void LCD_PutPixel(uint16_t x, uint16_t y); 64 | extern void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar); 65 | extern void LCD_DrawFillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); 66 | extern void LCD_DrawMonoPict(const uint32_t *Pict); 67 | extern void LCD_WriteBMP(uint32_t BmpAddress); 68 | 69 | 70 | #endif /* LCDHAL_H_ */ 71 | -------------------------------------------------------------------------------- /driver/inc/lcdHAL_HX8347A.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcdHAL_HX8347A.h 3 | * 4 | * Created on: 10.04.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef LCDHAL_HX8347A_H_ 9 | #define LCDHAL_HX8347A_H_ 10 | 11 | //****************************************************************************************** 12 | // Init 13 | extern void LCD_Init_HX8347A(void); 14 | 15 | //****************************************************************************************** 16 | // Color function 17 | extern uint16_t * getPaletteAdr0_HX8347A(void); 18 | extern uint16_t * getPaletteAdr1_HX8347A(void); 19 | 20 | 21 | //****************************************************************************************** 22 | // LowLevel Function 23 | extern void LCD_SetWindow_HX8347A(uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy); 24 | extern void LCD_PutPixel_HX8347A(uint16_t x, uint16_t y); 25 | extern void LCD_DrawChar_HX8347A(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar); 26 | extern void LCD_DrawFillRect_HX8347A(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); 27 | extern void LCD_DrawMonoPict_HX8347A(const uint32_t *Pict); 28 | extern void LCD_WriteBMP_HX8347A(uint32_t BmpAddress); 29 | 30 | 31 | #endif /* LCDHAL_HX8347A_H_ */ 32 | -------------------------------------------------------------------------------- /driver/inc/lcdHAL_ILI9320.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcdHAL_ILI9320.h 3 | * 4 | * Created on: 10.04.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef LCDHAL_ILI9320_H_ 9 | #define LCDHAL_ILI9320_H_ 10 | 11 | //****************************************************************************************** 12 | // Init 13 | extern void LCD_Init_ILI9320(void); 14 | 15 | 16 | //****************************************************************************************** 17 | // LowLevel Function 18 | 19 | extern void LCD_SetWindow_ILI9320(uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy); 20 | extern void LCD_PutPixel_ILI9320(uint16_t x, uint16_t y); 21 | extern void LCD_DrawChar_ILI9320(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar); 22 | extern void LCD_DrawFillRect_ILI9320(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); 23 | extern void LCD_DrawMonoPict_ILI9320(const uint32_t *Pict); 24 | extern void LCD_WriteBMP_ILI9320(uint32_t BmpAddress); 25 | 26 | 27 | #endif /* LCDHAL_ILI9320_H_ */ 28 | -------------------------------------------------------------------------------- /driver/inc/lcdHAL_SSD1298.h: -------------------------------------------------------------------------------- 1 | /* 2 | * lcdHAL_SSD1298.h 3 | * 4 | * Created on: 10.04.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef LCDHAL_SSD1298_H_ 9 | #define LCDHAL_SSD1298_H_ 10 | 11 | //****************************************************************************************** 12 | // Init 13 | extern void LCD_Init_SSD1298(void); 14 | 15 | //****************************************************************************************** 16 | // Color function 17 | extern uint16_t * getPaletteAdr0_SSD1298(void); 18 | extern uint16_t * getPaletteAdr1_SSD1298(void); 19 | 20 | 21 | //****************************************************************************************** 22 | // LowLevel Function 23 | extern void LCD_SetWindow_SSD1298(uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy); 24 | extern void LCD_PutPixel_SSD1298(uint16_t x, uint16_t y); 25 | extern void LCD_DrawChar_SSD1298(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar); 26 | extern void LCD_DrawFillRect_SSD1298(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); 27 | extern void LCD_DrawMonoPict_SSD1298(const uint32_t *Pict); 28 | extern void LCD_WriteBMP_SSD1298(uint32_t BmpAddress); 29 | 30 | 31 | #endif /* LCDHAL_SSD1298_H_ */ 32 | -------------------------------------------------------------------------------- /driver/inc/mkDriver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * mkDriver.h 3 | * 4 | * Created on: 08.01.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef MKDRIVER_H_ 9 | #define MKDRIVER_H_ 10 | 11 | // hardware init 12 | extern void guiDelay_ms(uint32_t _time); 13 | 14 | extern void LCD_CtrlLinesConfig(void); 15 | extern void LCD_FSMCConfig(void); 16 | extern void LCD_Reset_Off(void); 17 | extern void LCD_Reset_On(void); 18 | 19 | 20 | void LCD_WriteReg(uint8_t LCD_Reg, uint16_t LCD_RegValue); 21 | uint16_t LCD_ReadReg(uint8_t LCD_Reg); 22 | void LCD_WriteRAM_Prepare(void); 23 | void LCD_WriteRAM(uint16_t RGB_Code); 24 | uint16_t LCD_ReadRAM(void); 25 | void LCD_SetWindows (uint16_t startx, uint16_t starty, uint16_t endx, uint16_t endy); 26 | 27 | 28 | #endif /* MKDRIVER_H_ */ 29 | -------------------------------------------------------------------------------- /driver/src/beeper.c: -------------------------------------------------------------------------------- 1 | /* 2 | * beeper.c 3 | * 4 | * Created on: 25.03.2013 5 | * Author: Andrey Fursov 6 | */ 7 | #include "stm32f2xx_conf.h" 8 | #include "beeper.h" 9 | #ifdef TNKERNEL_PORT_CORTEXM3 10 | #include "tn.h" 11 | #endif 12 | 13 | 14 | BEEP beep = 15 | { 16 | 100, // uint32_t ShortDownCounter; 17 | 2000, // uint32_t intSoundCounter; 18 | 2000, // uint32_t intPauseCounter; 19 | 20 | 0, // unsigned intSoundOn : 1; 21 | 1, // unsigned shortSoundOn : 1; 22 | 0 // unsigned intSoundEnable : 1; 23 | 24 | }; 25 | 26 | void Beeper_Init(void) 27 | { 28 | // PC13 ind v2 29 | // PE6 ind v2.1 30 | GPIO_InitTypeDef GPIO_InitStructure; 31 | TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; 32 | TIM_OCInitTypeDef TIM_OCInitStructure; 33 | NVIC_InitTypeDef NVIC_InitStructure; 34 | uint16_t PrescalerValue = 0; 35 | 36 | 37 | 38 | 39 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM9, ENABLE); 40 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE); 41 | 42 | // // GPIOC Configuration: TIM9 CH2 (PE6) 43 | // GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6; 44 | // GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 45 | // GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; 46 | // GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 47 | // GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ; 48 | // GPIO_Init(GPIOE, &GPIO_InitStructure); 49 | // GPIO_PinAFConfig(GPIOE, GPIO_PinSource6, GPIO_AF_TIM9); 50 | 51 | GPIO_ResetBits ( GPIOC, GPIO_Pin_13); 52 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6; 53 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 54 | GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; 55 | GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 56 | GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ; 57 | GPIO_Init(GPIOE, &GPIO_InitStructure); 58 | GPIO_ResetBits ( GPIOC, GPIO_Pin_13); 59 | // Connect TIM9 pins to A2 60 | 61 | 62 | 63 | /* Enable the TIM9 global Interrupt */ 64 | NVIC_InitStructure.NVIC_IRQChannel = TIM1_BRK_TIM9_IRQn; 65 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2; 66 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2; 67 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 68 | NVIC_Init(&NVIC_InitStructure); 69 | 70 | /* Time base configuration */ 71 | PrescalerValue = (uint16_t) (SystemCoreClock / (2*1000000)) - 1; 72 | TIM_TimeBaseStructure.TIM_Period = 500; 73 | TIM_TimeBaseStructure.TIM_Prescaler = PrescalerValue; 74 | TIM_TimeBaseStructure.TIM_ClockDivision = 0; 75 | TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; 76 | TIM_TimeBaseInit(TIM9, &TIM_TimeBaseStructure); 77 | 78 | /* Output Compare Toggle Mode configuration: Channel2 */ 79 | TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; 80 | TIM_OCInitStructure.TIM_Pulse = TIM_TimeBaseStructure.TIM_Period/2; 81 | 82 | TIM_OC2Init(TIM9, &TIM_OCInitStructure); 83 | 84 | TIM_OC2PreloadConfig(TIM9, TIM_OCPreload_Disable); 85 | 86 | /* TIM enable counter */ 87 | TIM_Cmd(TIM9, ENABLE); 88 | 89 | /* TIM IT enable */ 90 | 91 | //TIM_ITConfig(TIM9, TIM_IT_Update | TIM_IT_CC2, ENABLE); 92 | TIM_ITConfig(TIM9, TIM_IT_Update, ENABLE); 93 | } 94 | 95 | void TIM1_BRK_TIM9_IRQHandler(void) //-- UART2 Tx 96 | { 97 | // tn_event_iset(&event_all_uart, EVENT_UART3_TX_END); 98 | //-- Clear int flag 99 | /* TIM9_CH2 toggling with frequency = 366.2 Hz */ 100 | if (TIM_GetITStatus(TIM9, TIM_IT_Update) != RESET) 101 | { 102 | TIM_ClearITPendingBit(TIM9, TIM_IT_Update); 103 | } 104 | 105 | if (beep.intSoundOn || beep.shortSoundOn) 106 | { 107 | GPIO_ToggleBits ( GPIOC, GPIO_Pin_13); 108 | } 109 | else 110 | { 111 | GPIO_ResetBits ( GPIOC, GPIO_Pin_13); 112 | } 113 | 114 | if (beep.shortSoundOn) 115 | { 116 | if (beep.ShortDownCounter--) 117 | { 118 | 119 | } 120 | else 121 | { 122 | beep.shortSoundOn = 0; 123 | } 124 | } 125 | 126 | if (beep.intSoundEnable) 127 | { 128 | if (beep.intSoundCounter) 129 | { 130 | beep.intSoundCounter--; 131 | beep.intSoundOn = 1; 132 | beep.intPauseCounter = 2000; 133 | } 134 | else 135 | { 136 | if (beep.intPauseCounter) 137 | { 138 | beep.intPauseCounter--; 139 | beep.intSoundOn = 0; 140 | } 141 | else 142 | { 143 | beep.intSoundCounter = 2000; 144 | } 145 | } 146 | 147 | } 148 | else 149 | { 150 | beep.intSoundOn = 0; 151 | } 152 | 153 | 154 | 155 | 156 | #ifdef TNKERNEL_PORT_CORTEXM3 157 | tn_int_exit(); 158 | #endif 159 | } 160 | 161 | 162 | 163 | void Beeper_ShortOn(uint32_t time_ms) 164 | { 165 | beep.ShortDownCounter = time_ms*4; 166 | beep.shortSoundOn = 1; 167 | } 168 | 169 | void Beeper_Off(void) 170 | { 171 | beep.intSoundCounter = 2000; 172 | beep.intPauseCounter = 2000; 173 | beep.intSoundEnable = 0; 174 | } 175 | 176 | void Beeper_InterruptOn(void) 177 | { 178 | if (beep.intSoundEnable == 0) 179 | { 180 | beep.intSoundCounter = 2000; 181 | beep.intPauseCounter = 2000; 182 | } 183 | beep.intSoundEnable = 1; 184 | } 185 | -------------------------------------------------------------------------------- /driver/src/ee_emul.c: -------------------------------------------------------------------------------- 1 | /* Includes ------------------------------------------------------------------*/ 2 | #include "stm32f2xx_conf.h" 3 | #include "ee_emul.h" 4 | 5 | /* Private typedef -----------------------------------------------------------*/ 6 | /* Private define ------------------------------------------------------------*/ 7 | /* Private macro -------------------------------------------------------------*/ 8 | /* Private variables ---------------------------------------------------------*/ 9 | uint8_t const eepromdata[PAGE_SIZE] __attribute__((at(EEPROM_START_ADDRESS))); 10 | 11 | uint16_t EE_ReadBuf(uint16_t EEAddress, uint16_t* _data, uint16_t len) 12 | { 13 | volatile uint16_t * fData, i; 14 | 15 | fData = (volatile uint16_t *)(EEAddress + EEPROM_START_ADDRESS); 16 | 17 | for (i = 0; i < len; i++) 18 | { 19 | _data[i] = fData[i]; 20 | } 21 | 22 | return i; 23 | } 24 | 25 | uint16_t EE_WriteBuf(uint16_t EEAddress, uint16_t* _data, uint16_t len) 26 | { 27 | uint16_t * rData, * fData; 28 | uint32_t adr; 29 | uint32_t ret; 30 | uint32_t i; 31 | volatile FLASH_Status FLASHStatus = FLASH_COMPLETE; 32 | 33 | ret = 0; 34 | // check data 35 | rData = (uint16_t *)_data; 36 | fData = (uint16_t *)(EEAddress + EEPROM_START_ADDRESS); 37 | adr = EEAddress + EEPROM_START_ADDRESS; 38 | for (i = 0; i < len; i++) 39 | { 40 | if (rData[i] != fData[i] ) 41 | { 42 | ret = 1; 43 | if (fData[i] != 0xFFFF) 44 | { 45 | ret = 2; 46 | i = len; 47 | } 48 | } 49 | } 50 | 51 | if (ret) 52 | { 53 | FLASH_Unlock(); 54 | FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | 55 | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR|FLASH_FLAG_PGSERR); 56 | // Clear Page 57 | if (ret == 2) 58 | FLASHStatus = FLASH_EraseSector(PAGE0_ID, VOLTAGE_RANGE); 59 | ret = 0; 60 | if (FLASHStatus == FLASH_COMPLETE) 61 | { 62 | for (i = 0; i < len; i++) 63 | { 64 | FLASHStatus = FLASH_ProgramHalfWord(adr, rData[i]); 65 | adr += 2; 66 | } 67 | // check flash write 68 | rData = (uint16_t *)_data; 69 | fData = (uint16_t *)(EEAddress + EEPROM_START_ADDRESS); 70 | for (i = 0; i < len; i++) 71 | { 72 | if (rData[i] != fData[i] ) ret = 1; 73 | } 74 | } 75 | else 76 | { 77 | ret = 2; 78 | } 79 | FLASH_Lock(); 80 | } 81 | return ret; 82 | } 83 | 84 | -------------------------------------------------------------------------------- /driver/src/lcdHAL_9320.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/driver/src/lcdHAL_9320.c -------------------------------------------------------------------------------- /driver/src/lcdHAL_universal.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/driver/src/lcdHAL_universal.c -------------------------------------------------------------------------------- /driver/src/mkDriver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/driver/src/mkDriver.c -------------------------------------------------------------------------------- /driver/src/mkDriver_207Z.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/driver/src/mkDriver_207Z.c -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Include/system_stm32f2xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f2xx.h 4 | * @author MCD Application Team 5 | * @version V1.1.3 6 | * @date 05-March-2012 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT 2012 STMicroelectronics

12 | * 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 14 | * You may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at: 16 | * 17 | * http://www.st.com/software_license_agreement_liberty_v2 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | * 25 | ****************************************************************************** 26 | */ 27 | 28 | /** @addtogroup CMSIS 29 | * @{ 30 | */ 31 | 32 | /** @addtogroup stm32f2xx_system 33 | * @{ 34 | */ 35 | 36 | /** 37 | * @brief Define to prevent recursive inclusion 38 | */ 39 | #ifndef __SYSTEM_STM32F2XX_H 40 | #define __SYSTEM_STM32F2XX_H 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | /** @addtogroup STM32F2xx_System_Includes 47 | * @{ 48 | */ 49 | 50 | /** 51 | * @} 52 | */ 53 | 54 | 55 | /** @addtogroup STM32F2xx_System_Exported_types 56 | * @{ 57 | */ 58 | 59 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 60 | 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @addtogroup STM32F2xx_System_Exported_Constants 67 | * @{ 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @addtogroup STM32F2xx_System_Exported_Macros 75 | * @{ 76 | */ 77 | 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @addtogroup STM32F2xx_System_Exported_Functions 83 | * @{ 84 | */ 85 | 86 | extern void SystemInit(void); 87 | extern void SystemCoreClockUpdate(void); 88 | /** 89 | * @} 90 | */ 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /*__SYSTEM_STM32F2XX_H */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /** 103 | * @} 104 | */ 105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Device/ST/STM32F2xx/Source/Templates/TASKING/cstart_thumb2.asm: -------------------------------------------------------------------------------- 1 | 2 | 3 | ;; NOTE: To allow the use of this file for both ARMv6M and ARMv7M, 4 | ;; we will only use 16-bit Thumb intructions. 5 | 6 | .extern _lc_ub_stack ; usr/sys mode stack pointer 7 | .extern _lc_ue_stack ; symbol required by debugger 8 | .extern _lc_ub_table ; ROM to RAM copy table 9 | .extern main 10 | .extern _Exit 11 | .extern exit 12 | .weak exit 13 | .global __get_argcv 14 | .weak __get_argcv 15 | .extern __argcvbuf 16 | .weak __argcvbuf 17 | ;;.extern __init_hardware 18 | .extern SystemInit 19 | 20 | .if @defined('__PROF_ENABLE__') 21 | .extern __prof_init 22 | .endif 23 | .if @defined('__POSIX__') 24 | .extern posix_main 25 | .extern _posix_boot_stack_top 26 | .endif 27 | 28 | .global _START 29 | 30 | .section .text.cstart 31 | 32 | .thumb 33 | _START: 34 | ;; anticipate possible ROM/RAM remapping 35 | ;; by loading the 'real' program address 36 | ldr r1,=_Next 37 | bx r1 38 | _Next: 39 | ;; initialize the stack pointer 40 | ldr r1,=_lc_ub_stack ; TODO: make this part of the vector table 41 | mov sp,r1 42 | 43 | ;; call a user function which initializes function. 44 | bl SystemInit 45 | 46 | ;; copy initialized sections from ROM to RAM 47 | ;; and clear uninitialized data sections in RAM 48 | 49 | ldr r3,=_lc_ub_table 50 | movs r0,#0 51 | cploop: 52 | ldr r4,[r3,#0] ; load type 53 | ldr r5,[r3,#4] ; dst address 54 | ldr r6,[r3,#8] ; src address 55 | ldr r7,[r3,#12] ; size 56 | 57 | cmp r4,#1 58 | beq copy 59 | cmp r4,#2 60 | beq clear 61 | b done 62 | 63 | copy: 64 | subs r7,r7,#1 65 | ldrb r1,[r6,r7] 66 | strb r1,[r5,r7] 67 | bne copy 68 | 69 | adds r3,r3,#16 70 | b cploop 71 | 72 | clear: 73 | subs r7,r7,#1 74 | strb r0,[r5,r7] 75 | bne clear 76 | 77 | adds r3,r3,#16 78 | b cploop 79 | 80 | done: 81 | 82 | .if @defined('__POSIX__') 83 | 84 | ;; posix stack buffer for system upbringing 85 | ldr r0,=_posix_boot_stack_top 86 | ldr r0, [r0] 87 | mov sp,r0 88 | 89 | .else 90 | 91 | ;; load r10 with end of USR/SYS stack, which is 92 | ;; needed in case stack overflow checking is on 93 | ;; NOTE: use 16-bit instructions only, for ARMv6M 94 | ldr r0,=_lc_ue_stack 95 | mov r10,r0 96 | 97 | .endif 98 | 99 | .if @defined('__PROF_ENABLE__') 100 | bl __prof_init 101 | .endif 102 | 103 | .if @defined('__POSIX__') 104 | ;; call posix_main with no arguments 105 | bl posix_main 106 | .else 107 | ;; retrieve argc and argv (default argv[0]==NULL & argc==0) 108 | bl __get_argcv 109 | ldr r1,=__argcvbuf 110 | ;; call main 111 | bl main 112 | .endif 113 | 114 | ;; call exit using the return value from main() 115 | ;; Note. Calling exit will also run all functions 116 | ;; that were supplied through atexit(). 117 | bl exit 118 | 119 | __get_argcv: ; weak definition 120 | movs r0,#0 121 | bx lr 122 | 123 | .ltorg 124 | .endsec 125 | 126 | .calls '_START', ' ' 127 | .calls '_START','__init_vector_table' 128 | .if @defined('__PROF_ENABLE__') 129 | .calls '_START','__prof_init' 130 | .endif 131 | .if @defined('__POSIX__') 132 | .calls '_START','posix_main' 133 | .else 134 | .calls '_START','__get_argcv' 135 | .calls '_START','main' 136 | .endif 137 | .calls '_START','exit' 138 | .calls '_START','',0 139 | 140 | .end 141 | -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_CM4_SIMD.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_CM4_SIMD.htm -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_DebugSupport.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_DebugSupport.htm -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_History.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_History.htm -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_Logo_Final.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_Logo_Final.jpg -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Documentation/CMSIS_System_View_Description.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/Documentation/CMSIS_System_View_Description.htm -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/Include/arm_common_tables.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Copyright (C) 2010 ARM Limited. All rights reserved. 3 | * 4 | * $Date: 11. November 2010 5 | * $Revision: V1.0.2 6 | * 7 | * Project: CMSIS DSP Library 8 | * Title: arm_common_tables.h 9 | * 10 | * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 11 | * 12 | * Target Processor: Cortex-M4/Cortex-M3 13 | * 14 | * Version 1.0.2 2010/11/11 15 | * Documentation updated. 16 | * 17 | * Version 1.0.1 2010/10/05 18 | * Production release and review comments incorporated. 19 | * 20 | * Version 1.0.0 2010/09/20 21 | * Production release and review comments incorporated. 22 | * -------------------------------------------------------------------- */ 23 | 24 | #ifndef _ARM_COMMON_TABLES_H 25 | #define _ARM_COMMON_TABLES_H 26 | 27 | #include "arm_math.h" 28 | 29 | extern uint16_t armBitRevTable[256]; 30 | extern q15_t armRecipTableQ15[64]; 31 | extern q31_t armRecipTableQ31[64]; 32 | extern const q31_t realCoefAQ31[1024]; 33 | extern const q31_t realCoefBQ31[1024]; 34 | 35 | #endif /* ARM_COMMON_TABLES_H */ 36 | -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011 ARM Limited. All rights reserved. 3 | * 4 | * Date: 25 July 2011 5 | * Revision: V2.10 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Binaries 34 | --- -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/STM32F2xx/stm32f2xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/STM32F2xx/stm32f2xx.h -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/STM32F2xx/system_stm32f2xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f2xx.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 18-April-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 stm32f2xx_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F2XX_H 34 | #define __SYSTEM_STM32F2XX_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F2xx_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F2xx_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /** @addtogroup STM32F2xx_System_Exported_Constants 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @addtogroup STM32F2xx_System_Exported_Macros 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @addtogroup STM32F2xx_System_Exported_Functions 77 | * @{ 78 | */ 79 | 80 | extern void SystemInit(void); 81 | extern void SystemCoreClockUpdate(void); 82 | /** 83 | * @} 84 | */ 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | #endif /*__SYSTEM_STM32F2XX_H */ 91 | 92 | /** 93 | * @} 94 | */ 95 | 96 | /** 97 | * @} 98 | */ 99 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 100 | -------------------------------------------------------------------------------- /example/keil/StdLib/CMSIS/index.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/StdLib/CMSIS/index.htm -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_crc.h 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F2xx_CRC_H 31 | #define __STM32F2xx_CRC_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f2xx.h" 39 | 40 | /** @addtogroup STM32F2xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup CRC 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup CRC_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /* Exported macro ------------------------------------------------------------*/ 60 | /* Exported functions --------------------------------------------------------*/ 61 | 62 | void CRC_ResetDR(void); 63 | uint32_t CRC_CalcCRC(uint32_t Data); 64 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 65 | uint32_t CRC_GetCRC(void); 66 | void CRC_SetIDRegister(uint8_t IDValue); 67 | uint8_t CRC_GetIDRegister(void); 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif /* __STM32F2xx_CRC_H */ 74 | 75 | /** 76 | * @} 77 | */ 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 84 | -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_dbgmcu.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_dbgmcu.h 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the DBGMCU firmware library. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT 2012 STMicroelectronics

12 | * 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 14 | * You may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at: 16 | * 17 | * http://www.st.com/software_license_agreement_liberty_v2 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | * 25 | ****************************************************************************** 26 | */ 27 | 28 | /* Define to prevent recursive inclusion -------------------------------------*/ 29 | #ifndef __STM32F2xx_DBGMCU_H 30 | #define __STM32F2xx_DBGMCU_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /* Includes ------------------------------------------------------------------*/ 37 | #include "stm32f2xx.h" 38 | 39 | /** @addtogroup STM32F2xx_StdPeriph_Driver 40 | * @{ 41 | */ 42 | 43 | /** @addtogroup DBGMCU 44 | * @{ 45 | */ 46 | 47 | /* Exported types ------------------------------------------------------------*/ 48 | /* Exported constants --------------------------------------------------------*/ 49 | 50 | /** @defgroup DBGMCU_Exported_Constants 51 | * @{ 52 | */ 53 | #define DBGMCU_SLEEP ((uint32_t)0x00000001) 54 | #define DBGMCU_STOP ((uint32_t)0x00000002) 55 | #define DBGMCU_STANDBY ((uint32_t)0x00000004) 56 | #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0xFFFFFFF8) == 0x00) && ((PERIPH) != 0x00)) 57 | 58 | #define DBGMCU_TIM2_STOP ((uint32_t)0x00000001) 59 | #define DBGMCU_TIM3_STOP ((uint32_t)0x00000002) 60 | #define DBGMCU_TIM4_STOP ((uint32_t)0x00000004) 61 | #define DBGMCU_TIM5_STOP ((uint32_t)0x00000008) 62 | #define DBGMCU_TIM6_STOP ((uint32_t)0x00000010) 63 | #define DBGMCU_TIM7_STOP ((uint32_t)0x00000020) 64 | #define DBGMCU_TIM12_STOP ((uint32_t)0x00000040) 65 | #define DBGMCU_TIM13_STOP ((uint32_t)0x00000080) 66 | #define DBGMCU_TIM14_STOP ((uint32_t)0x00000100) 67 | #define DBGMCU_RTC_STOP ((uint32_t)0x00000400) 68 | #define DBGMCU_WWDG_STOP ((uint32_t)0x00000800) 69 | #define DBGMCU_IWDG_STOP ((uint32_t)0x00001000) 70 | #define DBGMCU_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00200000) 71 | #define DBGMCU_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00400000) 72 | #define DBGMCU_I2C3_SMBUS_TIMEOUT ((uint32_t)0x00800000) 73 | #define DBGMCU_CAN1_STOP ((uint32_t)0x02000000) 74 | #define DBGMCU_CAN2_STOP ((uint32_t)0x04000000) 75 | #define IS_DBGMCU_APB1PERIPH(PERIPH) ((((PERIPH) & 0xF91FE200) == 0x00) && ((PERIPH) != 0x00)) 76 | 77 | #define DBGMCU_TIM1_STOP ((uint32_t)0x00000001) 78 | #define DBGMCU_TIM8_STOP ((uint32_t)0x00000002) 79 | #define DBGMCU_TIM9_STOP ((uint32_t)0x00010000) 80 | #define DBGMCU_TIM10_STOP ((uint32_t)0x00020000) 81 | #define DBGMCU_TIM11_STOP ((uint32_t)0x00040000) 82 | #define IS_DBGMCU_APB2PERIPH(PERIPH) ((((PERIPH) & 0xFFF8FFFC) == 0x00) && ((PERIPH) != 0x00)) 83 | /** 84 | * @} 85 | */ 86 | 87 | /* Exported macro ------------------------------------------------------------*/ 88 | /* Exported functions --------------------------------------------------------*/ 89 | uint32_t DBGMCU_GetREVID(void); 90 | uint32_t DBGMCU_GetDEVID(void); 91 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState); 92 | void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState); 93 | void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState); 94 | 95 | #ifdef __cplusplus 96 | } 97 | #endif 98 | 99 | #endif /* __STM32F2xx_DBGMCU_H */ 100 | 101 | /** 102 | * @} 103 | */ 104 | 105 | /** 106 | * @} 107 | */ 108 | 109 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 110 | -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_iwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_iwdg.h 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the IWDG 8 | * firmware library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F2xx_IWDG_H 31 | #define __STM32F2xx_IWDG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f2xx.h" 39 | 40 | /** @addtogroup STM32F2xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup IWDG 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup IWDG_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** @defgroup IWDG_WriteAccess 56 | * @{ 57 | */ 58 | #define IWDG_WriteAccess_Enable ((uint16_t)0x5555) 59 | #define IWDG_WriteAccess_Disable ((uint16_t)0x0000) 60 | #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \ 61 | ((ACCESS) == IWDG_WriteAccess_Disable)) 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup IWDG_prescaler 67 | * @{ 68 | */ 69 | #define IWDG_Prescaler_4 ((uint8_t)0x00) 70 | #define IWDG_Prescaler_8 ((uint8_t)0x01) 71 | #define IWDG_Prescaler_16 ((uint8_t)0x02) 72 | #define IWDG_Prescaler_32 ((uint8_t)0x03) 73 | #define IWDG_Prescaler_64 ((uint8_t)0x04) 74 | #define IWDG_Prescaler_128 ((uint8_t)0x05) 75 | #define IWDG_Prescaler_256 ((uint8_t)0x06) 76 | #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \ 77 | ((PRESCALER) == IWDG_Prescaler_8) || \ 78 | ((PRESCALER) == IWDG_Prescaler_16) || \ 79 | ((PRESCALER) == IWDG_Prescaler_32) || \ 80 | ((PRESCALER) == IWDG_Prescaler_64) || \ 81 | ((PRESCALER) == IWDG_Prescaler_128)|| \ 82 | ((PRESCALER) == IWDG_Prescaler_256)) 83 | /** 84 | * @} 85 | */ 86 | 87 | /** @defgroup IWDG_Flag 88 | * @{ 89 | */ 90 | #define IWDG_FLAG_PVU ((uint16_t)0x0001) 91 | #define IWDG_FLAG_RVU ((uint16_t)0x0002) 92 | #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU)) 93 | #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF) 94 | /** 95 | * @} 96 | */ 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | /* Exported macro ------------------------------------------------------------*/ 103 | /* Exported functions --------------------------------------------------------*/ 104 | 105 | /* Prescaler and Counter configuration functions ******************************/ 106 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess); 107 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler); 108 | void IWDG_SetReload(uint16_t Reload); 109 | void IWDG_ReloadCounter(void); 110 | 111 | /* IWDG activation function ***************************************************/ 112 | void IWDG_Enable(void); 113 | 114 | /* Flag management function ***************************************************/ 115 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG); 116 | 117 | #ifdef __cplusplus 118 | } 119 | #endif 120 | 121 | #endif /* __STM32F2xx_IWDG_H */ 122 | 123 | /** 124 | * @} 125 | */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 132 | -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rng.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_rng.h 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the Random 8 | * Number Generator(RNG) firmware library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F2xx_RNG_H 31 | #define __STM32F2xx_RNG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f2xx.h" 39 | 40 | /** @addtogroup STM32F2xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup RNG 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup RNG_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** @defgroup RNG_flags_definition 56 | * @{ 57 | */ 58 | #define RNG_FLAG_DRDY ((uint8_t)0x0001) /*!< Data ready */ 59 | #define RNG_FLAG_CECS ((uint8_t)0x0002) /*!< Clock error current status */ 60 | #define RNG_FLAG_SECS ((uint8_t)0x0004) /*!< Seed error current status */ 61 | 62 | #define IS_RNG_GET_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_DRDY) || \ 63 | ((RNG_FLAG) == RNG_FLAG_CECS) || \ 64 | ((RNG_FLAG) == RNG_FLAG_SECS)) 65 | #define IS_RNG_CLEAR_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_CECS) || \ 66 | ((RNG_FLAG) == RNG_FLAG_SECS)) 67 | /** 68 | * @} 69 | */ 70 | 71 | /** @defgroup RNG_interrupts_definition 72 | * @{ 73 | */ 74 | #define RNG_IT_CEI ((uint8_t)0x20) /*!< Clock error interrupt */ 75 | #define RNG_IT_SEI ((uint8_t)0x40) /*!< Seed error interrupt */ 76 | 77 | #define IS_RNG_IT(IT) ((((IT) & (uint8_t)0x9F) == 0x00) && ((IT) != 0x00)) 78 | #define IS_RNG_GET_IT(RNG_IT) (((RNG_IT) == RNG_IT_CEI) || ((RNG_IT) == RNG_IT_SEI)) 79 | /** 80 | * @} 81 | */ 82 | 83 | /** 84 | * @} 85 | */ 86 | 87 | /* Exported macro ------------------------------------------------------------*/ 88 | /* Exported functions --------------------------------------------------------*/ 89 | 90 | /* Function used to set the RNG configuration to the default reset state *****/ 91 | void RNG_DeInit(void); 92 | 93 | /* Configuration function *****************************************************/ 94 | void RNG_Cmd(FunctionalState NewState); 95 | 96 | /* Get 32 bit Random number function ******************************************/ 97 | uint32_t RNG_GetRandomNumber(void); 98 | 99 | /* Interrupts and flags management functions **********************************/ 100 | void RNG_ITConfig(FunctionalState NewState); 101 | FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG); 102 | void RNG_ClearFlag(uint8_t RNG_FLAG); 103 | ITStatus RNG_GetITStatus(uint8_t RNG_IT); 104 | void RNG_ClearITPendingBit(uint8_t RNG_IT); 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif /*__STM32F2xx_RNG_H */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | /** 117 | * @} 118 | */ 119 | 120 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 121 | -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_wwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_wwdg.h 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the WWDG firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F2xx_WWDG_H 31 | #define __STM32F2xx_WWDG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f2xx.h" 39 | 40 | /** @addtogroup STM32F2xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup WWDG 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup WWDG_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** @defgroup WWDG_Prescaler 56 | * @{ 57 | */ 58 | 59 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 60 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 61 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 62 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 63 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 64 | ((PRESCALER) == WWDG_Prescaler_2) || \ 65 | ((PRESCALER) == WWDG_Prescaler_4) || \ 66 | ((PRESCALER) == WWDG_Prescaler_8)) 67 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 68 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** 75 | * @} 76 | */ 77 | 78 | /* Exported macro ------------------------------------------------------------*/ 79 | /* Exported functions --------------------------------------------------------*/ 80 | 81 | /* Function used to set the WWDG configuration to the default reset state ****/ 82 | void WWDG_DeInit(void); 83 | 84 | /* Prescaler, Refresh window and Counter configuration functions **************/ 85 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 86 | void WWDG_SetWindowValue(uint8_t WindowValue); 87 | void WWDG_EnableIT(void); 88 | void WWDG_SetCounter(uint8_t Counter); 89 | 90 | /* WWDG activation function ***************************************************/ 91 | void WWDG_Enable(uint8_t Counter); 92 | 93 | /* Interrupts and flags management functions **********************************/ 94 | FlagStatus WWDG_GetFlagStatus(void); 95 | void WWDG_ClearFlag(void); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /* __STM32F2xx_WWDG_H */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 112 | -------------------------------------------------------------------------------- /example/keil/StdLib/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_crc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f2xx_crc.c 4 | * @author MCD Application Team 5 | * @version V1.1.2 6 | * @date 05-March-2012 7 | * @brief This file provides all the CRC firmware functions. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT 2012 STMicroelectronics

12 | * 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 14 | * You may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at: 16 | * 17 | * http://www.st.com/software_license_agreement_liberty_v2 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | * 25 | ****************************************************************************** 26 | */ 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f2xx_crc.h" 30 | 31 | /** @addtogroup STM32F2xx_StdPeriph_Driver 32 | * @{ 33 | */ 34 | 35 | /** @defgroup CRC 36 | * @brief CRC driver modules 37 | * @{ 38 | */ 39 | 40 | /* Private typedef -----------------------------------------------------------*/ 41 | /* Private define ------------------------------------------------------------*/ 42 | /* Private macro -------------------------------------------------------------*/ 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* Private function prototypes -----------------------------------------------*/ 45 | /* Private functions ---------------------------------------------------------*/ 46 | 47 | /** @defgroup CRC_Private_Functions 48 | * @{ 49 | */ 50 | 51 | /** 52 | * @brief Resets the CRC Data register (DR). 53 | * @param None 54 | * @retval None 55 | */ 56 | void CRC_ResetDR(void) 57 | { 58 | /* Reset CRC generator */ 59 | CRC->CR = CRC_CR_RESET; 60 | } 61 | 62 | /** 63 | * @brief Computes the 32-bit CRC of a given data word(32-bit). 64 | * @param Data: data word(32-bit) to compute its CRC 65 | * @retval 32-bit CRC 66 | */ 67 | uint32_t CRC_CalcCRC(uint32_t Data) 68 | { 69 | CRC->DR = Data; 70 | 71 | return (CRC->DR); 72 | } 73 | 74 | /** 75 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit). 76 | * @param pBuffer: pointer to the buffer containing the data to be computed 77 | * @param BufferLength: length of the buffer to be computed 78 | * @retval 32-bit CRC 79 | */ 80 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) 81 | { 82 | uint32_t index = 0; 83 | 84 | for(index = 0; index < BufferLength; index++) 85 | { 86 | CRC->DR = pBuffer[index]; 87 | } 88 | return (CRC->DR); 89 | } 90 | 91 | /** 92 | * @brief Returns the current CRC value. 93 | * @param None 94 | * @retval 32-bit CRC 95 | */ 96 | uint32_t CRC_GetCRC(void) 97 | { 98 | return (CRC->DR); 99 | } 100 | 101 | /** 102 | * @brief Stores a 8-bit data in the Independent Data(ID) register. 103 | * @param IDValue: 8-bit value to be stored in the ID register 104 | * @retval None 105 | */ 106 | void CRC_SetIDRegister(uint8_t IDValue) 107 | { 108 | CRC->IDR = IDValue; 109 | } 110 | 111 | /** 112 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register 113 | * @param None 114 | * @retval 8-bit value of the ID register 115 | */ 116 | uint8_t CRC_GetIDRegister(void) 117 | { 118 | return (CRC->IDR); 119 | } 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | /** 126 | * @} 127 | */ 128 | 129 | /** 130 | * @} 131 | */ 132 | 133 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 134 | -------------------------------------------------------------------------------- /example/keil/TNKernel/CortexM3/tn_port_cm3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/CortexM3/tn_port_cm3.c -------------------------------------------------------------------------------- /example/keil/TNKernel/CortexM3/tn_port_cm3_armcc.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/CortexM3/tn_port_cm3_armcc.s -------------------------------------------------------------------------------- /example/keil/TNKernel/CortexM3/tn_port_cm3_gcc.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/CortexM3/tn_port_cm3_gcc.s -------------------------------------------------------------------------------- /example/keil/TNKernel/CortexM3/tn_port_cm3_iar.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/CortexM3/tn_port_cm3_iar.s -------------------------------------------------------------------------------- /example/keil/TNKernel/README_FIRST.txt: -------------------------------------------------------------------------------- 1 | 2 | For TNKernel v.2.6 and later you should set (in an IDE or makefile) 3 | the preprocessor defenition according to you port: 4 | 5 | - for ARM - TNKERNEL_PORT_ARM, 6 | - for Cortex M3 - TNKERNEL_PORT_CORTEXM3, 7 | - for MSP430x - TNKERNEL_PORT_MSP430X 8 | 9 | (see file 'tn_port.h' for more details) 10 | 11 | otherwise you'll get the preprocessor error "TNKernel port undefined". 12 | 13 | -------------------------------------------------------------------------------- /example/keil/TNKernel/tn.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn.h -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_dqueue.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_dqueue.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_event.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_event.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_mem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_mem.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_mutex.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_mutex.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_port.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_port.h -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_sem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_sem.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_tasks.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_tasks.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_utils.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_utils.c -------------------------------------------------------------------------------- /example/keil/TNKernel/tn_utils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/TNKernel/tn_utils.h -------------------------------------------------------------------------------- /example/keil/appGUI/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /example/keil/appGUI/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | appGUI 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 | 26 | 27 | -------------------------------------------------------------------------------- /example/keil/appGUI/HMI_Control.c: -------------------------------------------------------------------------------- 1 | /* 2 | * HMI_Control.c 3 | * 4 | * Created on: 08.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | #include "gui.h" 8 | #include "HMI_Control.h" 9 | 10 | GUI_ELEMENTS gui; 11 | enum WINDOW_ID windowID = winInit; 12 | 13 | 14 | 15 | void HMI_Control(void) 16 | { 17 | // Touch control 18 | touchGetSense(&gui.xTouch, &gui.yTouch); 19 | if (windowID == winInit) 20 | { 21 | HMI_ChangeWindow(winMain); 22 | } 23 | else 24 | { 25 | HMI_TouchCtrl(); 26 | } 27 | } 28 | 29 | void HMI_ChangeWindow(enum WINDOW_ID winID) 30 | { 31 | LCD_Clear(LCD_COLOR_GREYL); 32 | windowID = winID; 33 | switch(winID) 34 | { 35 | case winInit: 36 | windowID = winMain; 37 | break; 38 | case winMain: 39 | winMainInit(&gui); 40 | break; 41 | case winUartCfg: 42 | winUartCfgInit(&gui); 43 | break; 44 | case winPlot: 45 | winPlotInit(&gui); 46 | break; 47 | 48 | default: 49 | windowID = winInit; 50 | break; 51 | } 52 | HMI_OnPaint(); 53 | } 54 | 55 | void HMI_OnPaint(void) 56 | { 57 | uint16_t i; 58 | 59 | // button draw 60 | i = 0; 61 | while (gui.textButton[i].wmObj.Visible && i < MAX_NUM_TXT_BUTTON) 62 | { 63 | TextButtonDraw(&gui.textButton[i++]); 64 | } 65 | 66 | // label draw 67 | i = 0; 68 | while (gui.textButton[i].wmObj.Visible && i < MAX_NUM_LABEL) 69 | { 70 | guiLabelDraw(&gui.label[i++]); 71 | } 72 | 73 | // radio group draw 74 | i = 0; 75 | while (gui.radioGroup[i].wmObj.Visible && i < MAX_NUM_RADIO_GROUP) 76 | { 77 | RadioGroupDraw(&gui.radioGroup[i++]); 78 | } 79 | 80 | // check box draw 81 | i = 0; 82 | while (gui.checkBox[i].wmObj.Visible && i < MAX_NUM_RADIO_GROUP) 83 | { 84 | CheckBoxDraw(&gui.checkBox[i++]); 85 | } 86 | 87 | // updown box draw 88 | i = 0; 89 | while (gui.udBox[i].wmObj.Visible && i < MAX_NUM_UDBOX) 90 | { 91 | UpDownBoxDraw(&gui.udBox[i++]); 92 | } 93 | 94 | // chart box draw 95 | i = 0; 96 | while (gui.chart[i].wmObj.Visible && i < MAX_NUM_CHART) 97 | { 98 | guiChartDraw(&gui.chart[i++]); 99 | } 100 | 101 | 102 | } 103 | 104 | void HMI_TouchCtrl(void) 105 | { 106 | uint16_t i; 107 | 108 | // button touch 109 | i = 0; 110 | while (gui.textButton[i].wmObj.Visible && i < MAX_NUM_TXT_BUTTON) 111 | { 112 | if (gui.textButton[i].wmObj.Enable) 113 | { 114 | wmTouchControl(&gui.textButton[i].wmObj, &gui.textButton[i].wmTouch, gui.xTouch, gui.yTouch); 115 | TextButtonStateRefresh(&gui.textButton[i]); 116 | if (gui.textButton[i].wmTouch.JustReleased && gui.textButton[i].fOnUntouch != 0) 117 | { 118 | gui.textButton[i].wmTouch.JustReleased = 0; 119 | gui.textButton[i].fOnUntouch(); 120 | break; 121 | } 122 | } 123 | i++; 124 | } 125 | 126 | // radioGroup touch 127 | i = 0; 128 | while (gui.radioGroup[i].wmObj.Visible && i < MAX_NUM_RADIO_GROUP) 129 | { 130 | if (gui.radioGroup[i].wmObj.Enable) 131 | RadioGroupTouchControl(&gui.radioGroup[i], gui.xTouch, gui.yTouch); 132 | i++; 133 | } 134 | 135 | // check box touch 136 | i = 0; 137 | while (gui.checkBox[i].wmObj.Visible && i < MAX_NUM_CHECK_BOX) 138 | { 139 | if (gui.checkBox[i].wmObj.Enable) 140 | CheckBoxTouchControl(&gui.checkBox[i], gui.xTouch, gui.yTouch); 141 | i++; 142 | } 143 | 144 | // updown box touch 145 | i = 0; 146 | while (gui.udBox[i].wmObj.Visible && i < MAX_NUM_UDBOX) 147 | { 148 | if (gui.udBox[i].wmObj.Enable) 149 | UpDownTouchControl(&gui.udBox[i], gui.xTouch, gui.yTouch); 150 | i++; 151 | } 152 | 153 | // chart 154 | i = 0; 155 | while (gui.chart[i].wmObj.Visible && i < MAX_NUM_CHART) 156 | { 157 | // if (gui.chart[i].wmObj.Enable) 158 | // guiChartTouchControl(&gui.chart[i], gui.xTouch, gui.yTouch); 159 | i++; 160 | } 161 | 162 | } 163 | 164 | 165 | 166 | void HMIBtn_Exit(void) 167 | { 168 | HMI_ChangeWindow(winMain); 169 | } 170 | 171 | 172 | -------------------------------------------------------------------------------- /example/keil/appGUI/HMI_Control.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HMI_Control.h 3 | * 4 | * Created on: 08.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef HMI_CONTROL_H_ 9 | #define HMI_CONTROL_H_ 10 | 11 | #define MAX_NUM_TXT_BUTTON 16 12 | #define MAX_NUM_CHECK_BOX 8 13 | #define MAX_NUM_LABEL 8 14 | #define MAX_NUM_RADIO_GROUP 2 15 | #define MAX_NUM_UDBOX 2 16 | #define MAX_NUM_CHART 1 17 | 18 | typedef struct 19 | { 20 | TEXT_BUTTON textButton[MAX_NUM_TXT_BUTTON]; 21 | GUI_CHECK_BOX checkBox[MAX_NUM_CHECK_BOX]; 22 | GUI_LABEL label[MAX_NUM_LABEL]; 23 | GUI_RADIO_GROUP radioGroup[MAX_NUM_RADIO_GROUP]; 24 | GUI_UPDOWN_BOX udBox[MAX_NUM_UDBOX]; 25 | GUI_CHART chart[MAX_NUM_CHART]; 26 | int16_t xTouch; 27 | int16_t yTouch; 28 | 29 | } GUI_ELEMENTS; 30 | 31 | enum WINDOW_ID {winInit, winMain, winUartCfg, winMenu, winPlot}; 32 | #include "winMain.h" 33 | #include "winUartCfg.h" 34 | #include "winPlot.h" 35 | //******************************************************************* 36 | // prototypes 37 | //******************************************************************* 38 | extern void HMI_Control(void); 39 | extern void HMI_ChangeWindow(enum WINDOW_ID); 40 | extern void HMI_OnPaint(void); 41 | extern void HMI_TouchCtrl(void); 42 | 43 | extern void HMIBtn_Exit(void); 44 | 45 | 46 | #endif /* HMI_CONTROL_H_ */ 47 | -------------------------------------------------------------------------------- /example/keil/appGUI/appGUI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * appGUI.h 3 | * 4 | * Created on: 07.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | #ifndef _APPGUI_H 8 | #define _APPGUI_H 9 | 10 | extern void task_appGUI_func(void * par); 11 | extern void appGUI_task_create(void); 12 | 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /example/keil/appGUI/appGui.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/appGUI/appGui.c -------------------------------------------------------------------------------- /example/keil/appGUI/winMain.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/appGUI/winMain.c -------------------------------------------------------------------------------- /example/keil/appGUI/winMain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * winMain.h 3 | * 4 | * Created on: 09.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef WINMAIN_H_ 9 | #define WINMAIN_H_ 10 | 11 | extern void winMainInit(GUI_ELEMENTS * gui); 12 | extern void winMainCtrl(GUI_ELEMENTS * gui); 13 | extern void winMainOnPaint(GUI_ELEMENTS * gui); 14 | 15 | #endif /* WINMAIN_H_ */ 16 | -------------------------------------------------------------------------------- /example/keil/appGUI/winPlot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/appGUI/winPlot.c -------------------------------------------------------------------------------- /example/keil/appGUI/winPlot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * winPlot.h 3 | * 4 | * Created on: 28.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef WINPLOT_H_ 9 | #define WINPLOT_H_ 10 | 11 | extern void winPlotInit(GUI_ELEMENTS * gui); 12 | 13 | 14 | #endif /* WINPLOT_H_ */ 15 | -------------------------------------------------------------------------------- /example/keil/appGUI/winUartCfg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/appGUI/winUartCfg.c -------------------------------------------------------------------------------- /example/keil/appGUI/winUartCfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * winUartCfg.h 3 | * 4 | * Created on: 24.05.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef WINUARTCFG_H_ 9 | #define WINUARTCFG_H_ 10 | 11 | extern void winUartCfgInit(GUI_ELEMENTS * gui); 12 | extern void winUartCfgCtrl(GUI_ELEMENTS * gui); 13 | 14 | #endif /* WINUARTCFG_H_ */ 15 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/ADS7843_spi.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | extern void TP_SPI_Config(void); 5 | extern unsigned int TP_SPI_RW( unsigned int c ); 6 | extern void touchGetSense(int16_t * x, int16_t * y); 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/HAL_Calender.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * Name: HAL_Calender.h 3 | * Purpose: Date/Time support. 4 | * 5 | * Version: V1.00 6 | *---------------------------------------------------------------------------- 7 | * History: 8 | * V1.00 Initial Version 9 | *----------------------------------------------------------------------------*/ 10 | // 11 | #include 12 | #include // RV31 13 | 14 | #ifndef _DATETIME_ 15 | #define _DATETIME_ 16 | 17 | #ifdef LOCALE_US 18 | #define GetWeekDay() GetWeekDayU() 19 | #define GetWeekDayString(a) GetWeekDayString_US(a) 20 | #else // EU 21 | #define GetWeekDay() GetWeekDayE() 22 | #define GetWeekDayString(a) GetWeekDayString_DE(a) 23 | #endif 24 | 25 | typedef struct tm TTimeRec; 26 | 27 | #endif 28 | 29 | //------------------------------------------------------------------------------ 30 | // 31 | // Built around time.h from RTL (\RV31 or other subdir with Real View Library) 32 | // 33 | // The time is a 32-bit counter of seconds: 0 is 01-01-1970 00:00:00. 34 | // As the counter the RTC counter or a software driven counter can be 35 | // used. To access the counter two functions: 36 | // 37 | extern uint32_t GetElapsed(void); 38 | extern uint32_t SetElapsed(uint32_t e); 39 | extern uint32_t RTC_GetCounter(void); 40 | extern uint32_t RTC_SetCounter(uint32_t e); 41 | 42 | // 43 | // ...should be implemented elsewhere IN THE USER CODE. 44 | // 45 | // The simplest implementation looks like: 46 | /* 47 | 48 | volatile uint32_t TimeCounter; 49 | 50 | uint32_t GetElapsed(void) 51 | { 52 | return TimeCounter; 53 | } 54 | 55 | uint32_t SetElapsed(uint32_t e) 56 | { 57 | return TimeCounter = e; 58 | } 59 | 60 | void SomeTimeoutEverySecond(void) 61 | { 62 | IncElapsed(); 63 | } 64 | */ 65 | // 66 | extern uint32_t IncElapsed(void); 67 | extern uint8_t IsLeapYear(uint16_t y); 68 | 69 | extern uint32_t Count2Time(uint32_t c, 70 | uint8_t *h, 71 | uint8_t *m, 72 | uint8_t *s); 73 | 74 | extern uint32_t Count2Date(uint32_t c, 75 | uint16_t *y, 76 | uint8_t *m, // 1..12 77 | uint8_t *d); // 1..31 78 | 79 | extern uint32_t Time2Count(uint8_t h, 80 | uint8_t m, 81 | uint8_t s); 82 | 83 | extern uint32_t Date2Count(uint16_t y, // like 2010 84 | uint8_t m, // 1..12 85 | uint8_t d); // 1..31 86 | 87 | extern uint32_t GetTime(uint8_t *h, 88 | uint8_t *m, 89 | uint8_t *s); 90 | 91 | extern uint32_t GetDate(uint16_t *y, 92 | uint8_t *m, // 1..12 93 | uint8_t *d); // 1..31 94 | 95 | extern uint8_t GetWeekDayU(void); // US: 0=Sun, 6=Sat 96 | extern uint8_t GetWeekDayE(void); // EU: 0=Mo, 6=So 97 | 98 | extern const char* GetWeekDayString_US(uint8_t wd); // string like "Su"... 99 | extern const char* GetWeekDayString_DE(uint8_t wd); // string like "Mo"... 100 | /* see also macros 101 | #define GetWeekDay() 102 | #define GetWeekDayString(a) 103 | */ 104 | extern void SetTime(uint8_t h, // 0..23 105 | uint8_t m, // 0..59 106 | uint8_t s); // 0..59 107 | extern void SetDate(uint16_t y, // like 2010 108 | uint8_t m, // 1..12 109 | uint8_t d); // 1..31 110 | //------------------------------------------------------------------------------ 111 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/at26df.h: -------------------------------------------------------------------------------- 1 | #ifndef __AT26DF_H 2 | #define __AT26DF_H 3 | 4 | // prototypes 5 | //high Layer 6 | void sFLASH_DeInit(void); 7 | void sFLASH_Init(void); 8 | void sFLASH_EraseSector(unsigned int SectorAddr); 9 | void sFLASH_EraseBlock4k(unsigned int SectorAddr); 10 | void sFLASH_EraseBlock32k(unsigned int SectorAddr); 11 | void sFLASH_EraseBulk(void); 12 | void sFLASH_WritePage(unsigned char * pBuffer, unsigned int WriteAddr, unsigned int NumByteToWrite); 13 | void sFLASH_WriteBuffer(unsigned char * pBuffer, unsigned int WriteAddr, unsigned int NumByteToWrite); 14 | void sFLASH_ReadBuffer(unsigned char * pBuffer, unsigned int ReadAddr, unsigned int NumByteToRead); 15 | unsigned int sFLASH_ReadID(void); 16 | unsigned int sFLASH_ReadStatus(void); 17 | void sFLASH_StartReadSequence(unsigned int ReadAddr); 18 | // low Layer 19 | unsigned char sFLASH_ReadByte(void); 20 | unsigned char sFLASH_SendByte(unsigned char byte); 21 | unsigned short sFLASH_SendHalfWord(unsigned short HalfWord); 22 | void sFLASH_WriteEnable(void); 23 | void sFLASH_WaitForWriteEnd(void); 24 | void sFLASH_GlobalUnprotect(void); 25 | 26 | 27 | #define sFLASH_CS_LOW() GPIO_ResetBits(sFLASH_CS_GPIO_PORT, sFLASH_CS_PIN) 28 | #define sFLASH_CS_HIGH() GPIO_SetBits(sFLASH_CS_GPIO_PORT, sFLASH_CS_PIN) 29 | 30 | 31 | #define sFLASH_CMD_WRITE 0x02 /*!< Write to Memory instruction */ 32 | #define sFLASH_CMD_WRSR 0x01 /*!< Write Status Register instruction */ 33 | #define sFLASH_CMD_WREN 0x06 /*!< Write enable instruction */ 34 | #define sFLASH_CMD_READ 0x03 /*!< Read from Memory instruction */ 35 | #define sFLASH_CMD_RDSR 0x05 /*!< Read Status Register instruction */ 36 | #define sFLASH_CMD_RDID 0x9F /*!< Read identification */ 37 | #define sFLASH_CMD_SE 0xD8 /*!< Sector Erase instruction */ 38 | #define sFLASH_CMD_BE 0xC7 /*!< Bulk Erase instruction */ 39 | #define sFLASH_CMD_4K_ERASE 0x20 /*!< Bulk Erase instruction */ 40 | #define sFLASH_CMD_32K_ERASE 0x52 /*!< Bulk Erase instruction */ 41 | 42 | #define sFLASH_WIP_FLAG 0x01 /*!< Write In Progress (WIP) flag */ 43 | 44 | #define sFLASH_DUMMY_BYTE 0xA5 45 | #define sFLASH_SPI_PAGESIZE 0x100 46 | 47 | #define sFLASH_M25P128_ID 0x202018 48 | #define sFLASH_M25P64_ID 0x202017 49 | 50 | 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/button.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/inc/button.h -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/crcm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/inc/crcm.h -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/dem240320h_hx8347.h: -------------------------------------------------------------------------------- 1 | #ifndef DEM240320H_HX8347_H 2 | #define DEM240320H_HX8347_H 3 | 4 | #define RED_16 0xFC00 5 | #define GREEN_16 0x03F0 6 | #define BLUE_16 0x000F 7 | #define BLACK_16 0x0000 8 | #define WHITE_16 0xFFFF 9 | #define GRAY_16 0x8208 10 | #define YELLOW_16 0xFFF0 11 | #define ORANGE_16 0xFD10 12 | #define LIME_16 0x7FF0 13 | 14 | 15 | typedef struct 16 | { 17 | unsigned clRed : 6; 18 | unsigned clGreen : 6; 19 | unsigned clBlue : 4; 20 | } RGB16; 21 | 22 | typedef struct 23 | { 24 | unsigned clRed : 6; 25 | unsigned clGreen : 6; 26 | unsigned clBlue : 6; 27 | } RGB32; 28 | 29 | 30 | extern void lcdInit(void); 31 | 32 | 33 | 34 | #endif 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/hx8347.h: -------------------------------------------------------------------------------- 1 | #ifndef HX8347_H 2 | #define HX8347_H 3 | 4 | 5 | 6 | 7 | typedef struct 8 | { 9 | __IO uint16_t LCD_REG; 10 | __IO uint16_t LCD_RAM; 11 | } GL_LCD_TypeDef; 12 | 13 | #define LCD_BASE ((uint32_t)(0x60000000 | 0x0001fffe)) 14 | 15 | #define GL_LCD ((GL_LCD_TypeDef *) GL_LCD_BASE) 16 | #define RCC_AHBPeriph_FSMC ((uint32_t)0x00000100) 17 | 18 | 19 | 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/i2c_eeprom.h: -------------------------------------------------------------------------------- 1 | #ifndef _I2C_EEPROM_H_ 2 | #define _I2C_EEPROM_H_ 3 | 4 | 5 | #define sEE_WRITE_ADDRESS1 0x50 6 | #define sEE_READ_ADDRESS1 0x50 7 | 8 | #define sEE_I2C I2C1 9 | #define sEE_I2C_CLK RCC_APB1Periph_I2C1 10 | #define sEE_I2C_SCL_PIN GPIO_Pin_6 11 | #define sEE_I2C_SCL_GPIO_PORT GPIOB 12 | #define sEE_I2C_SCL_GPIO_CLK RCC_APB2Periph_GPIOB 13 | #define sEE_I2C_SDA_PIN GPIO_Pin_7 14 | #define sEE_I2C_SDA_GPIO_PORT GPIOB 15 | #define sEE_I2C_SDA_GPIO_CLK RCC_APB2Periph_GPIOB 16 | #define sEE_AT24C02 17 | 18 | //#define sEE_I2C_DMA DMA1 19 | //#define sEE_I2C_DMA_CHANNEL_TX DMA1_Channel4 20 | //#define sEE_I2C_DMA_CHANNEL_RX DMA1_Channel5 21 | //#define sEE_I2C_DMA_FLAG_TX_TC DMA1_IT_TC4 22 | //#define sEE_I2C_DMA_FLAG_TX_GL DMA1_IT_GL4 23 | //#define sEE_I2C_DMA_FLAG_RX_TC DMA1_IT_TC5 24 | //#define sEE_I2C_DMA_FLAG_RX_GL DMA1_IT_GL5 25 | //#define sEE_I2C_DMA_CLK RCC_AHBPeriph_DMA1 26 | //#define sEE_I2C_DR_Address ((uint32_t)0x40005810) 27 | //#define sEE_USE_DMA 28 | 29 | #define sEE_I2C_DMA_TX_IRQn DMA1_Channel4_IRQn 30 | #define sEE_I2C_DMA_RX_IRQn DMA1_Channel5_IRQn 31 | #define sEE_I2C_DMA_TX_IRQHandler DMA1_Channel4_IRQHandler 32 | #define sEE_I2C_DMA_RX_IRQHandler DMA1_Channel5_IRQHandler 33 | #define sEE_I2C_DMA_PREPRIO 0 34 | #define sEE_I2C_DMA_SUBPRIO 0 35 | 36 | #define I2C_SLAVE_ADDRESS7 0xA0 37 | #define sEE_DIRECTION_TX 0 38 | #define sEE_DIRECTION_RX 1 39 | 40 | /* Time constant for the delay caclulation allowing to have a millisecond 41 | incrementing counter. This value should be equal to (System Clock / 1000). 42 | ie. if system clock = 24MHz then sEE_TIME_CONST should be 24. */ 43 | #define sEE_TIME_CONST 24 44 | 45 | 46 | 47 | // sEE_Init(); 48 | // sEE_WriteBuffer(Tx1_Buffer, sEE_WRITE_ADDRESS1, BUFFER_SIZE1); 49 | // sEE_ReadBuffer(Rx1_Buffer, sEE_READ_ADDRESS1, (uint16_t *)(&NumDataRead)); 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/tn_task_usart.h: -------------------------------------------------------------------------------- 1 | #ifndef TN_TASK_USART_H 2 | #define TN_TASK_USART_H 3 | 4 | extern void task_uart_func(void * par); 5 | extern void uart_task_create(void); 6 | 7 | 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/inc/uartdrv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/inc/uartdrv.h -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/ADS7843_spi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/src/ADS7843_spi.c -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/button.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/src/button.c -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/crcm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/src/crcm.c -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/hx8347.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | 4 | typedef struct 5 | { 6 | __IO uint16_t LCD_REG; 7 | __IO uint16_t LCD_RAM; 8 | } GL_LCD_TypeDef; 9 | 10 | 11 | 12 | //***************************************************************************** 13 | // 14 | //***************************************************************************** 15 | void hx8347_Init(void) 16 | { 17 | volatile uint32_t lcdid = 0; 18 | volatile uint16_t clrColor, red, green, blue, regValue; 19 | 20 | regValue = 0xE8; 21 | LCD_CtrlLinesConfig(); 22 | LCD_FSMCConfig(); 23 | 24 | Set_Rst(); 25 | delay_ms(10); 26 | Clr_Rst(); 27 | delay_ms(10); 28 | Set_Rst(); 29 | delay_ms(250); 30 | 31 | } -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/i2c_eeprom.c: -------------------------------------------------------------------------------- 1 | #include "stm32f2xx_conf.h" 2 | #include "types.h" 3 | #include "i2c_eeprom.h" 4 | 5 | 6 | void sEE_LowLevel_Init(void) 7 | { 8 | GPIO_InitTypeDef GPIO_InitStructure; 9 | // NVIC_InitTypeDef NVIC_InitStructure; 10 | 11 | /*!< sEE_I2C_SCL_GPIO_CLK and sEE_I2C_SDA_GPIO_CLK Periph clock enable */ 12 | // RCC_APB2PeriphClockCmd(sEE_I2C_SCL_GPIO_CLK | sEE_I2C_SDA_GPIO_CLK, ENABLE); 13 | 14 | /*!< sEE_I2C Periph clock enable */ 15 | RCC_APB1PeriphClockCmd(sEE_I2C_CLK, ENABLE); 16 | 17 | /*!< GPIO configuration */ 18 | /*!< Configure sEE_I2C pins: SCL */ 19 | GPIO_InitStructure.GPIO_Pin = sEE_I2C_SCL_PIN; 20 | GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 21 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 22 | GPIO_Init(sEE_I2C_SCL_GPIO_PORT, &GPIO_InitStructure); 23 | 24 | /*!< Configure sEE_I2C pins: SDA */ 25 | GPIO_InitStructure.GPIO_Pin = sEE_I2C_SDA_PIN; 26 | GPIO_Init(sEE_I2C_SDA_GPIO_PORT, &GPIO_InitStructure); 27 | 28 | 29 | 30 | // /* Configure and enable I2C DMA TX Channel interrupt */ 31 | // NVIC_InitStructure.NVIC_IRQChannel = sEE_I2C_DMA_TX_IRQn; 32 | // NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = sEE_I2C_DMA_PREPRIO; 33 | // NVIC_InitStructure.NVIC_IRQChannelSubPriority = sEE_I2C_DMA_SUBPRIO; 34 | // NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 35 | // NVIC_Init(&NVIC_InitStructure); 36 | // 37 | // /* Configure and enable I2C DMA RX Channel interrupt */ 38 | // NVIC_InitStructure.NVIC_IRQChannel = sEE_I2C_DMA_RX_IRQn; 39 | // NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = sEE_I2C_DMA_PREPRIO; 40 | // NVIC_InitStructure.NVIC_IRQChannelSubPriority = sEE_I2C_DMA_SUBPRIO; 41 | // NVIC_Init(&NVIC_InitStructure); 42 | 43 | // /*!< I2C DMA TX and RX channels configuration */ 44 | // /* Enable the DMA clock */ 45 | // RCC_AHBPeriphClockCmd(sEE_I2C_DMA_CLK, ENABLE); 46 | // 47 | // /* I2C TX DMA Channel configuration */ 48 | // DMA_DeInit(sEE_I2C_DMA_CHANNEL_TX); 49 | // sEEDMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)sEE_I2C_DR_Address; 50 | // sEEDMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)0; /* This parameter will be configured durig communication */ 51 | // sEEDMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralDST; /* This parameter will be configured durig communication */ 52 | // sEEDMA_InitStructure.DMA_BufferSize = 0xFFFF; /* This parameter will be configured durig communication */ 53 | // sEEDMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; 54 | // sEEDMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; 55 | // sEEDMA_InitStructure.DMA_PeripheralDataSize = DMA_MemoryDataSize_Byte; 56 | // sEEDMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte; 57 | // sEEDMA_InitStructure.DMA_Mode = DMA_Mode_Normal; 58 | // sEEDMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh; 59 | // sEEDMA_InitStructure.DMA_M2M = DMA_M2M_Disable; 60 | // DMA_Init(sEE_I2C_DMA_CHANNEL_TX, &sEEDMA_InitStructure); 61 | // 62 | // /* I2C RX DMA Channel configuration */ 63 | // DMA_DeInit(sEE_I2C_DMA_CHANNEL_RX); 64 | // DMA_Init(sEE_I2C_DMA_CHANNEL_RX, &sEEDMA_InitStructure); 65 | // 66 | // /* Enable the DMA Channels Interrupts */ 67 | // DMA_ITConfig(sEE_I2C_DMA_CHANNEL_TX, DMA_IT_TC, ENABLE); 68 | // DMA_ITConfig(sEE_I2C_DMA_CHANNEL_RX, DMA_IT_TC, ENABLE); 69 | } 70 | 71 | 72 | void sEE_Init(void) 73 | { 74 | I2C_InitTypeDef I2C_InitStructure; 75 | 76 | sEE_LowLevel_Init(); 77 | 78 | /*!< I2C configuration */ 79 | /* sEE_I2C configuration */ 80 | I2C_InitStructure.I2C_Mode = I2C_Mode_I2C; 81 | I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2; 82 | I2C_InitStructure.I2C_OwnAddress1 = I2C_SLAVE_ADDRESS7; 83 | I2C_InitStructure.I2C_Ack = I2C_Ack_Enable; 84 | I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; 85 | I2C_InitStructure.I2C_ClockSpeed = 400000; 86 | 87 | /* sEE_I2C Peripheral Enable */ 88 | I2C_Cmd(sEE_I2C, ENABLE); 89 | /* Apply sEE_I2C configuration after enabling it */ 90 | I2C_Init(sEE_I2C, &I2C_InitStructure); 91 | 92 | 93 | 94 | // /* Enable the sEE_I2C peripheral DMA requests */ 95 | // I2C_DMACmd(sEE_I2C, ENABLE); 96 | // 97 | // #if defined (sEE_M24C64_32) 98 | // /*!< Select the EEPROM address according to the state of E0, E1, E2 pins */ 99 | // sEEAddress = sEE_HW_ADDRESS; 100 | // #elif defined (sEE_M24C08) 101 | // /*!< depending on the sEE Address selected in the i2c_ee.h file */ 102 | // #ifdef sEE_Block0_ADDRESS 103 | // /*!< Select the sEE Block0 to write on */ 104 | // sEEAddress = sEE_Block0_ADDRESS; 105 | // #endif 106 | // 107 | // #ifdef sEE_Block1_ADDRESS 108 | // /*!< Select the sEE Block1 to write on */ 109 | // sEEAddress = sEE_Block1_ADDRESS; 110 | // #endif 111 | // 112 | // #ifdef sEE_Block2_ADDRESS 113 | // /*!< Select the sEE Block2 to write on */ 114 | // sEEAddress = sEE_Block2_ADDRESS; 115 | // #endif 116 | // 117 | // #ifdef sEE_Block3_ADDRESS 118 | // /*!< Select the sEE Block3 to write on */ 119 | // sEEAddress = sEE_Block3_ADDRESS; 120 | // #endif 121 | // #endif /*!< sEE_M24C64_32 */ 122 | } 123 | -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/tn_task_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/src/tn_task_usart.c -------------------------------------------------------------------------------- /example/keil/bspStdLib/src/uartdrv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/bspStdLib/src/uartdrv.c -------------------------------------------------------------------------------- /example/keil/scvn.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x08000000 0x00100000 { ; load region size_region 6 | ER_IROM1 0x08000000 0x00100000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | } 11 | RW_IRAM1 0x20000000 0x00020000 { ; RW data 12 | .ANY (+RW +ZI) 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /example/keil/scvn.tra: -------------------------------------------------------------------------------- 1 | *** Creating Trace Output File 'scvn.tra' Ok. 2 | ### Preparing for ADS-LD. 3 | ### Creating ADS-LD Command Line 4 | ### List of Objects: adding '"tn.o"' 5 | ### List of Objects: adding '"tn_dqueue.o"' 6 | ### List of Objects: adding '"tn_event.o"' 7 | ### List of Objects: adding '"tn_mem.o"' 8 | ### List of Objects: adding '"tn_mutex.o"' 9 | ### List of Objects: adding '"tn_sem.o"' 10 | ### List of Objects: adding '"tn_tasks.o"' 11 | ### List of Objects: adding '"tn_utils.o"' 12 | ### List of Objects: adding '"tn_port_cm3.o"' 13 | ### List of Objects: adding '"tn_port_cm3_armcc.o"' 14 | ### List of Objects: adding '"misc.o"' 15 | ### List of Objects: adding '"stm32f2xx_dma.o"' 16 | ### List of Objects: adding '"stm32f2xx_flash.o"' 17 | ### List of Objects: adding '"stm32f2xx_fsmc.o"' 18 | ### List of Objects: adding '"stm32f2xx_gpio.o"' 19 | ### List of Objects: adding '"stm32f2xx_iwdg.o"' 20 | ### List of Objects: adding '"stm32f2xx_rcc.o"' 21 | ### List of Objects: adding '"stm32f2xx_syscfg.o"' 22 | ### List of Objects: adding '"stm32f2xx_tim.o"' 23 | ### List of Objects: adding '"stm32f2xx_usart.o"' 24 | ### List of Objects: adding '"stm32f2xx_rtc.o"' 25 | ### List of Objects: adding '"stm32f2xx_adc.o"' 26 | ### List of Objects: adding '"stm32f2xx_dac.o"' 27 | ### List of Objects: adding '"stm32f2xx_dbgmcu.o"' 28 | ### List of Objects: adding '"stm32f2xx_i2c.o"' 29 | ### List of Objects: adding '"stm32f2xx_pwr.o"' 30 | ### List of Objects: adding '"stm32f2xx_spi.o"' 31 | ### List of Objects: adding '"core_cm3.o"' 32 | ### List of Objects: adding '"system_stm32f2xx.o"' 33 | ### List of Objects: adding '"startup_stm32f2xx.o"' 34 | ### List of Objects: adding '"mkdriver.o"' 35 | ### List of Objects: adding '"lcdhal_universal.o"' 36 | ### List of Objects: adding '"lcdhal_ili9320.o"' 37 | ### List of Objects: adding '"lcdhal_hx8347a.o"' 38 | ### List of Objects: adding '"ee_emul.o"' 39 | ### List of Objects: adding '"ads7843.o"' 40 | ### List of Objects: adding '"guicolor.o"' 41 | ### List of Objects: adding '"guifonts.o"' 42 | ### List of Objects: adding '"guiprimitives.o"' 43 | ### List of Objects: adding '"guitext.o"' 44 | ### List of Objects: adding '"widget.o"' 45 | ### List of Objects: adding '"aftime.o"' 46 | ### List of Objects: adding '"guichart.o"' 47 | ### List of Objects: adding '"guicheckbox.o"' 48 | ### List of Objects: adding '"guilabel.o"' 49 | ### List of Objects: adding '"guiradiogroup.o"' 50 | ### List of Objects: adding '"guitextbutton.o"' 51 | ### List of Objects: adding '"guitouchcalibration.o"' 52 | ### List of Objects: adding '"guiupdownbox.o"' 53 | ### List of Objects: adding '"beeper.o"' 54 | ### List of Objects: adding '"startup_hardware_init.o"' 55 | ### List of Objects: adding '"main.o"' 56 | ### List of Objects: adding '"tn_user.o"' 57 | ### List of Objects: adding '"crcm.o"' 58 | ### List of Objects: adding '"button.o"' 59 | ### List of Objects: adding '"at26df.o"' 60 | ### List of Objects: adding '"uartdrv.o"' 61 | ### List of Objects: adding '"tn_task_usart.o"' 62 | ### ADS-LD Command completed: 63 | --cpu Cortex-M3 "tn.o" "tn_dqueue.o" "tn_event.o" "tn_mem.o" "tn_mutex.o" "tn_sem.o" "tn_tasks.o" "tn_utils.o" "tn_port_cm3.o" "tn_port_cm3_armcc.o" "misc.o" "stm32f2xx_dma.o" "stm32f2xx_flash.o" "stm32f2xx_fsmc.o" "stm32f2xx_gpio.o" "stm32f2xx_iwdg.o" "stm32f2xx_rcc.o" "stm32f2xx_syscfg.o" "stm32f2xx_tim.o" "stm32f2xx_usart.o" "stm32f2xx_rtc.o" "stm32f2xx_adc.o" "stm32f2xx_dac.o" "stm32f2xx_dbgmcu.o" "stm32f2xx_i2c.o" "stm32f2xx_pwr.o" "stm32f2xx_spi.o" "core_cm3.o" "system_stm32f2xx.o" "startup_stm32f2xx.o" "mkdriver.o" "lcdhal_universal.o" "lcdhal_ili9320.o" "lcdhal_hx8347a.o" "ee_emul.o" "ads7843.o" "guicolor.o" "guifonts.o" "guiprimitives.o" "guitext.o" "widget.o" "aftime.o" "guichart.o" "guicheckbox.o" "guilabel.o" "guiradiogroup.o" "guitextbutton.o" "guitouchcalibration.o" "guiupdownbox.o" "beeper.o" "startup_hardware_init.o" "main.o" "tn_user.o" "crcm.o" "button.o" "at26df.o" "uartdrv.o" "tn_task_usart.o" 64 | --strict --scatter "scvn.sct" 65 | --summary_stderr --info summarysizes --map --xref --callgraph --symbols 66 | --info sizes --info totals --info unused --info veneers 67 | --list ".\scvn.map" -o scvn.axf### Preparing Environment (PrepEnvAds) 68 | ### ADS-LD Output File: 'scvn.axf' 69 | ### ADS-LD Command File: 'scvn.lnp' 70 | ### Checking for dirty Components... 71 | ### Creating CmdFile 'scvn.lnp', Handle=0x000022CC 72 | ### Writing '.lnp' file 73 | ### ADS-LD Command file 'scvn.lnp' is ready. 74 | ### ADS-LD: About to start ADS-LD Thread. 75 | ### ADS-LD: executed with 0 errors 76 | ### Updating obj list 77 | ### LDADS_file() completed. 78 | -------------------------------------------------------------------------------- /example/keil/user/globals.h: -------------------------------------------------------------------------------- 1 | #ifndef _GLOBALS_H_ 2 | #define _GLOBALS_H_ 3 | 4 | #include "hw_config.h" 5 | #include "tn.h" 6 | #include "gui.h" 7 | #include "appGUI.h" 8 | 9 | #include "ee_emul.h" 10 | 11 | #define VECTACTIVE (0x000001FF) 12 | #define rNVIC_ICSR (*((__IO unsigned int*)0xE000ED04)) 13 | 14 | 15 | typedef unsigned int volatile SYSTEM_TIMER; 16 | extern SYSTEM_TIMER getSystemTimer1ms(void); 17 | extern SYSTEM_TIMER getSystemTimer1s(void); 18 | extern void setSystemTimer1s(SYSTEM_TIMER timer); 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /example/keil/user/hw_init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/user/hw_init.c -------------------------------------------------------------------------------- /example/keil/user/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | Fursov Andrey, 2013 3 | TNKernel v2.6 by Yury Tyemkin 4 | 5 | 6 | 7 | */ 8 | 9 | /*============================================================================ 10 | 11 | *===========================================================================*/ 12 | #include "globals.h" 13 | 14 | 15 | #include 16 | #include 17 | 18 | #include "tn_task_usart.h" 19 | 20 | 21 | #include "at26df.h" 22 | #include "crcm.h" 23 | #include "uartdrv.h" 24 | 25 | 26 | 27 | 28 | //----------- Tasks ---------------------------------------------------------- 29 | // 0 - max priority, 30 - min priority 30 | //#define TASK_xxx_PRIORITY 11 31 | 32 | // stack size 33 | //#define TASK_xxx_STK_SIZE 32 34 | 35 | //-------- stack ----------------------- 36 | 37 | 38 | 39 | //-------- Semaphores ----------------------- 40 | 41 | //-------- Events ----------------------- 42 | 43 | //------- Queues ---------------------------- 44 | 45 | 46 | //------- Memory pools ---------------------------- 47 | 48 | 49 | //------------ Non OS globals --------------- 50 | 51 | 52 | 53 | //************************************************************ 54 | // LOCAL VARIABLES 55 | 56 | 57 | 58 | //************************************************************ 59 | // LOCAL PROTOTYPES 60 | 61 | 62 | 63 | 64 | //************************************************************ 65 | // MAIN 66 | //************************************************************ 67 | //---------------------------------------------------------------------------- 68 | int main(void) 69 | 70 | { 71 | tn_arm_disable_interrupts(); 72 | 73 | HardwareInit(); 74 | 75 | 76 | tn_start_system(); //-- Never returns 77 | 78 | return 1; 79 | } 80 | 81 | 82 | //---------------------------------------------------------------------------- 83 | void tn_app_init() 84 | { 85 | //--- gui 86 | appGUI_task_create(); 87 | 88 | //--- Task USART 89 | uart_task_create(); 90 | 91 | 92 | } 93 | 94 | -------------------------------------------------------------------------------- /example/keil/user/startup_hardware_init.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/user/startup_hardware_init.s -------------------------------------------------------------------------------- /example/keil/user/stm32f2xx_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file GPIO/IOToggle/stm32f2xx_conf.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 18-April-2011 7 | * @brief Library configuration 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 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef __STM32F2xx_CONF_H 24 | #define __STM32F2xx_CONF_H 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | /* Uncomment the line below to enable peripheral header file inclusion */ 28 | #include "stm32f2xx_adc.h" 29 | //#include "stm32f2xx_can.h" 30 | //#include "stm32f2xx_crc.h" 31 | //#include "stm32f2xx_cryp.h" 32 | #include "stm32f2xx_dac.h" 33 | #include "stm32f2xx_dbgmcu.h" 34 | //#include "stm32f2xx_dcmi.h" 35 | #include "stm32f2xx_dma.h" 36 | //#include "stm32f2xx_exti.h" 37 | #include "stm32f2xx_flash.h" 38 | #include "stm32f2xx_fsmc.h" 39 | //#include "stm32f2xx_hash.h" 40 | #include "stm32f2xx_gpio.h" 41 | #include "stm32f2xx_i2c.h" 42 | #include "stm32f2xx_iwdg.h" 43 | #include "stm32f2xx_pwr.h" 44 | #include "stm32f2xx_rcc.h" 45 | //#include "stm32f2xx_rng.h" 46 | #include "stm32f2xx_rtc.h" 47 | //#include "stm32f2xx_sdio.h" 48 | #include "stm32f2xx_spi.h" 49 | #include "stm32f2xx_syscfg.h" 50 | #include "stm32f2xx_tim.h" 51 | #include "stm32f2xx_usart.h" 52 | //#include "stm32f2xx_wwdg.h" 53 | #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ 54 | 55 | /* Exported types ------------------------------------------------------------*/ 56 | /* Exported constants --------------------------------------------------------*/ 57 | 58 | /* If an external clock source is used, then the value of the following define 59 | should be set to the value of the external clock source, else, if no external 60 | clock is used, keep this define commented */ 61 | /*#define I2S_EXTERNAL_CLOCK_VAL 12288000 */ /* Value of the external clock in Hz */ 62 | 63 | 64 | /* Uncomment the line below to expanse the "assert_param" macro in the 65 | Standard Peripheral Library drivers code */ 66 | /* #define USE_FULL_ASSERT 1 */ 67 | 68 | /* Exported macro ------------------------------------------------------------*/ 69 | #ifdef USE_FULL_ASSERT 70 | 71 | /** 72 | * @brief The assert_param macro is used for function's parameters check. 73 | * @param expr: If expr is false, it calls assert_failed function 74 | * which reports the name of the source file and the source 75 | * line number of the call that failed. 76 | * If expr is true, it returns no value. 77 | * @retval None 78 | */ 79 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 80 | /* Exported functions ------------------------------------------------------- */ 81 | void assert_failed(uint8_t* file, uint32_t line); 82 | #else 83 | #define assert_param(expr) ((void)0) 84 | #endif /* USE_FULL_ASSERT */ 85 | 86 | #endif /* __STM32F2xx_CONF_H */ 87 | 88 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 89 | -------------------------------------------------------------------------------- /example/keil/user/tn_user.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/user/tn_user.c -------------------------------------------------------------------------------- /example/keil/user/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _TYPES_H_ 2 | #define _TYPES_H_ 3 | 4 | #include "HAL_Calender.h" 5 | #include 6 | 7 | #define UART1_RX_BUF_SIZE 512 8 | #define UART1_TX_BUF_SIZE 512 9 | 10 | #define UART2_RX_BUF_SIZE 512 11 | #define UART2_TX_BUF_SIZE 512 12 | 13 | #define UART3_RX_BUF_SIZE 512 14 | #define UART3_TX_BUF_SIZE 512 15 | 16 | //#define UART4_RX_BUF_SIZE 512 17 | //#define UART4_TX_BUF_SIZE 512 18 | 19 | 20 | #define NUM_ADC_SAMPLE 200 21 | #define NUM_DI 18 22 | #define NUM_DO 10 23 | #define NUM_AI 8 24 | 25 | 26 | #define USART1_DR_Base ((unsigned int)0x40011004) 27 | #define USART2_DR_Base ((unsigned int)0x40004404) 28 | #define USART3_DR_Base ((unsigned int)0x40004804) 29 | //#define USART4_DR_Base ((unsigned int)0x40004C04) 30 | 31 | #define UART_UI USART1 32 | #define UART_485 USART2 33 | 34 | #define UART_UI_DMA_TX DMA2_Stream7 35 | #define UART_UI_DMA_RX DMA2_Stream5 36 | 37 | #define UART_485_DMA_TX DMA1_Stream6 38 | #define UART_485_DMA_RX DMA1_Stream5 39 | 40 | #define UART_UI_TX_LEN UART1_TX_BUF_SIZE 41 | #define UART_UI_RX_LEN UART1_RX_BUF_SIZE 42 | #define UART_485_TX_LEN UART2_TX_BUF_SIZE 43 | #define UART_485_RX_LEN UART2_RX_BUF_SIZE 44 | 45 | 46 | #define USART3_TX_DMACH DMA1_Stream3 47 | #define USART3_RX_DMACH DMA1_Stream1 48 | #define USART2_TX_DMACH DMA1_Stream6 49 | #define USART2_RX_DMACH DMA1_Stream5 50 | 51 | #define USART1_TX_DMACH DMA2_Stream7 52 | #define USART1_RX_DMACH DMA2_Stream5 53 | 54 | #define ADC1_DR_Base ((unsigned int)0x4001204C) 55 | 56 | //----------------------------- 57 | 58 | typedef unsigned int volatile SYSTEM_TIMER; 59 | extern SYSTEM_TIMER getSystemTimer1ms(void); 60 | extern SYSTEM_TIMER getSystemTimer1s(void); 61 | extern void setSystemTimer1s(SYSTEM_TIMER timer); 62 | extern unsigned int getAdcResult(void); 63 | extern unsigned int HardwareInit(void); 64 | extern void delay_ms(SYSTEM_TIMER _time); 65 | //--- NVIC 66 | 67 | //#define ISRPENDING (1u<<22) 68 | #define VECTACTIVE (0x000001FF) 69 | #define rNVIC_ICSR (*((__IO unsigned int*)0xE000ED04)) 70 | 71 | 72 | typedef struct 73 | { 74 | SYSTEM_TIMER lastResp; 75 | SYSTEM_TIMER lastRespTnu; 76 | 77 | unsigned resWriteDateTime : 1; 78 | unsigned resReadDateTime : 1; 79 | unsigned resReadTnu : 1; 80 | unsigned resReadCfg : 1; 81 | unsigned resReadCfgUser : 1; 82 | unsigned resWriteCfg : 1; 83 | unsigned resWriteCfgUser : 1; 84 | unsigned resWriteAck : 1; 85 | 86 | unsigned resWriteStart : 1; 87 | unsigned resWriteStop : 1; 88 | 89 | 90 | 91 | 92 | 93 | 94 | } RESPONSE_STATE; 95 | 96 | extern RESPONSE_STATE* getPtrRespState(void); 97 | 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /example/keil/user/utils_uart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/example/keil/user/utils_uart.c -------------------------------------------------------------------------------- /tools/TheDotFactory/AboutForm.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009, Eran "Pavius" Duchan 3 | * This file is part of The Dot Factory. 4 | * 5 | * The Dot Factory is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the Free 7 | * Software Foundation, either version 3 of the License, or (at your option) 8 | * any later version. The Dot Factory is distributed in the hope that it will be 9 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 11 | * details. You should have received a copy of the GNU General Public License along 12 | * with The Dot Factory. If not, see http://www.gnu.org/licenses/. 13 | */ 14 | 15 | using System; 16 | using System.Collections.Generic; 17 | using System.ComponentModel; 18 | using System.Data; 19 | using System.Drawing; 20 | using System.Linq; 21 | using System.Text; 22 | using System.Windows.Forms; 23 | 24 | namespace TheDotFactory 25 | { 26 | public partial class AboutForm : Form 27 | { 28 | public AboutForm() 29 | { 30 | InitializeComponent(); 31 | } 32 | 33 | private void AboutForm_Load(object sender, EventArgs e) 34 | { 35 | // set text 36 | lblAppName.Text = String.Format("The Dot Factory (v.{0})", MainForm.ApplicationVersion); 37 | } 38 | 39 | private void linkIcons_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 40 | { 41 | // open 42 | System.Diagnostics.Process.Start("http://www.famfamfam.com"); 43 | } 44 | 45 | private void linkSite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 46 | { 47 | // open 48 | System.Diagnostics.Process.Start("http://www.pavius.net"); 49 | } 50 | 51 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 52 | { 53 | // open 54 | System.Diagnostics.Process.Start("https://github.com/mru00"); 55 | } 56 | 57 | private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 58 | { 59 | // open 60 | System.Diagnostics.Process.Start("https://github.com/psryland"); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace TheDotFactory 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TheDotFactory")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TheDotFactory")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("62215aba-cb67-43d2-82d9-c84a8803e98f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Этот код создан программой. 4 | // Исполняемая версия:4.0.30319.17929 5 | // 6 | // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае 7 | // повторной генерации кода. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TheDotFactory.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. 17 | /// 18 | // Этот класс создан автоматически классом StronglyTypedResourceBuilder 19 | // с помощью такого средства, как ResGen или Visual Studio. 20 | // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen 21 | // с параметром /str или перестройте свой проект VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheDotFactory.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Перезаписывает свойство CurrentUICulture текущего потока для всех 51 | /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Этот код создан программой. 4 | // Исполняемая версия:4.0.30319.17929 5 | // 6 | // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае 7 | // повторной генерации кода. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TheDotFactory.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("Enter text to generate here")] 29 | public string InputText { 30 | get { 31 | return ((string)(this["InputText"])); 32 | } 33 | set { 34 | this["InputText"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 41 | public int OutputConfigIndex { 42 | get { 43 | return ((int)(this["OutputConfigIndex"])); 44 | } 45 | set { 46 | this["OutputConfigIndex"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("Microsoft Sans Serif, 8.25pt")] 53 | public global::System.Drawing.Font InputFont { 54 | get { 55 | return ((global::System.Drawing.Font)(this["InputFont"])); 56 | } 57 | set { 58 | this["InputFont"] = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Enter text to generate here 7 | 8 | 9 | 0 10 | 11 | 12 | Microsoft Sans Serif, 8.25pt 13 | 14 | 15 | -------------------------------------------------------------------------------- /tools/TheDotFactory/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace TheDotFactory.Properties { 2 | 3 | 4 | // This class allows you to handle specific events on the settings class: 5 | // The SettingChanging event is raised before a setting's value is changed. 6 | // The PropertyChanged event is raised after a setting's value is changed. 7 | // The SettingsLoaded event is raised after the setting values are loaded. 8 | // The SettingsSaving event is raised before the setting values are saved. 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // To add event handlers for saving and changing settings, uncomment the lines below: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // Add code to handle the SettingChangingEvent event here. 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // Add code to handle the SettingsSaving event here. 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tools/TheDotFactory/TheDotFactory.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheDotFactory", "TheDotFactory.csproj", "{03FBC09E-C0BB-4D1D-BFDE-79454C60D78C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {03FBC09E-C0BB-4D1D-BFDE-79454C60D78C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {03FBC09E-C0BB-4D1D-BFDE-79454C60D78C}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {03FBC09E-C0BB-4D1D-BFDE-79454C60D78C}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {03FBC09E-C0BB-4D1D-BFDE-79454C60D78C}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /tools/TheDotFactory/TheDotFactory.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/TheDotFactory.v11.suo -------------------------------------------------------------------------------- /tools/TheDotFactory/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | Enter text to generate here 12 | 13 | 14 | 0 15 | 16 | 17 | Microsoft Sans Serif, 8.25pt 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/OutputConfigs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | false 6 | true 7 | C 8 | # 9 | RotateZero 10 | false 11 | false 12 | Fixed 13 | Fixed 14 | AtBitmap 15 | ColumnMajor 16 | MsbFirst 17 | Hex 18 | 0x 19 | false 20 | DisplayInBits 21 | DisplayInBits 22 | DisplayInBits 23 | false 24 | 80 25 | DisplayInBytes 26 | DisplayInBits 27 | false 28 | 2 29 | const uint_8 {0}Bitmaps 30 | const FONT_CHAR_INFO {0}Descriptors 31 | const FONT_INFO {0}FontInfo 32 | const uint_8 {0}Width 33 | const uint_8 {0}Height 34 | momo8 35 | 36 | -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/bin/Debug/TheDotFactory.exe -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | Enter text to generate here 12 | 13 | 14 | 0 15 | 16 | 17 | Microsoft Sans Serif, 8.25pt 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/bin/Debug/TheDotFactory.pdb -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/bin/Debug/TheDotFactory.vshost.exe -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | Enter text to generate here 12 | 13 | 14 | 0 15 | 16 | 17 | Microsoft Sans Serif, 8.25pt 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/TheDotFactory.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tools/TheDotFactory/bin/Debug/Настройки AFGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/bin/Debug/Настройки AFGUI.png -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.AboutForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.AboutForm.resources -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.InputBoxDialog.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.InputBoxDialog.resources -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.MainForm.resources -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.OutputConfigurationForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.OutputConfigurationForm.resources -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.Properties.Resources.resources -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\bin\Debug\TheDotFactory.exe.config 2 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\bin\Debug\TheDotFactory.exe 3 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\bin\Debug\TheDotFactory.pdb 4 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.csprojResolveAssemblyReference.cache 5 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.AboutForm.resources 6 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.InputBoxDialog.resources 7 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.MainForm.resources 8 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.OutputConfigurationForm.resources 9 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.Properties.Resources.resources 10 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.csproj.GenerateResource.Cache 11 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.exe 12 | D:\DOWNLOAD\Font Converter\The-Dot-Factory-master\The-Dot-Factory-master\TheDotFactory\obj\Debug\TheDotFactory.pdb 13 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\TheDotFactory\bin\Debug\TheDotFactory.exe.config 14 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\TheDotFactory\obj\Debug\TheDotFactory.exe 15 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\TheDotFactory\obj\Debug\TheDotFactory.pdb 16 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\bin\Debug\TheDotFactory.exe.config 17 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.exe 18 | C:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.pdb 19 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\bin\Debug\TheDotFactory.exe.config 20 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.exe 21 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.pdb 22 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\bin\Debug\TheDotFactory.exe 23 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\bin\Debug\TheDotFactory.pdb 24 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.csprojResolveAssemblyReference.cache 25 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.AboutForm.resources 26 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.InputBoxDialog.resources 27 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.MainForm.resources 28 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.OutputConfigurationForm.resources 29 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.Properties.Resources.resources 30 | E:\work\eclipse\AFGUI\AFGUI\tools\TheDotFactory\obj\Debug\TheDotFactory.csproj.GenerateResource.Cache 31 | -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.exe -------------------------------------------------------------------------------- /tools/TheDotFactory/obj/Debug/TheDotFactory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/tools/TheDotFactory/obj/Debug/TheDotFactory.pdb -------------------------------------------------------------------------------- /utils/inc/afTime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * afTime.h 3 | * 4 | * Created on: 23.02.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef AFTIME_H_ 9 | #define AFTIME_H_ 10 | 11 | typedef struct 12 | { 13 | uint8_t Day ; 14 | uint8_t Month ; 15 | uint16_t Year ; 16 | 17 | uint8_t WeekDay ; 18 | 19 | uint8_t Hour ; 20 | uint8_t Minute ; 21 | uint8_t Second ; 22 | 23 | } DATETIME; 24 | 25 | extern void UnixTimeToDateTime(uint32_t utime, DATETIME *DateTime); 26 | extern uint32_t DateTimeToUnixTime(DATETIME *DateTime); 27 | extern void SetDayOfWeek(DATETIME *DateTime); 28 | extern uint16_t DateTimeToString(DATETIME *DateTime, char *str, uint16_t len); 29 | #endif /* AFTIME_H_ */ 30 | -------------------------------------------------------------------------------- /utils/src/afTime.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/utils/src/afTime.c -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/version.txt -------------------------------------------------------------------------------- /wigets/inc/guiChart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiChart.h 3 | * 4 | * Created on: 02.01.2013 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUICHART_H_ 9 | #define GUICHART_H_ 10 | 11 | #include "gui.h" 12 | 13 | typedef struct 14 | { 15 | 16 | WM_OBJ wmObj; 17 | WM_TEXT wmTxt; 18 | WM_TOUCH wmTouch; 19 | 20 | uint8_t table[320]; 21 | int16_t numPoint; 22 | uint16_t xGridSpace; 23 | uint16_t yGridSpace; 24 | 25 | uint16_t LineColor; 26 | 27 | unsigned Dot_nLine : 1; // Dot/Line 28 | 29 | 30 | } GUI_CHART; 31 | 32 | extern void defaultChartInit(GUI_CHART * chart, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 33 | extern void chartSetData(GUI_CHART * chart, int16_t * data, uint16_t numData); 34 | extern void guiChartDraw(GUI_CHART * chart); 35 | extern void guiChartRefresh(GUI_CHART * chart, uint16_t _color); 36 | 37 | 38 | #endif /* GUICHART_H_ */ 39 | -------------------------------------------------------------------------------- /wigets/inc/guiCheckBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiCheckButton.h 3 | * 4 | * Created on: 19.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUICHECKBOX_H_ 9 | #define GUICHECKBOX_H_ 10 | 11 | #include "gui.h" 12 | 13 | typedef struct 14 | { 15 | WM_OBJ wmObj; 16 | WM_TEXT wmTxt; 17 | WM_TOUCH wmTouch; 18 | unsigned Checked : 1; 19 | unsigned Docked : 1; 20 | 21 | 22 | 23 | } GUI_CHECK_BOX; 24 | 25 | extern void defaultCheckInit(GUI_CHECK_BOX * checkBox, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 26 | extern void CheckBoxTextInit(GUI_CHECK_BOX * checkBox, char *text, V_FONT * vFont, uint8_t rot, uint8_t flip, uint8_t align_h, uint8_t align_v); 27 | extern void CheckBoxDraw(GUI_CHECK_BOX * checkBox); 28 | extern void CheckBoxTouchControl(GUI_CHECK_BOX * checkBox, int16_t xTouch, int16_t yTouch); 29 | extern void CheckBoxStateRefresh(GUI_CHECK_BOX * checkBox); 30 | 31 | #endif /* GUICHECKBOX_H_ */ 32 | -------------------------------------------------------------------------------- /wigets/inc/guiEditBox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/wigets/inc/guiEditBox.h -------------------------------------------------------------------------------- /wigets/inc/guiKeyBoard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/wigets/inc/guiKeyBoard.h -------------------------------------------------------------------------------- /wigets/inc/guiLabel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiLabel.h 3 | * 4 | * Created on: 21.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUILABEL_H_ 9 | #define GUILABEL_H_ 10 | 11 | #include "gui.h" 12 | 13 | typedef struct 14 | { 15 | 16 | WM_OBJ wmObj; 17 | WM_TEXT wmTxt; 18 | 19 | } GUI_LABEL; 20 | 21 | extern void labelInit(GUI_LABEL * label, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 22 | extern void defaultLabelInit(GUI_LABEL * label, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t * text); 23 | extern void guiLabelDraw(GUI_LABEL * label); 24 | 25 | 26 | #endif /* GUILABEL_H_ */ 27 | -------------------------------------------------------------------------------- /wigets/inc/guiRadioGroup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiRadioGroup.h 3 | * 4 | * Created on: 24.03.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef GUIRADIOGROUP_H_ 9 | #define GUIRADIOGROUP_H_ 10 | 11 | typedef struct 12 | { 13 | WM_OBJ wmObj; 14 | WM_TEXT wmTxt; 15 | WM_TOUCH wmTouch; 16 | } GUI_RADIO_GROUP_ITEM; 17 | 18 | 19 | typedef struct 20 | { 21 | WM_OBJ wmObj; 22 | WM_TEXT wmTxt; 23 | GUI_RADIO_GROUP_ITEM Item[8]; 24 | uint8_t NumItem; 25 | uint8_t ItemSelected; 26 | 27 | } GUI_RADIO_GROUP; 28 | 29 | 30 | extern void defaultRadioGroupInit(GUI_RADIO_GROUP * radioGroup, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 31 | extern void defaultRadioGroupItemInit(GUI_RADIO_GROUP * radioGroup, uint8_t numItem, uint8_t itemSelected); 32 | extern void RadioGroupTextInit(GUI_RADIO_GROUP * radioGroup, char *text, V_FONT * vFont); 33 | 34 | extern void RadioGroupItemInit(GUI_RADIO_GROUP * radioGroup, char *text, V_FONT * vFont, uint8_t index); 35 | 36 | extern void RadioGroupDraw(GUI_RADIO_GROUP * radioGroup); 37 | extern void RadioGroupTouchControl(GUI_RADIO_GROUP * radioGroup, int16_t xTouch, int16_t yTouch); 38 | extern void RadioGroupStateRefresh(GUI_RADIO_GROUP * radioGroup); 39 | 40 | 41 | 42 | #endif /* GUIRADIOGROUP_H_ */ 43 | -------------------------------------------------------------------------------- /wigets/inc/guiTerminalBlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiTerminalBlock.h 3 | * 4 | * Created on: 15.06.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef GUITERMINALBLOCK_H_ 9 | #define GUITERMINALBLOCK_H_ 10 | 11 | typedef struct 12 | { 13 | WM_OBJ wmObj; 14 | uint16_t qSymb; 15 | uint16_t qString; 16 | uint16_t countString; 17 | uint16_t startString; 18 | V_FONT * vFont; 19 | uint16_t TextColor; 20 | char ** strings; 21 | } GUI_TERMINAL_BLOCK; 22 | 23 | extern void defaultTerminalBlockInit(GUI_TERMINAL_BLOCK * tBlock, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 24 | extern void TerminalBlockOnPait(GUI_TERMINAL_BLOCK * tBlock); 25 | extern void TerminalBlockStringDraw(GUI_TERMINAL_BLOCK * tBlock); 26 | extern void TerminalBlockClear(GUI_TERMINAL_BLOCK * tBlock); 27 | extern void TerminalBlockAddStrings(GUI_TERMINAL_BLOCK * tBlock, char * str, uint16_t len); 28 | 29 | 30 | #endif /* GUITERMINALBLOCK_H_ */ 31 | -------------------------------------------------------------------------------- /wigets/inc/guiTextButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiTextButton.h 3 | * 4 | * Created on: 17.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #ifndef GUITEXTBUTTON_H_ 9 | #define GUITEXTBUTTON_H_ 10 | 11 | #include "gui.h" 12 | 13 | typedef struct 14 | { 15 | 16 | WM_OBJ wmObj; 17 | WM_TEXT wmTxt; 18 | WM_TOUCH wmTouch; 19 | void (*fOnTouch)(); 20 | void (*fOnUntouch)(); 21 | } TEXT_BUTTON; 22 | 23 | typedef struct 24 | { 25 | int ID; 26 | TEXT_BUTTON btn; 27 | char symCode; 28 | } STEXT_BUTTON; 29 | 30 | extern void defaultTextButtonInit(TEXT_BUTTON * button, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 31 | extern void ButtonTextInit(TEXT_BUTTON * button, char *text, V_FONT * vFont, uint8_t rot, uint8_t flip, uint8_t align_h, uint8_t align_v); 32 | extern void TextButtonDraw(TEXT_BUTTON * button); 33 | extern void TextButtonStateRefresh(TEXT_BUTTON * button); 34 | extern void TextButtonTouchControl(TEXT_BUTTON * button, int16_t xTouch, int16_t yTouch); 35 | 36 | extern int STextButtonTouchControl(STEXT_BUTTON * sBtn, int16_t xTouch, int16_t yTouch); 37 | 38 | #endif /* GUITEXTBUTTON_H_ */ 39 | -------------------------------------------------------------------------------- /wigets/inc/guiTouchCalibration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiTouchCalibration.h 3 | * 4 | * Created on: 23.04.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef GUITOUCHCALIBRATION_H_ 9 | #define GUITOUCHCALIBRATION_H_ 10 | 11 | extern uint16_t touchCalibration(void); 12 | extern void touchSaveCoef(int16_t _ax, int16_t _bx, int16_t _ay, int16_t _by); 13 | extern void touchLoadCoef(void); 14 | 15 | #endif /* GUITOUCHCALIBRATION_H_ */ 16 | -------------------------------------------------------------------------------- /wigets/inc/guiUpDownBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * guiUpDownBox.h 3 | * 4 | * Created on: 22.03.2013 5 | * Author: Andrey Fursov 6 | */ 7 | 8 | #ifndef GUIUPDOWNBOX_H_ 9 | #define GUIUPDOWNBOX_H_ 10 | 11 | #include "gui.h" 12 | 13 | typedef struct 14 | { 15 | WM_OBJ wmObj; 16 | TEXT_BUTTON btnUp; 17 | TEXT_BUTTON btnDown; 18 | GUI_LABEL wmLblHead; 19 | GUI_LABEL wmLblEdit; 20 | 21 | char strValue[16]; 22 | 23 | int32_t Value; 24 | int32_t ValueMax; 25 | int32_t ValueMin; 26 | int32_t ValueInc; 27 | int32_t ValueFastInc; 28 | uint8_t Format; 29 | unsigned CycleUpDown : 1; 30 | } GUI_UPDOWN_BOX; 31 | 32 | extern void defaultUpDownBoxInit(GUI_UPDOWN_BOX * udBox, uint16_t x, uint16_t y, uint16_t width, uint16_t height); 33 | extern void UpDownBoxLblTextInit(GUI_UPDOWN_BOX * udBox, char *text, V_FONT * vFont, uint8_t rot, uint8_t flip, uint8_t align_h, uint8_t align_v); 34 | extern void UpDownBoxEditTextInit(GUI_UPDOWN_BOX * udBox, char *text, V_FONT * vFont, uint8_t rot, uint8_t flip, uint8_t align_h, uint8_t align_v); 35 | extern void UpDownBoxTextPosInit(GUI_UPDOWN_BOX * udBox); 36 | extern void UpDownBoxSetValue(GUI_UPDOWN_BOX * udBox, int32_t curValue, int32_t maxValue, int32_t minValue); 37 | extern void UpDownBoxDraw(GUI_UPDOWN_BOX * udBox); 38 | extern void UpDownTouchControl(GUI_UPDOWN_BOX * udBox, int16_t xTouch, int16_t yTouch); 39 | extern void UpDownBoxSetValue(GUI_UPDOWN_BOX * udBox, int32_t curValue, int32_t maxValue, int32_t minValue); 40 | 41 | #endif /* GUIUPDOWNBOX_H_ */ 42 | -------------------------------------------------------------------------------- /wigets/src/guiChart.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiChart.c 3 | * 4 | * Created on: 02.01.2013 5 | * Author: Andrey 6 | */ 7 | 8 | #include "gui.h" 9 | 10 | /*! 11 | Инициализация диаграммы по умолчанию 12 | \param[out] *chart Указатель на объект диаграммы 13 | \param[in] x координата по оси x 14 | \param[in] y координата по оси y 15 | \param[in] width ширина виджета 16 | \param[in] height высота виджета 17 | */ 18 | void defaultChartInit(GUI_CHART * chart, uint16_t x, uint16_t y, uint16_t width, uint16_t height) 19 | { 20 | 21 | chart->wmObj.xPos = x; 22 | chart->wmObj.yPos = y; 23 | chart->wmObj.Width = width; 24 | chart->wmObj.Height = height; 25 | 26 | 27 | chart->wmObj.Color = LCD_COLOR_BLACK; 28 | chart->LineColor = LCD_COLOR_GREEN; 29 | 30 | chart->wmObj.BorderColor = LCD_COLOR_WHITE; 31 | chart->wmObj.BorderWidth = 1; 32 | chart->Dot_nLine = 0; 33 | 34 | 35 | chart->wmObj.Visible = 0; 36 | chart->wmObj.Enable = 0; 37 | } 38 | 39 | /*! 40 | Установка массива значений для диаграммы 41 | \param[out] *chart Указатель на объект диаграммы 42 | \param[in] *data Указатель на массив значений (int16_t) 43 | \param[in] numData Количество значений в массиве 44 | */ 45 | void chartSetData(GUI_CHART * chart, int16_t * data, uint16_t numData) 46 | { 47 | uint16_t i, point; 48 | if (numData < chart->wmObj.Width-1) 49 | point = numData; 50 | else 51 | point = chart->wmObj.Width-1; 52 | chart->numPoint = numData; 53 | for (i = 0; i < point; i++) 54 | { 55 | if (data[i] < chart->wmObj.Height-1 && data[i] > 0) 56 | chart->table[i] = data[i]; 57 | else 58 | { 59 | if (data[i] >= chart->wmObj.Height) 60 | chart->table[i] = chart->wmObj.Height-1; 61 | else 62 | chart->table[i] = 0; 63 | } 64 | } 65 | } 66 | 67 | 68 | /*! 69 | Вывод диаграммы на экран 70 | \param[in] *chart Указатель на объект диаграммы 71 | */ 72 | void guiChartDraw(GUI_CHART * chart) 73 | { 74 | uint16_t i; 75 | //uint16_t xGridSpace, yGridSpace; 76 | 77 | if (chart->wmObj.Visible) 78 | { 79 | // Axes 80 | LCD_SetTextColor(chart->wmObj.BorderColor); 81 | 82 | LCD_DrawLine(chart->wmObj.xPos, chart->wmObj.yPos, chart->wmObj.Height, LCD_DIR_VERTICAL); 83 | LCD_DrawLine(chart->wmObj.xPos, chart->wmObj.yPos + chart->wmObj.Height-1, chart->wmObj.Width, LCD_DIR_HORIZONTAL); 84 | LCD_SetTextColor(chart->wmObj.Color); 85 | LCD_DrawFillRect(chart->wmObj.xPos+1, chart->wmObj.yPos, chart->wmObj.Width - 1, chart->wmObj.Height - 1); 86 | 87 | // Grid Lines 88 | 89 | // Graph 90 | LCD_SetTextColor(chart->LineColor); 91 | for (i = 0; i < chart->wmObj.Width-1; i++) 92 | { 93 | if (chart->table[i] > chart->wmObj.Height-1) chart->table[i] = chart->wmObj.Height-11; 94 | if (chart->Dot_nLine) // dot graph 95 | LCD_PutPixel(chart->wmObj.xPos+1+i, chart->wmObj.yPos + chart->wmObj.Height - 1 - chart->table[i]); 96 | else // line graph (histogram) 97 | LCD_DrawLine(chart->wmObj.xPos+1+i, 98 | chart->wmObj.yPos + chart->wmObj.Height - 1 - chart->table[i], 99 | chart->table[i], 100 | LCD_DIR_VERTICAL); 101 | } 102 | } 103 | } 104 | 105 | //void guiChartFastClear(GUI_CHART * chart) 106 | //{ 107 | // uint16_t i; 108 | // //uint16_t xGridSpace, yGridSpace; 109 | // 110 | // if (chart->wmObj.Visible) 111 | // { 112 | // // Graph 113 | // LCD_SetTextColor(chart->wmObj.Color); 114 | // for (i = 0; i < chart->wmObj.Width-1; i++) 115 | // { 116 | // if (chart->table[i] > chart->wmObj.Height-1) chart->table[i] = chart->wmObj.Height-1; 117 | // if (chart->Dot_nLine) // dot graph 118 | // LCD_PutPixel(chart->wmObj.xPos+1+i, chart->wmObj.yPos + chart->wmObj.Height - 1 - chart->table[i]); 119 | // else // line graph (histogram) 120 | // LCD_DrawLine(chart->wmObj.xPos+1+i, 121 | // chart->wmObj.yPos + chart->wmObj.Height - 1 - chart->table[i], 122 | // chart->table[i], 123 | // LCD_DIR_VERTICAL); 124 | // } 125 | // } 126 | //} 127 | 128 | /*! 129 | Обновление диаграммы 130 | \param[in] *chart Указатель на объект диаграммы 131 | \param[in] _color цвет линий данных 132 | */ 133 | void guiChartRefresh(GUI_CHART * chart, uint16_t _color) 134 | { 135 | uint16_t i; 136 | //uint16_t xGridSpace, yGridSpace; 137 | 138 | 139 | if (chart->wmObj.Visible) 140 | { 141 | // axis 142 | LCD_SetTextColor(chart->wmObj.BorderColor); 143 | LCD_DrawLine(chart->wmObj.xPos, chart->wmObj.yPos, chart->wmObj.Height, LCD_DIR_VERTICAL); 144 | LCD_DrawLine(chart->wmObj.xPos, chart->wmObj.yPos + chart->wmObj.Height-1, chart->wmObj.Width, LCD_DIR_HORIZONTAL); 145 | 146 | // Graph 147 | LCD_SetTextColor(_color); 148 | for (i = 0; i < chart->wmObj.Width-1; i++) 149 | { 150 | if (chart->table[i] > chart->wmObj.Height-1) chart->table[i] = chart->wmObj.Height-1; 151 | if (chart->Dot_nLine) // dot graph 152 | LCD_PutPixel(chart->wmObj.xPos+1+i, chart->wmObj.yPos + (chart->wmObj.Height - 1) - chart->table[i]); 153 | else // line graph (histogram) 154 | LCD_DrawLine(chart->wmObj.xPos+1+i, 155 | chart->wmObj.yPos + chart->wmObj.Height - 1 - chart->table[i], 156 | chart->table[i], 157 | LCD_DIR_VERTICAL); 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /wigets/src/guiCheckBox.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiTextcheckBox.c 3 | * 4 | * Created on: 17.12.2012 5 | * Author: Andrey 6 | */ 7 | 8 | #include "gui.h" 9 | 10 | void defaultCheckInit(GUI_CHECK_BOX * checkBox, uint16_t x, uint16_t y, uint16_t width, uint16_t height) 11 | { 12 | 13 | checkBox->wmObj.xPos = x; 14 | checkBox->wmObj.yPos = y; 15 | checkBox->wmObj.Width = width; 16 | checkBox->wmObj.Height = height; 17 | 18 | checkBox->wmObj.Color = LCD_COLOR_WHITE; 19 | 20 | checkBox->wmObj.BorderColor = LCD_COLOR_GREYL; 21 | checkBox->wmObj.BorderWidth = 1; 22 | 23 | checkBox->wmObj.Visible = 0; 24 | checkBox->wmObj.Enable = 0; 25 | checkBox->Checked = 0; 26 | }; 27 | 28 | void CheckBoxTextInit(GUI_CHECK_BOX * checkBox, char *text, V_FONT * vFont, uint8_t rot, uint8_t flip, uint8_t align_h, uint8_t align_v) 29 | { 30 | checkBox->wmTxt.TextColor = LCD_COLOR_BLACK; 31 | wmTextInit(&checkBox->wmTxt, text, vFont, rot, flip, align_h, align_v); 32 | wmTextPositionInit(&checkBox->wmTxt, 33 | checkBox->wmObj.xPos + checkBox->wmObj.Height+1, 34 | checkBox->wmObj.yPos , 35 | checkBox->wmObj.Width - checkBox->wmObj.Height - 1, 36 | checkBox->wmTxt.vFont->Height 37 | ); 38 | 39 | } 40 | 41 | void CheckBoxDraw(GUI_CHECK_BOX * checkBox) 42 | { 43 | // uint16_t colorLight, colorDark; 44 | 45 | if (checkBox->wmObj.Visible) 46 | { 47 | //colorLight = guiChangeColorLight(checkBox->wmObj.BorderColor, 150); 48 | //colorDark = guiChangeColorLight(checkBox->wmObj.BorderColor, 50); 49 | 50 | // check symbol 51 | // Top-Left Border 52 | //LCD_SetTextColor(colorDark); 53 | LCD_SetTextColor(LCD_COLOR_GREYD); 54 | LCD_DrawLine(checkBox->wmObj.xPos, checkBox->wmObj.yPos, checkBox->wmObj.Height, LCD_DIR_HORIZONTAL); 55 | LCD_DrawLine(checkBox->wmObj.xPos, checkBox->wmObj.yPos+1, checkBox->wmObj.Height-1, LCD_DIR_HORIZONTAL); 56 | LCD_DrawLine(checkBox->wmObj.xPos, checkBox->wmObj.yPos, checkBox->wmObj.Height, LCD_DIR_VERTICAL); 57 | LCD_DrawLine(checkBox->wmObj.xPos+1, checkBox->wmObj.yPos, checkBox->wmObj.Height-1, LCD_DIR_VERTICAL); 58 | 59 | 60 | // Bot-Right Dark Border 61 | //LCD_SetTextColor(colorLight); 62 | LCD_SetTextColor(LCD_COLOR_WHITE); 63 | LCD_DrawLine(checkBox->wmObj.xPos+1, checkBox->wmObj.yPos+checkBox->wmObj.Height-1, checkBox->wmObj.Height-1, LCD_DIR_HORIZONTAL); 64 | LCD_DrawLine(checkBox->wmObj.xPos+checkBox->wmObj.Height-1, checkBox->wmObj.yPos+1, checkBox->wmObj.Height-1, LCD_DIR_VERTICAL); 65 | LCD_SetTextColor(checkBox->wmObj.BorderColor); 66 | LCD_DrawLine(checkBox->wmObj.xPos+2, checkBox->wmObj.yPos+checkBox->wmObj.Height-2, checkBox->wmObj.Height-3, LCD_DIR_HORIZONTAL); 67 | LCD_DrawLine(checkBox->wmObj.xPos+checkBox->wmObj.Height-2, checkBox->wmObj.yPos+2, checkBox->wmObj.Height-3, LCD_DIR_VERTICAL); 68 | 69 | // Center 70 | if (checkBox->wmObj.Enable) 71 | LCD_SetTextColor(LCD_COLOR_WHITE); 72 | else 73 | LCD_SetTextColor(LCD_COLOR_GREYL); 74 | LCD_DrawFillRect(checkBox->wmObj.xPos+2,checkBox->wmObj.yPos+2,checkBox->wmObj.Height-4,checkBox->wmObj.Height-4); 75 | if (checkBox->Checked) 76 | { 77 | if (checkBox->wmObj.Enable) 78 | LCD_SetTextColor(LCD_COLOR_BLACK); 79 | else 80 | LCD_SetTextColor(LCD_COLOR_GREYD); 81 | LCD_DrawFillRect(checkBox->wmObj.xPos+4,checkBox->wmObj.yPos+4,checkBox->wmObj.Height-8,checkBox->wmObj.Height-8); 82 | } 83 | 84 | 85 | 86 | 87 | 88 | 89 | // Back 90 | // LCD_SetTextColor(checkBox->wmObj.Color); 91 | // LCD_DrawFillRect(checkBox->wmObj.xPos + checkBox->wmObj.BorderWidth, 92 | // checkBox->wmObj.yPos + checkBox->wmObj.BorderWidth, 93 | // checkBox->wmObj.Width - checkBox->wmObj.BorderWidth - checkBox->wmObj.BorderWidth - 1, 94 | // checkBox->wmObj.Height - checkBox->wmObj.BorderWidth - checkBox->wmObj.BorderWidth - 1); 95 | 96 | // Text 97 | LCD_SetFont(checkBox->wmTxt.vFont); 98 | if (checkBox->wmObj.Enable) 99 | LCD_SetColors(checkBox->wmTxt.TextColor, checkBox->wmObj.BorderColor); 100 | else 101 | LCD_SetColors(guiChangeColorLight(checkBox->wmTxt.TextColor, 120), checkBox->wmObj.BorderColor);; 102 | LCD_DrawString(checkBox->wmTxt.Text, checkBox->wmTxt.TextLen, checkBox->wmTxt.TextPosX, checkBox->wmTxt.TextPosY); 103 | } 104 | } 105 | 106 | void CheckBoxStateRefresh(GUI_CHECK_BOX * checkBox) 107 | { 108 | if (checkBox->wmObj.Visible) 109 | { 110 | // Center 111 | if (checkBox->wmObj.Enable) 112 | LCD_SetTextColor(LCD_COLOR_WHITE); 113 | else 114 | LCD_SetTextColor(LCD_COLOR_GREYL); 115 | LCD_DrawFillRect(checkBox->wmObj.xPos+2,checkBox->wmObj.yPos+2,checkBox->wmObj.Height-4,checkBox->wmObj.Height-4); 116 | if (checkBox->Checked) 117 | { 118 | if (checkBox->wmObj.Enable) 119 | LCD_SetTextColor(LCD_COLOR_BLACK); 120 | else 121 | LCD_SetTextColor(LCD_COLOR_GREYD); 122 | LCD_DrawFillRect(checkBox->wmObj.xPos+4,checkBox->wmObj.yPos+4,checkBox->wmObj.Height-8,checkBox->wmObj.Height-8); 123 | } 124 | } 125 | } 126 | 127 | void CheckBoxTouchControl(GUI_CHECK_BOX * checkBox, int16_t xTouch, int16_t yTouch) 128 | { 129 | if (checkBox->wmObj.Enable) 130 | { 131 | wmTouchControl(&checkBox->wmObj, &checkBox->wmTouch, xTouch, yTouch); 132 | if (checkBox->wmTouch.JustReleased) 133 | { 134 | checkBox->wmTouch.JustReleased = 0; 135 | if (checkBox->Checked) 136 | checkBox->Checked = 0; 137 | else 138 | checkBox->Checked = 1; 139 | CheckBoxStateRefresh(checkBox); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /wigets/src/guiEditBox.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/wigets/src/guiEditBox.c -------------------------------------------------------------------------------- /wigets/src/guiKeyBoard.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/wigets/src/guiKeyBoard.c -------------------------------------------------------------------------------- /wigets/src/guiLabel.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiLabel.c 3 | * 4 | * Created on: 26.12.2012 5 | * Author: Andrey 6 | */ 7 | #include "gui.h" 8 | 9 | void labelInit(GUI_LABEL * label, uint16_t x, uint16_t y, uint16_t width, uint16_t height) 10 | { 11 | wmObjInit(&label->wmObj, x, y, width, height); 12 | label->wmObj.Color = LCD_COLOR_GREYL; 13 | label->wmObj.BorderColor = label->wmObj.Color; 14 | label->wmObj.Visual3D = 0; 15 | label->wmObj.BorderWidth = 0; 16 | label->wmObj.Transparent = 1; 17 | } 18 | 19 | //void labelTextInit() 20 | 21 | void guiLabelDraw(GUI_LABEL * label) 22 | { 23 | uint16_t i; 24 | if (label->wmObj.Visible) 25 | { 26 | // Borders 27 | LCD_SetTextColor(label->wmObj.BorderColor); 28 | if (label->wmObj.BorderWidth) 29 | { 30 | if (label->wmObj.Visual3D == 1) 31 | { 32 | for (i = 0; i < label->wmObj.BorderWidth; i++) 33 | { 34 | LCD_SetTextColor(LCD_COLOR_GREYD); 35 | // Top Border 36 | LCD_DrawLine(label->wmObj.xPos, label->wmObj.yPos, label->wmObj.Width-i-1, LCD_DIR_HORIZONTAL); 37 | // Left Border 38 | LCD_DrawLine(label->wmObj.xPos, label->wmObj.yPos, label->wmObj.Height-i, LCD_DIR_VERTICAL); 39 | 40 | if (i == label->wmObj.BorderWidth-1 && label->wmObj.Color == LCD_COLOR_WHITE) 41 | LCD_SetTextColor(LCD_COLOR_GREYL); 42 | else 43 | LCD_SetTextColor(LCD_COLOR_WHITE); 44 | // Bottom Border 45 | LCD_DrawLine(label->wmObj.xPos+1+i, label->wmObj.yPos+label->wmObj.Height-i-1, label->wmObj.Width-i-2, LCD_DIR_HORIZONTAL); 46 | // Right Border 47 | LCD_DrawLine(label->wmObj.xPos+label->wmObj.Width-i-1, label->wmObj.yPos+i+1, label->wmObj.Height-i-2, LCD_DIR_VERTICAL); 48 | } 49 | } 50 | else 51 | { 52 | // Top Border 53 | LCD_DrawFillRect(label->wmObj.xPos, label->wmObj.yPos, label->wmObj.Width, label->wmObj.BorderWidth); 54 | // Left Border 55 | LCD_DrawFillRect(label->wmObj.xPos, label->wmObj.yPos, label->wmObj.BorderWidth, label->wmObj.Height); 56 | // Bottom Border 57 | LCD_DrawFillRect(label->wmObj.xPos, label->wmObj.yPos+label->wmObj.Height-label->wmObj.BorderWidth, label->wmObj.Width, label->wmObj.BorderWidth); 58 | // Right Border 59 | LCD_DrawFillRect(label->wmObj.xPos+label->wmObj.Width-label->wmObj.BorderWidth, label->wmObj.yPos, label->wmObj.BorderWidth, label->wmObj.Height); 60 | } 61 | } 62 | // Back 63 | if (label->wmObj.Transparent == 0) 64 | { 65 | LCD_SetTextColor(label->wmObj.Color); 66 | LCD_DrawFillRect(label->wmObj.xPos + label->wmObj.BorderWidth, 67 | label->wmObj.yPos + label->wmObj.BorderWidth, 68 | label->wmObj.Width - 2*label->wmObj.BorderWidth, 69 | label->wmObj.Height - 2*label->wmObj.BorderWidth 70 | ); 71 | } 72 | // Text 73 | LCD_SetFont(label->wmTxt.vFont); 74 | if (label->wmObj.Enable) 75 | LCD_SetColors(label->wmTxt.TextColor, label->wmObj.Color); 76 | else 77 | LCD_SetColors(guiChangeColorLight(label->wmObj.Color, 120), label->wmObj.Color); 78 | 79 | LCD_DrawString(label->wmTxt.Text, label->wmTxt.TextLen, label->wmTxt.TextPosX, label->wmTxt.TextPosY); 80 | } 81 | 82 | } 83 | 84 | -------------------------------------------------------------------------------- /wigets/src/guiTerminalBlock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * guiTerminalBlock.c 3 | * 4 | * Created on: 15.06.2013 5 | * Author: Andrey Fursov 6 | */ 7 | #include "gui.h" 8 | // default initialization terminal block 9 | void defaultTerminalBlockInit(GUI_TERMINAL_BLOCK * tBlock, uint16_t x, uint16_t y, uint16_t width, uint16_t height) 10 | { 11 | 12 | tBlock->wmObj.xPos = x; 13 | tBlock->wmObj.yPos = y; 14 | tBlock->wmObj.Width = width; 15 | tBlock->wmObj.Height = height; 16 | 17 | if (tBlock->vFont == 0) 18 | { 19 | tBlock->vFont = &GS_Lucida_12; 20 | } 21 | 22 | tBlock->TextColor = LCD_COLOR_WHITE; 23 | tBlock->wmObj.Color = LCD_COLOR_BLACK; 24 | tBlock->wmObj.BorderColor = LCD_COLOR_WHITE; 25 | tBlock->wmObj.BorderWidth = 1; 26 | 27 | tBlock->qString = (tBlock->wmObj.Height - 2*tBlock->wmObj.BorderWidth - 2)/tBlock->vFont->Height; 28 | tBlock->qSymb = (tBlock->wmObj.Width - 2*tBlock->wmObj.BorderWidth - 2)/(tBlock->vFont->Width + tBlock->vFont->SymbolSpace); 29 | tBlock->countString = 0; 30 | tBlock->startString = 0; 31 | 32 | tBlock->wmObj.Visible = 0; 33 | tBlock->wmObj.Enable = 0; 34 | }; 35 | 36 | void TerminalBlockOnPait(GUI_TERMINAL_BLOCK * tBlock) 37 | { 38 | wmObjOnPaint(&tBlock->wmObj); 39 | TerminalBlockStringDraw(tBlock); 40 | }; 41 | 42 | void TerminalBlockStringDraw(GUI_TERMINAL_BLOCK * tBlock) 43 | { 44 | uint16_t i, x, y, index; 45 | if (tBlock->wmObj.Visible) 46 | { 47 | x = tBlock->wmObj.xPos + tBlock->wmObj.BorderWidth + 1; 48 | y = tBlock->wmObj.yPos + tBlock->wmObj.BorderWidth + 1; 49 | index = tBlock->startString; 50 | LCD_SetColors(tBlock->TextColor, tBlock->wmObj.Color); 51 | if (tBlock->strings) 52 | { 53 | for (i = 0; i < tBlock->countString; i++) 54 | { 55 | guiDrawString(tBlock->strings[index], tBlock->vFont, tBlock->qSymb, x, y); 56 | y += tBlock->vFont->Height; 57 | index++; 58 | if (index >= tBlock->qString) index = 0; 59 | } 60 | } 61 | } 62 | } 63 | 64 | void TerminalBlockClear(GUI_TERMINAL_BLOCK * tBlock) 65 | { 66 | tBlock->countString = 0; 67 | tBlock->startString = 0; 68 | }; 69 | 70 | uint16_t TerminalBlockSetNewString(GUI_TERMINAL_BLOCK * tBlock) 71 | { 72 | uint16_t j, curStr; 73 | if (tBlock->countString < (tBlock->qString-1)) 74 | { 75 | curStr = tBlock->countString; 76 | tBlock->countString++; 77 | } 78 | else 79 | { 80 | curStr = tBlock->startString; 81 | tBlock->startString++; 82 | } 83 | if (tBlock->startString >= tBlock->qString) 84 | tBlock->startString = 0; 85 | for (j = 0; j < tBlock->qSymb; j++) 86 | { 87 | tBlock->strings[curStr][j] = ' '; 88 | } 89 | return curStr; 90 | }; 91 | 92 | void TerminalBlockAddStrings(GUI_TERMINAL_BLOCK * tBlock, char * str, uint16_t len) 93 | { 94 | uint16_t i, j, curStr, strPos; 95 | i = 0; 96 | strPos = 0; 97 | curStr = TerminalBlockSetNewString(tBlock); 98 | while (i < len && str[i] != 0) 99 | { 100 | switch(str[i]) 101 | { 102 | case '\r': 103 | strPos = 0; 104 | break; 105 | case '\n': 106 | strPos = 0; 107 | curStr = TerminalBlockSetNewString(tBlock); 108 | break; 109 | default: 110 | if (tBlock->strings) 111 | { 112 | if (strPos >= tBlock->qSymb) 113 | { 114 | strPos = 0; 115 | curStr = TerminalBlockSetNewString(tBlock); 116 | } 117 | tBlock->strings[curStr][strPos++] = str[i]; 118 | } 119 | 120 | break; 121 | } 122 | i++; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /wigets/src/guiTouchCalibration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndreyFursov/AFGUI/63738ab30ded118c8d4afb160e47e2bb83343c5f/wigets/src/guiTouchCalibration.c --------------------------------------------------------------------------------