├── .gitignore ├── 运行截图.jpg ├── User ├── main.c ├── palette.c ├── palette.h ├── Key │ ├── bsp_key.c │ └── bsp_key.h ├── adc │ ├── bsp_adc.c │ └── bsp_adc.h ├── dac │ ├── bsp_dac.c │ └── bsp_dac.h ├── led │ ├── bsp_led.c │ └── bsp_led.h ├── Beep │ ├── bsp_beep.c │ └── bsp_beep.h ├── FATFS │ ├── diskio.c │ ├── option │ │ ├── unicode.c │ │ └── syscall.c │ ├── integer.h │ ├── 00readme.txt │ └── diskio.h ├── FreeRTOSConfig.h ├── TPad │ ├── bsp_tpad.c │ └── bsp_tpad.h ├── sdio │ ├── sdio_test.c │ ├── bsp_sdio_sdcard.c │ ├── bsp_sdio_sdcard.h │ └── sdio_test.h ├── stm32f10x_it.c ├── usart │ ├── bsp_usart.c │ └── bsp_usart.h ├── SysTick │ ├── bsp_SysTick.c │ └── bsp_SysTick.h ├── TimBase │ ├── bsp_TiMbase.c │ └── bsp_TiMbase.h ├── flash │ ├── bsp_spi_flash.c │ └── bsp_spi_flash.h ├── lcd │ ├── bsp_ili9341_lcd.c │ ├── bsp_ili9341_lcd.h │ ├── bsp_xpt2046_lcd.c │ └── bsp_xpt2046_lcd.h ├── sram │ └── bsp_fsmc_sram.c ├── bsp_all.h ├── stm32f10x_it.h └── stm32f10x_conf.h ├── Doc └── readme.txt ├── STemWin_Task ├── DSO.c ├── DSO.h ├── MainTask.c ├── MainTask.h ├── DataProcess.c ├── ScreenShot.c ├── ScreenShot.h └── Touch_calibration.c ├── STemWin ├── inc │ ├── GUI_Type.h │ ├── GUI_Version.h │ ├── GUIDRV_Template.h │ ├── GUIDRV_NoOpt_1_8.h │ ├── MESSAGEBOX.h │ ├── WINDOW_Private.h │ ├── GUI_SPRITE_Private.h │ ├── LCD_ConfDefaults.h │ ├── GUI_HOOK.h │ ├── GUIDRV_Dist.h │ ├── GUI_ARRAY_Private.h │ ├── GUIDRV_DCache.h │ ├── Global.h │ ├── WM_GUI.h │ ├── GUIMTDRV_TangoC32.h │ ├── GUI_SetOrientation.h │ ├── GUI_ARRAY.h │ ├── TEXT_Private.h │ ├── KNOB_Private.h │ ├── DIALOG.h │ ├── GUI_FontIntern.h │ ├── LCD_Private.h │ ├── GUI_GCache_Private.h │ ├── SLIDER_Private.h │ ├── GUI_BMP_Private.h │ ├── BUTTON_Private.h │ ├── GUIDRV_TemplateI.h │ ├── HEADER_Private.h │ ├── PROGBAR_Private.h │ └── DIALOG_Intern.h ├── Config │ ├── GUIConf.c │ ├── GUI_X_Touch_Analog.c │ ├── LCDConf_FlexColor.c │ ├── LCDConf.h │ └── GUIConf.h ├── OS │ ├── GUI_X_FreeRTOS.c │ └── GUI_X.c └── Lib │ ├── STemWin_CM3_OS_wc16.a │ ├── STemWin532_CM3_OS_Keil.lib │ ├── STemWin_CM3_OS_wc16_ARGB.a │ └── MCD-ST Image SW License Agreement V2.pdf ├── Libraries ├── CMSIS │ ├── stm32f10x.h │ └── system_stm32f10x.h └── FWlib │ ├── inc │ ├── stm32f10x_gpio.h │ ├── stm32f10x_crc.h │ ├── stm32f10x_wwdg.h │ ├── stm32f10x_dbgmcu.h │ ├── stm32f10x_iwdg.h │ ├── stm32f10x_rtc.h │ └── stm32f10x_pwr.h │ └── src │ ├── stm32f10x_i2c.c │ ├── stm32f10x_flash.c │ ├── stm32f10x_usart.c │ ├── stm32f10x_crc.c │ └── stm32f10x_iwdg.c ├── FreeRTOS ├── port │ ├── MemMang │ │ └── ReadMe.url │ └── RVDS │ │ ├── ARM_CM7 │ │ └── ReadMe.txt │ │ ├── ARM7_LPC21xx │ │ └── portmacro.inc │ │ └── ARM_CA9 │ │ └── portmacro.inc ├── src │ └── readme.txt └── include │ └── stdint.readme ├── README.md ├── Project └── RVMDK(uv5) │ └── DebugConfig │ └── Fire_F103_STM32F103ZE_1.0.0.dbgconf └── DSP └── stm32_dsp.h /.gitignore: -------------------------------------------------------------------------------- 1 | .history 2 | .vscode 3 | 4 | Output/ 5 | Listing/ -------------------------------------------------------------------------------- /运行截图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/运行截图.jpg -------------------------------------------------------------------------------- /User/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/main.c -------------------------------------------------------------------------------- /Doc/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Doc/readme.txt -------------------------------------------------------------------------------- /User/palette.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/palette.c -------------------------------------------------------------------------------- /User/palette.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/palette.h -------------------------------------------------------------------------------- /STemWin_Task/DSO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/DSO.c -------------------------------------------------------------------------------- /STemWin_Task/DSO.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/DSO.h -------------------------------------------------------------------------------- /User/Key/bsp_key.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/Key/bsp_key.c -------------------------------------------------------------------------------- /User/Key/bsp_key.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/Key/bsp_key.h -------------------------------------------------------------------------------- /User/adc/bsp_adc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/adc/bsp_adc.c -------------------------------------------------------------------------------- /User/adc/bsp_adc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/adc/bsp_adc.h -------------------------------------------------------------------------------- /User/dac/bsp_dac.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/dac/bsp_dac.c -------------------------------------------------------------------------------- /User/dac/bsp_dac.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/dac/bsp_dac.h -------------------------------------------------------------------------------- /User/led/bsp_led.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/led/bsp_led.c -------------------------------------------------------------------------------- /User/led/bsp_led.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/led/bsp_led.h -------------------------------------------------------------------------------- /User/Beep/bsp_beep.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/Beep/bsp_beep.c -------------------------------------------------------------------------------- /User/Beep/bsp_beep.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/Beep/bsp_beep.h -------------------------------------------------------------------------------- /User/FATFS/diskio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/FATFS/diskio.c -------------------------------------------------------------------------------- /User/FreeRTOSConfig.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/FreeRTOSConfig.h -------------------------------------------------------------------------------- /User/TPad/bsp_tpad.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/TPad/bsp_tpad.c -------------------------------------------------------------------------------- /User/TPad/bsp_tpad.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/TPad/bsp_tpad.h -------------------------------------------------------------------------------- /User/sdio/sdio_test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/sdio/sdio_test.c -------------------------------------------------------------------------------- /User/stm32f10x_it.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/stm32f10x_it.c -------------------------------------------------------------------------------- /STemWin/inc/GUI_Type.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/inc/GUI_Type.h -------------------------------------------------------------------------------- /STemWin_Task/MainTask.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/MainTask.c -------------------------------------------------------------------------------- /STemWin_Task/MainTask.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/MainTask.h -------------------------------------------------------------------------------- /User/usart/bsp_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/usart/bsp_usart.c -------------------------------------------------------------------------------- /User/usart/bsp_usart.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/usart/bsp_usart.h -------------------------------------------------------------------------------- /STemWin/Config/GUIConf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Config/GUIConf.c -------------------------------------------------------------------------------- /STemWin_Task/DataProcess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/DataProcess.c -------------------------------------------------------------------------------- /STemWin_Task/ScreenShot.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/ScreenShot.c -------------------------------------------------------------------------------- /STemWin_Task/ScreenShot.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/ScreenShot.h -------------------------------------------------------------------------------- /User/SysTick/bsp_SysTick.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/SysTick/bsp_SysTick.c -------------------------------------------------------------------------------- /User/SysTick/bsp_SysTick.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/SysTick/bsp_SysTick.h -------------------------------------------------------------------------------- /User/TimBase/bsp_TiMbase.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/TimBase/bsp_TiMbase.c -------------------------------------------------------------------------------- /User/TimBase/bsp_TiMbase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/TimBase/bsp_TiMbase.h -------------------------------------------------------------------------------- /User/flash/bsp_spi_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/flash/bsp_spi_flash.c -------------------------------------------------------------------------------- /User/flash/bsp_spi_flash.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/flash/bsp_spi_flash.h -------------------------------------------------------------------------------- /User/lcd/bsp_ili9341_lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/lcd/bsp_ili9341_lcd.c -------------------------------------------------------------------------------- /User/lcd/bsp_ili9341_lcd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/lcd/bsp_ili9341_lcd.h -------------------------------------------------------------------------------- /User/lcd/bsp_xpt2046_lcd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/lcd/bsp_xpt2046_lcd.c -------------------------------------------------------------------------------- /User/lcd/bsp_xpt2046_lcd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/lcd/bsp_xpt2046_lcd.h -------------------------------------------------------------------------------- /User/sram/bsp_fsmc_sram.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/sram/bsp_fsmc_sram.c -------------------------------------------------------------------------------- /Libraries/CMSIS/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Libraries/CMSIS/stm32f10x.h -------------------------------------------------------------------------------- /STemWin/OS/GUI_X_FreeRTOS.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/OS/GUI_X_FreeRTOS.c -------------------------------------------------------------------------------- /User/sdio/bsp_sdio_sdcard.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/sdio/bsp_sdio_sdcard.c -------------------------------------------------------------------------------- /User/sdio/bsp_sdio_sdcard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/User/sdio/bsp_sdio_sdcard.h -------------------------------------------------------------------------------- /STemWin/Lib/STemWin_CM3_OS_wc16.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Lib/STemWin_CM3_OS_wc16.a -------------------------------------------------------------------------------- /STemWin_Task/Touch_calibration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin_Task/Touch_calibration.c -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_gpio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Libraries/FWlib/inc/stm32f10x_gpio.h -------------------------------------------------------------------------------- /Libraries/FWlib/src/stm32f10x_i2c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Libraries/FWlib/src/stm32f10x_i2c.c -------------------------------------------------------------------------------- /STemWin/Config/GUI_X_Touch_Analog.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Config/GUI_X_Touch_Analog.c -------------------------------------------------------------------------------- /STemWin/Config/LCDConf_FlexColor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Config/LCDConf_FlexColor.c -------------------------------------------------------------------------------- /Libraries/FWlib/src/stm32f10x_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Libraries/FWlib/src/stm32f10x_flash.c -------------------------------------------------------------------------------- /Libraries/FWlib/src/stm32f10x_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/Libraries/FWlib/src/stm32f10x_usart.c -------------------------------------------------------------------------------- /STemWin/Lib/STemWin532_CM3_OS_Keil.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Lib/STemWin532_CM3_OS_Keil.lib -------------------------------------------------------------------------------- /STemWin/Lib/STemWin_CM3_OS_wc16_ARGB.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Lib/STemWin_CM3_OS_wc16_ARGB.a -------------------------------------------------------------------------------- /FreeRTOS/port/MemMang/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.freertos.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /STemWin/Lib/MCD-ST Image SW License Agreement V2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godcreator02/stm32F1-simple_oscillograph/HEAD/STemWin/Lib/MCD-ST Image SW License Agreement V2.pdf -------------------------------------------------------------------------------- /User/sdio/sdio_test.h: -------------------------------------------------------------------------------- 1 | #ifndef __SDIO_TEST_H 2 | #define __SDIO_TEST_H 3 | 4 | void SD_Test(void); 5 | 6 | #endif 7 | 8 | 9 | /*****************************END OF FILE**************************/ 10 | -------------------------------------------------------------------------------- /User/FATFS/option/unicode.c: -------------------------------------------------------------------------------- 1 | #include "../ff.h" 2 | 3 | #if _USE_LFN != 0 4 | 5 | #if _CODE_PAGE == 932 /* Japanese Shift_JIS */ 6 | #include "cc932.c" 7 | #elif _CODE_PAGE == 936 /* Simplified Chinese GBK */ 8 | #include "cc936.c" 9 | #elif _CODE_PAGE == 949 /* Korean */ 10 | #include "cc949.c" 11 | #elif _CODE_PAGE == 950 /* Traditional Chinese Big5 */ 12 | #include "cc950.c" 13 | #else /* Single Byte Character-Set */ 14 | #include "ccsbcs.c" 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /User/bsp_all.h: -------------------------------------------------------------------------------- 1 | #ifndef __BPS_ALL_H 2 | #define __BSP_ALL_H 3 | 4 | 5 | #include "stm32f10x.h" 6 | 7 | 8 | #include "./led/bsp_led.h" 9 | #include "./usart/bsp_usart.h" 10 | #include "./key/bsp_key.h" 11 | #include "./lcd/bsp_ili9341_lcd.h" 12 | #include "./lcd/bsp_xpt2046_lcd.h" 13 | #include "./flash/bsp_spi_flash.h" 14 | #include "./sram/bsp_fsmc_sram.h" 15 | #include "./TPad/bsp_tpad.h" 16 | #include "./beep/bsp_beep.h" 17 | #include "bsp_adc.h" 18 | #include "./dac/bsp_dac.h" 19 | #include 20 | #include "bsp_Timbase.h" 21 | 22 | 23 | 24 | #endif /* __KEY_H */ 25 | -------------------------------------------------------------------------------- /User/FATFS/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* Development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8-bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16-bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16-bit or 32-bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32-bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /User/FATFS/00readme.txt: -------------------------------------------------------------------------------- 1 | FatFs Module Source Files R0.11 2 | 3 | 4 | FILES 5 | 6 | 00readme.txt This file. 7 | history.txt Revision history. 8 | ffconf.h Configuration file for FatFs module. 9 | ff.h Common include file for FatFs and application module. 10 | ff.c FatFs module. 11 | diskio.h Common include file for FatFs and disk I/O module. 12 | diskio.c An example of glue function to attach existing disk I/O module to FatFs. 13 | integer.h Integer type definitions for FatFs. 14 | option Optional external functions. 15 | 16 | 17 | Low level disk I/O module is not included in this archive because the FatFs 18 | module is only a generic file system layer and not depend on any specific 19 | storage device. You have to provide a low level disk I/O module that written 20 | to control the target storage device. 21 | 22 | -------------------------------------------------------------------------------- /FreeRTOS/src/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and or compiler. 4 | 5 | + The FreeRTOS/Source directory contains the three files that are common to 6 | every port - list.c, queue.c and tasks.c. The kernel is contained within these 7 | three files. croutine.c implements the optional co-routine functionality - which 8 | is normally only used on very memory limited systems. 9 | 10 | + The FreeRTOS/Source/Portable directory contains the files that are specific to 11 | a particular microcontroller and or compiler. 12 | 13 | + The FreeRTOS/Source/include directory contains the real time kernel header 14 | files. 15 | 16 | See the readme file in the FreeRTOS/Source/Portable directory for more 17 | information. -------------------------------------------------------------------------------- /FreeRTOS/include/stdint.readme: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FREERTOS_STDINT 3 | #define FREERTOS_STDINT 4 | 5 | /******************************************************************************* 6 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions 7 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be 8 | * built using compilers that do not provide their own stdint.h definition. 9 | * 10 | * To use this file: 11 | * 12 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h 13 | * header file, as that directory will already be in the compilers include 14 | * path. 15 | * 16 | * 2) Rename the copied file stdint.h. 17 | * 18 | */ 19 | 20 | typedef signed char int8_t; 21 | typedef unsigned char uint8_t; 22 | typedef short int16_t; 23 | typedef unsigned short uint16_t; 24 | typedef long int32_t; 25 | typedef unsigned long uint32_t; 26 | 27 | #endif /* FREERTOS_STDINT */ 28 | -------------------------------------------------------------------------------- /FreeRTOS/port/RVDS/ARM_CM7/ReadMe.txt: -------------------------------------------------------------------------------- 1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers. 2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The 3 | revision is specified by an 'r' number, and a 'p' number, so will look something 4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the 5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use 6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used 7 | with all core revisions. 8 | 9 | The first option is to use the ARM Cortex-M4F port, and the second option is to 10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround. 11 | 12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be 13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in 14 | the /FreeRTOS/Source/portable/RVDS/ARM_CM4F directory. 15 | 16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM 17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1 18 | directory. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 基于野火指南者开发板的简易示波器,使用emwin544+freertos,用片上adc采样,最高1MHz采样 2 | 3 | *** 4 | 5 | > 使用野火的指南者开发板,自带屏幕。用PC5测量,按键K1可以调整采样率。另外PA4和PA5上发出相同的正弦波信号,正弦波频率可以按K2调节。暂时只有自动触发 6 | 7 | ~~按stm32手册上最快采样时间1.5周期的话最快是1us的转换时间,测试下来好像是能稍微更快一些,我也不确定。就算1.2MHz的话分辨率也不是很高,测个几十kHz的信号还是很准的,更高的就不太行了~~ 8 | 9 | ~~ADC连续转换每次需要的时间完全由ADC时钟来确定,根据手册1.5+12.5的转换周期,18MHz对应1,285,714点每秒,36MHz对应2,571,428点每秒,经过测试完全正确。最后使用18MHzADC时钟,并由1.2MHz的定时器来触发转换,也就是1,200,000点每秒。~~ 10 | 11 | ~~屏幕右边写了两个按钮,暂时只有测试作用,以后可以加个FFT和多通道进去。~~ 12 | 13 | *** 14 | 15 | # 以上全部作废,花了几天时间重新写了一个新的出来。 16 | 17 | ## 运行图片 18 | 19 | 测得另一个单片产生的PWM波 20 | 21 | 运行截图 22 | 23 | ## 功能总览 24 | > 1. 界面完全更新 25 | > 2. 可以显示波形或者FFT 26 | > 3. 最高采样率1M,最低500 27 | > 4. 使用FFT测量波形频率(在采样率很高时由于FFT点数依旧为1024会不准),显示峰峰值和最小值 28 | > 5. 按键调整触发电平大小、采样率、电压倍率、水平位移、垂直位移、DAC频率、N个显示点代表1个采样点 29 | > 6. 按键操作为:单击Key1为增大、上移、左移,Key2相反;双击Key1选择下一个参数,双击Key2选择上一个参数;三击调节DAC正弦波频率 30 | > 7. 屏幕右上角的按钮可以调整显示FFT或者波形,左上角的按钮可以暂停波形 31 | > 8. 只有自动触发 32 | ## 没有的功能(以后可能添加) 33 | > 1. 正常触发 34 | > 2. 波形保存 35 | > 3. 自动设置 36 | > 4. 多通道,目前只有一个通道 37 | > 38 | 39 | ## 引脚说明 40 | 41 | PA4和PA5输出DAC正弦波,PC5作为ADC的输入,两个按键分别为PA0和PC13,串口用USART1,PA9、PA10收发。 -------------------------------------------------------------------------------- /User/stm32f10x_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file Project/STM32F10x_StdPeriph_Template/stm32f10x_it.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 08-April-2011 7 | * @brief This file contains the headers of the interrupt handlers. 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 __STM32F10x_IT_H 24 | #define __STM32F10x_IT_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Includes ------------------------------------------------------------------*/ 31 | #include "stm32f10x.h" 32 | 33 | /* Exported types ------------------------------------------------------------*/ 34 | /* Exported constants --------------------------------------------------------*/ 35 | /* Exported macro ------------------------------------------------------------*/ 36 | /* Exported functions ------------------------------------------------------- */ 37 | 38 | void NMI_Handler(void); 39 | void HardFault_Handler(void); 40 | void MemManage_Handler(void); 41 | void BusFault_Handler(void); 42 | void UsageFault_Handler(void); 43 | void SVC_Handler(void); 44 | void DebugMon_Handler(void); 45 | void PendSV_Handler(void); 46 | void SysTick_Handler(void); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* __STM32F10x_IT_H */ 53 | 54 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 55 | -------------------------------------------------------------------------------- /Libraries/CMSIS/system_stm32f10x.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f10x.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | 22 | /** @addtogroup CMSIS 23 | * @{ 24 | */ 25 | 26 | /** @addtogroup stm32f10x_system 27 | * @{ 28 | */ 29 | 30 | /** 31 | * @brief Define to prevent recursive inclusion 32 | */ 33 | #ifndef __SYSTEM_STM32F10X_H 34 | #define __SYSTEM_STM32F10X_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @addtogroup STM32F10x_System_Includes 41 | * @{ 42 | */ 43 | 44 | /** 45 | * @} 46 | */ 47 | 48 | 49 | /** @addtogroup STM32F10x_System_Exported_types 50 | * @{ 51 | */ 52 | 53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @addtogroup STM32F10x_System_Exported_Constants 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @addtogroup STM32F10x_System_Exported_Macros 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @addtogroup STM32F10x_System_Exported_Functions 76 | * @{ 77 | */ 78 | 79 | extern void SystemInit(void); 80 | extern void SystemCoreClockUpdate(void); 81 | /** 82 | * @} 83 | */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /*__SYSTEM_STM32F10X_H */ 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 99 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_crc.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_CRC_H 25 | #define __STM32F10x_CRC_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup CRC 39 | * @{ 40 | */ 41 | 42 | /** @defgroup CRC_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup CRC_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup CRC_Exported_Macros 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup CRC_Exported_Functions 67 | * @{ 68 | */ 69 | 70 | void CRC_ResetDR(void); 71 | uint32_t CRC_CalcCRC(uint32_t Data); 72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 73 | uint32_t CRC_GetCRC(void); 74 | void CRC_SetIDRegister(uint8_t IDValue); 75 | uint8_t CRC_GetIDRegister(void); 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif /* __STM32F10x_CRC_H */ 82 | /** 83 | * @} 84 | */ 85 | 86 | /** 87 | * @} 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 95 | -------------------------------------------------------------------------------- /Project/RVMDK(uv5)/DebugConfig/Fire_F103_STM32F103ZE_1.0.0.dbgconf: -------------------------------------------------------------------------------- 1 | // File: STM32F101_102_103_105_107.dbgconf 2 | // Version: 1.0.0 3 | // Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008) 4 | // STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets 5 | 6 | // <<< Use Configuration Wizard in Context Menu >>> 7 | 8 | // Debug MCU configuration register (DBGMCU_CR) 9 | // Reserved bits must be kept at reset value 10 | // DBG_TIM11_STOP TIM11 counter stopped when core is halted 11 | // DBG_TIM10_STOP TIM10 counter stopped when core is halted 12 | // DBG_TIM9_STOP TIM9 counter stopped when core is halted 13 | // DBG_TIM14_STOP TIM14 counter stopped when core is halted 14 | // DBG_TIM13_STOP TIM13 counter stopped when core is halted 15 | // DBG_TIM12_STOP TIM12 counter stopped when core is halted 16 | // DBG_CAN2_STOP Debug CAN2 stopped when core is halted 17 | // DBG_TIM7_STOP TIM7 counter stopped when core is halted 18 | // DBG_TIM6_STOP TIM6 counter stopped when core is halted 19 | // DBG_TIM5_STOP TIM5 counter stopped when core is halted 20 | // DBG_TIM8_STOP TIM8 counter stopped when core is halted 21 | // DBG_I2C2_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted 22 | // DBG_I2C1_SMBUS_TIMEOUT SMBUS timeout mode stopped when core is halted 23 | // DBG_CAN1_STOP Debug CAN1 stopped when Core is halted 24 | // DBG_TIM4_STOP TIM4 counter stopped when core is halted 25 | // DBG_TIM3_STOP TIM3 counter stopped when core is halted 26 | // DBG_TIM2_STOP TIM2 counter stopped when core is halted 27 | // DBG_TIM1_STOP TIM1 counter stopped when core is halted 28 | // DBG_WWDG_STOP Debug window watchdog stopped when core is halted 29 | // DBG_IWDG_STOP Debug independent watchdog stopped when core is halted 30 | // DBG_STANDBY Debug standby mode 31 | // DBG_STOP Debug stop mode 32 | // DBG_SLEEP Debug sleep mode 33 | // 34 | DbgMCU_CR = 0x00000007; 35 | 36 | // <<< end of configuration section >>> 37 | -------------------------------------------------------------------------------- /User/FATFS/diskio.h: -------------------------------------------------------------------------------- 1 | /*-----------------------------------------------------------------------/ 2 | / Low level disk interface modlue include file (C)ChaN, 2014 / 3 | /-----------------------------------------------------------------------*/ 4 | 5 | #ifndef _DISKIO_DEFINED 6 | #define _DISKIO_DEFINED 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define _USE_WRITE 1 /* 1: Enable disk_write function */ 13 | #define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */ 14 | 15 | #include "integer.h" 16 | 17 | 18 | /* Status of Disk Functions */ 19 | typedef BYTE DSTATUS; 20 | 21 | /* Results of Disk Functions */ 22 | typedef enum { 23 | RES_OK = 0, /* 0: Successful */ 24 | RES_ERROR, /* 1: R/W Error */ 25 | RES_WRPRT, /* 2: Write Protected */ 26 | RES_NOTRDY, /* 3: Not Ready */ 27 | RES_PARERR /* 4: Invalid Parameter */ 28 | } DRESULT; 29 | 30 | 31 | /*---------------------------------------*/ 32 | /* Prototypes for disk control functions */ 33 | 34 | 35 | DSTATUS disk_initialize (BYTE pdrv); 36 | DSTATUS disk_status (BYTE pdrv); 37 | DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count); 38 | DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); 39 | DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); 40 | 41 | 42 | /* Disk Status Bits (DSTATUS) */ 43 | 44 | #define STA_NOINIT 0x01 /* Drive not initialized */ 45 | #define STA_NODISK 0x02 /* No medium in the drive */ 46 | #define STA_PROTECT 0x04 /* Write protected */ 47 | 48 | 49 | /* Command code for disk_ioctrl fucntion */ 50 | 51 | /* Generic command (Used by FatFs) */ 52 | #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ 53 | #define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */ 54 | #define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */ 55 | #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */ 56 | #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */ 57 | 58 | /* Generic command (Not used by FatFs) */ 59 | #define CTRL_POWER 5 /* Get/Set power status */ 60 | #define CTRL_LOCK 6 /* Lock/Unlock media removal */ 61 | #define CTRL_EJECT 7 /* Eject media */ 62 | #define CTRL_FORMAT 8 /* Create physical format on the media */ 63 | 64 | /* MMC/SDC specific ioctl command */ 65 | #define MMC_GET_TYPE 10 /* Get card type */ 66 | #define MMC_GET_CSD 11 /* Get CSD */ 67 | #define MMC_GET_CID 12 /* Get CID */ 68 | #define MMC_GET_OCR 13 /* Get OCR */ 69 | #define MMC_GET_SDSTAT 14 /* Get SD status */ 70 | 71 | /* ATA/CF specific ioctl command */ 72 | #define ATA_GET_REV 20 /* Get F/W revision */ 73 | #define ATA_GET_MODEL 21 /* Get model name */ 74 | #define ATA_GET_SN 22 /* Get serial number */ 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_Version.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_Version.h 44 | Purpose : Include file defining current GUI version 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_VERSION_H 49 | #define GUI_VERSION_H 50 | 51 | #define GUI_VERSION 54401 52 | 53 | #endif /* Avoid multiple inclusion */ 54 | 55 | /*************************** End of file ****************************/ 56 | -------------------------------------------------------------------------------- /DSP/stm32_dsp.h: -------------------------------------------------------------------------------- 1 | /******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** 2 | * File Name : stm32_dsp.h 3 | * Author : MCD Application Team 4 | * Version : V1.0.1 5 | * Date : 10/20/2008 6 | * Description : This source file contains prototypes of DSP functions 7 | ******************************************************************************** 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. 10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE 12 | * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING 13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 14 | *******************************************************************************/ 15 | 16 | /* Define to prevent recursive inclusion -------------------------------------*/ 17 | #ifndef __STM32F10x_DSP_H 18 | #define __STM32F10x_DSP_H 19 | 20 | /* Includes ------------------------------------------------------------------*/ 21 | #include "stm32f10x.h" 22 | //#include "stm32f1xx_hal.h" 23 | 24 | #define u8 uint8_t 25 | #define u16 uint16_t 26 | #define u32 uint32_t 27 | #define s16 int16_t 28 | 29 | 30 | /* Exported types ------------------------------------------------------------*/ 31 | /* for block FIR module */ 32 | typedef struct { 33 | u16 *h; 34 | u32 nh; 35 | } COEFS; 36 | 37 | /* Exported constants --------------------------------------------------------*/ 38 | /* Exported macro ------------------------------------------------------------*/ 39 | /* Exported functions ------------------------------------------------------- */ 40 | 41 | /* FIR 16-bit filter in assembly */ 42 | void fir_16by16_stm32(void *y, void *x, COEFS *c, u32 N); 43 | 44 | /* PID controller in C, error computed outside the function */ 45 | u16 DoPID(u16 Error, u16 *Coeff); 46 | 47 | /* Full PID in C, error computed inside the function */ 48 | u16 DoFullPID(u16 In, u16 Ref, u16 *Coeff); 49 | 50 | /* PID controller in assembly, error computed outside the function */ 51 | u16 PID_stm32(u16 Error, u16 *Coeff); 52 | 53 | /* Radix-4 complex FFT for STM32, in assembly */ 54 | /* 64 points*/ 55 | void cr4_fft_64_stm32(void *pssOUT, void *pssIN, u16 Nbin); 56 | /* 256 points */ 57 | void cr4_fft_256_stm32(void *pssOUT, void *pssIN, u16 Nbin); 58 | /* 1024 points */ 59 | void cr4_fft_1024_stm32(void *pssOUT, void *pssIN, u16 Nbin); 60 | 61 | /* IIR filter in assembly */ 62 | void iirarma_stm32(void *y, void *x, u16 *h2, u16 *h1, u32 ny ); 63 | 64 | /* IIR filter in C */ 65 | void iir_biquad_stm32(u16 *y, u16 *x, s16 *IIRCoeff, u16 ny); 66 | 67 | #endif /* __STM32F10x_DSP_H */ 68 | 69 | /******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ 70 | -------------------------------------------------------------------------------- /STemWin/Config/LCDConf.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Portions COPYRIGHT 2013 STMicroelectronics * 3 | * Portions SEGGER Microcontroller GmbH & Co. KG * 4 | * Solutions for real time microcontroller applications * 5 | ********************************************************************** 6 | * * 7 | * (c) 1996 - 2013 SEGGER Microcontroller GmbH & Co. KG * 8 | * * 9 | * Internet: www.segger.com Support: support@segger.com * 10 | * * 11 | ********************************************************************** 12 | 13 | ** emWin V5.22 - Graphical user interface for embedded applications ** 14 | All Intellectual Property rights in the Software belongs to SEGGER. 15 | emWin is protected by international copyright laws. Knowledge of the 16 | source code may not be used to write a similar product. This file may 17 | only be used in accordance with the following terms: 18 | 19 | The software has been licensed to STMicroelectronics International 20 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 21 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 22 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 23 | troller products commercialized by Licensee only, sublicensed and dis_ 24 | tributed under the terms and conditions of the End User License Agree_ 25 | ment supplied by STMicroelectronics International N.V. 26 | Full source code is available at: www.segger.com 27 | 28 | We appreciate your understanding and fairness. 29 | ---------------------------------------------------------------------- 30 | File : LCDConf.h 31 | Purpose : Display driver configuration file 32 | ---------------------------------------------------------------------- 33 | */ 34 | 35 | /** 36 | ****************************************************************************** 37 | * @attention 38 | * 39 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 40 | * You may not use this file except in compliance with the License. 41 | * You may obtain a copy of the License at: 42 | * 43 | * http://www.st.com/software_license_agreement_liberty_v2 44 | * 45 | * Unless required by applicable law or agreed to in writing, software 46 | * distributed under the License is distributed on an "AS IS" BASIS, 47 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 48 | * See the License for the specific language governing permissions and 49 | * limitations under the License. 50 | * 51 | ****************************************************************************** 52 | */ 53 | 54 | #ifndef LCDCONF_H 55 | #define LCDCONF_H 56 | 57 | #endif /* LCDCONF_H */ 58 | 59 | /*************************** End of file ****************************/ 60 | -------------------------------------------------------------------------------- /STemWin/inc/GUIDRV_Template.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIDRV_Template.h 44 | Purpose : Interface definition for GUIDRV_Template driver 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUIDRV_TEMPLATE_H 49 | #define GUIDRV_TEMPLATE_H 50 | 51 | /********************************************************************* 52 | * 53 | * Display drivers 54 | */ 55 | // 56 | // Addresses 57 | // 58 | extern const GUI_DEVICE_API GUIDRV_Win_API; 59 | 60 | extern const GUI_DEVICE_API GUIDRV_Template_API; 61 | 62 | // 63 | // Macros to be used in configuration files 64 | // 65 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 66 | 67 | #define GUIDRV_TEMPLATE &GUIDRV_Win_API 68 | 69 | #else 70 | 71 | #define GUIDRV_TEMPLATE &GUIDRV_Template_API 72 | 73 | #endif 74 | 75 | #endif 76 | 77 | /*************************** End of file ****************************/ 78 | -------------------------------------------------------------------------------- /STemWin/inc/GUIDRV_NoOpt_1_8.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIDRV_NoOpt_1_8.h 44 | Purpose : Interface definition for non optimized drawing functions 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #include "GUI_Private.h" 49 | 50 | #ifndef GUIDRV_NOOPT_1_8_H 51 | #define GUIDRV_NOOPT_1_8_H 52 | 53 | void GUIDRV__NoOpt_XorPixel (GUI_DEVICE * pDevice, int x, int y); 54 | void GUIDRV__NoOpt_DrawHLine (GUI_DEVICE * pDevice, int x0, int y, int x1); 55 | void GUIDRV__NoOpt_DrawVLine (GUI_DEVICE * pDevice, int x, int y0, int y1); 56 | void GUIDRV__NoOpt_FillRect (GUI_DEVICE * pDevice, int x0, int y0, int x1, int y1); 57 | void GUIDRV__NoOpt_DrawBitmap(GUI_DEVICE * pDevice, int x0, int y0, int xSize, int ySize, int BitsPerPixel, int BytesPerLine, const U8 * pData, int Diff, const LCD_PIXELINDEX * pTrans); 58 | 59 | #endif 60 | 61 | /*************************** End of file ****************************/ 62 | -------------------------------------------------------------------------------- /STemWin/inc/MESSAGEBOX.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : MESSAGEBOX.h 44 | Purpose : Message box interface 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef MESSAGEBOX_H 49 | #define MESSAGEBOX_H 50 | 51 | #include "WM.h" 52 | 53 | #if GUI_WINSUPPORT 54 | 55 | #if defined(__cplusplus) 56 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 57 | #endif 58 | 59 | WM_HWIN MESSAGEBOX_Create(const char * sMessage, const char * sCaption, int Flags); 60 | 61 | /********************************************************************* 62 | * 63 | * The callback ... 64 | * 65 | * Do not call it directly ! It is only to be used from within an 66 | * overwritten callback. 67 | */ 68 | void MESSAGEBOX_Callback(WM_MESSAGE * pMsg); 69 | 70 | #if defined(__cplusplus) 71 | } 72 | #endif 73 | 74 | #endif /* GUI_WINSUPPORT */ 75 | 76 | #endif /* MESSAGEBOX */ 77 | 78 | /*************************** End of file ****************************/ 79 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_wwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_wwdg.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the WWDG firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_WWDG_H 25 | #define __STM32F10x_WWDG_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup WWDG 39 | * @{ 40 | */ 41 | 42 | /** @defgroup WWDG_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup WWDG_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup WWDG_Prescaler 55 | * @{ 56 | */ 57 | 58 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 59 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 60 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 61 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 62 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 63 | ((PRESCALER) == WWDG_Prescaler_2) || \ 64 | ((PRESCALER) == WWDG_Prescaler_4) || \ 65 | ((PRESCALER) == WWDG_Prescaler_8)) 66 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 67 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) 68 | 69 | /** 70 | * @} 71 | */ 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | /** @defgroup WWDG_Exported_Macros 78 | * @{ 79 | */ 80 | /** 81 | * @} 82 | */ 83 | 84 | /** @defgroup WWDG_Exported_Functions 85 | * @{ 86 | */ 87 | 88 | void WWDG_DeInit(void); 89 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 90 | void WWDG_SetWindowValue(uint8_t WindowValue); 91 | void WWDG_EnableIT(void); 92 | void WWDG_SetCounter(uint8_t Counter); 93 | void WWDG_Enable(uint8_t Counter); 94 | FlagStatus WWDG_GetFlagStatus(void); 95 | void WWDG_ClearFlag(void); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /* __STM32F10x_WWDG_H */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | 115 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 116 | -------------------------------------------------------------------------------- /User/stm32f10x_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file Project/STM32F10x_StdPeriph_Template/stm32f10x_conf.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 08-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 __STM32F10x_CONF_H 24 | #define __STM32F10x_CONF_H 25 | 26 | /* Includes ------------------------------------------------------------------*/ 27 | /* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */ 28 | #include "stm32f10x_adc.h" 29 | #include "stm32f10x_bkp.h" 30 | #include "stm32f10x_can.h" 31 | #include "stm32f10x_cec.h" 32 | #include "stm32f10x_crc.h" 33 | #include "stm32f10x_dac.h" 34 | #include "stm32f10x_dbgmcu.h" 35 | #include "stm32f10x_dma.h" 36 | #include "stm32f10x_exti.h" 37 | #include "stm32f10x_flash.h" 38 | #include "stm32f10x_fsmc.h" 39 | #include "stm32f10x_gpio.h" 40 | #include "stm32f10x_i2c.h" 41 | #include "stm32f10x_iwdg.h" 42 | #include "stm32f10x_pwr.h" 43 | #include "stm32f10x_rcc.h" 44 | #include "stm32f10x_rtc.h" 45 | #include "stm32f10x_sdio.h" 46 | #include "stm32f10x_spi.h" 47 | #include "stm32f10x_tim.h" 48 | #include "stm32f10x_usart.h" 49 | #include "stm32f10x_wwdg.h" 50 | #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ 51 | 52 | /* Exported types ------------------------------------------------------------*/ 53 | /* Exported constants --------------------------------------------------------*/ 54 | /* Uncomment the line below to expanse the "assert_param" macro in the 55 | Standard Peripheral Library drivers code */ 56 | /* #define USE_FULL_ASSERT 1 */ 57 | 58 | /* Exported macro ------------------------------------------------------------*/ 59 | 60 | //#define USE_FULL_ASSERT 61 | #ifdef USE_FULL_ASSERT 62 | 63 | /** 64 | * @brief The assert_param macro is used for function's parameters check. 65 | * @param expr: If expr is false, it calls assert_failed function which reports 66 | * the name of the source file and the source line number of the call 67 | * that failed. If expr is true, it returns no value. 68 | * @retval None 69 | */ 70 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 71 | /* Exported functions ------------------------------------------------------- */ 72 | void assert_failed(uint8_t* file, uint32_t line); 73 | #else 74 | #define assert_param(expr) ((void)0) 75 | #endif /* USE_FULL_ASSERT */ 76 | 77 | 78 | 79 | #endif /* __STM32F10x_CONF_H */ 80 | 81 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 82 | -------------------------------------------------------------------------------- /STemWin/inc/WINDOW_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : WINDOW_Private.h 44 | Purpose : WINDOW private header file 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef WINDOW_PRIVATE_H 49 | #define WINDOW_PRIVATE_H 50 | 51 | #include "WM.h" 52 | 53 | #if GUI_WINSUPPORT 54 | 55 | /********************************************************************* 56 | * 57 | * Object definition 58 | * 59 | ********************************************************************** 60 | */ 61 | 62 | typedef struct { 63 | WIDGET Widget; 64 | WM_CALLBACK * cb; 65 | WM_HWIN hFocusedChild; 66 | WM_DIALOG_STATUS * pDialogStatus; 67 | GUI_COLOR BkColor; 68 | } WINDOW_OBJ; 69 | 70 | /********************************************************************* 71 | * 72 | * Externals 73 | * 74 | ********************************************************************** 75 | */ 76 | 77 | extern GUI_COLOR WINDOW__DefaultBkColor; 78 | 79 | #endif /* GUI_WINSUPPORT */ 80 | #endif /* WINDOW_PRIVATE_H */ 81 | 82 | /*************************** End of file ****************************/ 83 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_SPRITE_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_SPRITE_Private.h 44 | Purpose : Private header file for sprites 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_SPRITE_PRIVATE_H 49 | #define GUI_SPRITE_PRIVATE_H 50 | 51 | /********************************************************************* 52 | * 53 | * Defines 54 | * 55 | ********************************************************************** 56 | */ 57 | #define SPRITE_LOCK_H(h) (GUI_SPRITE_OBJ *)GUI_LOCK_H(h) 58 | 59 | /********************************************************************* 60 | * 61 | * Types 62 | * 63 | ********************************************************************** 64 | */ 65 | // 66 | // The sprite object 67 | // 68 | typedef struct { 69 | GUI_DEVICE * pDevice; 70 | GUI_RECT Rect; 71 | GUI_HMEM hColors; 72 | U16 Flags; 73 | const GUI_BITMAP * pBM; 74 | void (* pCB)(GUI_HSPRITE hSprite, int Cmd); // Callback routine for animated sprites 75 | GUI_HMEM hContext; 76 | } GUI_SPRITE_OBJ; 77 | 78 | 79 | #endif // GUI_SPRITE_PRIVATE_H 80 | 81 | /*************************** End of file ****************************/ 82 | -------------------------------------------------------------------------------- /STemWin/inc/LCD_ConfDefaults.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : LCD_ConfDefaults.h 44 | Purpose : Valid LCD configuration and defaults 45 | ---------------------------------------------------------------------- 46 | */ 47 | 48 | #ifndef LCD_CONFIG_DEFAULTS_H 49 | #define LCD_CONFIG_DEFAULTS_H 50 | 51 | #include "LCDConf.h" /* Configuration header file */ 52 | 53 | /********************************************************** 54 | * 55 | * Configuration defaults 56 | */ 57 | #ifndef LCD_MIRROR_X 58 | #define LCD_MIRROR_X 0 59 | #endif 60 | #ifndef LCD_MIRROR_Y 61 | #define LCD_MIRROR_Y 0 62 | #endif 63 | #ifndef LCD_SWAP_XY 64 | #define LCD_SWAP_XY 0 65 | #endif 66 | #ifndef LCD_FIRSTCOM0 67 | #define LCD_FIRSTCOM0 0 68 | #endif 69 | #ifndef LCD_FIRSTSEG0 70 | #define LCD_FIRSTSEG0 0 71 | #endif 72 | #ifndef LCD_SWAP_RB 73 | #define LCD_SWAP_RB 0 74 | #endif 75 | #ifndef LCD_DISPLAY_INDEX 76 | #define LCD_DISPLAY_INDEX 0 77 | #endif 78 | #ifndef LCD_ENDIAN_BIG 79 | #define LCD_ENDIAN_BIG 0 80 | #endif 81 | #ifndef LCD_ALLOW_NON_OPTIMIZED_MODE 82 | #define LCD_ALLOW_NON_OPTIMIZED_MODE 1 83 | #endif 84 | 85 | #endif /* LCD_CONFIG_DEFAULTS_H */ 86 | 87 | /*************************** End of file ****************************/ 88 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_HOOK.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ------------------------------------------------ 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | 43 | ---------------------------------------------------------------------- 44 | File : GUI_HOOK.h 45 | Purpose : Hook handling routines 46 | --------------------END-OF-HEADER------------------------------------- 47 | */ 48 | 49 | #ifndef GUI_HOOK_H 50 | #define GUI_HOOK_H 51 | 52 | #include "WM_Intern.h" 53 | 54 | #if GUI_WINSUPPORT 55 | 56 | #if defined(__cplusplus) 57 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 58 | #endif 59 | 60 | /********************************************************************* 61 | * 62 | * Types 63 | * 64 | ********************************************************************** 65 | */ 66 | 67 | typedef int GUI_HOOK_FUNC(WM_MESSAGE* pMsg); 68 | 69 | typedef struct GUI_HOOK { 70 | struct GUI_HOOK* pNext; 71 | GUI_HOOK_FUNC* pHookFunc; 72 | } GUI_HOOK; 73 | 74 | /********************************************************************* 75 | * 76 | * Functions 77 | * 78 | ********************************************************************** 79 | */ 80 | 81 | void GUI_HOOK_Add (GUI_HOOK** ppFirstHook, GUI_HOOK* pNewHook, GUI_HOOK_FUNC* pHookFunc); 82 | void GUI_HOOK_Remove(GUI_HOOK** ppFirstHook, GUI_HOOK* pHook); 83 | 84 | #if defined(__cplusplus) 85 | } 86 | #endif 87 | 88 | #endif /* GUI_WINSUPPORT */ 89 | #endif /* GUI_HOOK_H */ 90 | 91 | /*************************** End of file ****************************/ 92 | -------------------------------------------------------------------------------- /STemWin/inc/GUIDRV_Dist.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIDRV_Dist.h 44 | Purpose : Interface definition for GUIDRV_Dist driver 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUIDRV_DIST_H 49 | #define GUIDRV_DIST_H 50 | 51 | #if defined(__cplusplus) 52 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 53 | #endif 54 | 55 | /********************************************************************* 56 | * 57 | * Display driver 58 | */ 59 | // 60 | // Address 61 | // 62 | extern const GUI_DEVICE_API GUIDRV_Dist_API; 63 | 64 | // 65 | // Macros to be used in configuration files 66 | // 67 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 68 | 69 | #define GUIDRV_DIST &GUIDRV_Win_API 70 | 71 | #else 72 | 73 | #define GUIDRV_DIST &GUIDRV_Dist_API 74 | 75 | #endif 76 | 77 | /********************************************************************* 78 | * 79 | * Public routines 80 | */ 81 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 82 | 83 | #define GUIDRV_Dist_AddDriver(pDevice, pDriver, pRect) 84 | 85 | #else 86 | 87 | void GUIDRV_Dist_AddDriver(GUI_DEVICE * pDevice, GUI_DEVICE * pDriver, GUI_RECT * pRect); 88 | 89 | #endif 90 | 91 | #if defined(__cplusplus) 92 | } 93 | #endif 94 | 95 | #endif /* GUIDRV_DIST_H */ 96 | 97 | /*************************** End of file ****************************/ 98 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_ARRAY_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_ARRAY_Private.h 44 | Purpose : Private array handling routines, should be used only 45 | from within GUI_ARRAY... routines! 46 | ---------------------------END-OF-HEADER------------------------------ 47 | */ 48 | 49 | #ifndef GUI_ARRAY_PRIVATE_H 50 | #define GUI_ARRAY_PRIVATE_H 51 | 52 | #include "GUI_ARRAY.h" 53 | 54 | #if GUI_WINSUPPORT 55 | 56 | /********************************************************************* 57 | * 58 | * Private types 59 | * 60 | ********************************************************************** 61 | */ 62 | typedef struct { 63 | U16 NumItems; 64 | WM_HMEM haHandle; /* Handle to buffer holding handles */ 65 | } GUI_ARRAY_OBJ; 66 | 67 | /********************************************************************* 68 | * 69 | * Private functions 70 | * 71 | ********************************************************************** 72 | */ 73 | WM_HMEM GUI_ARRAY__GethItem (const GUI_ARRAY_OBJ * pThis, unsigned int Index); 74 | void * GUI_ARRAY__GetpItem (const GUI_ARRAY_OBJ * pThis, unsigned int Index); 75 | void * GUI_ARRAY__GetpItemLocked(const GUI_ARRAY_OBJ * pThis, unsigned int Index); 76 | int GUI_ARRAY__SethItem ( GUI_ARRAY_OBJ * pThis, unsigned int Index, WM_HMEM hItem); 77 | 78 | #endif /* GUI_WINSUPPORT */ 79 | 80 | #endif /* GUI_ARRAY_PRIVATE_H */ 81 | 82 | /*************************** End of file ****************************/ 83 | -------------------------------------------------------------------------------- /STemWin/inc/GUIDRV_DCache.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIDRV_DCache.h 44 | Purpose : Interface definition for GUIDRV_DCache driver 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUIDRV_DCACHE_H 49 | #define GUIDRV_DCACHE_H 50 | 51 | #if defined(__cplusplus) 52 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 53 | #endif 54 | 55 | /********************************************************************* 56 | * 57 | * Display driver 58 | */ 59 | // 60 | // Address 61 | // 62 | extern const GUI_DEVICE_API GUIDRV_DCache_API; 63 | 64 | // 65 | // Macros to be used in configuration files 66 | // 67 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 68 | 69 | #define GUIDRV_DCACHE &GUIDRV_Win_API 70 | 71 | #else 72 | 73 | #define GUIDRV_DCACHE &GUIDRV_DCache_API 74 | 75 | #endif 76 | 77 | /********************************************************************* 78 | * 79 | * Public routines 80 | */ 81 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 82 | 83 | #define GUIDRV_DCache_AddDriver(pDevice, pDriver) 84 | #define GUIDRV_DCache_SetMode1bpp(pDevice) 85 | 86 | #else 87 | 88 | void GUIDRV_DCache_AddDriver (GUI_DEVICE * pDevice, GUI_DEVICE * pDriver); 89 | void GUIDRV_DCache_SetMode1bpp(GUI_DEVICE * pDevice); 90 | 91 | #endif 92 | 93 | #if defined(__cplusplus) 94 | } 95 | #endif 96 | 97 | #endif /* GUIDRV_DCACHE_H */ 98 | 99 | /*************************** End of file ****************************/ 100 | -------------------------------------------------------------------------------- /Libraries/FWlib/src/stm32f10x_crc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_crc.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the CRC firmware functions. 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 | /* Includes ------------------------------------------------------------------*/ 23 | #include "stm32f10x_crc.h" 24 | 25 | /** @addtogroup STM32F10x_StdPeriph_Driver 26 | * @{ 27 | */ 28 | 29 | /** @defgroup CRC 30 | * @brief CRC driver modules 31 | * @{ 32 | */ 33 | 34 | /** @defgroup CRC_Private_TypesDefinitions 35 | * @{ 36 | */ 37 | 38 | /** 39 | * @} 40 | */ 41 | 42 | /** @defgroup CRC_Private_Defines 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup CRC_Private_Macros 51 | * @{ 52 | */ 53 | 54 | /** 55 | * @} 56 | */ 57 | 58 | /** @defgroup CRC_Private_Variables 59 | * @{ 60 | */ 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup CRC_Private_FunctionPrototypes 67 | * @{ 68 | */ 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @defgroup CRC_Private_Functions 75 | * @{ 76 | */ 77 | 78 | /** 79 | * @brief Resets the CRC Data register (DR). 80 | * @param None 81 | * @retval None 82 | */ 83 | void CRC_ResetDR(void) 84 | { 85 | /* Reset CRC generator */ 86 | CRC->CR = CRC_CR_RESET; 87 | } 88 | 89 | /** 90 | * @brief Computes the 32-bit CRC of a given data word(32-bit). 91 | * @param Data: data word(32-bit) to compute its CRC 92 | * @retval 32-bit CRC 93 | */ 94 | uint32_t CRC_CalcCRC(uint32_t Data) 95 | { 96 | CRC->DR = Data; 97 | 98 | return (CRC->DR); 99 | } 100 | 101 | /** 102 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit). 103 | * @param pBuffer: pointer to the buffer containing the data to be computed 104 | * @param BufferLength: length of the buffer to be computed 105 | * @retval 32-bit CRC 106 | */ 107 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) 108 | { 109 | uint32_t index = 0; 110 | 111 | for(index = 0; index < BufferLength; index++) 112 | { 113 | CRC->DR = pBuffer[index]; 114 | } 115 | return (CRC->DR); 116 | } 117 | 118 | /** 119 | * @brief Returns the current CRC value. 120 | * @param None 121 | * @retval 32-bit CRC 122 | */ 123 | uint32_t CRC_GetCRC(void) 124 | { 125 | return (CRC->DR); 126 | } 127 | 128 | /** 129 | * @brief Stores a 8-bit data in the Independent Data(ID) register. 130 | * @param IDValue: 8-bit value to be stored in the ID register 131 | * @retval None 132 | */ 133 | void CRC_SetIDRegister(uint8_t IDValue) 134 | { 135 | CRC->IDR = IDValue; 136 | } 137 | 138 | /** 139 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register 140 | * @param None 141 | * @retval 8-bit value of the ID register 142 | */ 143 | uint8_t CRC_GetIDRegister(void) 144 | { 145 | return (CRC->IDR); 146 | } 147 | 148 | /** 149 | * @} 150 | */ 151 | 152 | /** 153 | * @} 154 | */ 155 | 156 | /** 157 | * @} 158 | */ 159 | 160 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 161 | -------------------------------------------------------------------------------- /STemWin/inc/Global.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : Global.h 44 | Purpose : Global types 45 | In case your application already has a Global.h, you should 46 | merge the files. In order to use Segger code, the types 47 | U8, U16, U32, I8, I16, I32 need to be defined in Global.h; 48 | additional definitions do not hurt. 49 | Revision: $Rev: 6050 $ 50 | ---------------------------END-OF-HEADER------------------------------ 51 | */ 52 | 53 | #ifndef GLOBAL_H // Guard against multiple inclusion 54 | #define GLOBAL_H 55 | 56 | #define U8 unsigned char 57 | #define I8 signed char 58 | #define U16 unsigned short 59 | #define I16 signed short 60 | #ifdef __x86_64__ 61 | #define U32 unsigned 62 | #define I32 int 63 | #else 64 | #define U32 unsigned long 65 | #define I32 signed long 66 | #endif 67 | 68 | #ifdef _WIN32 69 | // 70 | // Microsoft VC6 compiler related 71 | // 72 | #ifdef __MINGW32__ 73 | #define U64 unsigned long long 74 | #define I64 long long 75 | #else 76 | #define U64 unsigned __int64 77 | #define U128 unsigned __int128 78 | #define I64 __int64 79 | #define I128 __int128 80 | #if _MSC_VER <= 1200 81 | #define U64_C(x) x##UI64 82 | #else 83 | #define U64_C(x) x##ULL 84 | #endif 85 | #endif 86 | #else 87 | // 88 | // C99 compliant compiler 89 | // 90 | #define U64 unsigned long long 91 | #define I64 signed long long 92 | #define U64_C(x) x##ULL 93 | #endif 94 | 95 | #endif // Avoid multiple inclusion 96 | 97 | /*************************** End of file ****************************/ 98 | -------------------------------------------------------------------------------- /STemWin/inc/WM_GUI.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : WM_GUI.h 44 | Purpose : Windows manager include for low level GUI routines 45 | ---------------------------------------------------------------------- 46 | */ 47 | 48 | #ifndef WM_GUI_H /* Make sure we only include it once */ 49 | #define WM_GUI_H 50 | 51 | #if defined(__cplusplus) 52 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 53 | #endif 54 | 55 | int WM__InitIVRSearch(const GUI_RECT* pMaxRect); 56 | int WM__GetNextIVR (void); 57 | int WM__GetOrgX_AA(void); 58 | int WM__GetOrgY_AA(void); 59 | 60 | #define WM_ITERATE_START(pRect) \ 61 | { \ 62 | if (WM__InitIVRSearch(pRect)) \ 63 | do { 64 | 65 | #define WM_ITERATE_END() \ 66 | } while (WM__GetNextIVR()); \ 67 | } 68 | 69 | #define WM_ADDORGX(x) (x += GUI_pContext->xOff) 70 | #define WM_ADDORGY(y) (y += GUI_pContext->yOff) 71 | #define WM_ADDORG(x0,y0) WM_ADDORGX(x0); WM_ADDORGY(y0) 72 | #define WM_ADDORGX_AA(x) (x += WM__GetOrgX_AA()) 73 | #define WM_ADDORGY_AA(y) (y += WM__GetOrgY_AA()) 74 | #define WM_ADDORG_AA(x0,y0) WM_ADDORGX_AA(x0); WM_ADDORGY_AA(y0) 75 | #define WM_SUBORGX(x) (x -= GUI_pContext->xOff) 76 | #define WM_SUBORGY(y) (y -= GUI_pContext->yOff) 77 | #define WM_SUBORG(x0,y0) WM_SUBORGX(x0); WM_SUBORGY(y0) 78 | 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | 84 | #endif /* Avoid multiple inclusion */ 85 | 86 | /*************************** End of file ****************************/ 87 | -------------------------------------------------------------------------------- /STemWin/inc/GUIMTDRV_TangoC32.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIMTDRV_TangoC32.h 44 | Purpose : Interface definition for GUIMTDRV_TangoC32 driver 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUIMTDRV_TANGOC32_H 49 | #define GUIMTDRV_TANGOC32_H 50 | 51 | #include "GUI_Type.h" 52 | 53 | #if defined(__cplusplus) 54 | //extern "C" { /* Make sure we have C-declarations in C++ programs */ 55 | #endif 56 | 57 | /********************************************************************* 58 | * 59 | * Types 60 | * 61 | ********************************************************************** 62 | */ 63 | typedef struct { 64 | int LayerIndex; 65 | // 66 | // Initialization 67 | // 68 | void (* pf_I2C_Init)(unsigned char SlaveAddr); 69 | // 70 | // Read- and write access 71 | // 72 | int (* pf_I2C_Read )(unsigned char * pData, int Start, int Stop); 73 | int (* pf_I2C_ReadM )(unsigned char * pData, int NumItems, int Start, int Stop); 74 | int (* pf_I2C_Write )(unsigned char Data, int Start, int Stop); 75 | int (* pf_I2C_WriteM)(unsigned char * pData, int NumItems, int Start, int Stop); 76 | // 77 | // 7-bit address to be used to address the I2C slave 78 | // 79 | U8 SlaveAddr; 80 | } GUIMTDRV_TANGOC32_CONFIG; 81 | 82 | /********************************************************************* 83 | * 84 | * Interface 85 | * 86 | ********************************************************************** 87 | */ 88 | int GUIMTDRV_TangoC32_Init(GUIMTDRV_TANGOC32_CONFIG * pConfig); 89 | int GUIMTDRV_TangoC32_Exec(void); 90 | 91 | #endif /* GUIMTDRV_TANGOC32_H */ 92 | 93 | /*************************** End of file ****************************/ 94 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_SetOrientation.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_SetOrientation.h 44 | Purpose : Private include file for GUI_SetOrientation_xxx 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_SETORIENTATION_H 49 | #define GUI_SETORIENTATION_H 50 | 51 | #include "GUI_Private.h" 52 | 53 | /********************************************************************* 54 | * 55 | * Defines 56 | * 57 | ********************************************************************** 58 | */ 59 | // 60 | // Use unique context identified 61 | // 62 | #define DRIVER_CONTEXT DRIVER_CONTEXT_ORIENTATION 63 | 64 | /********************************************************************* 65 | * 66 | * Types 67 | * 68 | ********************************************************************** 69 | */ 70 | /********************************************************************* 71 | * 72 | * DRIVER_CONTEXT 73 | */ 74 | typedef struct DRIVER_CONTEXT DRIVER_CONTEXT; 75 | 76 | struct DRIVER_CONTEXT { 77 | void (* pfLog2Phys)(DRIVER_CONTEXT * pContext, int x, int y, int * px_phys, int * py_phys); 78 | U8 * pData; 79 | int BytesPerPixel; 80 | int BytesPerLine; 81 | int Orientation; 82 | int xSize, ySize; 83 | int vxSize, vySize; 84 | int PixelOffset; 85 | const GUI_ORIENTATION_API * pDrawingAPI; 86 | }; 87 | 88 | /********************************************************************* 89 | * 90 | * Private interface 91 | * 92 | ********************************************************************** 93 | */ 94 | void GUI__Sort(int * p0, int * p1); 95 | 96 | #endif /* GUI_SETORIENTATION_H */ 97 | 98 | /*************************** End of file ****************************/ 99 | -------------------------------------------------------------------------------- /STemWin/Config/GUIConf.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | File : GUIConf.c 30 | Purpose : Display controller initialization 31 | ---------------------------END-OF-HEADER------------------------------ 32 | */ 33 | 34 | /** 35 | ****************************************************************************** 36 | * @attention 37 | * 38 | *

© Copyright (c) 2018 STMicroelectronics. 39 | * All rights reserved.

40 | * 41 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 42 | * the "License"; You may not use this file except in compliance with the License. 43 | * You may obtain a copy of the License at: 44 | * http://www.st.com/SLA0044 45 | * 46 | ****************************************************************************** 47 | */ 48 | 49 | #ifndef GUICONF_H 50 | #define GUICONF_H 51 | 52 | /********************************************************************* 53 | * 54 | * Multi layer/display support 55 | */ 56 | #define GUI_NUM_LAYERS 1 // Maximum number of available layers 57 | 58 | /********************************************************************* 59 | * 60 | * Multi tasking support 61 | */ 62 | #ifdef OS_SUPPORT 63 | #define GUI_OS (1) // Compile with multitasking support 64 | #else 65 | #define GUI_OS (0) 66 | #endif 67 | 68 | /********************************************************************* 69 | * 70 | * Configuration of touch support 71 | */ 72 | #ifndef GUI_SUPPORT_TOUCH 73 | #define GUI_SUPPORT_TOUCH (1) // Support touchscreen 74 | #endif 75 | 76 | /********************************************************************* 77 | * 78 | * Default font 79 | */ 80 | #define GUI_DEFAULT_FONT &GUI_Font6x8 81 | 82 | /********************************************************************* 83 | * 84 | * Configuration of available packages 85 | */ 86 | #define GUI_SUPPORT_MOUSE (1) /* Support a mouse */ 87 | #define GUI_WINSUPPORT (1) /* Use window manager */ 88 | #define GUI_SUPPORT_MEMDEV (1) /* Memory device package available */ 89 | #define GUI_SUPPORT_DEVICES (1) /* Enable use of device pointers */ 90 | 91 | /********************************************************************* 92 | * 93 | * ARGB support 94 | */ 95 | #define GUI_USE_ARGB (1) 96 | 97 | #endif /* Avoid multiple inclusion */ 98 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_ARRAY.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_ARRAY.h 44 | Purpose : Array handling routines 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_ARRAY_H 49 | #define GUI_ARRAY_H 50 | 51 | #include "WM_Intern.h" 52 | 53 | #if GUI_WINSUPPORT 54 | 55 | /********************************************************************* 56 | * 57 | * Public types 58 | * 59 | ********************************************************************** 60 | */ 61 | typedef WM_HMEM GUI_ARRAY; 62 | 63 | /********************************************************************* 64 | * 65 | * Public functions 66 | * 67 | ********************************************************************** 68 | */ 69 | GUI_ARRAY GUI_ARRAY_Create (void); 70 | int GUI_ARRAY_AddItem (GUI_ARRAY hArray, const void * pNew, int Len); 71 | void GUI_ARRAY_Delete (GUI_ARRAY hArray); 72 | WM_HMEM GUI_ARRAY_GethItem (GUI_ARRAY hArray, unsigned int Index); 73 | unsigned GUI_ARRAY_GetNumItems (GUI_ARRAY hArray); 74 | void * GUI_ARRAY_GetpItemLocked (GUI_ARRAY hArray, unsigned int Index); 75 | int GUI_ARRAY_SethItem (GUI_ARRAY hArray, unsigned int Index, WM_HMEM hItem); 76 | WM_HMEM GUI_ARRAY_SetItem (GUI_ARRAY hArray, unsigned int Index, const void * pData, int Len); 77 | void GUI_ARRAY_DeleteItem (GUI_ARRAY hArray, unsigned int Index); 78 | char GUI_ARRAY_InsertBlankItem (GUI_ARRAY hArray, unsigned int Index); 79 | WM_HMEM GUI_ARRAY_InsertItem (GUI_ARRAY hArray, unsigned int Index, int Len); 80 | void * GUI_ARRAY_ResizeItemLocked(GUI_ARRAY hArray, unsigned int Index, int Len); 81 | 82 | #endif /* GUI_WINSUPPORT */ 83 | 84 | #endif /* GUI_ARRAY_H */ 85 | 86 | /*************************** End of file ****************************/ 87 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_dbgmcu.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_dbgmcu.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the DBGMCU 8 | * 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 __STM32F10x_DBGMCU_H 25 | #define __STM32F10x_DBGMCU_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup DBGMCU 39 | * @{ 40 | */ 41 | 42 | /** @defgroup DBGMCU_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup DBGMCU_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | #define DBGMCU_SLEEP ((uint32_t)0x00000001) 55 | #define DBGMCU_STOP ((uint32_t)0x00000002) 56 | #define DBGMCU_STANDBY ((uint32_t)0x00000004) 57 | #define DBGMCU_IWDG_STOP ((uint32_t)0x00000100) 58 | #define DBGMCU_WWDG_STOP ((uint32_t)0x00000200) 59 | #define DBGMCU_TIM1_STOP ((uint32_t)0x00000400) 60 | #define DBGMCU_TIM2_STOP ((uint32_t)0x00000800) 61 | #define DBGMCU_TIM3_STOP ((uint32_t)0x00001000) 62 | #define DBGMCU_TIM4_STOP ((uint32_t)0x00002000) 63 | #define DBGMCU_CAN1_STOP ((uint32_t)0x00004000) 64 | #define DBGMCU_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00008000) 65 | #define DBGMCU_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00010000) 66 | #define DBGMCU_TIM8_STOP ((uint32_t)0x00020000) 67 | #define DBGMCU_TIM5_STOP ((uint32_t)0x00040000) 68 | #define DBGMCU_TIM6_STOP ((uint32_t)0x00080000) 69 | #define DBGMCU_TIM7_STOP ((uint32_t)0x00100000) 70 | #define DBGMCU_CAN2_STOP ((uint32_t)0x00200000) 71 | #define DBGMCU_TIM15_STOP ((uint32_t)0x00400000) 72 | #define DBGMCU_TIM16_STOP ((uint32_t)0x00800000) 73 | #define DBGMCU_TIM17_STOP ((uint32_t)0x01000000) 74 | #define DBGMCU_TIM12_STOP ((uint32_t)0x02000000) 75 | #define DBGMCU_TIM13_STOP ((uint32_t)0x04000000) 76 | #define DBGMCU_TIM14_STOP ((uint32_t)0x08000000) 77 | #define DBGMCU_TIM9_STOP ((uint32_t)0x10000000) 78 | #define DBGMCU_TIM10_STOP ((uint32_t)0x20000000) 79 | #define DBGMCU_TIM11_STOP ((uint32_t)0x40000000) 80 | 81 | #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0x800000F8) == 0x00) && ((PERIPH) != 0x00)) 82 | /** 83 | * @} 84 | */ 85 | 86 | /** @defgroup DBGMCU_Exported_Macros 87 | * @{ 88 | */ 89 | 90 | /** 91 | * @} 92 | */ 93 | 94 | /** @defgroup DBGMCU_Exported_Functions 95 | * @{ 96 | */ 97 | 98 | uint32_t DBGMCU_GetREVID(void); 99 | uint32_t DBGMCU_GetDEVID(void); 100 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState); 101 | 102 | #ifdef __cplusplus 103 | } 104 | #endif 105 | 106 | #endif /* __STM32F10x_DBGMCU_H */ 107 | /** 108 | * @} 109 | */ 110 | 111 | /** 112 | * @} 113 | */ 114 | 115 | /** 116 | * @} 117 | */ 118 | 119 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 120 | -------------------------------------------------------------------------------- /STemWin/inc/TEXT_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : TEXT.h 44 | Purpose : TEXT include 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef TEXT_PRIVATE_H 49 | #define TEXT_PRIVATE_H 50 | 51 | #include "TEXT.h" 52 | #include "GUI_Private.h" 53 | 54 | #if GUI_WINSUPPORT 55 | 56 | /********************************************************************* 57 | * 58 | * Object definition 59 | * 60 | ********************************************************************** 61 | */ 62 | typedef struct { 63 | const GUI_FONT * pFont; 64 | GUI_COLOR TextColor; 65 | GUI_COLOR BkColor; 66 | GUI_WRAPMODE WrapMode; 67 | } TEXT_PROPS; 68 | 69 | typedef struct { 70 | WIDGET Widget; 71 | TEXT_PROPS Props; 72 | WM_HMEM hpText; 73 | I16 Align; 74 | } TEXT_OBJ; 75 | 76 | /********************************************************************* 77 | * 78 | * Macros for internal use 79 | * 80 | ********************************************************************** 81 | */ 82 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 83 | #define TEXT_INIT_ID(p) p->Widget.DebugId = TEXT_ID 84 | #else 85 | #define TEXT_INIT_ID(p) 86 | #endif 87 | 88 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 89 | TEXT_OBJ * TEXT_LockH(TEXT_Handle h); 90 | #define TEXT_LOCK_H(h) TEXT_LockH(h) 91 | #else 92 | #define TEXT_LOCK_H(h) (TEXT_OBJ *)GUI_LOCK_H(h) 93 | #endif 94 | 95 | /********************************************************************* 96 | * 97 | * Module internal data 98 | * 99 | ********************************************************************** 100 | */ 101 | extern TEXT_PROPS TEXT__DefaultProps; 102 | 103 | #endif /* if GUI_WINSUPPORT */ 104 | #endif /* TEXT_PRIVATE_H */ 105 | 106 | /*************************** End of file ****************************/ 107 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_iwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_iwdg.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the IWDG 8 | * 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 __STM32F10x_IWDG_H 25 | #define __STM32F10x_IWDG_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup IWDG 39 | * @{ 40 | */ 41 | 42 | /** @defgroup IWDG_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup IWDG_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup IWDG_WriteAccess 55 | * @{ 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 | 70 | #define IWDG_Prescaler_4 ((uint8_t)0x00) 71 | #define IWDG_Prescaler_8 ((uint8_t)0x01) 72 | #define IWDG_Prescaler_16 ((uint8_t)0x02) 73 | #define IWDG_Prescaler_32 ((uint8_t)0x03) 74 | #define IWDG_Prescaler_64 ((uint8_t)0x04) 75 | #define IWDG_Prescaler_128 ((uint8_t)0x05) 76 | #define IWDG_Prescaler_256 ((uint8_t)0x06) 77 | #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \ 78 | ((PRESCALER) == IWDG_Prescaler_8) || \ 79 | ((PRESCALER) == IWDG_Prescaler_16) || \ 80 | ((PRESCALER) == IWDG_Prescaler_32) || \ 81 | ((PRESCALER) == IWDG_Prescaler_64) || \ 82 | ((PRESCALER) == IWDG_Prescaler_128)|| \ 83 | ((PRESCALER) == IWDG_Prescaler_256)) 84 | /** 85 | * @} 86 | */ 87 | 88 | /** @defgroup IWDG_Flag 89 | * @{ 90 | */ 91 | 92 | #define IWDG_FLAG_PVU ((uint16_t)0x0001) 93 | #define IWDG_FLAG_RVU ((uint16_t)0x0002) 94 | #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU)) 95 | #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF) 96 | /** 97 | * @} 98 | */ 99 | 100 | /** 101 | * @} 102 | */ 103 | 104 | /** @defgroup IWDG_Exported_Macros 105 | * @{ 106 | */ 107 | 108 | /** 109 | * @} 110 | */ 111 | 112 | /** @defgroup IWDG_Exported_Functions 113 | * @{ 114 | */ 115 | 116 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess); 117 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler); 118 | void IWDG_SetReload(uint16_t Reload); 119 | void IWDG_ReloadCounter(void); 120 | void IWDG_Enable(void); 121 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG); 122 | 123 | #ifdef __cplusplus 124 | } 125 | #endif 126 | 127 | #endif /* __STM32F10x_IWDG_H */ 128 | /** 129 | * @} 130 | */ 131 | 132 | /** 133 | * @} 134 | */ 135 | 136 | /** 137 | * @} 138 | */ 139 | 140 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 141 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_rtc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_rtc.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the RTC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_RTC_H 25 | #define __STM32F10x_RTC_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup RTC 39 | * @{ 40 | */ 41 | 42 | /** @defgroup RTC_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup RTC_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup RTC_interrupts_define 55 | * @{ 56 | */ 57 | 58 | #define RTC_IT_OW ((uint16_t)0x0004) /*!< Overflow interrupt */ 59 | #define RTC_IT_ALR ((uint16_t)0x0002) /*!< Alarm interrupt */ 60 | #define RTC_IT_SEC ((uint16_t)0x0001) /*!< Second interrupt */ 61 | #define IS_RTC_IT(IT) ((((IT) & (uint16_t)0xFFF8) == 0x00) && ((IT) != 0x00)) 62 | #define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_OW) || ((IT) == RTC_IT_ALR) || \ 63 | ((IT) == RTC_IT_SEC)) 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup RTC_interrupts_flags 69 | * @{ 70 | */ 71 | 72 | #define RTC_FLAG_RTOFF ((uint16_t)0x0020) /*!< RTC Operation OFF flag */ 73 | #define RTC_FLAG_RSF ((uint16_t)0x0008) /*!< Registers Synchronized flag */ 74 | #define RTC_FLAG_OW ((uint16_t)0x0004) /*!< Overflow flag */ 75 | #define RTC_FLAG_ALR ((uint16_t)0x0002) /*!< Alarm flag */ 76 | #define RTC_FLAG_SEC ((uint16_t)0x0001) /*!< Second flag */ 77 | #define IS_RTC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint16_t)0xFFF0) == 0x00) && ((FLAG) != 0x00)) 78 | #define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_RTOFF) || ((FLAG) == RTC_FLAG_RSF) || \ 79 | ((FLAG) == RTC_FLAG_OW) || ((FLAG) == RTC_FLAG_ALR) || \ 80 | ((FLAG) == RTC_FLAG_SEC)) 81 | #define IS_RTC_PRESCALER(PRESCALER) ((PRESCALER) <= 0xFFFFF) 82 | 83 | /** 84 | * @} 85 | */ 86 | 87 | /** 88 | * @} 89 | */ 90 | 91 | /** @defgroup RTC_Exported_Macros 92 | * @{ 93 | */ 94 | 95 | /** 96 | * @} 97 | */ 98 | 99 | /** @defgroup RTC_Exported_Functions 100 | * @{ 101 | */ 102 | 103 | void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState); 104 | void RTC_EnterConfigMode(void); 105 | void RTC_ExitConfigMode(void); 106 | uint32_t RTC_GetCounter(void); 107 | void RTC_SetCounter(uint32_t CounterValue); 108 | void RTC_SetPrescaler(uint32_t PrescalerValue); 109 | void RTC_SetAlarm(uint32_t AlarmValue); 110 | uint32_t RTC_GetDivider(void); 111 | void RTC_WaitForLastTask(void); 112 | void RTC_WaitForSynchro(void); 113 | FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG); 114 | void RTC_ClearFlag(uint16_t RTC_FLAG); 115 | ITStatus RTC_GetITStatus(uint16_t RTC_IT); 116 | void RTC_ClearITPendingBit(uint16_t RTC_IT); 117 | 118 | #ifdef __cplusplus 119 | } 120 | #endif 121 | 122 | #endif /* __STM32F10x_RTC_H */ 123 | /** 124 | * @} 125 | */ 126 | 127 | /** 128 | * @} 129 | */ 130 | 131 | /** 132 | * @} 133 | */ 134 | 135 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 136 | -------------------------------------------------------------------------------- /STemWin/inc/KNOB_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : KNOB.h 44 | Purpose : KNOB include 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef KNOB_PRIVATE_H 49 | #define KNOB_PRIVATE_H 50 | 51 | #include "KNOB.h" 52 | #include "GUI_Private.h" 53 | 54 | #if (GUI_SUPPORT_MEMDEV && GUI_WINSUPPORT) 55 | 56 | /********************************************************************* 57 | * 58 | * Object definition 59 | * 60 | ********************************************************************** 61 | */ 62 | typedef struct { 63 | I32 Snap; // Position where the knob snaps 64 | I32 Period; // Time it takes to stop the knob in ms 65 | GUI_COLOR BkColor; // The Bk color 66 | I32 Offset; // the offset 67 | I32 MinRange; 68 | I32 MaxRange; 69 | I32 TickSize; // Minimum movement range in 1/10 of degree 70 | I32 KeyValue; // Range of movement for one key push 71 | } KNOB_PROPS; 72 | 73 | typedef struct { 74 | WIDGET Widget; 75 | KNOB_PROPS Props; 76 | WM_HMEM hContext; 77 | I32 Angle; 78 | I32 Value; 79 | int xSize; 80 | int ySize; 81 | GUI_MEMDEV_Handle hMemSrc; 82 | GUI_MEMDEV_Handle hMemDst; 83 | GUI_MEMDEV_Handle hMemBk; 84 | } KNOB_OBJ; 85 | 86 | /********************************************************************* 87 | * 88 | * Macros for internal use 89 | * 90 | ********************************************************************** 91 | */ 92 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 93 | #define KNOB_INIT_ID(p) p->Widget.DebugId = KNOB_ID 94 | #else 95 | #define KNOB_INIT_ID(p) 96 | #endif 97 | 98 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 99 | KNOB_OBJ * KNOB_LockH(KNOB_Handle h); 100 | #define KNOB_LOCK_H(h) KNOB_LockH(h) 101 | #else 102 | #define KNOB_LOCK_H(h) (KNOB_OBJ *)GUI_LOCK_H(h) 103 | #endif 104 | 105 | /********************************************************************* 106 | * 107 | * Module internal data 108 | * 109 | ********************************************************************** 110 | */ 111 | extern KNOB_PROPS KNOB__DefaultProps; 112 | 113 | #endif // (GUI_SUPPORT_MEMDEV && GUI_WINSUPPORT) 114 | #endif // KNOB_PRIVATE_H 115 | -------------------------------------------------------------------------------- /STemWin/inc/DIALOG.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : Dialog.h 44 | Purpose : Dialog box include 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef DIALOG_H 49 | #define DIALOG_H 50 | 51 | #include "WM.h" 52 | #include "BUTTON.h" 53 | #include "CALENDAR.h" 54 | #include "CHECKBOX.h" 55 | #include "CHOOSECOLOR.h" 56 | #include "CHOOSEFILE.h" 57 | #include "DROPDOWN.h" 58 | #include "EDIT.h" 59 | #include "FRAMEWIN.h" 60 | #include "GRAPH.h" 61 | #include "HEADER.h" 62 | #include "ICONVIEW.h" 63 | #include "IMAGE.h" 64 | #include "LISTBOX.h" 65 | #include "LISTVIEW.h" 66 | #include "LISTWHEEL.h" 67 | #include "MENU.h" 68 | #include "MULTIEDIT.h" 69 | #include "MULTIPAGE.h" 70 | #include "PROGBAR.h" 71 | #include "RADIO.h" 72 | #include "SCROLLBAR.h" 73 | #include "SLIDER.h" 74 | #include "SPINBOX.h" 75 | #include "SWIPELIST.h" 76 | #include "TEXT.h" 77 | #include "TREEVIEW.h" 78 | #include "KNOB.h" 79 | 80 | #if GUI_WINSUPPORT 81 | 82 | #if defined(__cplusplus) 83 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 84 | #endif 85 | 86 | /********************************************************************* 87 | * 88 | * WINDOW API 89 | */ 90 | WM_HWIN WINDOW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, WM_CALLBACK * cb); 91 | WM_HWIN WINDOW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, WM_CALLBACK * cb, int NumExtraBytes); 92 | WM_HWIN WINDOW_CreateIndirect (const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 93 | GUI_COLOR WINDOW_GetDefaultBkColor(void); 94 | int WINDOW_GetUserData (WM_HWIN hObj, void * pDest, int NumBytes); 95 | void WINDOW_SetBkColor (WM_HWIN hObj, GUI_COLOR Color); 96 | void WINDOW_SetDefaultBkColor(GUI_COLOR Color); 97 | int WINDOW_SetUserData (WM_HWIN hObj, const void * pSrc, int NumBytes); 98 | 99 | void WINDOW_Callback(WM_MESSAGE * pMsg); 100 | 101 | #if defined(__cplusplus) 102 | } 103 | #endif 104 | 105 | #endif // GUI_WINSUPPORT 106 | #endif // DIALOG_H 107 | 108 | /*************************** End of file ****************************/ 109 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_FontIntern.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_FontIntern.h 44 | Purpose : Internal declarations used in font files 45 | ---------------------------END-OF-HEADER------------------------------ 46 | 47 | Attention : Do not modify this file ! If you do, you will not 48 | be able do update to a later GUI version ! 49 | 50 | */ 51 | 52 | 53 | #ifndef GUI_FONTINTERN_H /* Guard against multiple inclusion */ 54 | #define GUI_FONTINTERN_H 55 | 56 | #include "GUI.h" 57 | 58 | #if defined(__cplusplus) 59 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 60 | #endif 61 | 62 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font8ASCII_Prop; 63 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_FontF8x13_ASCII_Prop1; 64 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_FontF8x15B_ASCII_Prop1; 65 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font10S_ASCII_FontProp1; 66 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font10ASCIIProp1; 67 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font13ASCII_Prop1; 68 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font13B_ASCII_Prop1; 69 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font13H_ASCII_Prop1; 70 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font13HB_ASCII_Prop1; 71 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font16_1_FontProp1; 72 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font16ASCIIProp1; 73 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font16B_ASCII_Prop1; 74 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font20_ASCII_Prop1; 75 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font20B_ASCII_Prop1; 76 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font24_ASCII_Prop1; 77 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font24B_ASCII_Prop1; 78 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font32_ASCII_Prop1; 79 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font32B_ASCII_Prop1; 80 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_FontComic18B_ASCII_Prop1; 81 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_FontComic24B_ASCII_Prop1; 82 | 83 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font6x8ASCII_Prop0; 84 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font8x16ASCII_Prop0; 85 | extern GUI_CONST_STORAGE GUI_FONT_PROP GUI_Font8x8ASCII_Prop0; 86 | 87 | extern GUI_CONST_STORAGE GUI_CHARINFO GUI_Font16_HK_CharInfo[169]; 88 | 89 | #if defined(__cplusplus) 90 | } 91 | #endif 92 | 93 | 94 | #endif /* Guard against multiple inclusion */ 95 | 96 | /*************************** End of file ****************************/ 97 | -------------------------------------------------------------------------------- /STemWin/inc/LCD_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : LCD_Private.h 44 | Purpose : To be used only by the display drivers 45 | ---------------------------------------------------------------------- 46 | */ 47 | 48 | #ifndef LCD_Private_H 49 | #define LCD_Private_H 50 | 51 | #include "LCDConf.h" 52 | #include "LCD_Protected.h" 53 | #include "GUI.h" 54 | 55 | /********************************************************************* 56 | * 57 | * API functions 58 | */ 59 | extern const struct tLCDDEV_APIList_struct * /* const */ LCD_aAPI[GUI_NUM_LAYERS]; 60 | 61 | /********************************************************************* 62 | * 63 | * Support for Segment/COMLUTs 64 | */ 65 | #define LCD_TYPE_SEGTRANS U16 66 | #define LCD_TYPE_COMTRANS U16 67 | 68 | #ifdef LCD_LUT_COM 69 | extern LCD_TYPE_COMTRANS LCD__aLine2Com0[LCD_YSIZE]; 70 | #endif 71 | 72 | #ifdef LCD_LUT_SEG 73 | extern LCD_TYPE_COMTRANS LCD__aCol2Seg0[LCD_XSIZE]; 74 | #endif 75 | 76 | /********************************************************************* 77 | * 78 | * Support for multiple display controllers 79 | */ 80 | #define DECLARE_PROTOTYPES(DISTX) \ 81 | void LCD_##DISTX##_SetPixelIndex(int x, int y, int PixelIndex); \ 82 | unsigned LCD_##DISTX##_GetPixelIndex(int x, int y); \ 83 | void LCD_##DISTX##_XorPixel (int x, int y); \ 84 | void LCD_##DISTX##_DrawHLine (int x0, int y, int x1); \ 85 | void LCD_##DISTX##_DrawVLine (int x, int y0, int y1); \ 86 | void LCD_##DISTX##_FillRect (int x0, int y0, int x1, int y1); \ 87 | void LCD_##DISTX##_DrawBitmap (int x0, int y0, int xsize, int ysize, int BitsPerPixel, int BytesPerLine, const U8 * pData, int Diff, const LCD_PIXELINDEX * pTrans); \ 88 | void LCD_##DISTX##_SetOrg (int x, int y); \ 89 | void LCD_##DISTX##_On (void); \ 90 | void LCD_##DISTX##_Off (void); \ 91 | int LCD_##DISTX##_Init (void); \ 92 | void LCD_##DISTX##_SetLUTEntry (U8 Pos, LCD_COLOR Color); \ 93 | void * LCD_##DISTX##_GetDevFunc (int Index); \ 94 | void LCD_##DISTX##_ReInit (void) 95 | 96 | DECLARE_PROTOTYPES(DIST0); 97 | DECLARE_PROTOTYPES(DIST1); 98 | DECLARE_PROTOTYPES(DIST2); 99 | DECLARE_PROTOTYPES(DIST3); 100 | 101 | #endif /* Avoid multiple inclusion */ 102 | 103 | /*************************** End of file ****************************/ 104 | -------------------------------------------------------------------------------- /Libraries/FWlib/inc/stm32f10x_pwr.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_pwr.h 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file contains all the functions prototypes for the PWR firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ 24 | #ifndef __STM32F10x_PWR_H 25 | #define __STM32F10x_PWR_H 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* Includes ------------------------------------------------------------------*/ 32 | #include "stm32f10x.h" 33 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver 35 | * @{ 36 | */ 37 | 38 | /** @addtogroup PWR 39 | * @{ 40 | */ 41 | 42 | /** @defgroup PWR_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup PWR_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup PVD_detection_level 55 | * @{ 56 | */ 57 | 58 | #define PWR_PVDLevel_2V2 ((uint32_t)0x00000000) 59 | #define PWR_PVDLevel_2V3 ((uint32_t)0x00000020) 60 | #define PWR_PVDLevel_2V4 ((uint32_t)0x00000040) 61 | #define PWR_PVDLevel_2V5 ((uint32_t)0x00000060) 62 | #define PWR_PVDLevel_2V6 ((uint32_t)0x00000080) 63 | #define PWR_PVDLevel_2V7 ((uint32_t)0x000000A0) 64 | #define PWR_PVDLevel_2V8 ((uint32_t)0x000000C0) 65 | #define PWR_PVDLevel_2V9 ((uint32_t)0x000000E0) 66 | #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \ 67 | ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \ 68 | ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \ 69 | ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9)) 70 | /** 71 | * @} 72 | */ 73 | 74 | /** @defgroup Regulator_state_is_STOP_mode 75 | * @{ 76 | */ 77 | 78 | #define PWR_Regulator_ON ((uint32_t)0x00000000) 79 | #define PWR_Regulator_LowPower ((uint32_t)0x00000001) 80 | #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \ 81 | ((REGULATOR) == PWR_Regulator_LowPower)) 82 | /** 83 | * @} 84 | */ 85 | 86 | /** @defgroup STOP_mode_entry 87 | * @{ 88 | */ 89 | 90 | #define PWR_STOPEntry_WFI ((uint8_t)0x01) 91 | #define PWR_STOPEntry_WFE ((uint8_t)0x02) 92 | #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE)) 93 | 94 | /** 95 | * @} 96 | */ 97 | 98 | /** @defgroup PWR_Flag 99 | * @{ 100 | */ 101 | 102 | #define PWR_FLAG_WU ((uint32_t)0x00000001) 103 | #define PWR_FLAG_SB ((uint32_t)0x00000002) 104 | #define PWR_FLAG_PVDO ((uint32_t)0x00000004) 105 | #define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \ 106 | ((FLAG) == PWR_FLAG_PVDO)) 107 | 108 | #define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB)) 109 | /** 110 | * @} 111 | */ 112 | 113 | /** 114 | * @} 115 | */ 116 | 117 | /** @defgroup PWR_Exported_Macros 118 | * @{ 119 | */ 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | /** @defgroup PWR_Exported_Functions 126 | * @{ 127 | */ 128 | 129 | void PWR_DeInit(void); 130 | void PWR_BackupAccessCmd(FunctionalState NewState); 131 | void PWR_PVDCmd(FunctionalState NewState); 132 | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel); 133 | void PWR_WakeUpPinCmd(FunctionalState NewState); 134 | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry); 135 | void PWR_EnterSTANDBYMode(void); 136 | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG); 137 | void PWR_ClearFlag(uint32_t PWR_FLAG); 138 | 139 | #ifdef __cplusplus 140 | } 141 | #endif 142 | 143 | #endif /* __STM32F10x_PWR_H */ 144 | /** 145 | * @} 146 | */ 147 | 148 | /** 149 | * @} 150 | */ 151 | 152 | /** 153 | * @} 154 | */ 155 | 156 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 157 | -------------------------------------------------------------------------------- /STemWin/OS/GUI_X.c: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Portions COPYRIGHT 2013 STMicroelectronics * 3 | * Portions SEGGER Microcontroller GmbH & Co. KG * 4 | * Solutions for real time microcontroller applications * 5 | ********************************************************************** 6 | * * 7 | * (c) 1996 - 2013 SEGGER Microcontroller GmbH & Co. KG * 8 | * * 9 | * Internet: www.segger.com Support: support@segger.com * 10 | * * 11 | ********************************************************************** 12 | 13 | ** emWin V5.22 - Graphical user interface for embedded applications ** 14 | All Intellectual Property rights in the Software belongs to SEGGER. 15 | emWin is protected by international copyright laws. Knowledge of the 16 | source code may not be used to write a similar product. This file may 17 | only be used in accordance with the following terms: 18 | 19 | The software has been licensed to STMicroelectronics International 20 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 21 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 22 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 23 | troller products commercialized by Licensee only, sublicensed and dis_ 24 | tributed under the terms and conditions of the End User License Agree_ 25 | ment supplied by STMicroelectronics International N.V. 26 | Full source code is available at: www.segger.com 27 | 28 | We appreciate your understanding and fairness. 29 | ---------------------------------------------------------------------- 30 | File : GUI_X.C 31 | Purpose : Config / System dependent externals for GUI 32 | ---------------------------END-OF-HEADER------------------------------ 33 | */ 34 | 35 | /** 36 | ****************************************************************************** 37 | * @attention 38 | * 39 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 40 | * You may not use this file except in compliance with the License. 41 | * You may obtain a copy of the License at: 42 | * 43 | * http://www.st.com/software_license_agreement_liberty_v2 44 | * 45 | * Unless required by applicable law or agreed to in writing, software 46 | * distributed under the License is distributed on an "AS IS" BASIS, 47 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 48 | * See the License for the specific language governing permissions and 49 | * limitations under the License. 50 | * 51 | ****************************************************************************** 52 | */ 53 | 54 | #include "GUI.h" 55 | #include "./Bsp/usart/bsp_debug_usart.h" 56 | 57 | 58 | /********************************************************************* 59 | * 60 | * Global data 61 | */ 62 | volatile GUI_TIMER_TIME OS_TimeMS; 63 | 64 | /********************************************************************* 65 | * 66 | * Timing: 67 | * GUI_X_GetTime() 68 | * GUI_X_Delay(int) 69 | 70 | Some timing dependent routines require a GetTime 71 | and delay function. Default time unit (tick), normally is 72 | 1 ms. 73 | */ 74 | 75 | GUI_TIMER_TIME GUI_X_GetTime(void) { 76 | return OS_TimeMS; 77 | } 78 | 79 | void GUI_X_Delay(int ms) { 80 | int tEnd = OS_TimeMS + ms; 81 | while ((tEnd - OS_TimeMS) > 0); 82 | } 83 | 84 | /********************************************************************* 85 | * 86 | * GUI_X_Init() 87 | * 88 | * Note: 89 | * GUI_X_Init() is called from GUI_Init is a possibility to init 90 | * some hardware which needs to be up and running before the GUI. 91 | * If not required, leave this routine blank. 92 | */ 93 | 94 | void GUI_X_Init(void) { 95 | OS_TimeMS=0; 96 | } 97 | 98 | 99 | /********************************************************************* 100 | * 101 | * GUI_X_ExecIdle 102 | * 103 | * Note: 104 | * Called if WM is in idle state 105 | */ 106 | 107 | void GUI_X_ExecIdle(void) {} 108 | 109 | /********************************************************************* 110 | * 111 | * Logging: OS dependent 112 | 113 | Note: 114 | Logging is used in higher debug levels only. The typical target 115 | build does not use logging and does therefor not require any of 116 | the logging routines below. For a release build without logging 117 | the routines below may be eliminated to save some space. 118 | (If the linker is not function aware and eliminates unreferenced 119 | functions automatically) 120 | 121 | */ 122 | 123 | void GUI_X_Log (const char *s) { GUI_USE_PARA(s); } 124 | void GUI_X_Warn (const char *s) { GUI_USE_PARA(s); } 125 | void GUI_X_ErrorOut(const char *s) { GUI_USE_PARA(s); } 126 | 127 | 128 | /*************************** End of file ****************************/ 129 | -------------------------------------------------------------------------------- /FreeRTOS/port/RVDS/ARM7_LPC21xx/portmacro.inc: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. 3 | ; All rights reserved 4 | ; 5 | ; 6 | ; *************************************************************************** 7 | ; * * 8 | ; * FreeRTOS tutorial books are available in pdf and paperback. * 9 | ; * Complete, revised, and edited pdf reference manuals are also * 10 | ; * available. * 11 | ; * * 12 | ; * Purchasing FreeRTOS documentation will not only help you, by * 13 | ; * ensuring you get running as quickly as possible and with an * 14 | ; * in-depth knowledge of how to use FreeRTOS, it will also help * 15 | ; * the FreeRTOS project to continue with its mission of providing * 16 | ; * professional grade, cross platform, de facto standard solutions * 17 | ; * for microcontrollers - completely free of charge! * 18 | ; * * 19 | ; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< * 20 | ; * * 21 | ; * Thank you for using FreeRTOS, and thank you for your support! * 22 | ; * * 23 | ; *************************************************************************** 24 | ; 25 | ; 26 | ; This file is part of the FreeRTOS distribution. 27 | ; 28 | ; FreeRTOS is free software; you can redistribute it and/or modify it under 29 | ; the terms of the GNU General Public License (version 2) as published by the 30 | ; Free Software Foundation AND MODIFIED BY the FreeRTOS exception. 31 | ; >>>NOTE<<< The modification to the GPL is included to allow you to 32 | ; distribute a combined work that includes FreeRTOS without being obliged to 33 | ; provide the source code for proprietary components outside of the FreeRTOS 34 | ; kernel. FreeRTOS is distributed in the hope that it will be useful, but 35 | ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 36 | ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 37 | ; more details. You should have received a copy of the GNU General Public 38 | ; License and the FreeRTOS license exception along with FreeRTOS; if not it 39 | ; can be viewed here: http://www.freertos.org/a00114.html and also obtained 40 | ; by writing to Richard Barry, contact details for whom are available on the 41 | ; FreeRTOS WEB site. 42 | ; 43 | ; 1 tab == 4 spaces! 44 | ; 45 | ; http://www.FreeRTOS.org - Documentation, latest information, license and 46 | ; contact details. 47 | ; 48 | ; http://www.SafeRTOS.com - A version that is certified for use in safety 49 | ; critical systems. 50 | ; 51 | ; http://www.OpenRTOS.com - Commercial support, development, porting, 52 | ; licensing and training services. 53 | ;*/ 54 | 55 | IMPORT ulCriticalNesting ; 56 | IMPORT pxCurrentTCB ; 57 | 58 | 59 | MACRO 60 | portRESTORE_CONTEXT 61 | 62 | 63 | LDR R0, =pxCurrentTCB ; Set the LR to the task stack. The location was... 64 | LDR R0, [R0] ; ... stored in pxCurrentTCB 65 | LDR LR, [R0] 66 | 67 | LDR R0, =ulCriticalNesting ; The critical nesting depth is the first item on... 68 | LDMFD LR!, {R1} ; ...the stack. Load it into the ulCriticalNesting var. 69 | STR R1, [R0] ; 70 | 71 | LDMFD LR!, {R0} ; Get the SPSR from the stack. 72 | MSR SPSR_cxsf, R0 ; 73 | 74 | LDMFD LR, {R0-R14}^ ; Restore all system mode registers for the task. 75 | NOP ; 76 | 77 | LDR LR, [LR, #+60] ; Restore the return address 78 | 79 | ; And return - correcting the offset in the LR to obtain ... 80 | SUBS PC, LR, #4 ; ...the correct address. 81 | 82 | MEND 83 | 84 | ; /**********************************************************************/ 85 | 86 | MACRO 87 | portSAVE_CONTEXT 88 | 89 | 90 | STMDB SP!, {R0} ; Store R0 first as we need to use it. 91 | 92 | STMDB SP,{SP}^ ; Set R0 to point to the task stack pointer. 93 | NOP ; 94 | SUB SP, SP, #4 ; 95 | LDMIA SP!,{R0} ; 96 | 97 | STMDB R0!, {LR} ; Push the return address onto the stack. 98 | MOV LR, R0 ; Now we have saved LR we can use it instead of R0. 99 | LDMIA SP!, {R0} ; Pop R0 so we can save it onto the system mode stack. 100 | 101 | STMDB LR,{R0-LR}^ ; Push all the system mode registers onto the task stack. 102 | NOP ; 103 | SUB LR, LR, #60 ; 104 | 105 | MRS R0, SPSR ; Push the SPSR onto the task stack. 106 | STMDB LR!, {R0} ; 107 | 108 | LDR R0, =ulCriticalNesting ; 109 | LDR R0, [R0] ; 110 | STMDB LR!, {R0} ; 111 | 112 | LDR R0, =pxCurrentTCB ; Store the new top of stack for the task. 113 | LDR R1, [R0] ; 114 | STR LR, [R1] ; 115 | 116 | MEND 117 | 118 | END 119 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_GCache_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_GCache_Private.h 44 | Purpose : Private header 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_GCACHE_PRIVATE_H 49 | #define GUI_GCACHE_PRIVATE_H 50 | 51 | #include "GUI_Private.h" 52 | 53 | /********************************************************************* 54 | * 55 | * Defines 56 | * 57 | ********************************************************************** 58 | */ 59 | #define DRIVER_CONTEXT DRIVER_CONTEXT_GCACHE 60 | 61 | /********************************************************************* 62 | * 63 | * Types 64 | * 65 | ********************************************************************** 66 | */ 67 | /********************************************************************* 68 | * 69 | * DRIVER_CONTEXT 70 | */ 71 | typedef struct { 72 | int x0, y0, x1, y1, IsDirty; 73 | int xSize, ySize; 74 | int CacheLocked; 75 | int MemSize; 76 | int BitsPerPixel; 77 | int BytesPerLine; 78 | // 79 | // Line buffer for reading operation 80 | // 81 | LCD_PIXELINDEX * pLineBuffer; 82 | // 83 | // Palette for drawing 'cache bitmap' 84 | // 85 | LCD_PIXELINDEX * pPalette; 86 | // 87 | // Cache management 88 | // 89 | void (* pfReadRect) (GUI_DEVICE * pDevice, int _x0, int _y0, int _x1, int _y1, LCD_PIXELINDEX * pBuffer); 90 | void (* pfSendCacheRect)(GUI_DEVICE * pDevice); 91 | U32 * pVMEM; 92 | // 93 | // Drawing functions 94 | // 95 | void (* pfDrawBitmap )(GUI_DEVICE * pDevice, int _x0, int _y0, int xsize, int ysize, int _BitsPerPixel, int _BytesPerLine, const U8 * pData, int Diff, const LCD_PIXELINDEX * pTrans); 96 | void (* pfDrawHLine )(GUI_DEVICE * pDevice, int _x0, int _y0, int _x1); 97 | void (* pfDrawVLine )(GUI_DEVICE * pDevice, int _x , int _y0, int _y1); 98 | void (* pfFillRect )(GUI_DEVICE * pDevice, int _x0, int _y0, int _x1, int _y1); 99 | LCD_PIXELINDEX (* pfGetPixelIndex)(GUI_DEVICE * pDevice, int _x, int _y); 100 | void (* pfSetPixelIndex)(GUI_DEVICE * pDevice, int _x, int _y, LCD_PIXELINDEX ColorIndex); 101 | void (* pfXorPixel )(GUI_DEVICE * pDevice, int _x, int _y); 102 | // 103 | // GetData function 104 | // 105 | void *(* pfGetDevData )(GUI_DEVICE * pDevice, int Index); 106 | } DRIVER_CONTEXT; 107 | 108 | /********************************************************************* 109 | * 110 | * Interface 111 | * 112 | ********************************************************************** 113 | */ 114 | GUI_DEVICE * GUI_GCACHE__CreateEx(int LayerIndex, const LCD_API_COLOR_CONV * pColorConvAPI, int BitsPerPixel); 115 | 116 | #endif 117 | 118 | /*************************** End of file ****************************/ 119 | -------------------------------------------------------------------------------- /User/FATFS/option/syscall.c: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------*/ 2 | /* Sample code of OS dependent controls for FatFs */ 3 | /* (C)ChaN, 2014 */ 4 | /*------------------------------------------------------------------------*/ 5 | 6 | 7 | #include "../ff.h" 8 | 9 | 10 | #if _FS_REENTRANT 11 | /*------------------------------------------------------------------------*/ 12 | /* Create a Synchronization Object 13 | /*------------------------------------------------------------------------*/ 14 | /* This function is called in f_mount() function to create a new 15 | / synchronization object, such as semaphore and mutex. When a 0 is returned, 16 | / the f_mount() function fails with FR_INT_ERR. 17 | */ 18 | 19 | int ff_cre_syncobj ( /* !=0:Function succeeded, ==0:Could not create due to any error */ 20 | BYTE vol, /* Corresponding logical drive being processed */ 21 | _SYNC_t *sobj /* Pointer to return the created sync object */ 22 | ) 23 | { 24 | int ret; 25 | 26 | 27 | *sobj = CreateMutex(NULL, FALSE, NULL); /* Win32 */ 28 | ret = (int)(*sobj != INVALID_HANDLE_VALUE); 29 | 30 | // *sobj = SyncObjects[vol]; /* uITRON (give a static created sync object) */ 31 | // ret = 1; /* The initial value of the semaphore must be 1. */ 32 | 33 | // *sobj = OSMutexCreate(0, &err); /* uC/OS-II */ 34 | // ret = (int)(err == OS_NO_ERR); 35 | 36 | // *sobj = xSemaphoreCreateMutex(); /* FreeRTOS */ 37 | // ret = (int)(*sobj != NULL); 38 | 39 | return ret; 40 | } 41 | 42 | 43 | 44 | /*------------------------------------------------------------------------*/ 45 | /* Delete a Synchronization Object */ 46 | /*------------------------------------------------------------------------*/ 47 | /* This function is called in f_mount() function to delete a synchronization 48 | / object that created with ff_cre_syncobj function. When a 0 is returned, 49 | / the f_mount() function fails with FR_INT_ERR. 50 | */ 51 | 52 | int ff_del_syncobj ( /* !=0:Function succeeded, ==0:Could not delete due to any error */ 53 | _SYNC_t sobj /* Sync object tied to the logical drive to be deleted */ 54 | ) 55 | { 56 | int ret; 57 | 58 | 59 | ret = CloseHandle(sobj); /* Win32 */ 60 | 61 | // ret = 1; /* uITRON (nothing to do) */ 62 | 63 | // OSMutexDel(sobj, OS_DEL_ALWAYS, &err); /* uC/OS-II */ 64 | // ret = (int)(err == OS_NO_ERR); 65 | 66 | // vSemaphoreDelete(sobj); /* FreeRTOS */ 67 | // ret = 1; 68 | 69 | return ret; 70 | } 71 | 72 | 73 | 74 | /*------------------------------------------------------------------------*/ 75 | /* Request Grant to Access the Volume */ 76 | /*------------------------------------------------------------------------*/ 77 | /* This function is called on entering file functions to lock the volume. 78 | / When a 0 is returned, the file function fails with FR_TIMEOUT. 79 | */ 80 | 81 | int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a grant */ 82 | _SYNC_t sobj /* Sync object to wait */ 83 | ) 84 | { 85 | int ret; 86 | 87 | ret = (int)(WaitForSingleObject(sobj, _FS_TIMEOUT) == WAIT_OBJECT_0); /* Win32 */ 88 | 89 | // ret = (int)(wai_sem(sobj) == E_OK); /* uITRON */ 90 | 91 | // OSMutexPend(sobj, _FS_TIMEOUT, &err)); /* uC/OS-II */ 92 | // ret = (int)(err == OS_NO_ERR); 93 | 94 | // ret = (int)(xSemaphoreTake(sobj, _FS_TIMEOUT) == pdTRUE); /* FreeRTOS */ 95 | 96 | return ret; 97 | } 98 | 99 | 100 | 101 | /*------------------------------------------------------------------------*/ 102 | /* Release Grant to Access the Volume */ 103 | /*------------------------------------------------------------------------*/ 104 | /* This function is called on leaving file functions to unlock the volume. 105 | */ 106 | 107 | void ff_rel_grant ( 108 | _SYNC_t sobj /* Sync object to be signaled */ 109 | ) 110 | { 111 | ReleaseMutex(sobj); /* Win32 */ 112 | 113 | // sig_sem(sobj); /* uITRON */ 114 | 115 | // OSMutexPost(sobj); /* uC/OS-II */ 116 | 117 | // xSemaphoreGive(sobj); /* FreeRTOS */ 118 | } 119 | 120 | #endif 121 | 122 | 123 | 124 | 125 | #if _USE_LFN == 3 /* LFN with a working buffer on the heap */ 126 | /*------------------------------------------------------------------------*/ 127 | /* Allocate a memory block */ 128 | /*------------------------------------------------------------------------*/ 129 | /* If a NULL is returned, the file function fails with FR_NOT_ENOUGH_CORE. 130 | */ 131 | 132 | void* ff_memalloc ( /* Returns pointer to the allocated memory block */ 133 | UINT msize /* Number of bytes to allocate */ 134 | ) 135 | { 136 | return malloc(msize); /* Allocate a new memory block with POSIX API */ 137 | } 138 | 139 | 140 | /*------------------------------------------------------------------------*/ 141 | /* Free a memory block */ 142 | /*------------------------------------------------------------------------*/ 143 | 144 | void ff_memfree ( 145 | void* mblock /* Pointer to the memory block to free */ 146 | ) 147 | { 148 | free(mblock); /* Discard the memory block with POSIX API */ 149 | } 150 | 151 | #endif 152 | -------------------------------------------------------------------------------- /STemWin/inc/SLIDER_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : SLIDER_Private.h 44 | Purpose : SLIDER private header file 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef SLIDER_PRIVATE_H 49 | #define SLIDER_PRIVATE_H 50 | 51 | #include "WM.h" 52 | #include "WIDGET.h" 53 | #include "SLIDER.h" 54 | 55 | #if GUI_WINSUPPORT 56 | 57 | /********************************************************************* 58 | * 59 | * Defines 60 | * 61 | ********************************************************************** 62 | */ 63 | // 64 | // Flags 65 | // 66 | #define SLIDER_FLAG_DRAW_FOCUS_RECT (1 << 0) 67 | 68 | /********************************************************************* 69 | * 70 | * Object definition 71 | * 72 | ********************************************************************** 73 | */ 74 | typedef struct { 75 | WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 76 | } SLIDER_SKIN_PRIVATE; 77 | 78 | typedef struct { 79 | U8 Flags; 80 | GUI_COLOR BkColor; 81 | GUI_COLOR BarColor; 82 | GUI_COLOR FocusColor; 83 | GUI_COLOR TickColor; 84 | SLIDER_SKIN_PRIVATE SkinPrivate; 85 | } SLIDER_PROPS; 86 | 87 | typedef struct { 88 | WIDGET Widget; 89 | SLIDER_PROPS Props; 90 | WIDGET_SKIN const * pWidgetSkin; 91 | int NumTicks; 92 | int Max; 93 | int Min; 94 | int v; 95 | I16 Width; 96 | } SLIDER_Obj; 97 | 98 | /********************************************************************* 99 | * 100 | * Macros for internal use 101 | * 102 | ********************************************************************** 103 | */ 104 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 105 | #define SLIDER_INIT_ID(p) (p->Widget.DebugId = SLIDER_ID) 106 | #else 107 | #define SLIDER_INIT_ID(p) 108 | #endif 109 | 110 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 111 | SLIDER_Obj * SLIDER_LockH(SLIDER_Handle h); 112 | #define SLIDER_LOCK_H(h) SLIDER_LockH(h) 113 | #else 114 | #define SLIDER_LOCK_H(h) (SLIDER_Obj *)GUI_LOCK_H(h) 115 | #endif 116 | 117 | #ifndef SLIDER_SUPPORT_TRANSPARENCY 118 | #define SLIDER_SUPPORT_TRANSPARENCY WM_SUPPORT_TRANSPARENCY 119 | #endif 120 | 121 | /********************************************************************* 122 | * 123 | * Public data (internal defaults) 124 | * 125 | ********************************************************************** 126 | */ 127 | extern SLIDER_PROPS SLIDER__DefaultProps; 128 | extern const WIDGET_SKIN SLIDER__SkinClassic; 129 | extern WIDGET_SKIN SLIDER__Skin; 130 | extern const WIDGET_SKIN * SLIDER__pSkinDefault; 131 | 132 | #endif // GUI_WINSUPPORT 133 | #endif // SLIDER_PRIVATE_H 134 | 135 | /*************************** End of file ****************************/ 136 | -------------------------------------------------------------------------------- /STemWin/inc/GUI_BMP_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUI_BMP_Private.h 44 | Purpose : Private header file for GUI_BMP... functions 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUI_BMP_PRIVATE_H 49 | #define GUI_BMP_PRIVATE_H 50 | 51 | #include "GUI_Private.h" 52 | 53 | /********************************************************************* 54 | * 55 | * Defines 56 | * 57 | ********************************************************************** 58 | */ 59 | #define BI_RGB 0 60 | #define BI_RLE8 1 61 | #define BI_RLE4 2 62 | #define BI_BITFIELDS 3 63 | 64 | /********************************************************************* 65 | * 66 | * Types 67 | * 68 | ********************************************************************** 69 | */ 70 | // 71 | // Default parameter structure for reading data from memory 72 | // 73 | typedef struct { 74 | const U8 * pFileData; 75 | } GUI_BMP_PARAM; 76 | 77 | // 78 | // Context structure for getting stdio input 79 | // 80 | typedef struct { 81 | GUI_GET_DATA_FUNC * pfGetData; // Function pointer 82 | U32 Off; // Data pointer 83 | void * pParam; // Parameter pointer passed to function 84 | } GUI_BMP_CONTEXT; 85 | 86 | // 87 | // Parameter structure for passing several required variables to the 88 | // functions _DrawLine_RGB() and _DrawLine_ARGB() (in GUI_BMP_EnableAlpha.c). 89 | // 90 | typedef struct { 91 | const U8 * pSrc; // Pointer to data 92 | I32 xSrc; // Used to read data 93 | int ySrc; // Used to read data 94 | I32 xSize; 95 | U32 BytesPerPixel; 96 | tLCDDEV_Color2Index * pfColor2Index; 97 | tLCDDEV_Index2Color * pfIndex2Color; // Used to manage bitfield conversion 98 | LCD_API_NEXT_PIXEL * pNextPixel_API; 99 | int x0; // Used to draw data 100 | int y0; // Used to draw data 101 | int x1; // Used to draw data 102 | int y1; // Used to draw data 103 | } GUI_DRAWLINE_INFO; 104 | 105 | /********************************************************************* 106 | * 107 | * Interface 108 | * 109 | ********************************************************************** 110 | */ 111 | int GUI_BMP__GetData (void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off); 112 | int GUI_BMP__Init (GUI_BMP_CONTEXT * pContext, I32 * pWidth, I32 * pHeight, U16 * pBitCount, int * pNumColors, int * pCompression); 113 | int GUI_BMP__ReadData (GUI_BMP_CONTEXT * pContext, int NumBytes, const U8 ** ppData, unsigned StartOfFile); 114 | int GUI_BMP__ReadPalette(GUI_BMP_CONTEXT * pContext, int NumColors); 115 | 116 | #endif /* GUI_BMP_PRIVATE_H */ 117 | 118 | /*************************** End of file ****************************/ 119 | -------------------------------------------------------------------------------- /STemWin/inc/BUTTON_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : BUTTON_Private.h 44 | Purpose : BUTTON private header file 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef BUTTON_PRIVATE_H 49 | #define BUTTON_PRIVATE_H 50 | 51 | #include "WM.h" 52 | #include "BUTTON.h" 53 | 54 | #if GUI_WINSUPPORT 55 | 56 | /********************************************************************* 57 | * 58 | * Defines 59 | * 60 | ********************************************************************** 61 | */ 62 | #ifndef BUTTON_3D_MOVE_X 63 | #define BUTTON_3D_MOVE_X 1 64 | #endif 65 | #ifndef BUTTON_3D_MOVE_Y 66 | #define BUTTON_3D_MOVE_Y 1 67 | #endif 68 | 69 | /********************************************************************* 70 | * 71 | * Object definition 72 | * 73 | ********************************************************************** 74 | */ 75 | typedef struct { 76 | WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 77 | } BUTTON_SKIN_PRIVATE; 78 | 79 | typedef struct { 80 | GUI_COLOR aBkColor[3]; 81 | GUI_COLOR aTextColor[3]; 82 | GUI_COLOR FocusColor; 83 | GUI_COLOR FrameColor; 84 | const GUI_FONT * pFont; 85 | BUTTON_SKIN_PRIVATE SkinPrivate; 86 | I16 Align; 87 | I16 xPosText, yPosText; 88 | } BUTTON_PROPS; 89 | 90 | typedef struct { 91 | WIDGET Widget; 92 | BUTTON_PROPS Props; 93 | WIDGET_SKIN const * pWidgetSkin; 94 | WM_HMEM hpText; 95 | WM_HMEM ahDrawObj[3]; 96 | } BUTTON_Obj; 97 | 98 | /********************************************************************* 99 | * 100 | * Macros for internal use 101 | * 102 | ********************************************************************** 103 | */ 104 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 105 | #define BUTTON_INIT_ID(p) (p->Widget.DebugId = BUTTON_ID) 106 | #else 107 | #define BUTTON_INIT_ID(p) 108 | #endif 109 | 110 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 111 | BUTTON_Obj * BUTTON_LockH(BUTTON_Handle h); 112 | #define BUTTON_LOCK_H(h) BUTTON_LockH(h) 113 | #else 114 | #define BUTTON_LOCK_H(h) (BUTTON_Obj *)GUI_LOCK_H(h) 115 | #endif 116 | 117 | /********************************************************************* 118 | * 119 | * Public data (internal defaults) 120 | * 121 | ********************************************************************** 122 | */ 123 | extern BUTTON_PROPS BUTTON__DefaultProps; 124 | 125 | extern const WIDGET_SKIN BUTTON__SkinClassic; 126 | extern WIDGET_SKIN BUTTON__Skin; 127 | 128 | extern WIDGET_SKIN const * BUTTON__pSkinDefault; 129 | 130 | /********************************************************************* 131 | * 132 | * Private functions 133 | * 134 | ********************************************************************** 135 | */ 136 | void BUTTON__SetDrawObj(BUTTON_Handle hObj, int Index, GUI_DRAW_HANDLE hDrawObj); 137 | 138 | 139 | #endif /* GUI_WINSUPPORT */ 140 | #endif /* BUTTON_H */ 141 | 142 | /*************************** End of file ****************************/ 143 | -------------------------------------------------------------------------------- /STemWin/inc/GUIDRV_TemplateI.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : GUIDRV_TemplateI.h 44 | Purpose : Interface definition for GUIDRV_TemplateI driver 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef GUIDRV_TEMPLATE_I_H 49 | #define GUIDRV_TEMPLATE_I_H 50 | 51 | #if defined(__cplusplus) 52 | extern "C" { /* Make sure we have C-declarations in C++ programs */ 53 | #endif 54 | 55 | /********************************************************************* 56 | * 57 | * Configuration structure 58 | */ 59 | typedef struct { 60 | // 61 | // Driver specific configuration items 62 | // 63 | int Dummy; 64 | } CONFIG_TEMPLATE_I; 65 | 66 | /********************************************************************* 67 | * 68 | * Display drivers 69 | */ 70 | // 71 | // Addresses 72 | // 73 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_16_API; 74 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OY_16_API; 75 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OX_16_API; 76 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OXY_16_API; 77 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OS_16_API; 78 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OSY_16_API; 79 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OSX_16_API; 80 | extern const GUI_DEVICE_API GUIDRV_TEMPLATE_I_OSXY_16_API; 81 | 82 | // 83 | // Macros to be used in configuration files 84 | // 85 | #if defined(WIN32) && !defined(LCD_SIMCONTROLLER) 86 | 87 | #define GUIDRV_TEMPLATE_I_16 &GUIDRV_Win_API 88 | #define GUIDRV_TEMPLATE_I_OY_16 &GUIDRV_Win_API 89 | #define GUIDRV_TEMPLATE_I_OX_16 &GUIDRV_Win_API 90 | #define GUIDRV_TEMPLATE_I_OXY_16 &GUIDRV_Win_API 91 | #define GUIDRV_TEMPLATE_I_OS_16 &GUIDRV_Win_API 92 | #define GUIDRV_TEMPLATE_I_OSY_16 &GUIDRV_Win_API 93 | #define GUIDRV_TEMPLATE_I_OSX_16 &GUIDRV_Win_API 94 | #define GUIDRV_TEMPLATE_I_OSXY_16 &GUIDRV_Win_API 95 | 96 | #else 97 | 98 | #define GUIDRV_TEMPLATE_I_16 &GUIDRV_TEMPLATE_I_16_API 99 | #define GUIDRV_TEMPLATE_I_OY_16 &GUIDRV_TEMPLATE_I_OY_16_API 100 | #define GUIDRV_TEMPLATE_I_OX_16 &GUIDRV_TEMPLATE_I_OX_16_API 101 | #define GUIDRV_TEMPLATE_I_OXY_16 &GUIDRV_TEMPLATE_I_OXY_16_API 102 | #define GUIDRV_TEMPLATE_I_OS_16 &GUIDRV_TEMPLATE_I_OS_16_API 103 | #define GUIDRV_TEMPLATE_I_OSY_16 &GUIDRV_TEMPLATE_I_OSY_16_API 104 | #define GUIDRV_TEMPLATE_I_OSX_16 &GUIDRV_TEMPLATE_I_OSX_16_API 105 | #define GUIDRV_TEMPLATE_I_OSXY_16 &GUIDRV_TEMPLATE_I_OSXY_16_API 106 | 107 | #endif 108 | 109 | /********************************************************************* 110 | * 111 | * Public routines 112 | */ 113 | void GUIDRV_TemplateI_Config (GUI_DEVICE * pDevice, CONFIG_TEMPLATE_I * pConfig); 114 | void GUIDRV_TemplateI_SetBus_XXX(GUI_DEVICE * pDevice, GUI_PORT_API * pHW_API); 115 | void GUIDRV_TemplateI_SetFuncXXX(GUI_DEVICE * pDevice); 116 | 117 | #if defined(__cplusplus) 118 | } 119 | #endif 120 | 121 | #endif 122 | 123 | /*************************** End of file ****************************/ 124 | -------------------------------------------------------------------------------- /STemWin/inc/HEADER_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : HEADER_Private.h 44 | Purpose : Private HEADER include 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef HEADER_PRIVATE_H 49 | #define HEADER_PRIVATE_H 50 | 51 | 52 | #include "HEADER.h" 53 | #include "WIDGET.h" 54 | #include "WM.h" 55 | #include "GUI_ARRAY.h" 56 | 57 | #if GUI_WINSUPPORT 58 | 59 | /********************************************************************* 60 | * 61 | * Object definition 62 | * 63 | ********************************************************************** 64 | */ 65 | typedef struct { 66 | int Width; 67 | I16 Align; 68 | WM_HMEM hDrawObj; 69 | char acText[1]; 70 | } HEADER_COLUMN; 71 | 72 | typedef struct { 73 | WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 74 | } HEADER_SKIN_PRIVATE; 75 | 76 | typedef struct { 77 | const GUI_FONT * pFont; 78 | GUI_COLOR BkColor; 79 | GUI_COLOR TextColor; 80 | GUI_COLOR ArrowColor; 81 | HEADER_SKIN_PRIVATE SkinPrivate; 82 | } HEADER_PROPS; 83 | 84 | typedef struct { 85 | WIDGET Widget; 86 | HEADER_PROPS Props; 87 | WIDGET_SKIN const * pWidgetSkin; 88 | GUI_ARRAY Columns; 89 | int CapturePosX; 90 | int CaptureItem; 91 | int ScrollPos; 92 | int Sel; 93 | int DirIndicatorColumn; 94 | int DirIndicatorReverse; 95 | unsigned Fixed; 96 | U8 DragLimit; 97 | } HEADER_Obj; 98 | 99 | /********************************************************************* 100 | * 101 | * Private (module internal) data 102 | * 103 | ********************************************************************** 104 | */ 105 | 106 | extern HEADER_PROPS HEADER__DefaultProps; 107 | extern const GUI_CURSOR * HEADER__pDefaultCursor; 108 | extern int HEADER__DefaultBorderH; 109 | extern int HEADER__DefaultBorderV; 110 | 111 | extern const WIDGET_SKIN HEADER__SkinClassic; 112 | extern WIDGET_SKIN HEADER__Skin; 113 | 114 | extern WIDGET_SKIN const * HEADER__pSkinDefault; 115 | 116 | /********************************************************************* 117 | * 118 | * Macros for internal use 119 | * 120 | ********************************************************************** 121 | */ 122 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 123 | #define HEADER_INIT_ID(p) (p->Widget.DebugId = HEADER_ID) 124 | #else 125 | #define HEADER_INIT_ID(p) 126 | #endif 127 | 128 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 129 | HEADER_Obj * HEADER_LockH(HEADER_Handle h); 130 | #define HEADER_LOCK_H(h) HEADER_LockH(h) 131 | #else 132 | #define HEADER_LOCK_H(h) (HEADER_Obj *)GUI_LOCK_H(h) 133 | #endif 134 | 135 | void HEADER__SetDrawObj(HEADER_Handle hObj, unsigned Index, GUI_DRAW_HANDLE hDrawObj); 136 | 137 | 138 | #endif // GUI_WINSUPPORT 139 | #endif // Avoid multiple inclusion 140 | 141 | /*************************** End of file ****************************/ 142 | -------------------------------------------------------------------------------- /STemWin/inc/PROGBAR_Private.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : PROGBAR_Private.h 44 | Purpose : Internal header file 45 | ---------------------------END-OF-HEADER------------------------------ 46 | */ 47 | 48 | #ifndef PROGBAR_PRIVATE_H 49 | #define PROGBAR_PRIVATE_H 50 | 51 | #include "PROGBAR.h" 52 | #include "WIDGET.h" 53 | 54 | #if GUI_WINSUPPORT 55 | 56 | /********************************************************************* 57 | * 58 | * Defines 59 | * 60 | ********************************************************************** 61 | */ 62 | #define PROGBAR_SF_HORIZONTAL PROGBAR_CF_HORIZONTAL 63 | #define PROGBAR_SF_VERTICAL PROGBAR_CF_VERTICAL 64 | #define PROGBAR_SF_USER PROGBAR_CF_USER 65 | 66 | /********************************************************************* 67 | * 68 | * Types 69 | * 70 | ********************************************************************** 71 | */ 72 | typedef struct { 73 | WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 74 | } PROGBAR_SKIN_PRIVATE; 75 | 76 | typedef struct { 77 | const GUI_FONT * pFont; 78 | GUI_COLOR aBarColor[2]; 79 | GUI_COLOR aTextColor[2]; 80 | PROGBAR_SKIN_PRIVATE SkinPrivate; 81 | } PROGBAR_PROPS; 82 | 83 | typedef struct { 84 | WIDGET Widget; 85 | int v; 86 | WM_HMEM hpText; 87 | I16 XOff, YOff; 88 | I16 TextAlign; 89 | int Min, Max; 90 | PROGBAR_PROPS Props; 91 | WIDGET_SKIN const * pWidgetSkin; 92 | U8 Flags; 93 | } PROGBAR_Obj; 94 | 95 | /********************************************************************* 96 | * 97 | * Macros for internal use 98 | * 99 | ********************************************************************** 100 | */ 101 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 102 | #define PROGBAR_INIT_ID(p) p->Widget.DebugId = PROGBAR_ID 103 | #else 104 | #define PROGBAR_INIT_ID(p) 105 | #endif 106 | 107 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 108 | PROGBAR_Obj * PROGBAR_LockH(PROGBAR_Handle h); 109 | #define PROGBAR_LOCK_H(h) PROGBAR_LockH(h) 110 | #else 111 | #define PROGBAR_LOCK_H(h) (PROGBAR_Obj *)GUI_LOCK_H(h) 112 | #endif 113 | 114 | /********************************************************************* 115 | * 116 | * Public data (internal defaults) 117 | * 118 | ********************************************************************** 119 | */ 120 | extern PROGBAR_PROPS PROGBAR__DefaultProps; 121 | 122 | extern const WIDGET_SKIN PROGBAR__SkinClassic; 123 | extern WIDGET_SKIN PROGBAR__Skin; 124 | 125 | extern WIDGET_SKIN const * PROGBAR__pSkinDefault; 126 | 127 | /********************************************************************* 128 | * 129 | * Public functions (internal) 130 | * 131 | ********************************************************************** 132 | */ 133 | char * PROGBAR__GetTextLocked(const PROGBAR_Obj * pObj); 134 | void PROGBAR__GetTextRect (const PROGBAR_Obj * pObj, GUI_RECT * pRect, const char * pText); 135 | int PROGBAR__Value2Pos (const PROGBAR_Obj * pObj, int v); 136 | 137 | #endif /* GUI_WINSUPPORT */ 138 | #endif /* PROGBAR_PRIVATE_H */ 139 | 140 | /*************************** End of file ****************************/ 141 | -------------------------------------------------------------------------------- /FreeRTOS/port/RVDS/ARM_CA9/portmacro.inc: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. 3 | ; All rights reserved 4 | ; 5 | ; 6 | ; *************************************************************************** 7 | ; * * 8 | ; * FreeRTOS tutorial books are available in pdf and paperback. * 9 | ; * Complete, revised, and edited pdf reference manuals are also * 10 | ; * available. * 11 | ; * * 12 | ; * Purchasing FreeRTOS documentation will not only help you, by * 13 | ; * ensuring you get running as quickly as possible and with an * 14 | ; * in-depth knowledge of how to use FreeRTOS, it will also help * 15 | ; * the FreeRTOS project to continue with its mission of providing * 16 | ; * professional grade, cross platform, de facto standard solutions * 17 | ; * for microcontrollers - completely free of charge! * 18 | ; * * 19 | ; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< * 20 | ; * * 21 | ; * Thank you for using FreeRTOS, and thank you for your support! * 22 | ; * * 23 | ; *************************************************************************** 24 | ; 25 | ; 26 | ; This file is part of the FreeRTOS distribution. 27 | ; 28 | ; FreeRTOS is free software; you can redistribute it and/or modify it under 29 | ; the terms of the GNU General Public License (version 2) as published by the 30 | ; Free Software Foundation AND MODIFIED BY the FreeRTOS exception. 31 | ; >>>NOTE<<< The modification to the GPL is included to allow you to 32 | ; distribute a combined work that includes FreeRTOS without being obliged to 33 | ; provide the source code for proprietary components outside of the FreeRTOS 34 | ; kernel. FreeRTOS is distributed in the hope that it will be useful, but 35 | ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 36 | ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 37 | ; more details. You should have received a copy of the GNU General Public 38 | ; License and the FreeRTOS license exception along with FreeRTOS; if not it 39 | ; can be viewed here: http://www.freertos.org/a00114.html and also obtained 40 | ; by writing to Richard Barry, contact details for whom are available on the 41 | ; FreeRTOS WEB site. 42 | ; 43 | ; 1 tab == 4 spaces! 44 | ; 45 | ; http://www.FreeRTOS.org - Documentation, latest information, license and 46 | ; contact details. 47 | ; 48 | ; http://www.SafeRTOS.com - A version that is certified for use in safety 49 | ; critical systems. 50 | ; 51 | ; http://www.OpenRTOS.com - Commercial support, development, porting, 52 | ; licensing and training services. 53 | ;*/ 54 | 55 | SYS_MODE EQU 0x1f 56 | SVC_MODE EQU 0x13 57 | IRQ_MODE EQU 0x12 58 | 59 | IMPORT ulCriticalNesting 60 | IMPORT pxCurrentTCB 61 | IMPORT ulPortTaskHasFPUContext 62 | IMPORT ulAsmAPIPriorityMask 63 | IMPORT ulICCPMR 64 | 65 | 66 | MACRO 67 | portSAVE_CONTEXT 68 | 69 | ; Save the LR and SPSR onto the system mode stack before switching to 70 | ; system mode to save the remaining system mode registers 71 | SRSDB sp!, #SYS_MODE 72 | CPS #SYS_MODE 73 | PUSH {R0-R12, R14} 74 | 75 | ; Push the critical nesting count 76 | LDR R2, =ulCriticalNesting 77 | LDR R1, [R2] 78 | PUSH {R1} 79 | 80 | ; Does the task have a floating point context that needs saving? If 81 | ; ulPortTaskHasFPUContext is 0 then no. 82 | LDR R2, =ulPortTaskHasFPUContext 83 | LDR R3, [R2] 84 | CMP R3, #0 85 | 86 | ; Save the floating point context, if any 87 | FMRXNE R1, FPSCR 88 | VPUSHNE {D0-D15} 89 | VPUSHNE {D16-D31} 90 | PUSHNE {R1} 91 | 92 | ; Save ulPortTaskHasFPUContext itself 93 | PUSH {R3} 94 | 95 | ; Save the stack pointer in the TCB 96 | LDR R0, =pxCurrentTCB 97 | LDR R1, [R0] 98 | STR SP, [R1] 99 | 100 | MEND 101 | 102 | ; /**********************************************************************/ 103 | 104 | MACRO 105 | portRESTORE_CONTEXT 106 | 107 | ; Set the SP to point to the stack of the task being restored. 108 | LDR R0, =pxCurrentTCB 109 | LDR R1, [R0] 110 | LDR SP, [R1] 111 | 112 | ; Is there a floating point context to restore? If the restored 113 | ; ulPortTaskHasFPUContext is zero then no. 114 | LDR R0, =ulPortTaskHasFPUContext 115 | POP {R1} 116 | STR R1, [R0] 117 | CMP R1, #0 118 | 119 | ; Restore the floating point context, if any 120 | POPNE {R0} 121 | VPOPNE {D16-D31} 122 | VPOPNE {D0-D15} 123 | VMSRNE FPSCR, R0 124 | 125 | ; Restore the critical section nesting depth 126 | LDR R0, =ulCriticalNesting 127 | POP {R1} 128 | STR R1, [R0] 129 | 130 | ; Ensure the priority mask is correct for the critical nesting depth 131 | LDR R2, =ulICCPMR 132 | CMP R1, #0 133 | MOVEQ R4, #255 134 | LDRNE R4, =ulAsmAPIPriorityMask 135 | STR R4, [r2] 136 | 137 | ; Restore all system mode registers other than the SP (which is already 138 | ; being used) 139 | POP {R0-R12, R14} 140 | 141 | ; Return to the task code, loading CPSR on the way. 142 | RFEIA sp! 143 | 144 | MEND 145 | 146 | END 147 | 148 | -------------------------------------------------------------------------------- /STemWin/inc/DIALOG_Intern.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * SEGGER Microcontroller GmbH & Co. KG * 3 | * Solutions for real time microcontroller applications * 4 | ********************************************************************** 5 | * * 6 | * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 | * * 8 | * Internet: www.segger.com Support: support@segger.com * 9 | * * 10 | ********************************************************************** 11 | 12 | ** emWin V5.44 - Graphical user interface for embedded applications ** 13 | All Intellectual Property rights in the Software belongs to SEGGER. 14 | emWin is protected by international copyright laws. Knowledge of the 15 | source code may not be used to write a similar product. This file may 16 | only be used in accordance with the following terms: 17 | 18 | The software has been licensed to STMicroelectronics International 19 | N.V. a Dutch company with a Swiss branch and its headquarters in Plan- 20 | les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the 21 | purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ 22 | troller products commercialized by Licensee only, sublicensed and dis_ 23 | tributed under the terms and conditions of the End User License Agree_ 24 | ment supplied by STMicroelectronics International N.V. 25 | Full source code is available at: www.segger.com 26 | 27 | We appreciate your understanding and fairness. 28 | ---------------------------------------------------------------------- 29 | 30 | ****************************************************************************** 31 | * @attention 32 | * 33 | *

© Copyright (c) 2018 STMicroelectronics. 34 | * All rights reserved.

35 | * 36 | * This software component is licensed by ST under Ultimate Liberty license SLA0044, 37 | * the "License"; You may not use this file except in compliance with the License. 38 | * You may obtain a copy of the License at: 39 | * http://www.st.com/SLA0044 40 | * 41 | ****************************************************************************** 42 | ---------------------------------------------------------------------- 43 | File : Dialog.h 44 | Purpose : Dialog box include 45 | --------------------END-OF-HEADER------------------------------------- 46 | */ 47 | 48 | #ifndef DIALOG_INTERN_H 49 | #define DIALOG_INTERN_H 50 | 51 | #include "WM.h" 52 | 53 | #if GUI_WINSUPPORT 54 | 55 | #if defined(__cplusplus) 56 | extern "C" { // Make sure we have C-declarations in C++ programs 57 | #endif 58 | 59 | /********************************************************************* 60 | * 61 | * Types 62 | * 63 | ********************************************************************** 64 | */ 65 | typedef struct GUI_WIDGET_CREATE_INFO_struct GUI_WIDGET_CREATE_INFO; 66 | typedef WM_HWIN GUI_WIDGET_CREATE_FUNC (const GUI_WIDGET_CREATE_INFO * pCreate, WM_HWIN hWin, int x0, int y0, WM_CALLBACK * cb); 67 | 68 | /********************************************************************* 69 | * 70 | * Structures 71 | * 72 | ********************************************************************** 73 | */ 74 | struct GUI_WIDGET_CREATE_INFO_struct { 75 | GUI_WIDGET_CREATE_FUNC * pfCreateIndirect; 76 | const char * pName; // Text ... Not used on all widgets 77 | I16 Id; // ID ... should be unique in a dialog 78 | I16 x0; // x position 79 | I16 y0; // y position 80 | I16 xSize; // x size 81 | I16 ySize; // y size 82 | U16 Flags; // Widget specific create flags (opt.) 83 | I32 Para; // Widget specific parameter (opt.) 84 | U32 NumExtraBytes; // Number of extra bytes usable with _SetUserData & _GetUserData 85 | }; 86 | 87 | /********************************************************************* 88 | * 89 | * Public API functions 90 | * 91 | ********************************************************************** 92 | */ 93 | WM_HWIN GUI_CreateDialogBox (const GUI_WIDGET_CREATE_INFO * paWidget, int NumWidgets, WM_CALLBACK * cb, WM_HWIN hParent, int x0, int y0); 94 | void GUI_EndDialog (WM_HWIN hWin, int r); 95 | int GUI_ExecDialogBox (const GUI_WIDGET_CREATE_INFO * paWidget, int NumWidgets, WM_CALLBACK * cb, WM_HWIN hParent, int x0, int y0); 96 | int GUI_ExecCreatedDialog (WM_HWIN hDialog); 97 | WM_DIALOG_STATUS * GUI_GetDialogStatusPtr(WM_HWIN hDialog); // Not to be documented 98 | void GUI_SetDialogStatusPtr(WM_HWIN hDialog, WM_DIALOG_STATUS * pDialogStatus); // Not to be documented 99 | 100 | /********************************************************************* 101 | * 102 | * Obsolete 103 | */ 104 | LCD_COLOR DIALOG_GetBkColor(void); 105 | LCD_COLOR DIALOG_SetBkColor(LCD_COLOR BkColor); 106 | 107 | #if defined(__cplusplus) 108 | } 109 | #endif 110 | 111 | #endif // GUI_WINSUPPORT 112 | #endif // DIALOG_INTERN_H 113 | 114 | /*************************** End of file ****************************/ 115 | -------------------------------------------------------------------------------- /Libraries/FWlib/src/stm32f10x_iwdg.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_iwdg.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the IWDG firmware functions. 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 | /* Includes ------------------------------------------------------------------*/ 23 | #include "stm32f10x_iwdg.h" 24 | 25 | /** @addtogroup STM32F10x_StdPeriph_Driver 26 | * @{ 27 | */ 28 | 29 | /** @defgroup IWDG 30 | * @brief IWDG driver modules 31 | * @{ 32 | */ 33 | 34 | /** @defgroup IWDG_Private_TypesDefinitions 35 | * @{ 36 | */ 37 | 38 | /** 39 | * @} 40 | */ 41 | 42 | /** @defgroup IWDG_Private_Defines 43 | * @{ 44 | */ 45 | 46 | /* ---------------------- IWDG registers bit mask ----------------------------*/ 47 | 48 | /* KR register bit mask */ 49 | #define KR_KEY_Reload ((uint16_t)0xAAAA) 50 | #define KR_KEY_Enable ((uint16_t)0xCCCC) 51 | 52 | /** 53 | * @} 54 | */ 55 | 56 | /** @defgroup IWDG_Private_Macros 57 | * @{ 58 | */ 59 | 60 | /** 61 | * @} 62 | */ 63 | 64 | /** @defgroup IWDG_Private_Variables 65 | * @{ 66 | */ 67 | 68 | /** 69 | * @} 70 | */ 71 | 72 | /** @defgroup IWDG_Private_FunctionPrototypes 73 | * @{ 74 | */ 75 | 76 | /** 77 | * @} 78 | */ 79 | 80 | /** @defgroup IWDG_Private_Functions 81 | * @{ 82 | */ 83 | 84 | /** 85 | * @brief Enables or disables write access to IWDG_PR and IWDG_RLR registers. 86 | * @param IWDG_WriteAccess: new state of write access to IWDG_PR and IWDG_RLR registers. 87 | * This parameter can be one of the following values: 88 | * @arg IWDG_WriteAccess_Enable: Enable write access to IWDG_PR and IWDG_RLR registers 89 | * @arg IWDG_WriteAccess_Disable: Disable write access to IWDG_PR and IWDG_RLR registers 90 | * @retval None 91 | */ 92 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess) 93 | { 94 | /* Check the parameters */ 95 | assert_param(IS_IWDG_WRITE_ACCESS(IWDG_WriteAccess)); 96 | IWDG->KR = IWDG_WriteAccess; 97 | } 98 | 99 | /** 100 | * @brief Sets IWDG Prescaler value. 101 | * @param IWDG_Prescaler: specifies the IWDG Prescaler value. 102 | * This parameter can be one of the following values: 103 | * @arg IWDG_Prescaler_4: IWDG prescaler set to 4 104 | * @arg IWDG_Prescaler_8: IWDG prescaler set to 8 105 | * @arg IWDG_Prescaler_16: IWDG prescaler set to 16 106 | * @arg IWDG_Prescaler_32: IWDG prescaler set to 32 107 | * @arg IWDG_Prescaler_64: IWDG prescaler set to 64 108 | * @arg IWDG_Prescaler_128: IWDG prescaler set to 128 109 | * @arg IWDG_Prescaler_256: IWDG prescaler set to 256 110 | * @retval None 111 | */ 112 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler) 113 | { 114 | /* Check the parameters */ 115 | assert_param(IS_IWDG_PRESCALER(IWDG_Prescaler)); 116 | IWDG->PR = IWDG_Prescaler; 117 | } 118 | 119 | /** 120 | * @brief Sets IWDG Reload value. 121 | * @param Reload: specifies the IWDG Reload value. 122 | * This parameter must be a number between 0 and 0x0FFF. 123 | * @retval None 124 | */ 125 | void IWDG_SetReload(uint16_t Reload) 126 | { 127 | /* Check the parameters */ 128 | assert_param(IS_IWDG_RELOAD(Reload)); 129 | IWDG->RLR = Reload; 130 | } 131 | 132 | /** 133 | * @brief Reloads IWDG counter with value defined in the reload register 134 | * (write access to IWDG_PR and IWDG_RLR registers disabled). 135 | * @param None 136 | * @retval None 137 | */ 138 | void IWDG_ReloadCounter(void) 139 | { 140 | IWDG->KR = KR_KEY_Reload; 141 | } 142 | 143 | /** 144 | * @brief Enables IWDG (write access to IWDG_PR and IWDG_RLR registers disabled). 145 | * @param None 146 | * @retval None 147 | */ 148 | void IWDG_Enable(void) 149 | { 150 | IWDG->KR = KR_KEY_Enable; 151 | } 152 | 153 | /** 154 | * @brief Checks whether the specified IWDG flag is set or not. 155 | * @param IWDG_FLAG: specifies the flag to check. 156 | * This parameter can be one of the following values: 157 | * @arg IWDG_FLAG_PVU: Prescaler Value Update on going 158 | * @arg IWDG_FLAG_RVU: Reload Value Update on going 159 | * @retval The new state of IWDG_FLAG (SET or RESET). 160 | */ 161 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG) 162 | { 163 | FlagStatus bitstatus = RESET; 164 | /* Check the parameters */ 165 | assert_param(IS_IWDG_FLAG(IWDG_FLAG)); 166 | if ((IWDG->SR & IWDG_FLAG) != (uint32_t)RESET) 167 | { 168 | bitstatus = SET; 169 | } 170 | else 171 | { 172 | bitstatus = RESET; 173 | } 174 | /* Return the flag status */ 175 | return bitstatus; 176 | } 177 | 178 | /** 179 | * @} 180 | */ 181 | 182 | /** 183 | * @} 184 | */ 185 | 186 | /** 187 | * @} 188 | */ 189 | 190 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 191 | --------------------------------------------------------------------------------