├── .gitattributes ├── 上位机 ├── STM32示波器上位机源代码 │ ├── 示波器上位机.sln │ ├── 示波器上位机.suo │ └── 示波器上位机 │ │ ├── Form1.Designer.cs │ │ ├── Form1.cs │ │ ├── Form1.resx │ │ ├── Program.cs │ │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ │ ├── bin │ │ └── Debug │ │ │ ├── 示波器上位机.pdb │ │ │ ├── 示波器上位机.vshost.exe │ │ │ └── 示波器上位机.vshost.exe.manifest │ │ ├── obj │ │ └── x86 │ │ │ └── Debug │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── 示波器上位机.Form1.resources │ │ │ ├── 示波器上位机.Properties.Resources.resources │ │ │ ├── 示波器上位机.csproj.FileListAbsolute.txt │ │ │ ├── 示波器上位机.exe │ │ │ └── 示波器上位机.pdb │ │ ├── 示波器上位机.csproj │ │ └── 示波器上位机.suo └── 示波器上位机.exe ├── 硬件 ├── __Previews │ └── 示波器上层板最终实物版图.PcbDocPreview ├── 电平平移.ms12 ├── 示波器AD板.pdf ├── 示波器AD板最终实物版图.PcbDoc ├── 示波器上层板.pdf ├── 示波器上层板最终实物版图.PcbDoc ├── 示波器上层板最终实物版图.PcbDoc.htm ├── 示波器前端电路.ms12 └── 耦合——衰减电路.ms12 ├── 程序 ├── APP │ ├── app.bak │ ├── app.c │ ├── app.h │ ├── app_cfg.h │ ├── includes.h │ ├── os_cfg.bak │ ├── os_cfg.h │ ├── task_gui.bak │ ├── task_gui.c │ ├── task_gui.h │ ├── task_main.bak │ ├── task_main.c │ ├── task_main.h │ ├── task_rtc.bak │ ├── task_rtc.c │ ├── task_rtc.h │ ├── task_sd.bak │ ├── task_sd.c │ ├── task_sd.h │ ├── task_touchscreen.c │ └── task_touchscreen.h ├── CM3 │ ├── core_cm3.c │ ├── core_cm3.h │ ├── stm32f10x.h │ ├── system_stm32f10x.c │ └── system_stm32f10x.h ├── FWlib │ ├── SRC │ │ ├── misc.c │ │ ├── stm32f10x_adc.c │ │ ├── stm32f10x_bkp.c │ │ ├── stm32f10x_can.c │ │ ├── stm32f10x_cec.c │ │ ├── stm32f10x_crc.c │ │ ├── stm32f10x_dac.c │ │ ├── stm32f10x_dbgmcu.c │ │ ├── stm32f10x_dma.c │ │ ├── stm32f10x_exti.c │ │ ├── stm32f10x_flash.c │ │ ├── stm32f10x_fsmc.c │ │ ├── stm32f10x_gpio.c │ │ ├── stm32f10x_i2c.c │ │ ├── stm32f10x_iwdg.c │ │ ├── stm32f10x_pwr.c │ │ ├── stm32f10x_rcc.c │ │ ├── stm32f10x_rtc.c │ │ ├── stm32f10x_sdio.c │ │ ├── stm32f10x_spi.c │ │ ├── stm32f10x_tim.c │ │ ├── stm32f10x_usart.c │ │ ├── stm32f10x_wwdg.c │ │ └── system_stm32f10x.c │ └── inc │ │ ├── misc.h │ │ ├── stm32f10x_adc.h │ │ ├── stm32f10x_bkp.h │ │ ├── stm32f10x_can.h │ │ ├── stm32f10x_cec.h │ │ ├── stm32f10x_conf.bak │ │ ├── stm32f10x_conf.h │ │ ├── stm32f10x_crc.h │ │ ├── stm32f10x_dac.h │ │ ├── stm32f10x_dbgmcu.h │ │ ├── stm32f10x_dma.h │ │ ├── stm32f10x_exti.h │ │ ├── stm32f10x_flash.h │ │ ├── stm32f10x_fsmc.h │ │ ├── stm32f10x_gpio.h │ │ ├── stm32f10x_i2c.h │ │ ├── stm32f10x_iwdg.h │ │ ├── stm32f10x_pwr.h │ │ ├── stm32f10x_rcc.h │ │ ├── stm32f10x_rtc.h │ │ ├── stm32f10x_sdio.h │ │ ├── stm32f10x_spi.h │ │ ├── stm32f10x_tim.h │ │ ├── stm32f10x_usart.h │ │ └── stm32f10x_wwdg.h ├── GUI │ ├── Config │ │ ├── GUIConf.h │ │ ├── GUITouchConf.h │ │ ├── LCDConf.h │ │ └── vssver.scc │ ├── Core │ │ ├── CCGUICore.bat │ │ ├── GUI.h │ │ ├── GUIDebug.h │ │ ├── GUIType.h │ │ ├── GUIVersion.h │ │ ├── GUI_ConfDefaults.h │ │ ├── GUI_FontIntern.h │ │ ├── GUI_Private.h │ │ ├── GUI_Protected.h │ │ ├── GUI_VNC.h │ │ ├── GUI_X.h │ │ ├── LCD.h │ │ ├── LCDSIM.h │ │ ├── LCD_ConfDefaults.h │ │ ├── LCD_Private.h │ │ ├── LCD_Protected.h │ │ └── vssver.scc │ ├── GUI.H │ │ ├── BUTTON.h │ │ ├── BUTTON_Private.h │ │ ├── CHECKBOX.h │ │ ├── CHECKBOX_Private.h │ │ ├── DIALOG.h │ │ ├── DIALOG_Intern.h │ │ ├── DROPDOWN.h │ │ ├── DROPDOWN_Private.h │ │ ├── EDIT.h │ │ ├── EDIT_Private.h │ │ ├── FRAMEWIN.h │ │ ├── FRAMEWIN_Private.h │ │ ├── GUI.h │ │ ├── GUIDebug.h │ │ ├── GUIType.h │ │ ├── GUIVersion.h │ │ ├── GUI_ARRAY.h │ │ ├── GUI_ConfDefaults.h │ │ ├── GUI_FontIntern.h │ │ ├── GUI_HOOK.h │ │ ├── GUI_Private.h │ │ ├── GUI_Protected.h │ │ ├── GUI_VNC.h │ │ ├── GUI_X.h │ │ ├── HEADER.h │ │ ├── HEADER_Private.h │ │ ├── LCD.h │ │ ├── LCDSIM.h │ │ ├── LCD_ConfDefaults.h │ │ ├── LCD_IncludeDriver.h │ │ ├── LCD_Private.h │ │ ├── LCD_Protected.h │ │ ├── LISTBOX.h │ │ ├── LISTBOX_Private.h │ │ ├── LISTVIEW.h │ │ ├── LISTVIEW_Private.h │ │ ├── MENU.h │ │ ├── MENU_Private.h │ │ ├── MESSAGEBOX.h │ │ ├── MULTIEDIT.h │ │ ├── MULTIPAGE.h │ │ ├── MULTIPAGE_Private.h │ │ ├── PROGBAR.h │ │ ├── RADIO.h │ │ ├── RADIO_Private.h │ │ ├── SCROLLBAR.h │ │ ├── SCROLLBAR_Private.h │ │ ├── SLIDER.h │ │ ├── TEXT.h │ │ ├── TEXT_Private.h │ │ ├── WIDGET.h │ │ ├── WINDOW_Private.h │ │ ├── WM.h │ │ ├── WM_GUI.h │ │ ├── WM_Intern.h │ │ ├── WM_Intern_ConfDep.h │ │ ├── jconfig.h │ │ ├── jdct.h │ │ ├── jdhuff.h │ │ ├── jerror.h │ │ ├── jinclude.h │ │ ├── jmemsys.h │ │ ├── jmorecfg.h │ │ ├── jpegint.h │ │ ├── jpeglib.h │ │ └── jversion.h │ ├── LCDDriver │ │ ├── CCLCDDriver.bat │ │ ├── LCD_GUI_Interface.c │ │ └── vssver.scc │ └── uCGUI_Lib.lib ├── GUI_X │ ├── GUI_X.c │ ├── GUI_X_Touch.c │ └── GUI_X_uCOS.c ├── JLink Regs CM3.txt ├── JLinkLog.txt ├── JLinkSettings.ini ├── STM32-FD-FLASHLED.map ├── STM32示波器+GUI.uvgui.kangs ├── STM32示波器+GUI.uvopt ├── STM32示波器+GUI.uvproj ├── STM32示波器+GUI_Target 1.dep ├── STM32示波器+GUI_uvopt.bak ├── STM32示波器+GUI_uvproj.bak ├── UCOS+GUI.uvopt ├── UCOS+GUI_Target 1.dep ├── UCOS+GUI_uvopt.bak ├── UCOS+GUI_uvproj.bak ├── os_cpu_a.lst ├── startup │ └── startup_stm32f10x_hd.s ├── startup_stm32f10x_hd.lst ├── stm32-fd-FlashLED.Uv2.bak ├── stm32-fd-FlashLED.opt.bak ├── stm32-fd-FlashLED.uvopt ├── stm32-fd-FlashLED_Opt.Bak ├── stm32-fd-FlashLED_Target 1.dep ├── stm32-fd-FlashLED_Uv2.Bak ├── stm32-fd-FlashLED_uvopt.bak ├── stm32-fd-FlashLED_uvproj.bak ├── uCOS-II │ ├── Ports │ │ ├── os_cpu.h │ │ ├── os_cpu_a.asm │ │ ├── os_cpu_c.c │ │ └── os_dbg.c │ └── Source │ │ ├── os_core.c │ │ ├── os_dbg_r.c │ │ ├── os_flag.c │ │ ├── os_mbox.c │ │ ├── os_mem.c │ │ ├── os_mutex.c │ │ ├── os_q.c │ │ ├── os_sem.c │ │ ├── os_task.c │ │ ├── os_time.c │ │ ├── os_tmr.c │ │ ├── ucos_ii.c │ │ └── ucos_ii.h └── user │ ├── EXTI.c │ ├── EXTI.h │ ├── GBK_Small.h │ ├── LED.H │ ├── LED.c │ ├── adc.c │ ├── adc.h │ ├── ascii_font.h │ ├── bitband.h │ ├── dac v2.0.c │ ├── dac.c │ ├── dac.h │ ├── delay v2.0.c │ ├── delay.c │ ├── delay.h │ ├── indkey.c │ ├── indkey.h │ ├── iwdg.c │ ├── iwdg.h │ ├── main.c │ ├── oscilloscope.c │ ├── oscilloscope.h │ ├── pincfg.c │ ├── pincfg.h │ ├── pwm.c │ ├── pwm.h │ ├── readme.txt │ ├── sdcard.c │ ├── sdcard.h │ ├── stdarg.h │ ├── stm32f10x_it.c │ ├── stm32f10x_it.h │ ├── tft_api.c │ ├── tft_api.h │ ├── tft_drive.c │ ├── tft_drive.h │ ├── timer.c │ ├── timer.h │ ├── tsc2046.c │ ├── tsc2046.h │ ├── usart1.c │ └── usart1.h └── 设计文档 ├── STM32示波器通信协议.xlsx ├── 增益计算表.xlsx ├── 用四个字节十六进制数表示单精度浮点数.docx ├── 示波器时间表.docx └── 设计指标.docx /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "示波器上位机", "示波器上位机\示波器上位机.csproj", "{C2E14429-5E52-42E0-AD85-83248C6F389B}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C2E14429-5E52-42E0-AD85-83248C6F389B}.Debug|x86.ActiveCfg = Debug|x86 13 | {C2E14429-5E52-42E0-AD85-83248C6F389B}.Debug|x86.Build.0 = Debug|x86 14 | {C2E14429-5E52-42E0-AD85-83248C6F389B}.Release|x86.ActiveCfg = Release|x86 15 | {C2E14429-5E52-42E0-AD85-83248C6F389B}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机.suo -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace 示波器上位机 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// 应用程序的主入口点。 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new Form1()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("示波器上位机")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("示波器上位机")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("c0cc244d-92c4-4442-858b-955cb5981ff4")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.296 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 示波器上位机.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的、缓存的 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("示波器上位机.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, 56 | /// 方法是使用此强类型资源类。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.296 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 示波器上位机.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/bin/Debug/示波器上位机.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/bin/Debug/示波器上位机.pdb -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/bin/Debug/示波器上位机.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/bin/Debug/示波器上位机.vshost.exe -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/bin/Debug/示波器上位机.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.Form1.resources -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.Properties.Resources.resources -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\bin\Debug\示波器上位机.exe 2 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\bin\Debug\示波器上位机.pdb 3 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\obj\x86\Debug\ResolveAssemblyReference.cache 4 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.Form1.resources 5 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.Properties.Resources.resources 6 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.exe 7 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.pdb 8 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.exe 9 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.pdb 10 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\bin\Debug\示波器上位机.exe 11 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\bin\Debug\示波器上位机.pdb 12 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\obj\x86\Debug\ResolveAssemblyReference.cache 13 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.Form1.resources 14 | D:\电子\C#程序\STM32示波器上位机\示波器上位机\obj\x86\Debug\示波器上位机.Properties.Resources.resources 15 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.exe -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/obj/x86/Debug/示波器上位机.pdb -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/示波器上位机.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {C2E14429-5E52-42E0-AD85-83248C6F389B} 9 | WinExe 10 | Properties 11 | 示波器上位机 12 | 示波器上位机 13 | v3.0 14 | 512 15 | 16 | 17 | x86 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | x86 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | Form 46 | 47 | 48 | Form1.cs 49 | 50 | 51 | 52 | 53 | Form1.cs 54 | 55 | 56 | ResXFileCodeGenerator 57 | Resources.Designer.cs 58 | Designer 59 | 60 | 61 | True 62 | Resources.resx 63 | 64 | 65 | SettingsSingleFileGenerator 66 | Settings.Designer.cs 67 | 68 | 69 | True 70 | Settings.settings 71 | True 72 | 73 | 74 | 75 | 82 | -------------------------------------------------------------------------------- /上位机/STM32示波器上位机源代码/示波器上位机/示波器上位机.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/STM32示波器上位机源代码/示波器上位机/示波器上位机.suo -------------------------------------------------------------------------------- /上位机/示波器上位机.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/上位机/示波器上位机.exe -------------------------------------------------------------------------------- /硬件/电平平移.ms12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/电平平移.ms12 -------------------------------------------------------------------------------- /硬件/示波器AD板.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器AD板.pdf -------------------------------------------------------------------------------- /硬件/示波器AD板最终实物版图.PcbDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器AD板最终实物版图.PcbDoc -------------------------------------------------------------------------------- /硬件/示波器上层板.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器上层板.pdf -------------------------------------------------------------------------------- /硬件/示波器上层板最终实物版图.PcbDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器上层板最终实物版图.PcbDoc -------------------------------------------------------------------------------- /硬件/示波器上层板最终实物版图.PcbDoc.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器上层板最终实物版图.PcbDoc.htm -------------------------------------------------------------------------------- /硬件/示波器前端电路.ms12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/示波器前端电路.ms12 -------------------------------------------------------------------------------- /硬件/耦合——衰减电路.ms12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/硬件/耦合——衰减电路.ms12 -------------------------------------------------------------------------------- /程序/APP/app.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/app.bak -------------------------------------------------------------------------------- /程序/APP/app.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/app.c -------------------------------------------------------------------------------- /程序/APP/app.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/app.h -------------------------------------------------------------------------------- /程序/APP/app_cfg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/app_cfg.h -------------------------------------------------------------------------------- /程序/APP/includes.h: -------------------------------------------------------------------------------- 1 | #ifndef __INCLUDES_H__ 2 | #define __INCLUDES_H__ 3 | 4 | #include "stm32f10x.h" 5 | #include "stm32f10x_rcc.h" 6 | #include 7 | 8 | #include "ucos_ii.h" 9 | 10 | #include "bsp.h" 11 | #include "app.h" 12 | #include "led.h" 13 | #include "usart1.h" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /程序/APP/os_cfg.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/os_cfg.bak -------------------------------------------------------------------------------- /程序/APP/os_cfg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/os_cfg.h -------------------------------------------------------------------------------- /程序/APP/task_gui.bak: -------------------------------------------------------------------------------- 1 | #include "task_gui.h" 2 | #include "tft_api.h" 3 | 4 | void GUI_Init(void) 5 | { 6 | Draw_Rectangle(0,0,480,202,Blue2); 7 | Draw_Rectangle(1,1,479,201,Blue2); 8 | } 9 | 10 | void Draw_Gird(void) 11 | { 12 | unsigned char i; 13 | Draw_Rectangle(0,0,479,200,Blue2); 14 | Draw_Rectangle(1,1,478,201,Blue2); 15 | for(i=1; i<=3; i++) 16 | { 17 | if(i == 2) 18 | { 19 | Draw_Line(2,50*i,478,50*i,Green); 20 | Draw_Line(2,50*i+1,478,50*i+1,Green); 21 | } 22 | else 23 | Draw_Line(2,50*i,478,50*i,Green); 24 | } 25 | for(i=1; i<10; i++) 26 | { 27 | if(i == 5) 28 | { 29 | Draw_Line(48*i+1,2,48*i+1,198,Green); 30 | Draw_Line(48*i,2,48*i,198,Green); 31 | } 32 | else 33 | Draw_Line(48*i-1,2,48*i-1,198,Green); 34 | } 35 | } 36 | 37 | void ShowWelcomeScreen(void) 38 | { 39 | Draw_Rectangle(132,70,132*2,90*2,Blue2); 40 | Draw_Rectangle(131,69,132*2-1,90*2-1,Blue2); 41 | LCD_Write_String(132+4,70+6," ARM Cortex-M3",Yellow,Black); 42 | LCD_Write_String(132+11,70+36," Digital",Yellow,Black); 43 | LCD_Write_String(132+13,70+64," Oscilloscope",Yellow,Black); 44 | LCD_Write_String(132+13,70+84,"BoX 2013-8-19",Yellow,Black); 45 | } 46 | -------------------------------------------------------------------------------- /程序/APP/task_gui.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_gui.c -------------------------------------------------------------------------------- /程序/APP/task_gui.h: -------------------------------------------------------------------------------- 1 | #ifndef __TASK_GUI_H_ 2 | #define __TASK_GUI_H_ 3 | 4 | void Draw_Gird(void); 5 | void ShowWelcomeScreen(void); 6 | void DisplayWaveInfo(void); 7 | void ShowRealTimeWave(void); 8 | void ShowSavedWave(void); 9 | void DrawControlPanel(void); 10 | void DrawPramPanel(void); 11 | void TouchEventDetected(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /程序/APP/task_main.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_main.bak -------------------------------------------------------------------------------- /程序/APP/task_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_main.c -------------------------------------------------------------------------------- /程序/APP/task_main.h: -------------------------------------------------------------------------------- 1 | #ifndef __TASK_MAIN_H__ 2 | #define __TASK_MAIN_H__ 3 | 4 | #include "oscilloscope.h" 5 | 6 | #define Trigger_Rising 1 7 | #define Trigger_Falling 0 8 | 9 | void TaskStackChack(void); 10 | void GetFrequence(void); 11 | void GetWaveADCValue(void); 12 | void WaveMode_Init(WaveMode* WaveCtrl); 13 | void SendDataToPC(void); 14 | unsigned char PCtoMCU_Decoding(unsigned char Revdata[],unsigned int *cmd,unsigned int *pram); 15 | void MCUtoPC_Coding(unsigned char data[]); 16 | void ReceiveDataFromPC(void); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /程序/APP/task_rtc.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_rtc.bak -------------------------------------------------------------------------------- /程序/APP/task_rtc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_rtc.c -------------------------------------------------------------------------------- /程序/APP/task_rtc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_rtc.h -------------------------------------------------------------------------------- /程序/APP/task_sd.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_sd.bak -------------------------------------------------------------------------------- /程序/APP/task_sd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_sd.c -------------------------------------------------------------------------------- /程序/APP/task_sd.h: -------------------------------------------------------------------------------- 1 | #ifndef __TASK_SD_H__ 2 | #define __TASK_SD_H__ 3 | 4 | void SD_SaveWaveADValue(void); 5 | void SD_LoadWaveADValue(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /程序/APP/task_touchscreen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_touchscreen.c -------------------------------------------------------------------------------- /程序/APP/task_touchscreen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/APP/task_touchscreen.h -------------------------------------------------------------------------------- /程序/CM3/stm32f10x.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/CM3/stm32f10x.h -------------------------------------------------------------------------------- /程序/CM3/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 | -------------------------------------------------------------------------------- /程序/FWlib/SRC/misc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file misc.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the miscellaneous firmware functions (add-on 8 | * to CMSIS functions). 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 | /* Includes ------------------------------------------------------------------*/ 24 | #include "misc.h" 25 | 26 | /** @addtogroup STM32F10x_StdPeriph_Driver 27 | * @{ 28 | */ 29 | 30 | /** @defgroup MISC 31 | * @brief MISC driver modules 32 | * @{ 33 | */ 34 | 35 | /** @defgroup MISC_Private_TypesDefinitions 36 | * @{ 37 | */ 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | /** @defgroup MISC_Private_Defines 44 | * @{ 45 | */ 46 | 47 | #define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000) 48 | /** 49 | * @} 50 | */ 51 | 52 | /** @defgroup MISC_Private_Macros 53 | * @{ 54 | */ 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /** @defgroup MISC_Private_Variables 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup MISC_Private_FunctionPrototypes 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup MISC_Private_Functions 77 | * @{ 78 | */ 79 | 80 | /** 81 | * @brief Configures the priority grouping: pre-emption priority and subpriority. 82 | * @param NVIC_PriorityGroup: specifies the priority grouping bits length. 83 | * This parameter can be one of the following values: 84 | * @arg NVIC_PriorityGroup_0: 0 bits for pre-emption priority 85 | * 4 bits for subpriority 86 | * @arg NVIC_PriorityGroup_1: 1 bits for pre-emption priority 87 | * 3 bits for subpriority 88 | * @arg NVIC_PriorityGroup_2: 2 bits for pre-emption priority 89 | * 2 bits for subpriority 90 | * @arg NVIC_PriorityGroup_3: 3 bits for pre-emption priority 91 | * 1 bits for subpriority 92 | * @arg NVIC_PriorityGroup_4: 4 bits for pre-emption priority 93 | * 0 bits for subpriority 94 | * @retval None 95 | */ 96 | void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup) 97 | { 98 | /* Check the parameters */ 99 | assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); 100 | 101 | /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */ 102 | SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup; 103 | } 104 | 105 | /** 106 | * @brief Initializes the NVIC peripheral according to the specified 107 | * parameters in the NVIC_InitStruct. 108 | * @param NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure that contains 109 | * the configuration information for the specified NVIC peripheral. 110 | * @retval None 111 | */ 112 | void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct) 113 | { 114 | uint32_t tmppriority = 0x00, tmppre = 0x00, tmpsub = 0x0F; 115 | 116 | /* Check the parameters */ 117 | assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); 118 | assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority)); 119 | assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); 120 | 121 | if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) 122 | { 123 | /* Compute the Corresponding IRQ Priority --------------------------------*/ 124 | tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 125 | tmppre = (0x4 - tmppriority); 126 | tmpsub = tmpsub >> tmppriority; 127 | 128 | tmppriority = (uint32_t)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 129 | tmppriority |= NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub; 130 | tmppriority = tmppriority << 0x04; 131 | 132 | NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 133 | 134 | /* Enable the Selected IRQ Channels --------------------------------------*/ 135 | NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 136 | (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 137 | } 138 | else 139 | { 140 | /* Disable the Selected IRQ Channels -------------------------------------*/ 141 | NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 142 | (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 143 | } 144 | } 145 | 146 | /** 147 | * @brief Sets the vector table location and Offset. 148 | * @param NVIC_VectTab: specifies if the vector table is in RAM or FLASH memory. 149 | * This parameter can be one of the following values: 150 | * @arg NVIC_VectTab_RAM 151 | * @arg NVIC_VectTab_FLASH 152 | * @param Offset: Vector Table base offset field. This value must be a multiple 153 | * of 0x200. 154 | * @retval None 155 | */ 156 | void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset) 157 | { 158 | /* Check the parameters */ 159 | assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); 160 | assert_param(IS_NVIC_OFFSET(Offset)); 161 | 162 | SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 163 | } 164 | 165 | /** 166 | * @brief Selects the condition for the system to enter low power mode. 167 | * @param LowPowerMode: Specifies the new mode for the system to enter low power mode. 168 | * This parameter can be one of the following values: 169 | * @arg NVIC_LP_SEVONPEND 170 | * @arg NVIC_LP_SLEEPDEEP 171 | * @arg NVIC_LP_SLEEPONEXIT 172 | * @param NewState: new state of LP condition. This parameter can be: ENABLE or DISABLE. 173 | * @retval None 174 | */ 175 | void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState) 176 | { 177 | /* Check the parameters */ 178 | assert_param(IS_NVIC_LP(LowPowerMode)); 179 | assert_param(IS_FUNCTIONAL_STATE(NewState)); 180 | 181 | if (NewState != DISABLE) 182 | { 183 | SCB->SCR |= LowPowerMode; 184 | } 185 | else 186 | { 187 | SCB->SCR &= (uint32_t)(~(uint32_t)LowPowerMode); 188 | } 189 | } 190 | 191 | /** 192 | * @brief Configures the SysTick clock source. 193 | * @param SysTick_CLKSource: specifies the SysTick clock source. 194 | * This parameter can be one of the following values: 195 | * @arg SysTick_CLKSource_HCLK_Div8: AHB clock divided by 8 selected as SysTick clock source. 196 | * @arg SysTick_CLKSource_HCLK: AHB clock selected as SysTick clock source. 197 | * @retval None 198 | */ 199 | void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource) 200 | { 201 | /* Check the parameters */ 202 | assert_param(IS_SYSTICK_CLK_SOURCE(SysTick_CLKSource)); 203 | if (SysTick_CLKSource == SysTick_CLKSource_HCLK) 204 | { 205 | SysTick->CTRL |= SysTick_CLKSource_HCLK; 206 | } 207 | else 208 | { 209 | SysTick->CTRL &= SysTick_CLKSource_HCLK_Div8; 210 | } 211 | } 212 | 213 | /** 214 | * @} 215 | */ 216 | 217 | /** 218 | * @} 219 | */ 220 | 221 | /** 222 | * @} 223 | */ 224 | 225 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 226 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_dbgmcu.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_dbgmcu.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the DBGMCU 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_dbgmcu.h" 24 | 25 | /** @addtogroup STM32F10x_StdPeriph_Driver 26 | * @{ 27 | */ 28 | 29 | /** @defgroup DBGMCU 30 | * @brief DBGMCU driver modules 31 | * @{ 32 | */ 33 | 34 | /** @defgroup DBGMCU_Private_TypesDefinitions 35 | * @{ 36 | */ 37 | 38 | /** 39 | * @} 40 | */ 41 | 42 | /** @defgroup DBGMCU_Private_Defines 43 | * @{ 44 | */ 45 | 46 | #define IDCODE_DEVID_MASK ((uint32_t)0x00000FFF) 47 | /** 48 | * @} 49 | */ 50 | 51 | /** @defgroup DBGMCU_Private_Macros 52 | * @{ 53 | */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /** @defgroup DBGMCU_Private_Variables 60 | * @{ 61 | */ 62 | 63 | /** 64 | * @} 65 | */ 66 | 67 | /** @defgroup DBGMCU_Private_FunctionPrototypes 68 | * @{ 69 | */ 70 | 71 | /** 72 | * @} 73 | */ 74 | 75 | /** @defgroup DBGMCU_Private_Functions 76 | * @{ 77 | */ 78 | 79 | /** 80 | * @brief Returns the device revision identifier. 81 | * @param None 82 | * @retval Device revision identifier 83 | */ 84 | uint32_t DBGMCU_GetREVID(void) 85 | { 86 | return(DBGMCU->IDCODE >> 16); 87 | } 88 | 89 | /** 90 | * @brief Returns the device identifier. 91 | * @param None 92 | * @retval Device identifier 93 | */ 94 | uint32_t DBGMCU_GetDEVID(void) 95 | { 96 | return(DBGMCU->IDCODE & IDCODE_DEVID_MASK); 97 | } 98 | 99 | /** 100 | * @brief Configures the specified peripheral and low power mode behavior 101 | * when the MCU under Debug mode. 102 | * @param DBGMCU_Periph: specifies the peripheral and low power mode. 103 | * This parameter can be any combination of the following values: 104 | * @arg DBGMCU_SLEEP: Keep debugger connection during SLEEP mode 105 | * @arg DBGMCU_STOP: Keep debugger connection during STOP mode 106 | * @arg DBGMCU_STANDBY: Keep debugger connection during STANDBY mode 107 | * @arg DBGMCU_IWDG_STOP: Debug IWDG stopped when Core is halted 108 | * @arg DBGMCU_WWDG_STOP: Debug WWDG stopped when Core is halted 109 | * @arg DBGMCU_TIM1_STOP: TIM1 counter stopped when Core is halted 110 | * @arg DBGMCU_TIM2_STOP: TIM2 counter stopped when Core is halted 111 | * @arg DBGMCU_TIM3_STOP: TIM3 counter stopped when Core is halted 112 | * @arg DBGMCU_TIM4_STOP: TIM4 counter stopped when Core is halted 113 | * @arg DBGMCU_CAN1_STOP: Debug CAN2 stopped when Core is halted 114 | * @arg DBGMCU_I2C1_SMBUS_TIMEOUT: I2C1 SMBUS timeout mode stopped when Core is halted 115 | * @arg DBGMCU_I2C2_SMBUS_TIMEOUT: I2C2 SMBUS timeout mode stopped when Core is halted 116 | * @arg DBGMCU_TIM5_STOP: TIM5 counter stopped when Core is halted 117 | * @arg DBGMCU_TIM6_STOP: TIM6 counter stopped when Core is halted 118 | * @arg DBGMCU_TIM7_STOP: TIM7 counter stopped when Core is halted 119 | * @arg DBGMCU_TIM8_STOP: TIM8 counter stopped when Core is halted 120 | * @arg DBGMCU_CAN2_STOP: Debug CAN2 stopped when Core is halted 121 | * @arg DBGMCU_TIM15_STOP: TIM15 counter stopped when Core is halted 122 | * @arg DBGMCU_TIM16_STOP: TIM16 counter stopped when Core is halted 123 | * @arg DBGMCU_TIM17_STOP: TIM17 counter stopped when Core is halted 124 | * @arg DBGMCU_TIM9_STOP: TIM9 counter stopped when Core is halted 125 | * @arg DBGMCU_TIM10_STOP: TIM10 counter stopped when Core is halted 126 | * @arg DBGMCU_TIM11_STOP: TIM11 counter stopped when Core is halted 127 | * @arg DBGMCU_TIM12_STOP: TIM12 counter stopped when Core is halted 128 | * @arg DBGMCU_TIM13_STOP: TIM13 counter stopped when Core is halted 129 | * @arg DBGMCU_TIM14_STOP: TIM14 counter stopped when Core is halted 130 | * @param NewState: new state of the specified peripheral in Debug mode. 131 | * This parameter can be: ENABLE or DISABLE. 132 | * @retval None 133 | */ 134 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState) 135 | { 136 | /* Check the parameters */ 137 | assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph)); 138 | assert_param(IS_FUNCTIONAL_STATE(NewState)); 139 | 140 | if (NewState != DISABLE) 141 | { 142 | DBGMCU->CR |= DBGMCU_Periph; 143 | } 144 | else 145 | { 146 | DBGMCU->CR &= ~DBGMCU_Periph; 147 | } 148 | } 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /** 155 | * @} 156 | */ 157 | 158 | /** 159 | * @} 160 | */ 161 | 162 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 163 | -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_exti.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_exti.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the EXTI 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_exti.h" 24 | 25 | /** @addtogroup STM32F10x_StdPeriph_Driver 26 | * @{ 27 | */ 28 | 29 | /** @defgroup EXTI 30 | * @brief EXTI driver modules 31 | * @{ 32 | */ 33 | 34 | /** @defgroup EXTI_Private_TypesDefinitions 35 | * @{ 36 | */ 37 | 38 | /** 39 | * @} 40 | */ 41 | 42 | /** @defgroup EXTI_Private_Defines 43 | * @{ 44 | */ 45 | 46 | #define EXTI_LINENONE ((uint32_t)0x00000) /* No interrupt selected */ 47 | 48 | /** 49 | * @} 50 | */ 51 | 52 | /** @defgroup EXTI_Private_Macros 53 | * @{ 54 | */ 55 | 56 | /** 57 | * @} 58 | */ 59 | 60 | /** @defgroup EXTI_Private_Variables 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | /** @defgroup EXTI_Private_FunctionPrototypes 69 | * @{ 70 | */ 71 | 72 | /** 73 | * @} 74 | */ 75 | 76 | /** @defgroup EXTI_Private_Functions 77 | * @{ 78 | */ 79 | 80 | /** 81 | * @brief Deinitializes the EXTI peripheral registers to their default reset values. 82 | * @param None 83 | * @retval None 84 | */ 85 | void EXTI_DeInit(void) 86 | { 87 | EXTI->IMR = 0x00000000; 88 | EXTI->EMR = 0x00000000; 89 | EXTI->RTSR = 0x00000000; 90 | EXTI->FTSR = 0x00000000; 91 | EXTI->PR = 0x000FFFFF; 92 | } 93 | 94 | /** 95 | * @brief Initializes the EXTI peripheral according to the specified 96 | * parameters in the EXTI_InitStruct. 97 | * @param EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure 98 | * that contains the configuration information for the EXTI peripheral. 99 | * @retval None 100 | */ 101 | void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct) 102 | { 103 | uint32_t tmp = 0; 104 | 105 | /* Check the parameters */ 106 | assert_param(IS_EXTI_MODE(EXTI_InitStruct->EXTI_Mode)); 107 | assert_param(IS_EXTI_TRIGGER(EXTI_InitStruct->EXTI_Trigger)); 108 | assert_param(IS_EXTI_LINE(EXTI_InitStruct->EXTI_Line)); 109 | assert_param(IS_FUNCTIONAL_STATE(EXTI_InitStruct->EXTI_LineCmd)); 110 | 111 | tmp = (uint32_t)EXTI_BASE; 112 | 113 | if (EXTI_InitStruct->EXTI_LineCmd != DISABLE) 114 | { 115 | /* Clear EXTI line configuration */ 116 | EXTI->IMR &= ~EXTI_InitStruct->EXTI_Line; 117 | EXTI->EMR &= ~EXTI_InitStruct->EXTI_Line; 118 | 119 | tmp += EXTI_InitStruct->EXTI_Mode; 120 | 121 | *(__IO uint32_t *) tmp |= EXTI_InitStruct->EXTI_Line; 122 | 123 | /* Clear Rising Falling edge configuration */ 124 | EXTI->RTSR &= ~EXTI_InitStruct->EXTI_Line; 125 | EXTI->FTSR &= ~EXTI_InitStruct->EXTI_Line; 126 | 127 | /* Select the trigger for the selected external interrupts */ 128 | if (EXTI_InitStruct->EXTI_Trigger == EXTI_Trigger_Rising_Falling) 129 | { 130 | /* Rising Falling edge */ 131 | EXTI->RTSR |= EXTI_InitStruct->EXTI_Line; 132 | EXTI->FTSR |= EXTI_InitStruct->EXTI_Line; 133 | } 134 | else 135 | { 136 | tmp = (uint32_t)EXTI_BASE; 137 | tmp += EXTI_InitStruct->EXTI_Trigger; 138 | 139 | *(__IO uint32_t *) tmp |= EXTI_InitStruct->EXTI_Line; 140 | } 141 | } 142 | else 143 | { 144 | tmp += EXTI_InitStruct->EXTI_Mode; 145 | 146 | /* Disable the selected external lines */ 147 | *(__IO uint32_t *) tmp &= ~EXTI_InitStruct->EXTI_Line; 148 | } 149 | } 150 | 151 | /** 152 | * @brief Fills each EXTI_InitStruct member with its reset value. 153 | * @param EXTI_InitStruct: pointer to a EXTI_InitTypeDef structure which will 154 | * be initialized. 155 | * @retval None 156 | */ 157 | void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct) 158 | { 159 | EXTI_InitStruct->EXTI_Line = EXTI_LINENONE; 160 | EXTI_InitStruct->EXTI_Mode = EXTI_Mode_Interrupt; 161 | EXTI_InitStruct->EXTI_Trigger = EXTI_Trigger_Falling; 162 | EXTI_InitStruct->EXTI_LineCmd = DISABLE; 163 | } 164 | 165 | /** 166 | * @brief Generates a Software interrupt. 167 | * @param EXTI_Line: specifies the EXTI lines to be enabled or disabled. 168 | * This parameter can be any combination of EXTI_Linex where x can be (0..19). 169 | * @retval None 170 | */ 171 | void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line) 172 | { 173 | /* Check the parameters */ 174 | assert_param(IS_EXTI_LINE(EXTI_Line)); 175 | 176 | EXTI->SWIER |= EXTI_Line; 177 | } 178 | 179 | /** 180 | * @brief Checks whether the specified EXTI line flag is set or not. 181 | * @param EXTI_Line: specifies the EXTI line flag to check. 182 | * This parameter can be: 183 | * @arg EXTI_Linex: External interrupt line x where x(0..19) 184 | * @retval The new state of EXTI_Line (SET or RESET). 185 | */ 186 | FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line) 187 | { 188 | FlagStatus bitstatus = RESET; 189 | /* Check the parameters */ 190 | assert_param(IS_GET_EXTI_LINE(EXTI_Line)); 191 | 192 | if ((EXTI->PR & EXTI_Line) != (uint32_t)RESET) 193 | { 194 | bitstatus = SET; 195 | } 196 | else 197 | { 198 | bitstatus = RESET; 199 | } 200 | return bitstatus; 201 | } 202 | 203 | /** 204 | * @brief Clears the EXTI's line pending flags. 205 | * @param EXTI_Line: specifies the EXTI lines flags to clear. 206 | * This parameter can be any combination of EXTI_Linex where x can be (0..19). 207 | * @retval None 208 | */ 209 | void EXTI_ClearFlag(uint32_t EXTI_Line) 210 | { 211 | /* Check the parameters */ 212 | assert_param(IS_EXTI_LINE(EXTI_Line)); 213 | 214 | EXTI->PR = EXTI_Line; 215 | } 216 | 217 | /** 218 | * @brief Checks whether the specified EXTI line is asserted or not. 219 | * @param EXTI_Line: specifies the EXTI line to check. 220 | * This parameter can be: 221 | * @arg EXTI_Linex: External interrupt line x where x(0..19) 222 | * @retval The new state of EXTI_Line (SET or RESET). 223 | */ 224 | ITStatus EXTI_GetITStatus(uint32_t EXTI_Line) 225 | { 226 | ITStatus bitstatus = RESET; 227 | uint32_t enablestatus = 0; 228 | /* Check the parameters */ 229 | assert_param(IS_GET_EXTI_LINE(EXTI_Line)); 230 | 231 | enablestatus = EXTI->IMR & EXTI_Line; 232 | if (((EXTI->PR & EXTI_Line) != (uint32_t)RESET) && (enablestatus != (uint32_t)RESET)) 233 | { 234 | bitstatus = SET; 235 | } 236 | else 237 | { 238 | bitstatus = RESET; 239 | } 240 | return bitstatus; 241 | } 242 | 243 | /** 244 | * @brief Clears the EXTI's line pending bits. 245 | * @param EXTI_Line: specifies the EXTI lines to clear. 246 | * This parameter can be any combination of EXTI_Linex where x can be (0..19). 247 | * @retval None 248 | */ 249 | void EXTI_ClearITPendingBit(uint32_t EXTI_Line) 250 | { 251 | /* Check the parameters */ 252 | assert_param(IS_EXTI_LINE(EXTI_Line)); 253 | 254 | EXTI->PR = EXTI_Line; 255 | } 256 | 257 | /** 258 | * @} 259 | */ 260 | 261 | /** 262 | * @} 263 | */ 264 | 265 | /** 266 | * @} 267 | */ 268 | 269 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 270 | -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/FWlib/SRC/stm32f10x_flash.c -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_i2c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/FWlib/SRC/stm32f10x_i2c.c -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_usart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/FWlib/SRC/stm32f10x_usart.c -------------------------------------------------------------------------------- /程序/FWlib/SRC/stm32f10x_wwdg.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_wwdg.c 4 | * @author MCD Application Team 5 | * @version V3.5.0 6 | * @date 11-March-2011 7 | * @brief This file provides all the WWDG 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_wwdg.h" 24 | #include "stm32f10x_rcc.h" 25 | 26 | /** @addtogroup STM32F10x_StdPeriph_Driver 27 | * @{ 28 | */ 29 | 30 | /** @defgroup WWDG 31 | * @brief WWDG driver modules 32 | * @{ 33 | */ 34 | 35 | /** @defgroup WWDG_Private_TypesDefinitions 36 | * @{ 37 | */ 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | /** @defgroup WWDG_Private_Defines 44 | * @{ 45 | */ 46 | 47 | /* ----------- WWDG registers bit address in the alias region ----------- */ 48 | #define WWDG_OFFSET (WWDG_BASE - PERIPH_BASE) 49 | 50 | /* Alias word address of EWI bit */ 51 | #define CFR_OFFSET (WWDG_OFFSET + 0x04) 52 | #define EWI_BitNumber 0x09 53 | #define CFR_EWI_BB (PERIPH_BB_BASE + (CFR_OFFSET * 32) + (EWI_BitNumber * 4)) 54 | 55 | /* --------------------- WWDG registers bit mask ------------------------ */ 56 | 57 | /* CR register bit mask */ 58 | #define CR_WDGA_Set ((uint32_t)0x00000080) 59 | 60 | /* CFR register bit mask */ 61 | #define CFR_WDGTB_Mask ((uint32_t)0xFFFFFE7F) 62 | #define CFR_W_Mask ((uint32_t)0xFFFFFF80) 63 | #define BIT_Mask ((uint8_t)0x7F) 64 | 65 | /** 66 | * @} 67 | */ 68 | 69 | /** @defgroup WWDG_Private_Macros 70 | * @{ 71 | */ 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | /** @defgroup WWDG_Private_Variables 78 | * @{ 79 | */ 80 | 81 | /** 82 | * @} 83 | */ 84 | 85 | /** @defgroup WWDG_Private_FunctionPrototypes 86 | * @{ 87 | */ 88 | 89 | /** 90 | * @} 91 | */ 92 | 93 | /** @defgroup WWDG_Private_Functions 94 | * @{ 95 | */ 96 | 97 | /** 98 | * @brief Deinitializes the WWDG peripheral registers to their default reset values. 99 | * @param None 100 | * @retval None 101 | */ 102 | void WWDG_DeInit(void) 103 | { 104 | RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, ENABLE); 105 | RCC_APB1PeriphResetCmd(RCC_APB1Periph_WWDG, DISABLE); 106 | } 107 | 108 | /** 109 | * @brief Sets the WWDG Prescaler. 110 | * @param WWDG_Prescaler: specifies the WWDG Prescaler. 111 | * This parameter can be one of the following values: 112 | * @arg WWDG_Prescaler_1: WWDG counter clock = (PCLK1/4096)/1 113 | * @arg WWDG_Prescaler_2: WWDG counter clock = (PCLK1/4096)/2 114 | * @arg WWDG_Prescaler_4: WWDG counter clock = (PCLK1/4096)/4 115 | * @arg WWDG_Prescaler_8: WWDG counter clock = (PCLK1/4096)/8 116 | * @retval None 117 | */ 118 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler) 119 | { 120 | uint32_t tmpreg = 0; 121 | /* Check the parameters */ 122 | assert_param(IS_WWDG_PRESCALER(WWDG_Prescaler)); 123 | /* Clear WDGTB[1:0] bits */ 124 | tmpreg = WWDG->CFR & CFR_WDGTB_Mask; 125 | /* Set WDGTB[1:0] bits according to WWDG_Prescaler value */ 126 | tmpreg |= WWDG_Prescaler; 127 | /* Store the new value */ 128 | WWDG->CFR = tmpreg; 129 | } 130 | 131 | /** 132 | * @brief Sets the WWDG window value. 133 | * @param WindowValue: specifies the window value to be compared to the downcounter. 134 | * This parameter value must be lower than 0x80. 135 | * @retval None 136 | */ 137 | void WWDG_SetWindowValue(uint8_t WindowValue) 138 | { 139 | __IO uint32_t tmpreg = 0; 140 | 141 | /* Check the parameters */ 142 | assert_param(IS_WWDG_WINDOW_VALUE(WindowValue)); 143 | /* Clear W[6:0] bits */ 144 | 145 | tmpreg = WWDG->CFR & CFR_W_Mask; 146 | 147 | /* Set W[6:0] bits according to WindowValue value */ 148 | tmpreg |= WindowValue & (uint32_t) BIT_Mask; 149 | 150 | /* Store the new value */ 151 | WWDG->CFR = tmpreg; 152 | } 153 | 154 | /** 155 | * @brief Enables the WWDG Early Wakeup interrupt(EWI). 156 | * @param None 157 | * @retval None 158 | */ 159 | void WWDG_EnableIT(void) 160 | { 161 | *(__IO uint32_t *) CFR_EWI_BB = (uint32_t)ENABLE; 162 | } 163 | 164 | /** 165 | * @brief Sets the WWDG counter value. 166 | * @param Counter: specifies the watchdog counter value. 167 | * This parameter must be a number between 0x40 and 0x7F. 168 | * @retval None 169 | */ 170 | void WWDG_SetCounter(uint8_t Counter) 171 | { 172 | /* Check the parameters */ 173 | assert_param(IS_WWDG_COUNTER(Counter)); 174 | /* Write to T[6:0] bits to configure the counter value, no need to do 175 | a read-modify-write; writing a 0 to WDGA bit does nothing */ 176 | WWDG->CR = Counter & BIT_Mask; 177 | } 178 | 179 | /** 180 | * @brief Enables WWDG and load the counter value. 181 | * @param Counter: specifies the watchdog counter value. 182 | * This parameter must be a number between 0x40 and 0x7F. 183 | * @retval None 184 | */ 185 | void WWDG_Enable(uint8_t Counter) 186 | { 187 | /* Check the parameters */ 188 | assert_param(IS_WWDG_COUNTER(Counter)); 189 | WWDG->CR = CR_WDGA_Set | Counter; 190 | } 191 | 192 | /** 193 | * @brief Checks whether the Early Wakeup interrupt flag is set or not. 194 | * @param None 195 | * @retval The new state of the Early Wakeup interrupt flag (SET or RESET) 196 | */ 197 | FlagStatus WWDG_GetFlagStatus(void) 198 | { 199 | return (FlagStatus)(WWDG->SR); 200 | } 201 | 202 | /** 203 | * @brief Clears Early Wakeup interrupt flag. 204 | * @param None 205 | * @retval None 206 | */ 207 | void WWDG_ClearFlag(void) 208 | { 209 | WWDG->SR = (uint32_t)RESET; 210 | } 211 | 212 | /** 213 | * @} 214 | */ 215 | 216 | /** 217 | * @} 218 | */ 219 | 220 | /** 221 | * @} 222 | */ 223 | 224 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 225 | -------------------------------------------------------------------------------- /程序/FWlib/inc/stm32f10x_bkp.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_bkp.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 BKP 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_BKP_H 25 | #define __STM32F10x_BKP_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 BKP 39 | * @{ 40 | */ 41 | 42 | /** @defgroup BKP_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @} 48 | */ 49 | 50 | /** @defgroup BKP_Exported_Constants 51 | * @{ 52 | */ 53 | 54 | /** @defgroup Tamper_Pin_active_level 55 | * @{ 56 | */ 57 | 58 | #define BKP_TamperPinLevel_High ((uint16_t)0x0000) 59 | #define BKP_TamperPinLevel_Low ((uint16_t)0x0001) 60 | #define IS_BKP_TAMPER_PIN_LEVEL(LEVEL) (((LEVEL) == BKP_TamperPinLevel_High) || \ 61 | ((LEVEL) == BKP_TamperPinLevel_Low)) 62 | /** 63 | * @} 64 | */ 65 | 66 | /** @defgroup RTC_output_source_to_output_on_the_Tamper_pin 67 | * @{ 68 | */ 69 | 70 | #define BKP_RTCOutputSource_None ((uint16_t)0x0000) 71 | #define BKP_RTCOutputSource_CalibClock ((uint16_t)0x0080) 72 | #define BKP_RTCOutputSource_Alarm ((uint16_t)0x0100) 73 | #define BKP_RTCOutputSource_Second ((uint16_t)0x0300) 74 | #define IS_BKP_RTC_OUTPUT_SOURCE(SOURCE) (((SOURCE) == BKP_RTCOutputSource_None) || \ 75 | ((SOURCE) == BKP_RTCOutputSource_CalibClock) || \ 76 | ((SOURCE) == BKP_RTCOutputSource_Alarm) || \ 77 | ((SOURCE) == BKP_RTCOutputSource_Second)) 78 | /** 79 | * @} 80 | */ 81 | 82 | /** @defgroup Data_Backup_Register 83 | * @{ 84 | */ 85 | 86 | #define BKP_DR1 ((uint16_t)0x0004) 87 | #define BKP_DR2 ((uint16_t)0x0008) 88 | #define BKP_DR3 ((uint16_t)0x000C) 89 | #define BKP_DR4 ((uint16_t)0x0010) 90 | #define BKP_DR5 ((uint16_t)0x0014) 91 | #define BKP_DR6 ((uint16_t)0x0018) 92 | #define BKP_DR7 ((uint16_t)0x001C) 93 | #define BKP_DR8 ((uint16_t)0x0020) 94 | #define BKP_DR9 ((uint16_t)0x0024) 95 | #define BKP_DR10 ((uint16_t)0x0028) 96 | #define BKP_DR11 ((uint16_t)0x0040) 97 | #define BKP_DR12 ((uint16_t)0x0044) 98 | #define BKP_DR13 ((uint16_t)0x0048) 99 | #define BKP_DR14 ((uint16_t)0x004C) 100 | #define BKP_DR15 ((uint16_t)0x0050) 101 | #define BKP_DR16 ((uint16_t)0x0054) 102 | #define BKP_DR17 ((uint16_t)0x0058) 103 | #define BKP_DR18 ((uint16_t)0x005C) 104 | #define BKP_DR19 ((uint16_t)0x0060) 105 | #define BKP_DR20 ((uint16_t)0x0064) 106 | #define BKP_DR21 ((uint16_t)0x0068) 107 | #define BKP_DR22 ((uint16_t)0x006C) 108 | #define BKP_DR23 ((uint16_t)0x0070) 109 | #define BKP_DR24 ((uint16_t)0x0074) 110 | #define BKP_DR25 ((uint16_t)0x0078) 111 | #define BKP_DR26 ((uint16_t)0x007C) 112 | #define BKP_DR27 ((uint16_t)0x0080) 113 | #define BKP_DR28 ((uint16_t)0x0084) 114 | #define BKP_DR29 ((uint16_t)0x0088) 115 | #define BKP_DR30 ((uint16_t)0x008C) 116 | #define BKP_DR31 ((uint16_t)0x0090) 117 | #define BKP_DR32 ((uint16_t)0x0094) 118 | #define BKP_DR33 ((uint16_t)0x0098) 119 | #define BKP_DR34 ((uint16_t)0x009C) 120 | #define BKP_DR35 ((uint16_t)0x00A0) 121 | #define BKP_DR36 ((uint16_t)0x00A4) 122 | #define BKP_DR37 ((uint16_t)0x00A8) 123 | #define BKP_DR38 ((uint16_t)0x00AC) 124 | #define BKP_DR39 ((uint16_t)0x00B0) 125 | #define BKP_DR40 ((uint16_t)0x00B4) 126 | #define BKP_DR41 ((uint16_t)0x00B8) 127 | #define BKP_DR42 ((uint16_t)0x00BC) 128 | 129 | #define IS_BKP_DR(DR) (((DR) == BKP_DR1) || ((DR) == BKP_DR2) || ((DR) == BKP_DR3) || \ 130 | ((DR) == BKP_DR4) || ((DR) == BKP_DR5) || ((DR) == BKP_DR6) || \ 131 | ((DR) == BKP_DR7) || ((DR) == BKP_DR8) || ((DR) == BKP_DR9) || \ 132 | ((DR) == BKP_DR10) || ((DR) == BKP_DR11) || ((DR) == BKP_DR12) || \ 133 | ((DR) == BKP_DR13) || ((DR) == BKP_DR14) || ((DR) == BKP_DR15) || \ 134 | ((DR) == BKP_DR16) || ((DR) == BKP_DR17) || ((DR) == BKP_DR18) || \ 135 | ((DR) == BKP_DR19) || ((DR) == BKP_DR20) || ((DR) == BKP_DR21) || \ 136 | ((DR) == BKP_DR22) || ((DR) == BKP_DR23) || ((DR) == BKP_DR24) || \ 137 | ((DR) == BKP_DR25) || ((DR) == BKP_DR26) || ((DR) == BKP_DR27) || \ 138 | ((DR) == BKP_DR28) || ((DR) == BKP_DR29) || ((DR) == BKP_DR30) || \ 139 | ((DR) == BKP_DR31) || ((DR) == BKP_DR32) || ((DR) == BKP_DR33) || \ 140 | ((DR) == BKP_DR34) || ((DR) == BKP_DR35) || ((DR) == BKP_DR36) || \ 141 | ((DR) == BKP_DR37) || ((DR) == BKP_DR38) || ((DR) == BKP_DR39) || \ 142 | ((DR) == BKP_DR40) || ((DR) == BKP_DR41) || ((DR) == BKP_DR42)) 143 | 144 | #define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F) 145 | /** 146 | * @} 147 | */ 148 | 149 | /** 150 | * @} 151 | */ 152 | 153 | /** @defgroup BKP_Exported_Macros 154 | * @{ 155 | */ 156 | 157 | /** 158 | * @} 159 | */ 160 | 161 | /** @defgroup BKP_Exported_Functions 162 | * @{ 163 | */ 164 | 165 | void BKP_DeInit(void); 166 | void BKP_TamperPinLevelConfig(uint16_t BKP_TamperPinLevel); 167 | void BKP_TamperPinCmd(FunctionalState NewState); 168 | void BKP_ITConfig(FunctionalState NewState); 169 | void BKP_RTCOutputConfig(uint16_t BKP_RTCOutputSource); 170 | void BKP_SetRTCCalibrationValue(uint8_t CalibrationValue); 171 | void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data); 172 | uint16_t BKP_ReadBackupRegister(uint16_t BKP_DR); 173 | FlagStatus BKP_GetFlagStatus(void); 174 | void BKP_ClearFlag(void); 175 | ITStatus BKP_GetITStatus(void); 176 | void BKP_ClearITPendingBit(void); 177 | 178 | #ifdef __cplusplus 179 | } 180 | #endif 181 | 182 | #endif /* __STM32F10x_BKP_H */ 183 | /** 184 | * @} 185 | */ 186 | 187 | /** 188 | * @} 189 | */ 190 | 191 | /** 192 | * @} 193 | */ 194 | 195 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 196 | -------------------------------------------------------------------------------- /程序/FWlib/inc/stm32f10x_cec.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_cec.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 CEC 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_CEC_H 25 | #define __STM32F10x_CEC_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 CEC 39 | * @{ 40 | */ 41 | 42 | 43 | /** @defgroup CEC_Exported_Types 44 | * @{ 45 | */ 46 | 47 | /** 48 | * @brief CEC Init structure definition 49 | */ 50 | typedef struct 51 | { 52 | uint16_t CEC_BitTimingMode; /*!< Configures the CEC Bit Timing Error Mode. 53 | This parameter can be a value of @ref CEC_BitTiming_Mode */ 54 | uint16_t CEC_BitPeriodMode; /*!< Configures the CEC Bit Period Error Mode. 55 | This parameter can be a value of @ref CEC_BitPeriod_Mode */ 56 | }CEC_InitTypeDef; 57 | 58 | /** 59 | * @} 60 | */ 61 | 62 | /** @defgroup CEC_Exported_Constants 63 | * @{ 64 | */ 65 | 66 | /** @defgroup CEC_BitTiming_Mode 67 | * @{ 68 | */ 69 | #define CEC_BitTimingStdMode ((uint16_t)0x00) /*!< Bit timing error Standard Mode */ 70 | #define CEC_BitTimingErrFreeMode CEC_CFGR_BTEM /*!< Bit timing error Free Mode */ 71 | 72 | #define IS_CEC_BIT_TIMING_ERROR_MODE(MODE) (((MODE) == CEC_BitTimingStdMode) || \ 73 | ((MODE) == CEC_BitTimingErrFreeMode)) 74 | /** 75 | * @} 76 | */ 77 | 78 | /** @defgroup CEC_BitPeriod_Mode 79 | * @{ 80 | */ 81 | #define CEC_BitPeriodStdMode ((uint16_t)0x00) /*!< Bit period error Standard Mode */ 82 | #define CEC_BitPeriodFlexibleMode CEC_CFGR_BPEM /*!< Bit period error Flexible Mode */ 83 | 84 | #define IS_CEC_BIT_PERIOD_ERROR_MODE(MODE) (((MODE) == CEC_BitPeriodStdMode) || \ 85 | ((MODE) == CEC_BitPeriodFlexibleMode)) 86 | /** 87 | * @} 88 | */ 89 | 90 | 91 | /** @defgroup CEC_interrupts_definition 92 | * @{ 93 | */ 94 | #define CEC_IT_TERR CEC_CSR_TERR 95 | #define CEC_IT_TBTRF CEC_CSR_TBTRF 96 | #define CEC_IT_RERR CEC_CSR_RERR 97 | #define CEC_IT_RBTF CEC_CSR_RBTF 98 | #define IS_CEC_GET_IT(IT) (((IT) == CEC_IT_TERR) || ((IT) == CEC_IT_TBTRF) || \ 99 | ((IT) == CEC_IT_RERR) || ((IT) == CEC_IT_RBTF)) 100 | /** 101 | * @} 102 | */ 103 | 104 | 105 | /** @defgroup CEC_Own_Address 106 | * @{ 107 | */ 108 | #define IS_CEC_ADDRESS(ADDRESS) ((ADDRESS) < 0x10) 109 | /** 110 | * @} 111 | */ 112 | 113 | /** @defgroup CEC_Prescaler 114 | * @{ 115 | */ 116 | #define IS_CEC_PRESCALER(PRESCALER) ((PRESCALER) <= 0x3FFF) 117 | 118 | /** 119 | * @} 120 | */ 121 | 122 | /** @defgroup CEC_flags_definition 123 | * @{ 124 | */ 125 | 126 | /** 127 | * @brief ESR register flags 128 | */ 129 | #define CEC_FLAG_BTE ((uint32_t)0x10010000) 130 | #define CEC_FLAG_BPE ((uint32_t)0x10020000) 131 | #define CEC_FLAG_RBTFE ((uint32_t)0x10040000) 132 | #define CEC_FLAG_SBE ((uint32_t)0x10080000) 133 | #define CEC_FLAG_ACKE ((uint32_t)0x10100000) 134 | #define CEC_FLAG_LINE ((uint32_t)0x10200000) 135 | #define CEC_FLAG_TBTFE ((uint32_t)0x10400000) 136 | 137 | /** 138 | * @brief CSR register flags 139 | */ 140 | #define CEC_FLAG_TEOM ((uint32_t)0x00000002) 141 | #define CEC_FLAG_TERR ((uint32_t)0x00000004) 142 | #define CEC_FLAG_TBTRF ((uint32_t)0x00000008) 143 | #define CEC_FLAG_RSOM ((uint32_t)0x00000010) 144 | #define CEC_FLAG_REOM ((uint32_t)0x00000020) 145 | #define CEC_FLAG_RERR ((uint32_t)0x00000040) 146 | #define CEC_FLAG_RBTF ((uint32_t)0x00000080) 147 | 148 | #define IS_CEC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFF03) == 0x00) && ((FLAG) != 0x00)) 149 | 150 | #define IS_CEC_GET_FLAG(FLAG) (((FLAG) == CEC_FLAG_BTE) || ((FLAG) == CEC_FLAG_BPE) || \ 151 | ((FLAG) == CEC_FLAG_RBTFE) || ((FLAG)== CEC_FLAG_SBE) || \ 152 | ((FLAG) == CEC_FLAG_ACKE) || ((FLAG) == CEC_FLAG_LINE) || \ 153 | ((FLAG) == CEC_FLAG_TBTFE) || ((FLAG) == CEC_FLAG_TEOM) || \ 154 | ((FLAG) == CEC_FLAG_TERR) || ((FLAG) == CEC_FLAG_TBTRF) || \ 155 | ((FLAG) == CEC_FLAG_RSOM) || ((FLAG) == CEC_FLAG_REOM) || \ 156 | ((FLAG) == CEC_FLAG_RERR) || ((FLAG) == CEC_FLAG_RBTF)) 157 | 158 | /** 159 | * @} 160 | */ 161 | 162 | /** 163 | * @} 164 | */ 165 | 166 | /** @defgroup CEC_Exported_Macros 167 | * @{ 168 | */ 169 | 170 | /** 171 | * @} 172 | */ 173 | 174 | /** @defgroup CEC_Exported_Functions 175 | * @{ 176 | */ 177 | void CEC_DeInit(void); 178 | void CEC_Init(CEC_InitTypeDef* CEC_InitStruct); 179 | void CEC_Cmd(FunctionalState NewState); 180 | void CEC_ITConfig(FunctionalState NewState); 181 | void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress); 182 | void CEC_SetPrescaler(uint16_t CEC_Prescaler); 183 | void CEC_SendDataByte(uint8_t Data); 184 | uint8_t CEC_ReceiveDataByte(void); 185 | void CEC_StartOfMessage(void); 186 | void CEC_EndOfMessageCmd(FunctionalState NewState); 187 | FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG); 188 | void CEC_ClearFlag(uint32_t CEC_FLAG); 189 | ITStatus CEC_GetITStatus(uint8_t CEC_IT); 190 | void CEC_ClearITPendingBit(uint16_t CEC_IT); 191 | 192 | #ifdef __cplusplus 193 | } 194 | #endif 195 | 196 | #endif /* __STM32F10x_CEC_H */ 197 | 198 | /** 199 | * @} 200 | */ 201 | 202 | /** 203 | * @} 204 | */ 205 | 206 | /** 207 | * @} 208 | */ 209 | 210 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 211 | -------------------------------------------------------------------------------- /程序/FWlib/inc/stm32f10x_conf.bak: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file GPIO/IOToggle/stm32f10x_conf.h 4 | * @author MCD Application Team 5 | * @version V3.0.0 6 | * @date 04/06/2009 7 | * @brief Library configuration file. 8 | ****************************************************************************** 9 | * @copy 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 2009 STMicroelectronics

19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F10x_CONF_H 23 | #define __STM32F10x_CONF_H 24 | 25 | /* Includes ------------------------------------------------------------------*/ 26 | /* Uncomment the line below to enable peripheral header file inclusion */ 27 | /* #include "stm32f10x_adc.h" */ 28 | /* #include "stm32f10x_bkp.h" */ 29 | /* #include "stm32f10x_can.h" */ 30 | /* #include "stm32f10x_crc.h" */ 31 | /* #include "stm32f10x_dac.h" */ 32 | /* #include "stm32f10x_dbgmcu.h" */ 33 | /* #include "stm32f10x_dma.h" */ 34 | /* #include "stm32f10x_exti.h" */ 35 | /* #include "stm32f10x_flash.h" */ 36 | /* #include "stm32f10x_fsmc.h" */ 37 | #include "stm32f10x_gpio.h" 38 | /* #include "stm32f10x_i2c.h" */ 39 | /* #include "stm32f10x_iwdg.h" */ 40 | /* #include "stm32f10x_pwr.h" */ 41 | #include "stm32f10x_rcc.h" 42 | /* #include "stm32f10x_rtc.h" */ 43 | /* #include "stm32f10x_sdio.h" */ 44 | /* #include "stm32f10x_spi.h" */ 45 | /* #include "stm32f10x_tim.h" */ 46 | #include "stm32f10x_usart.h" 47 | /* #include "stm32f10x_wwdg.h" */ 48 | /* #include "misc.h" */ /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ 49 | 50 | /* Exported types ------------------------------------------------------------*/ 51 | /* Exported constants --------------------------------------------------------*/ 52 | /* Uncomment the line below to expanse the "assert_param" macro in the 53 | Standard Peripheral Library drivers code */ 54 | /* #define USE_FULL_ASSERT 1 */ 55 | 56 | /* Exported macro ------------------------------------------------------------*/ 57 | #ifdef USE_FULL_ASSERT 58 | 59 | /** 60 | * @brief The assert_param macro is used for function's parameters check. 61 | * @param expr: If expr is false, it calls assert_failed function 62 | * which reports the name of the source file and the source 63 | * line number of the call that failed. 64 | * If expr is true, it returns no value. 65 | * @retval : None 66 | */ 67 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 68 | /* Exported functions ------------------------------------------------------- */ 69 | void assert_failed(uint8_t* file, uint32_t line); 70 | #else 71 | #define assert_param(expr) ((void)0) 72 | #endif /* USE_FULL_ASSERT */ 73 | 74 | #endif /* __STM32F10x_CONF_H */ 75 | 76 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 77 | -------------------------------------------------------------------------------- /程序/FWlib/inc/stm32f10x_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file GPIO/IOToggle/stm32f10x_conf.h 4 | * @author MCD Application Team 5 | * @version V3.0.0 6 | * @date 04/06/2009 7 | * @brief Library configuration file. 8 | ****************************************************************************** 9 | * @copy 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 2009 STMicroelectronics

19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F10x_CONF_H 23 | #define __STM32F10x_CONF_H 24 | 25 | /* Includes ------------------------------------------------------------------*/ 26 | /* Uncomment the line below to enable peripheral header file inclusion */ 27 | #include "stm32f10x_adc.h" 28 | #include "stm32f10x_bkp.h" 29 | /* #include "stm32f10x_can.h" */ 30 | /* #include "stm32f10x_crc.h" */ 31 | #include "stm32f10x_dac.h" 32 | /* #include "stm32f10x_dbgmcu.h" */ 33 | #include "stm32f10x_dma.h" 34 | #include "stm32f10x_exti.h" 35 | /* #include "stm32f10x_flash.h" */ 36 | #include "stm32f10x_fsmc.h" 37 | #include "stm32f10x_gpio.h" 38 | /* #include "stm32f10x_i2c.h" */ 39 | #include "stm32f10x_iwdg.h" 40 | #include "stm32f10x_pwr.h" 41 | #include "stm32f10x_rcc.h" 42 | #include "stm32f10x_rtc.h" 43 | #include "stm32f10x_sdio.h" 44 | #include "stm32f10x_spi.h" 45 | #include "stm32f10x_tim.h" 46 | #include "stm32f10x_usart.h" 47 | /* #include "stm32f10x_wwdg.h" */ 48 | #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ 49 | 50 | /* Exported types ------------------------------------------------------------*/ 51 | /* Exported constants --------------------------------------------------------*/ 52 | /* Uncomment the line below to expanse the "assert_param" macro in the 53 | Standard Peripheral Library drivers code */ 54 | /* #define USE_FULL_ASSERT 1 */ 55 | 56 | /* Exported macro ------------------------------------------------------------*/ 57 | #ifdef USE_FULL_ASSERT 58 | 59 | /** 60 | * @brief The assert_param macro is used for function's parameters check. 61 | * @param expr: If expr is false, it calls assert_failed function 62 | * which reports the name of the source file and the source 63 | * line number of the call that failed. 64 | * If expr is true, it returns no value. 65 | * @retval : None 66 | */ 67 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) 68 | /* Exported functions ------------------------------------------------------- */ 69 | void assert_failed(uint8_t* file, uint32_t line); 70 | #else 71 | #define assert_param(expr) ((void)0) 72 | #endif /* USE_FULL_ASSERT */ 73 | 74 | #endif /* __STM32F10x_CONF_H */ 75 | 76 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 77 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/FWlib/inc/stm32f10x_exti.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f10x_exti.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 EXTI 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_EXTI_H 25 | #define __STM32F10x_EXTI_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 EXTI 39 | * @{ 40 | */ 41 | 42 | /** @defgroup EXTI_Exported_Types 43 | * @{ 44 | */ 45 | 46 | /** 47 | * @brief EXTI mode enumeration 48 | */ 49 | 50 | typedef enum 51 | { 52 | EXTI_Mode_Interrupt = 0x00, 53 | EXTI_Mode_Event = 0x04 54 | }EXTIMode_TypeDef; 55 | 56 | #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event)) 57 | 58 | /** 59 | * @brief EXTI Trigger enumeration 60 | */ 61 | 62 | typedef enum 63 | { 64 | EXTI_Trigger_Rising = 0x08, 65 | EXTI_Trigger_Falling = 0x0C, 66 | EXTI_Trigger_Rising_Falling = 0x10 67 | }EXTITrigger_TypeDef; 68 | 69 | #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \ 70 | ((TRIGGER) == EXTI_Trigger_Falling) || \ 71 | ((TRIGGER) == EXTI_Trigger_Rising_Falling)) 72 | /** 73 | * @brief EXTI Init Structure definition 74 | */ 75 | 76 | typedef struct 77 | { 78 | uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled. 79 | This parameter can be any combination of @ref EXTI_Lines */ 80 | 81 | EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines. 82 | This parameter can be a value of @ref EXTIMode_TypeDef */ 83 | 84 | EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. 85 | This parameter can be a value of @ref EXTIMode_TypeDef */ 86 | 87 | FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines. 88 | This parameter can be set either to ENABLE or DISABLE */ 89 | }EXTI_InitTypeDef; 90 | 91 | /** 92 | * @} 93 | */ 94 | 95 | /** @defgroup EXTI_Exported_Constants 96 | * @{ 97 | */ 98 | 99 | /** @defgroup EXTI_Lines 100 | * @{ 101 | */ 102 | 103 | #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */ 104 | #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */ 105 | #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */ 106 | #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */ 107 | #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */ 108 | #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */ 109 | #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */ 110 | #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */ 111 | #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */ 112 | #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */ 113 | #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */ 114 | #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */ 115 | #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */ 116 | #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */ 117 | #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */ 118 | #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */ 119 | #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */ 120 | #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */ 121 | #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB Device/USB OTG FS 122 | Wakeup from suspend event */ 123 | #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */ 124 | 125 | #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFFF00000) == 0x00) && ((LINE) != (uint16_t)0x00)) 126 | #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \ 127 | ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \ 128 | ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \ 129 | ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \ 130 | ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \ 131 | ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \ 132 | ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \ 133 | ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \ 134 | ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \ 135 | ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19)) 136 | 137 | 138 | /** 139 | * @} 140 | */ 141 | 142 | /** 143 | * @} 144 | */ 145 | 146 | /** @defgroup EXTI_Exported_Macros 147 | * @{ 148 | */ 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /** @defgroup EXTI_Exported_Functions 155 | * @{ 156 | */ 157 | 158 | void EXTI_DeInit(void); 159 | void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct); 160 | void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct); 161 | void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); 162 | FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line); 163 | void EXTI_ClearFlag(uint32_t EXTI_Line); 164 | ITStatus EXTI_GetITStatus(uint32_t EXTI_Line); 165 | void EXTI_ClearITPendingBit(uint32_t EXTI_Line); 166 | 167 | #ifdef __cplusplus 168 | } 169 | #endif 170 | 171 | #endif /* __STM32F10x_EXTI_H */ 172 | /** 173 | * @} 174 | */ 175 | 176 | /** 177 | * @} 178 | */ 179 | 180 | /** 181 | * @} 182 | */ 183 | 184 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 185 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/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 | -------------------------------------------------------------------------------- /程序/GUI/Config/GUIConf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Config/GUIConf.h -------------------------------------------------------------------------------- /程序/GUI/Config/GUITouchConf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Config/GUITouchConf.h -------------------------------------------------------------------------------- /程序/GUI/Config/LCDConf.h: -------------------------------------------------------------------------------- 1 | #ifndef LCDCONF_H 2 | #define LCDCONF_H 3 | 4 | 5 | #define LCD_XSIZE (480) 6 | #define LCD_YSIZE (272) 7 | #define LCD_CONTROLLER (9320) 8 | #define LCD_BITSPERPIXEL (16) 9 | #define LCD_FIXEDPALETTE (565) 10 | #define LCD_SWAP_RB (1) 11 | #define LCD_SWAP_XY (0) 12 | #define LCD_INIT_CONTROLLER() LCD1963_Init(); 13 | 14 | #endif /* LCDCONF_H */ 15 | 16 | -------------------------------------------------------------------------------- /程序/GUI/Config/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Config/vssver.scc -------------------------------------------------------------------------------- /程序/GUI/Core/CCGUICore.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO CCGUICore.BAT: Compiling GUI\Core 3 | CALL CC GUI2DLib 4 | CALL CC GUI__AddSpaceHex 5 | CALL CC GUI__CalcTextRect 6 | CALL CC GUI__DivideRound 7 | CALL CC GUI__DivideRound32 8 | CALL CC GUI__GetFontSizeY 9 | CALL CC GUI__GetNumChars 10 | CALL CC GUI__HandleEOLine 11 | CALL CC GUI__IntersectRect 12 | CALL CC GUI__IntersectRects 13 | CALL CC GUI__memset 14 | CALL CC GUI__memset16 15 | CALL CC GUI__Read 16 | CALL CC GUI__ReduceRect 17 | CALL CC GUI__SetText 18 | CALL CC GUI__strcmp 19 | CALL CC GUI__strlen 20 | CALL CC GUI__Wrap 21 | CALL CC GUI_AddBin 22 | CALL CC GUI_AddDec 23 | CALL CC GUI_AddDecMin 24 | CALL CC GUI_AddDecShift 25 | CALL CC GUI_AddHex 26 | CALL CC GUI_ALLOC_AllocInit 27 | CALL CC GUI_ALLOC_AllocZero 28 | CALL CC GUI_BMP 29 | CALL CC GUI_BMP_Serialize 30 | CALL CC GUI_CalcColorDist 31 | CALL CC GUI_ClearRectEx 32 | CALL CC GUI_Color2VisColor 33 | CALL CC GUI_CursorArrowL 34 | CALL CC GUI_CursorArrowLI 35 | CALL CC GUI_CursorArrowLPx 36 | CALL CC GUI_CursorArrowM 37 | CALL CC GUI_CursorArrowMI 38 | CALL CC GUI_CursorArrowMPx 39 | CALL CC GUI_CursorArrowS 40 | CALL CC GUI_CursorArrowSI 41 | CALL CC GUI_CursorArrowSPx 42 | CALL CC GUI_CursorCrossL 43 | CALL CC GUI_CursorCrossLI 44 | CALL CC GUI_CursorCrossLPx 45 | CALL CC GUI_CursorCrossM 46 | CALL CC GUI_CursorCrossMI 47 | CALL CC GUI_CursorCrossMPx 48 | CALL CC GUI_CursorCrossS 49 | CALL CC GUI_CursorCrossSI 50 | CALL CC GUI_CursorCrossSPx 51 | CALL CC GUI_CursorHeaderM 52 | CALL CC GUI_CursorHeaderMI 53 | CALL CC GUI_CursorHeaderMPx 54 | CALL CC GUI_CursorPal 55 | CALL CC GUI_CursorPalI 56 | CALL CC GUI_DispBin 57 | CALL CC GUI_DispCEOL 58 | CALL CC GUI_DispChar 59 | CALL CC GUI_DispChars 60 | CALL CC GUI_DispHex 61 | CALL CC GUI_DispString 62 | CALL CC GUI_DispStringAt 63 | CALL CC GUI_DispStringAtCEOL 64 | CALL CC GUI_DispStringHCenter 65 | CALL CC GUI_DispStringInRect 66 | CALL CC GUI_DispStringInRectEx 67 | CALL CC GUI_DispStringLen 68 | CALL CC GUI_DrawBitmap 69 | CALL CC GUI_DrawBitmapEx 70 | CALL CC GUI_DrawBitmapExp 71 | CALL CC GUI_DrawBitmapMag 72 | CALL CC GUI_DrawFocusRect 73 | CALL CC GUI_DrawGraph 74 | CALL CC GUI_DrawHLine 75 | CALL CC GUI_DrawPie 76 | CALL CC GUI_DrawPixel 77 | CALL CC GUI_DrawPolyline 78 | CALL CC GUI_DrawRectEx 79 | CALL CC GUI_DrawVLine 80 | CALL CC GUI_ErrorOut 81 | CALL CC GUI_Exec 82 | CALL CC GUI_FillPolygon 83 | CALL CC GUI_FillRect 84 | CALL CC GUI_FillRectEx 85 | CALL CC GUI_GetBitmapPixelColor 86 | CALL CC GUI_GetBitmapPixelIndex 87 | CALL CC GUI_GetClientRect 88 | CALL CC GUI_GetColor 89 | CALL CC GUI_GetDispPos 90 | CALL CC GUI_GetFont 91 | CALL CC GUI_GetFontInfo 92 | CALL CC GUI_GetFontSizeY 93 | CALL CC GUI_GetLineStyle 94 | CALL CC GUI_GetStringDistX 95 | CALL CC GUI_GetTextAlign 96 | CALL CC GUI_GetTextExtend 97 | CALL CC GUI_GetTextMode 98 | CALL CC GUI_GetVersionString 99 | CALL CC GUI_GetYSizeOfFont 100 | CALL CC GUI_Goto 101 | CALL CC GUI_InvertRect 102 | CALL CC GUI_IsInFont 103 | CALL CC GUI_Log 104 | CALL CC GUI_MergeRect 105 | CALL CC GUI_MOUSE 106 | CALL CC GUI_MOUSE_DriverPS2 107 | CALL CC GUI_MoveRect 108 | CALL CC GUI_OnKey 109 | CALL CC GUI_Pen 110 | CALL CC GUI_PID 111 | CALL CC GUI_RectsIntersect 112 | CALL CC GUI_SaveContext 113 | CALL CC GUI_SelectLayer 114 | CALL CC GUI_SelectLCD 115 | CALL CC GUI_SetColor 116 | CALL CC GUI_SetColorIndex 117 | CALL CC GUI_SetDecChar 118 | CALL CC GUI_SetDefault 119 | CALL CC GUI_SetDrawMode 120 | CALL CC GUI_SetFont 121 | CALL CC GUI_SetLBorder 122 | CALL CC GUI_SetLineStyle 123 | CALL CC GUI_SetLUTColor 124 | CALL CC GUI_SetLUTColorEx 125 | CALL CC GUI_SetLUTEntry 126 | CALL CC GUI_SetOrg 127 | CALL CC GUI_SetPixelIndex 128 | CALL CC GUI_SetTextAlign 129 | CALL CC GUI_SetTextMode 130 | CALL CC GUI_SetTextStyle 131 | CALL CC GUI_SIF 132 | CALL CC GUI_SIF_Prop 133 | CALL CC GUI_TOUCH 134 | CALL CC GUI_TOUCH_DriverAnalog 135 | CALL CC GUI_TOUCH_StoreState 136 | CALL CC GUI_TOUCH_StoreUnstable 137 | CALL CC GUI_UC 138 | CALL CC GUI_UC_DispString 139 | CALL CC GUI_UC_EncodeNone 140 | CALL CC GUI_UC_EncodeUTF8 141 | CALL CC GUI_WaitKey 142 | CALL CC GUI_WaitEvent 143 | CALL CC GUI_Warn 144 | CALL CC GUIAlloc 145 | CALL CC GUIArc 146 | CALL CC GUIChar 147 | CALL CC GUICharLine 148 | CALL CC GUICharM 149 | CALL CC GUICharP 150 | CALL CC GUICirc 151 | CALL CC GUIColor2Index 152 | CALL CC GUICore 153 | CALL CC GUICurs 154 | CALL CC GUIEncJS 155 | CALL CC GUIIndex2Color 156 | CALL CC GUIPolyE 157 | CALL CC GUIPolyM 158 | CALL CC GUIPolyR 159 | CALL CC GUIRealloc 160 | CALL CC GUIStream 161 | CALL CC GUITask 162 | CALL CC GUITime 163 | CALL CC GUITimer 164 | CALL CC GUIUC0 165 | CALL CC GUIVal 166 | CALL CC GUIValf 167 | CALL CC LCD 168 | CALL CC LCD_API 169 | CALL CC LCD_DrawBitmap_565 170 | CALL CC LCD_DrawBitmap_M565 171 | CALL CC LCD_DrawVLine 172 | CALL CC LCD_GetColorIndex 173 | CALL CC LCD_GetEx 174 | CALL CC LCD_GetNumDisplays 175 | CALL CC LCD_GetPixelColor 176 | CALL CC LCD_Index2ColorEx 177 | CALL CC LCD_L0_Generic 178 | CALL CC LCD_MixColors256 179 | CALL CC LCD_Mirror 180 | CALL CC LCD_Rotate180 181 | CALL CC LCD_RotateCW 182 | CALL CC LCD_RotateCCW 183 | CALL CC LCD_SelectLCD 184 | CALL CC LCD_SetClipRectEx 185 | CALL CC LCD_SetAPI 186 | CALL CC LCD_UpdateColorIndices 187 | CALL CC LCDAA 188 | CALL CC LCDColor 189 | CALL CC LCDGetP 190 | CALL CC LCDInfo 191 | CALL CC LCDInfo0 192 | CALL CC LCDInfo1 193 | CALL CC LCDL0Delta 194 | CALL CC LCDL0Mag 195 | CALL CC LCDP1 196 | CALL CC LCDP565_Index2Color 197 | CALL CC LCDPM565_Index2Color 198 | CALL CC LCDRLE4 199 | CALL CC LCDRLE8 200 | -------------------------------------------------------------------------------- /程序/GUI/Core/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUIDebug.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUIDebug.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUIType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUIType.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUIVersion.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUIVersion.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_ConfDefaults.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_ConfDefaults.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_FontIntern.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_FontIntern.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_Private.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_Protected.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_Protected.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_VNC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_VNC.h -------------------------------------------------------------------------------- /程序/GUI/Core/GUI_X.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/GUI_X.h -------------------------------------------------------------------------------- /程序/GUI/Core/LCD.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/LCD.h -------------------------------------------------------------------------------- /程序/GUI/Core/LCDSIM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/LCDSIM.h -------------------------------------------------------------------------------- /程序/GUI/Core/LCD_ConfDefaults.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/LCD_ConfDefaults.h -------------------------------------------------------------------------------- /程序/GUI/Core/LCD_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/LCD_Private.h -------------------------------------------------------------------------------- /程序/GUI/Core/LCD_Protected.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/LCD_Protected.h -------------------------------------------------------------------------------- /程序/GUI/Core/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/Core/vssver.scc -------------------------------------------------------------------------------- /程序/GUI/GUI.H/BUTTON.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/BUTTON.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/BUTTON_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/BUTTON_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/CHECKBOX.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/CHECKBOX.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/CHECKBOX_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/CHECKBOX_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/DIALOG.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/DIALOG.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/DIALOG_Intern.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/DIALOG_Intern.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/DROPDOWN.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/DROPDOWN.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/DROPDOWN_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/DROPDOWN_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/EDIT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/EDIT.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/EDIT_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/EDIT_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/FRAMEWIN.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/FRAMEWIN.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/FRAMEWIN_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/FRAMEWIN_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUIDebug.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUIDebug.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUIType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUIType.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUIVersion.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUIVersion.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_ARRAY.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_ARRAY.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_ConfDefaults.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_ConfDefaults.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_FontIntern.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_FontIntern.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_HOOK.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_HOOK.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_Protected.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_Protected.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_VNC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_VNC.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/GUI_X.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/GUI_X.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/HEADER.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/HEADER.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/HEADER_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/HEADER_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCD.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCD.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCDSIM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCDSIM.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCD_ConfDefaults.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCD_ConfDefaults.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCD_IncludeDriver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCD_IncludeDriver.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCD_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCD_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LCD_Protected.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LCD_Protected.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LISTBOX.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LISTBOX.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LISTBOX_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LISTBOX_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LISTVIEW.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LISTVIEW.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/LISTVIEW_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/LISTVIEW_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MENU.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MENU.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MENU_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MENU_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MESSAGEBOX.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MESSAGEBOX.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MULTIEDIT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MULTIEDIT.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MULTIPAGE.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MULTIPAGE.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/MULTIPAGE_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/MULTIPAGE_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/PROGBAR.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/PROGBAR.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/RADIO.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/RADIO.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/RADIO_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/RADIO_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/SCROLLBAR.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/SCROLLBAR.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/SCROLLBAR_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/SCROLLBAR_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/SLIDER.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/SLIDER.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/TEXT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/TEXT.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/TEXT_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/TEXT_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WIDGET.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WIDGET.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WINDOW_Private.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WINDOW_Private.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WM.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WM_GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WM_GUI.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WM_Intern.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WM_Intern.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/WM_Intern_ConfDep.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/GUI.H/WM_Intern_ConfDep.h -------------------------------------------------------------------------------- /程序/GUI/GUI.H/jconfig.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* 4 | * jconfig.doc 5 | * 6 | * Copyright (C) 1991-1994, Thomas G. Lane. 7 | * This file is part of the Independent JPEG Group's software. 8 | * For conditions of distribution and use, see the accompanying README file. 9 | * 10 | * This file documents the configuration options that are required to 11 | * customize the JPEG software for a particular system. 12 | * 13 | */ 14 | 15 | 16 | #include "GUI.h" /* Only needed for GUI_USE_PARA(xxx) */ 17 | 18 | /* 19 | * These symbols indicate the properties of your machine or compiler. 20 | * #define the symbol if yes, #undef it if no. 21 | */ 22 | 23 | 24 | /* Does your compiler support the declaration "unsigned char" ? 25 | * How about "unsigned short" ? 26 | */ 27 | #define HAVE_UNSIGNED_CHAR 28 | 29 | 30 | /* Define this if an ordinary "char" type is unsigned. 31 | * If you're not sure, leaving it undefined will work at some cost in speed. 32 | * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. 33 | */ 34 | #ifdef CHAR_IS_UNSIGNED 35 | #undef CHAR_IS_UNSIGNED 36 | #endif 37 | #define HAVE_STDDEF_H /* Define this if your system has an ANSI-conforming file. */ 38 | #define HAVE_STDLIB_H /* Define this if your system has an ANSI-conforming file. */ 39 | #ifdef NEED_BSD_STRINGS 40 | #undef NEED_BSD_STRINGS /* Define this if your system does not have an ANSI/SysV , but does have a BSD-style . */ 41 | #endif 42 | 43 | /* Define this if your system does not provide typedef size_t in any of the 44 | * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in 45 | * instead. 46 | */ 47 | #ifdef NEED_SYS_TYPES_H 48 | #undef NEED_SYS_TYPES_H 49 | #endif 50 | 51 | /* For 80x86 machines, you need to define NEED_FAR_POINTERS, 52 | * unless you are using a large-data memory model or 80386 flat-memory mode. 53 | * On less brain-damaged CPUs this symbol must not be defined. 54 | * (Defining this symbol causes large data structures to be referenced through 55 | * "far" pointers and to be allocated with a special version of malloc.) 56 | */ 57 | #ifdef NEED_SYS_TYPES_H 58 | #undef NEED_FAR_POINTERS 59 | #endif 60 | 61 | 62 | /* Although a real ANSI C compiler can deal perfectly well with pointers to 63 | * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI 64 | * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, 65 | * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you 66 | * actually get "missing structure definition" warnings or errors while 67 | * compiling the JPEG code. 68 | */ 69 | #ifdef INCOMPLETE_TYPES_BROKEN 70 | #undef INCOMPLETE_TYPES_BROKEN 71 | #endif 72 | 73 | 74 | /* 75 | * The following options affect code selection within the JPEG library, 76 | * but they don't need to be visible to applications using the library. 77 | * To minimize application namespace pollution, the symbols won't be 78 | * defined unless JPEG_INTERNALS has been defined. 79 | */ 80 | 81 | #ifdef JPEG_INTERNALS 82 | 83 | /* Define this if your compiler implements ">>" on signed values as a logical 84 | * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, 85 | * which is the normal and rational definition. 86 | */ 87 | #ifdef RIGHT_SHIFT_IS_UNSIGNED 88 | #undef RIGHT_SHIFT_IS_UNSIGNED 89 | #endif 90 | 91 | 92 | #endif /* JPEG_INTERNALS */ 93 | 94 | #ifndef GUI_USE_PARA 95 | #define GUI_USE_PARA(x) 96 | #endif 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /程序/GUI/GUI.H/jdct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jdct.h 3 | * 4 | * Copyright (C) 1994-1996, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This include file contains common declarations for the forward and 9 | * inverse DCT modules. These declarations are private to the DCT managers 10 | * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. 11 | * The individual DCT algorithms are kept in separate files to ease 12 | * machine-dependent tuning (e.g., assembly coding). 13 | */ 14 | 15 | 16 | /* 17 | * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; 18 | * the DCT is to be performed in-place in that buffer. Type DCTELEM is int 19 | * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT 20 | * implementations use an array of type FAST_FLOAT, instead.) 21 | * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). 22 | * The DCT outputs are returned scaled up by a factor of 8; they therefore 23 | * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This 24 | * convention improves accuracy in integer implementations and saves some 25 | * work in floating-point ones. 26 | * Quantization of the output coefficients is done by jcdctmgr.c. 27 | */ 28 | 29 | #if BITS_IN_JSAMPLE == 8 30 | typedef int DCTELEM; /* 16 or 32 bits is fine */ 31 | #else 32 | typedef INT32 DCTELEM; /* must have 32 bits */ 33 | #endif 34 | 35 | typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); 36 | typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); 37 | 38 | 39 | /* 40 | * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer 41 | * to an output sample array. The routine must dequantize the input data as 42 | * well as perform the IDCT; for dequantization, it uses the multiplier table 43 | * pointed to by compptr->dct_table. The output data is to be placed into the 44 | * sample array starting at a specified column. (Any row offset needed will 45 | * be applied to the array pointer before it is passed to the IDCT code.) 46 | * Note that the number of samples emitted by the IDCT routine is 47 | * DCT_scaled_size * DCT_scaled_size. 48 | */ 49 | 50 | /* typedef inverse_DCT_method_ptr is declared in jpegint.h */ 51 | 52 | /* 53 | * Each IDCT routine has its own ideas about the best dct_table element type. 54 | */ 55 | 56 | typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ 57 | #if BITS_IN_JSAMPLE == 8 58 | typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ 59 | #define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ 60 | #else 61 | typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ 62 | #define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ 63 | #endif 64 | typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ 65 | 66 | 67 | /* 68 | * Each IDCT routine is responsible for range-limiting its results and 69 | * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could 70 | * be quite far out of range if the input data is corrupt, so a bulletproof 71 | * range-limiting step is required. We use a mask-and-table-lookup method 72 | * to do the combined operations quickly. See the comments with 73 | * prepare_range_limit_table (in jdmaster.c) for more info. 74 | */ 75 | 76 | #define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) 77 | 78 | #define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ 79 | 80 | 81 | 82 | /* Extern declarations for the forward and inverse DCT routines. */ 83 | 84 | EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); 85 | EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); 86 | EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); 87 | 88 | EXTERN(void) jpeg_idct_islow 89 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 90 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 91 | EXTERN(void) jpeg_idct_ifast 92 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 93 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 94 | EXTERN(void) jpeg_idct_float 95 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 96 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 97 | EXTERN(void) jpeg_idct_4x4 98 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 99 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 100 | EXTERN(void) jpeg_idct_2x2 101 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 102 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 103 | EXTERN(void) jpeg_idct_1x1 104 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, 105 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); 106 | 107 | 108 | /* 109 | * Macros for handling fixed-point arithmetic; these are used by many 110 | * but not all of the DCT/IDCT modules. 111 | * 112 | * All values are expected to be of type INT32. 113 | * Fractional constants are scaled left by CONST_BITS bits. 114 | * CONST_BITS is defined within each module using these macros, 115 | * and may differ from one module to the next. 116 | */ 117 | 118 | #define ONE ((INT32) 1) 119 | #define CONST_SCALE (ONE << CONST_BITS) 120 | 121 | /* Convert a positive real constant to an integer scaled by CONST_SCALE. 122 | * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, 123 | * thus causing a lot of useless floating-point operations at run time. 124 | */ 125 | 126 | #define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) 127 | 128 | /* Descale and correctly round an INT32 value that's scaled by N bits. 129 | * We assume RIGHT_SHIFT rounds towards minus infinity, so adding 130 | * the fudge factor is correct for either sign of X. 131 | */ 132 | 133 | #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) 134 | 135 | /* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. 136 | * This macro is used only when the two inputs will actually be no more than 137 | * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a 138 | * full 32x32 multiply. This provides a useful speedup on many machines. 139 | * Unfortunately there is no way to specify a 16x16->32 multiply portably 140 | * in C, but some C compilers will do the right thing if you provide the 141 | * correct combination of casts. 142 | */ 143 | 144 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 145 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) 146 | #endif 147 | #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ 148 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) 149 | #endif 150 | 151 | #ifndef MULTIPLY16C16 /* default definition */ 152 | #define MULTIPLY16C16(var,const) ((var) * (const)) 153 | #endif 154 | 155 | /* Same except both inputs are variables. */ 156 | 157 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ 158 | #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) 159 | #endif 160 | 161 | #ifndef MULTIPLY16V16 /* default definition */ 162 | #define MULTIPLY16V16(var1,var2) ((var1) * (var2)) 163 | #endif 164 | -------------------------------------------------------------------------------- /程序/GUI/GUI.H/jinclude.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jinclude.h 3 | * 4 | * Copyright (C) 1991-1994, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file exists to provide a single place to fix any problems with 9 | * including the wrong system include files. (Common problems are taken 10 | * care of by the standard jconfig symbols, but on really weird systems 11 | * you may have to edit this file.) 12 | * 13 | * NOTE: this file is NOT intended to be included by applications using the 14 | * JPEG library. Most applications need only include jpeglib.h. 15 | */ 16 | 17 | 18 | /* Include auto-config file to find out which system include files we need. */ 19 | 20 | #include "jconfig.h" /* auto configuration options */ 21 | #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ 22 | 23 | /* 24 | * We need the NULL macro and size_t typedef. 25 | * On an ANSI-conforming system it is sufficient to include . 26 | * Otherwise, we get them from or ; we may have to 27 | * pull in as well. 28 | * Note that the core JPEG library does not require ; 29 | * only the default error handler and data source/destination modules do. 30 | * But we must pull it in because of the references to FILE in jpeglib.h. 31 | * You can remove those references if you want to compile without . 32 | */ 33 | 34 | #ifdef HAVE_STDDEF_H 35 | #include 36 | #endif 37 | 38 | #include 39 | 40 | #ifdef NEED_SYS_TYPES_H 41 | #include 42 | #endif 43 | 44 | #include 45 | 46 | /* 47 | * We need memory copying and zeroing functions, plus strncpy(). 48 | * ANSI and System V implementations declare these in . 49 | * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). 50 | * Some systems may declare memset and memcpy in . 51 | * 52 | * NOTE: we assume the size parameters to these functions are of type size_t. 53 | * Change the casts in these macros if not! 54 | */ 55 | 56 | #ifdef NEED_BSD_STRINGS 57 | 58 | #include 59 | #define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) 60 | #define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) 61 | 62 | #else /* not BSD, assume ANSI/SysV string lib */ 63 | 64 | #include 65 | #define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) 66 | #define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) 67 | 68 | #endif 69 | 70 | /* 71 | * In ANSI C, and indeed any rational implementation, size_t is also the 72 | * type returned by sizeof(). However, it seems there are some irrational 73 | * implementations out there, in which sizeof() returns an int even though 74 | * size_t is defined as long or unsigned long. To ensure consistent results 75 | * we always use this SIZEOF() macro in place of using sizeof() directly. 76 | */ 77 | 78 | #define SIZEOF(object) ((size_t) sizeof(object)) 79 | 80 | /* 81 | * The modules that use fread() and fwrite() always invoke them through 82 | * these macros. On some systems you may need to twiddle the argument casts. 83 | * CAUTION: argument order is different from underlying functions! 84 | */ 85 | 86 | #define JFREAD(file,buf,sizeofbuf) \ 87 | ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 88 | #define JFWRITE(file,buf,sizeofbuf) \ 89 | ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) 90 | -------------------------------------------------------------------------------- /程序/GUI/GUI.H/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /程序/GUI/LCDDriver/CCLCDDriver.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | ECHO CCGUILCDDriver.BAT: Compiling GUI\LCDDriver 4 | 5 | CALL CC LCDDummy 6 | CALL CC LCDNull 7 | CALL CC LCDWin 8 | -------------------------------------------------------------------------------- /程序/GUI/LCDDriver/LCD_GUI_Interface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/LCDDriver/LCD_GUI_Interface.c -------------------------------------------------------------------------------- /程序/GUI/LCDDriver/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/LCDDriver/vssver.scc -------------------------------------------------------------------------------- /程序/GUI/uCGUI_Lib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI/uCGUI_Lib.lib -------------------------------------------------------------------------------- /程序/GUI_X/GUI_X.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI_X/GUI_X.c -------------------------------------------------------------------------------- /程序/GUI_X/GUI_X_Touch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI_X/GUI_X_Touch.c -------------------------------------------------------------------------------- /程序/GUI_X/GUI_X_uCOS.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/GUI_X/GUI_X_uCOS.c -------------------------------------------------------------------------------- /程序/JLink Regs CM3.txt: -------------------------------------------------------------------------------- 1 | 0: R0: 0x00 2 | 1: R1: 0x01 3 | 2: R2: 0x02 4 | 3: R3: 0x03 5 | 4: R4: 0x04 6 | 5: R5: 0x05 7 | 6: R6: 0x06 8 | 7: R7: 0x07 9 | 8: R8: 0x08 10 | 9: R9: 0x09 11 | 10: R10: 0x0a 12 | 11: R11: 0x0b 13 | 12: R12: 0x0c 14 | 13: R13: 0x0d 15 | 14: R14: 0x0e 16 | 15: R15: 0x0f 17 | 16: XPSR: 0x10 18 | 17: MSP: 0x11 19 | 18: PSP: 0x12 20 | 19: RAZ: 0x13 21 | 20: CFBP: 0x14 22 | 21: APSR: 0x15 23 | 22: EPSR: 0x16 24 | 23: IPSR: 0x17 25 | 24: PRIMASK: 0x18 26 | 25: BASEPRI: 0x19 27 | 26: FAULTMASK: 0x1a 28 | 27: CONTROL: 0x1b 29 | 28: BASEPRI_MAX: 0x1c 30 | 29: IAPSR: 0x1d 31 | 30: EAPSR: 0x1e 32 | 31: IEPSR: 0x1f 33 | -------------------------------------------------------------------------------- /程序/JLinkLog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/JLinkLog.txt -------------------------------------------------------------------------------- /程序/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [FLASH] 2 | SkipProgOnCRCMatch = 1 3 | VerifyDownload = 1 4 | AllowCaching = 1 5 | EnableFlashDL = 2 6 | Override = 0 7 | Device="ADUC7020X62" 8 | [BREAKPOINTS] 9 | ShowInfoWin = 1 10 | EnableFlashBP = 2 11 | BPDuringExecution = 0 12 | [CPU] 13 | OverrideMemMap = 0 14 | AllowSimulation = 1 15 | ScriptFile="" 16 | [SWO] 17 | SWOLogFile="" 18 | -------------------------------------------------------------------------------- /程序/STM32示波器+GUI_Target 1.dep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/STM32示波器+GUI_Target 1.dep -------------------------------------------------------------------------------- /程序/stm32-fd-FlashLED.Uv2.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/stm32-fd-FlashLED.Uv2.bak -------------------------------------------------------------------------------- /程序/stm32-fd-FlashLED.opt.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/stm32-fd-FlashLED.opt.bak -------------------------------------------------------------------------------- /程序/stm32-fd-FlashLED_Opt.Bak: -------------------------------------------------------------------------------- 1 | ### uVision2 Project, (C) Keil Software 2 | ### Do not modify ! 3 | 4 | cExt (*.c) 5 | aExt (*.s*; *.src; *.a*) 6 | oExt (*.obj) 7 | lExt (*.lib) 8 | tExt (*.txt; *.h; *.inc) 9 | pExt (*.plm) 10 | CppX (*.cpp) 11 | DaveTm { 0,0,0,0,0,0,0,0 } 12 | 13 | Target (Target 1), 0x0004 // Tools: 'ARM-ADS' 14 | GRPOPT 1,(ASM),1,0,0 15 | GRPOPT 2,(USR),1,0,0 16 | GRPOPT 3,(FWlib),1,0,0 17 | GRPOPT 4,(CMSYS),1,0,0 18 | GRPOPT 5,(readme),1,0,0 19 | 20 | OPTFFF 1,1,2,0,0,0,0,0,<.\startup\startup_stm32f10x_hd.s> 21 | OPTFFF 2,2,1,2,0,1,1,0,<.\user\main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,248,255,255,255,226,255,255,255,0,0,0,0,0,0,0,0,100,3,0,0,152,1,0,0 } 22 | OPTFFF 2,3,1,0,0,0,0,0,<.\user\stm32f10x_it.c> 23 | OPTFFF 3,4,1,520093696,0,0,0,0,<.\FWlib\SRC\stm32f10x_gpio.c> 24 | OPTFFF 3,5,1,1073741824,0,0,0,0,<.\FWlib\SRC\stm32f10x_rcc.c> 25 | OPTFFF 4,6,1,0,0,0,0,0,<.\CM3\core_cm3.c> 26 | OPTFFF 4,7,1,1006632960,0,0,0,0,<.\CM3\system_stm32f10x.c> 27 | OPTFFF 5,8,5,570425344,0,0,0,0,<.\user\readme.txt> 28 | 29 | 30 | TARGOPT 1, (Target 1) 31 | ADSCLK=8000000 32 | OPTTT 1,1,1,0 33 | OPTHX 1,65535,0,0,0 34 | OPTLX 79,66,8,<.\> 35 | OPTOX 16 36 | OPTLT 1,1,1,0,1,1,0,1,0,0,0,0 37 | OPTXL 1,1,1,1,1,1,1,0,0 38 | OPTFL 1,0,1 39 | OPTAX 0 40 | OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103VE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103VE) 41 | OPTDBG 49150,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()() 42 | OPTKEY 0,(JL2CM3)(-U17935099 -O14 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TRE0 -FO31 -FD20000000 -FC800 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000) 43 | OPTDF 0x80 44 | OPTLE <> 45 | OPTLC <> 46 | EndOpt 47 | 48 | -------------------------------------------------------------------------------- /程序/stm32-fd-FlashLED_Uv2.Bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/stm32-fd-FlashLED_Uv2.Bak -------------------------------------------------------------------------------- /程序/uCOS-II/Ports/os_cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/OS-II 4 | * The Real-Time Kernel 5 | * 6 | * 7 | * (c) Copyright 2006, Micrium, Weston, FL 8 | * All Rights Reserved 9 | * 10 | * ARM Cortex-M3 Port 11 | * 12 | * File : OS_CPU.H 13 | * Version : V2.86 14 | * By : Jean J. Labrosse 15 | * Brian Nagel 16 | * 17 | * For : ARMv7M Cortex-M3 18 | * Mode : Thumb2 19 | * Toolchain : IAR EWARM 20 | ********************************************************************************************************* 21 | */ 22 | 23 | #ifndef OS_CPU_H 24 | #define OS_CPU_H 25 | 26 | 27 | #ifdef OS_CPU_GLOBALS 28 | #define OS_CPU_EXT 29 | #else 30 | #define OS_CPU_EXT extern 31 | #endif 32 | 33 | /* 34 | ********************************************************************************************************* 35 | * DATA TYPES 36 | * (Compiler Specific) 37 | ********************************************************************************************************* 38 | */ 39 | 40 | typedef unsigned char BOOLEAN; 41 | typedef unsigned char INT8U; /* Unsigned 8 bit quantity */ 42 | typedef signed char INT8S; /* Signed 8 bit quantity */ 43 | typedef unsigned short INT16U; /* Unsigned 16 bit quantity */ 44 | typedef signed short INT16S; /* Signed 16 bit quantity */ 45 | typedef unsigned int INT32U; /* Unsigned 32 bit quantity */ 46 | typedef signed int INT32S; /* Signed 32 bit quantity */ 47 | typedef float FP32; /* Single precision floating point */ 48 | typedef double FP64; /* Double precision floating point */ 49 | 50 | typedef unsigned int OS_STK; /* Each stack entry is 32-bit wide */ 51 | typedef unsigned int OS_CPU_SR; /* Define size of CPU status register (PSR = 32 bits) */ 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * Cortex-M1 56 | * Critical Section Management 57 | * 58 | * Method #1: Disable/Enable interrupts using simple instructions. After critical section, interrupts 59 | * will be enabled even if they were disabled before entering the critical section. 60 | * NOT IMPLEMENTED 61 | * 62 | * Method #2: Disable/Enable interrupts by preserving the state of interrupts. In other words, if 63 | * interrupts were disabled before entering the critical section, they will be disabled when 64 | * leaving the critical section. 65 | * NOT IMPLEMENTED 66 | * 67 | * Method #3: Disable/Enable interrupts by preserving the state of interrupts. Generally speaking you 68 | * would store the state of the interrupt disable flag in the local variable 'cpu_sr' and then 69 | * disable interrupts. 'cpu_sr' is allocated in all of uC/OS-II's functions that need to 70 | * disable interrupts. You would restore the interrupt disable state by copying back 'cpu_sr' 71 | * into the CPU's status register. 72 | ********************************************************************************************************* 73 | */ 74 | 75 | #define OS_CRITICAL_METHOD 3 76 | 77 | #if OS_CRITICAL_METHOD == 3 78 | #define OS_ENTER_CRITICAL() {cpu_sr = OS_CPU_SR_Save();} 79 | #define OS_EXIT_CRITICAL() {OS_CPU_SR_Restore(cpu_sr);} 80 | #endif 81 | 82 | /* 83 | ********************************************************************************************************* 84 | * Cortex-M3 Miscellaneous 85 | ********************************************************************************************************* 86 | */ 87 | 88 | #define OS_STK_GROWTH 1 /* Stack grows from HIGH to LOW memory on ARM */ 89 | 90 | #define OS_TASK_SW() OSCtxSw() 91 | 92 | /* 93 | ********************************************************************************************************* 94 | * PROTOTYPES 95 | ********************************************************************************************************* 96 | */ 97 | 98 | #if OS_CRITICAL_METHOD == 3 /* See OS_CPU_A.ASM */ 99 | OS_CPU_SR OS_CPU_SR_Save(void); 100 | void OS_CPU_SR_Restore(OS_CPU_SR cpu_sr); 101 | #endif 102 | 103 | void OSCtxSw(void); 104 | void OSIntCtxSw(void); 105 | void OSStartHighRdy(void); 106 | 107 | void OS_CPU_PendSVHandler(void); 108 | 109 | /* See OS_CPU_C.C */ 110 | /* void OS_CPU_SysTickHandler(void); */ 111 | /* void OS_CPU_SysTickInit(void); */ 112 | 113 | /* See BSP.C */ 114 | /* INT32U OS_CPU_SysTickClkFreq(void); */ 115 | #endif 116 | -------------------------------------------------------------------------------- /程序/uCOS-II/Ports/os_cpu_c.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Ports/os_cpu_c.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_core.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_core.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_dbg_r.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_dbg_r.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_flag.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_flag.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_mbox.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_mbox.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_mem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_mem.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_mutex.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_mutex.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_q.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_q.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_sem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_sem.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_task.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_task.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_time.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_time.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/os_tmr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/os_tmr.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/ucos_ii.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/ucos_ii.c -------------------------------------------------------------------------------- /程序/uCOS-II/Source/ucos_ii.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/uCOS-II/Source/ucos_ii.h -------------------------------------------------------------------------------- /程序/user/EXTI.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/EXTI.c -------------------------------------------------------------------------------- /程序/user/EXTI.h: -------------------------------------------------------------------------------- 1 | #ifndef __EXTI_H 2 | #define __EXTI_H 3 | 4 | void EXTI_Config(void); 5 | static void NVIC_Config(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /程序/user/GBK_Small.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/GBK_Small.h -------------------------------------------------------------------------------- /程序/user/LED.H: -------------------------------------------------------------------------------- 1 | #ifndef __LED_H 2 | #define __LED_H 3 | 4 | #include "bitband.h" 5 | #include "stm32f10x.h" 6 | 7 | #define BOARD_LED1 PEout(0) 8 | #define BOARD_LED2 PEout(2) 9 | #define DAC_LED PEout(4) 10 | #define BEEP PEout(5) 11 | 12 | void LED_GPIO_Config(void); 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /程序/user/LED.c: -------------------------------------------------------------------------------- 1 | #include "LED.H" 2 | 3 | void LED_GPIO_Config(void) 4 | { 5 | GPIO_InitTypeDef IO_Init; 6 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, ENABLE); 7 | IO_Init.GPIO_Pin = GPIO_Pin_All; 8 | IO_Init.GPIO_Mode = GPIO_Mode_Out_PP; 9 | IO_Init.GPIO_Speed = GPIO_Speed_50MHz; 10 | GPIO_Init(GPIOE, &IO_Init); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /程序/user/adc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/adc.c -------------------------------------------------------------------------------- /程序/user/adc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ADC_H 2 | #define __ADC_H 3 | 4 | #define ADC1_DR_Address ((unsigned int)0x40012400+0x4c) 5 | #define SAMPDEPTH 400 6 | 7 | void ADC1_GPIO_Init(void); 8 | void ADC1_Mode_Config(void); 9 | void ADC1_Init(void); 10 | unsigned short int GetTempSensor(void); 11 | void Earse_AD_FIFO(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /程序/user/ascii_font.h: -------------------------------------------------------------------------------- 1 | #define ASCII_FONT 2 | 3 | // 8x16 ASCII 4 | unsigned char const ASCII_8x16[1536] = { 5 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 6 | 0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, 7 | 0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 | 0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00, 9 | 0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00,0x00, 10 | 0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00, 11 | 0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00, 12 | 0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 13 | 0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00, 14 | 0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00, 15 | 0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00, 16 | 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, 17 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00, 18 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 19 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, 20 | 0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00, 21 | 0x00,0x00,0x7C,0xC6,0xC6,0xCE,0xD6,0xD6,0xE6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 22 | 0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00, 23 | 0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00, 24 | 0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00, 25 | 0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00, 26 | 0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x0E,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00, 27 | 0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 28 | 0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00, 29 | 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 30 | 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00, 31 | 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, 32 | 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00, 33 | 0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00, 34 | 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, 35 | 0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00, 36 | 0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, 37 | 0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00, 38 | 0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00, 39 | 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00, 40 | 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00, 41 | 0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00, 42 | 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00, 43 | 0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00, 44 | 0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00, 45 | 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00, 46 | 0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, 47 | 0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00, 48 | 0x00,0x00,0xE6,0x66,0x6C,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00, 49 | 0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00, 50 | 0x00,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00, 51 | 0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00, 52 | 0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00, 53 | 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00, 54 | 0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00, 55 | 0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00, 56 | 0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 57 | 0x00,0x00,0x7E,0x7E,0x5A,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, 58 | 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 59 | 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00, 60 | 0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xD6,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00, 61 | 0x00,0x00,0xC6,0xC6,0x6C,0x6C,0x38,0x38,0x6C,0x6C,0xC6,0xC6,0x00,0x00,0x00,0x00, 62 | 0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, 63 | 0x00,0x00,0xFE,0xC6,0x86,0x0C,0x18,0x30,0x60,0xC2,0xC6,0xFE,0x00,0x00,0x00,0x00, 64 | 0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00, 65 | 0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00, 66 | 0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00, 67 | 0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 68 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00, 69 | 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 70 | 0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00, 71 | 0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0xDC,0x00,0x00,0x00,0x00, 72 | 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00, 73 | 0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00, 74 | 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00, 75 | 0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00, 76 | 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0xCC,0x78,0x00, 77 | 0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00, 78 | 0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, 79 | 0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00, 80 | 0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00, 81 | 0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, 82 | 0x00,0x00,0x00,0x00,0x00,0xEC,0xFE,0xD6,0xD6,0xD6,0xD6,0xD6,0x00,0x00,0x00,0x00, 83 | 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, 84 | 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00, 85 | 0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00, 86 | 0x00,0x00,0x00,0x00,0x00,0x76,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00, 87 | 0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x62,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00, 88 | 0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00, 89 | 0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00, 90 | 0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00, 91 | 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00, 92 | 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xD6,0xD6,0xFE,0x6C,0x00,0x00,0x00,0x00, 93 | 0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00, 94 | 0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00, 95 | 0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00, 96 | 0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00, 97 | 0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, 98 | 0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, 99 | 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 100 | 0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00 101 | }; 102 | -------------------------------------------------------------------------------- /程序/user/bitband.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/bitband.h -------------------------------------------------------------------------------- /程序/user/dac v2.0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/dac v2.0.c -------------------------------------------------------------------------------- /程序/user/dac.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/dac.c -------------------------------------------------------------------------------- /程序/user/dac.h: -------------------------------------------------------------------------------- 1 | #ifndef __DAC_H 2 | #define __DAC_H 3 | 4 | void DAC_Config(void); 5 | void Set_DAC_Value(unsigned int vol); 6 | void DACTriggerByTIM2(unsigned short int Auto_Reload,unsigned short int Clock_Div); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /程序/user/delay v2.0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/delay v2.0.c -------------------------------------------------------------------------------- /程序/user/delay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/delay.c -------------------------------------------------------------------------------- /程序/user/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef __DELAY_H 2 | #define __DELAY_H 3 | 4 | void DelayInit(void); 5 | void delayus(unsigned int us); 6 | void delayms(unsigned int ms); 7 | void Software_Delay(unsigned int sec); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /程序/user/indkey.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/indkey.c -------------------------------------------------------------------------------- /程序/user/indkey.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/indkey.h -------------------------------------------------------------------------------- /程序/user/iwdg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/iwdg.c -------------------------------------------------------------------------------- /程序/user/iwdg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/iwdg.h -------------------------------------------------------------------------------- /程序/user/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/main.c -------------------------------------------------------------------------------- /程序/user/oscilloscope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/oscilloscope.c -------------------------------------------------------------------------------- /程序/user/oscilloscope.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/oscilloscope.h -------------------------------------------------------------------------------- /程序/user/pincfg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/pincfg.c -------------------------------------------------------------------------------- /程序/user/pincfg.h: -------------------------------------------------------------------------------- 1 | #ifndef __PINCFG_H_ 2 | #define __PINCFG_H_ 3 | 4 | #include "bitband.h" 5 | #include "stm32f10x.h" 6 | 7 | #define BOARD_LED1 PEout(0) 8 | #define BOARD_LED2 PEout(2) 9 | #define DAC_LED PEout(4) 10 | #define BEEP PEout(5) 11 | #define JDQ_ACDC PGout(5) 12 | #define JDQ_AV PGout(3) 13 | #define CD4051A PBout(12) 14 | #define CD4051B PBout(14) 15 | #define CD4051C PDout(12) 16 | #define KEY1 PBin(10) 17 | #define KEY2 PBin(11) 18 | 19 | void PinCfg_SWITCH(void); 20 | void PinCfg_JDQ(void); 21 | void PinCfg_CD4051(void); 22 | void PinCfg_KEY(void); 23 | void PinCfg(void); 24 | void PinCfg_Beep(unsigned char times); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /程序/user/pwm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/pwm.c -------------------------------------------------------------------------------- /程序/user/pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef __PWM_H 2 | #define __PWM_H 3 | 4 | void PWM_TIM3_CH2_Set_FreqAndDuty(unsigned short int freq,unsigned short int duty); 5 | void PWM_TIM3_CH2_Init(unsigned short int Auto_Reload); 6 | void PWM_TIM3_CH2_Config(unsigned short int Auto_Reload,unsigned short int Clock_Div); 7 | 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /程序/user/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/readme.txt -------------------------------------------------------------------------------- /程序/user/sdcard.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/sdcard.c -------------------------------------------------------------------------------- /程序/user/sdcard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/sdcard.h -------------------------------------------------------------------------------- /程序/user/stdarg.h: -------------------------------------------------------------------------------- 1 | /* stdarg.h: ANSI 'C' (X3J11 Oct 88) library header, section 4.8 */ 2 | /* Copyright (C) Codemist Ltd., 1988 */ 3 | /* Copyright (C) ARM Ltd., 1991-1999. All rights reserved */ 4 | 5 | /* 6 | * RCS $Revision: 152541 $ 7 | * Checkin $Date: 2010-02-23 12:26:12 +0000 (Tue, 23 Feb 2010) $ 8 | * Revising $Author: agrant $ 9 | */ 10 | 11 | #ifndef __stdarg_h 12 | #define __stdarg_h 13 | 14 | #ifndef __STDARG_DECLS 15 | #define __STDARG_DECLS 16 | 17 | #undef __CLIBNS 18 | 19 | #ifdef __cplusplus 20 | namespace std { 21 | #define __CLIBNS ::std:: 22 | extern "C" { 23 | #else 24 | #define __CLIBNS 25 | #endif /* __cplusplus */ 26 | 27 | /* 28 | * stdarg.h declares a type and defines macros for advancing through a 29 | * list of arguments whose number and types are not known to the called 30 | * function when it is translated. A function may be called with a variable 31 | * number of arguments of differing types. Its parameter list contains one or 32 | * more parameters. The rightmost parameter plays a special role in the access 33 | * mechanism, and will be called parmN in this description. 34 | */ 35 | 36 | /* N.B. is required to declare vfprintf() without defining */ 37 | /* va_list. Clearly the type __va_list there must keep in step. */ 38 | typedef struct __va_list { void *__ap; } va_list; 39 | 40 | /* 41 | * an array type suitable for holding information needed by the macro va_arg 42 | * and the function va_end. The called function shall declare a variable 43 | * (referred to as ap) having type va_list. The variable ap may be passed as 44 | * an argument to another function. 45 | * Note: va_list is an array type so that when an object of that type 46 | * is passed as an argument it gets passed by reference. 47 | */ 48 | #define va_start(ap, parmN) __va_start(ap, parmN) 49 | 50 | /* 51 | * The va_start macro shall be executed before any access to the unnamed 52 | * arguments. The parameter ap points to an object that has type va_list. 53 | * The va_start macro initialises ap for subsequent use by va_arg and 54 | * va_end. The parameter parmN is the identifier of the rightmost parameter 55 | * in the variable parameter list in the function definition (the one just 56 | * before the '...'). If the parameter parmN is declared with the register 57 | * storage class an error is given. 58 | * If parmN is a narrow type (char, short, float) an error is given in 59 | * strict ANSI mode, or a warning otherwise. 60 | * Returns: no value. 61 | */ 62 | #define va_arg(ap, type) __va_arg(ap, type) 63 | 64 | /* 65 | * The va_arg macro expands to an expression that has the type and value of 66 | * the next argument in the call. The parameter ap shall be the same as the 67 | * va_list ap initialised by va_start. Each invocation of va_arg modifies 68 | * ap so that successive arguments are returned in turn. The parameter 69 | * 'type' is a type name such that the type of a pointer to an object that 70 | * has the specified type can be obtained simply by postfixing a * to 71 | * 'type'. If type is a narrow type, an error is given in strict ANSI 72 | * mode, or a warning otherwise. If the type is an array or function type, 73 | * an error is given. 74 | * In non-strict ANSI mode, 'type' is allowed to be any expression. 75 | * Returns: The first invocation of the va_arg macro after that of the 76 | * va_start macro returns the value of the argument after that 77 | * specified by parmN. Successive invocations return the values of 78 | * the remaining arguments in succession. 79 | * The result is cast to 'type', even if 'type' is narrow. 80 | */ 81 | 82 | #define __va_copy(dest, src) ((void)((dest) = (src))) 83 | 84 | #if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) 85 | /* va_copy is in C99 and non-strict C90 and non-strict C++ 86 | * __va_copy is always present. 87 | */ 88 | #define va_copy(dest, src) ((void)((dest) = (src))) 89 | 90 | /* The va_copy macro makes the va_list dest be a copy of 91 | * the va_list src, as if the va_start macro had been applied 92 | * to it followed by the same sequence of uses of the va_arg 93 | * macro as had previously been used to reach the present state 94 | * of src. 95 | */ 96 | #endif 97 | 98 | #define va_end(ap) ((void)(ap)) 99 | /* 100 | * The va_end macro facilitates a normal return from the function whose 101 | * variable argument list was referenced by the expansion of va_start that 102 | * initialised the va_list ap. If the va_end macro is not invoked before 103 | * the return, the behaviour is undefined. 104 | * Returns: no value. 105 | */ 106 | 107 | #ifdef __cplusplus 108 | } /* extern "C" */ 109 | } /* namespace std */ 110 | #endif /* __cplusplus */ 111 | 112 | #ifdef __GNUC__ 113 | /* be cooperative with glibc */ 114 | typedef __CLIBNS va_list __gnuc_va_list; 115 | #define __GNUC_VA_LIST 116 | #undef __need___va_list 117 | #endif 118 | 119 | #endif /* __STDARG_DECLS */ 120 | 121 | #ifdef __cplusplus 122 | #ifndef __STDARG_NO_EXPORTS 123 | using ::std::va_list; 124 | #endif 125 | #endif /* __cplusplus */ 126 | 127 | #endif 128 | 129 | /* end of stdarg.h */ 130 | -------------------------------------------------------------------------------- /程序/user/stm32f10x_it.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file GPIO/IOToggle/stm32f10x_it.c 4 | * @author MCD Application Team 5 | * @version V3.0.0 6 | * @date 04/06/2009 7 | * @brief Main Interrupt Service Routines. 8 | * This file provides template for all exceptions handler and 9 | * peripherals interrupt service routine. 10 | ****************************************************************************** 11 | * @copy 12 | * 13 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 14 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 15 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 16 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 17 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 18 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 19 | * 20 | *

© COPYRIGHT 2009 STMicroelectronics

21 | */ 22 | 23 | /* Includes ------------------------------------------------------------------*/ 24 | #include "stm32f10x_it.h" 25 | #include "ucos_ii.h" 26 | 27 | 28 | /** 29 | * @brief This function handles SysTick Handler. 30 | * @param None 31 | * @retval : None 32 | */ 33 | //void SysTick_Handler(void) 34 | //{ 35 | // OSIntEnter(); 36 | // OSTimeTick(); 37 | // OSIntExit(); 38 | //} 39 | 40 | /** 41 | * @brief This function handles NMI exception. 42 | * @param None 43 | * @retval : None 44 | */ 45 | void NMI_Handler(void) 46 | { 47 | } 48 | 49 | 50 | 51 | /** 52 | * @brief This function handles Hard Fault exception. 53 | * @param None 54 | * @retval : None 55 | */ 56 | void HardFault_Handler(void) 57 | { 58 | /* Go to infinite loop when Hard Fault exception occurs */ 59 | while (1) 60 | { 61 | } 62 | } 63 | 64 | /** 65 | * @brief This function handles Memory Manage exception. 66 | * @param None 67 | * @retval : None 68 | */ 69 | void MemManage_Handler(void) 70 | { 71 | /* Go to infinite loop when Memory Manage exception occurs */ 72 | while (1) 73 | { 74 | } 75 | } 76 | 77 | /** 78 | * @brief This function handles Bus Fault exception. 79 | * @param None 80 | * @retval : None 81 | */ 82 | void BusFault_Handler(void) 83 | { 84 | /* Go to infinite loop when Bus Fault exception occurs */ 85 | while (1) 86 | { 87 | } 88 | } 89 | 90 | /** 91 | * @brief This function handles Usage Fault exception. 92 | * @param None 93 | * @retval : None 94 | */ 95 | void UsageFault_Handler(void) 96 | { 97 | /* Go to infinite loop when Usage Fault exception occurs */ 98 | while (1) 99 | { 100 | } 101 | } 102 | 103 | /** 104 | * @brief This function handles SVCall exception. 105 | * @param None 106 | * @retval : None 107 | */ 108 | void SVC_Handler(void) 109 | { 110 | } 111 | 112 | /** 113 | * @brief This function handles Debug Monitor exception. 114 | * @param None 115 | * @retval : None 116 | */ 117 | void DebugMon_Handler(void) 118 | { 119 | } 120 | 121 | /** 122 | * @brief This function handles PendSV_Handler exception. 123 | * @param None 124 | * @retval : None 125 | */ 126 | void PendSV_Handler(void) 127 | { 128 | } 129 | 130 | /******************************************************************************/ 131 | /* STM32F10x Peripherals Interrupt Handlers */ 132 | /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ 133 | /* available peripheral interrupt handler's name please refer to the startup */ 134 | /* file (startup_stm32f10x_xx.s). */ 135 | /******************************************************************************/ 136 | 137 | /** 138 | * @brief This function handles PPP interrupt request. 139 | * @param None 140 | * @retval : None 141 | */ 142 | /*void PPP_IRQHandler(void) 143 | { 144 | }*/ 145 | 146 | /** 147 | * @} 148 | */ 149 | 150 | /** 151 | * @} 152 | */ 153 | 154 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 155 | -------------------------------------------------------------------------------- /程序/user/stm32f10x_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file GPIO/IOToggle/stm32f10x_it.h 4 | * @author MCD Application Team 5 | * @version V3.0.0 6 | * @date 04/06/2009 7 | * @brief This file contains the headers of the interrupt handlers. 8 | ****************************************************************************** 9 | * @copy 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 2009 STMicroelectronics

19 | */ 20 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ 22 | #ifndef __STM32F10x_IT_H 23 | #define __STM32F10x_IT_H 24 | 25 | /* Includes ------------------------------------------------------------------*/ 26 | #include "stm32f10x.h" 27 | //#include "stm32f10x_nvic.h" 28 | //#include "stm32f10x_lib.h" 29 | /* Exported types ------------------------------------------------------------*/ 30 | /* Exported constants --------------------------------------------------------*/ 31 | /* Exported macro ------------------------------------------------------------*/ 32 | /* Exported functions ------------------------------------------------------- */ 33 | 34 | void NMIException(void); 35 | void HardFaultException(void); 36 | void MemManageException(void); 37 | void BusFaultException(void); 38 | void UsageFaultException(void); 39 | void DebugMonitor(void); 40 | void SVCHandler(void); 41 | void PendSVC(void); 42 | void SysTickHandler(void); 43 | void WWDG_IRQHandler(void); 44 | void PVD_IRQHandler(void); 45 | void TAMPER_IRQHandler(void); 46 | void RTC_IRQHandler(void); 47 | void FLASH_IRQHandler(void); 48 | void RCC_IRQHandler(void); 49 | void EXTI0_IRQHandler(void); 50 | void EXTI1_IRQHandler(void); 51 | void EXTI2_IRQHandler(void); 52 | void EXTI3_IRQHandler(void); 53 | void EXTI4_IRQHandler(void); 54 | void DMA1_Channel1_IRQHandler(void); 55 | void DMA1_Channel2_IRQHandler(void); 56 | void DMA1_Channel3_IRQHandler(void); 57 | void DMA1_Channel4_IRQHandler(void); 58 | void DMA1_Channel5_IRQHandler(void); 59 | void DMA1_Channel6_IRQHandler(void); 60 | void DMA1_Channel7_IRQHandler(void); 61 | void ADC1_2_IRQHandler(void); 62 | void USB_HP_CAN_TX_IRQHandler(void); 63 | void USB_LP_CAN_RX0_IRQHandler(void); 64 | void CAN_RX1_IRQHandler(void); 65 | void CAN_SCE_IRQHandler(void); 66 | void EXTI9_5_IRQHandler(void); 67 | void TIM1_BRK_IRQHandler(void); 68 | void TIM1_UP_IRQHandler(void); 69 | void TIM1_TRG_COM_IRQHandler(void); 70 | void TIM1_CC_IRQHandler(void); 71 | void TIM2_IRQHandler(void); 72 | void TIM3_IRQHandler(void); 73 | void TIM4_IRQHandler(void); 74 | void I2C1_EV_IRQHandler(void); 75 | void I2C1_ER_IRQHandler(void); 76 | void I2C2_EV_IRQHandler(void); 77 | void I2C2_ER_IRQHandler(void); 78 | void SPI1_IRQHandler(void); 79 | void SPI2_IRQHandler(void); 80 | void USART1_IRQHandler(void); 81 | void USART2_IRQHandler(void); 82 | void USART3_IRQHandler(void); 83 | void EXTI15_10_IRQHandler(void); 84 | void RTCAlarm_IRQHandler(void); 85 | void USBWakeUp_IRQHandler(void); 86 | void TIM8_BRK_IRQHandler(void); 87 | void TIM8_UP_IRQHandler(void); 88 | void TIM8_TRG_COM_IRQHandler(void); 89 | void TIM8_CC_IRQHandler(void); 90 | void ADC3_IRQHandler(void); 91 | void FSMC_IRQHandler(void); 92 | void SDIO_IRQHandler(void); 93 | void TIM5_IRQHandler(void); 94 | void SPI3_IRQHandler(void); 95 | void UART4_IRQHandler(void); 96 | void UART5_IRQHandler(void); 97 | void TIM6_IRQHandler(void); 98 | void TIM7_IRQHandler(void); 99 | void DMA2_Channel1_IRQHandler(void); 100 | void DMA2_Channel2_IRQHandler(void); 101 | void DMA2_Channel3_IRQHandler(void); 102 | void DMA2_Channel4_5_IRQHandler(void); 103 | #endif /* __STM32F10x_IT_H */ 104 | 105 | /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ 106 | -------------------------------------------------------------------------------- /程序/user/tft_api.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/tft_api.c -------------------------------------------------------------------------------- /程序/user/tft_api.h: -------------------------------------------------------------------------------- 1 | #ifndef __TFT_H 2 | #define __TFT_H 3 | 4 | #include "tft_drive.h" 5 | 6 | #define LCD_BUFFER_SIZE 64 7 | 8 | #define uint8 unsigned char 9 | #define uint16 unsigned short int 10 | #define uint32 unsigned int 11 | 12 | #define White 0xFFFF 13 | #define Black 0x0000 14 | #define Blue 0x001F 15 | #define Blue2 0x051F 16 | #define Red 0xF800 17 | #define Magenta 0xF81F 18 | #define Green 0x07E0 19 | #define Cyan 0x7FFF 20 | #define Yellow 0xFFE0 21 | 22 | 23 | 24 | void LCD_Write_Char(uint16 x,uint16 y,uint8 ch,uint16 Color,uint16 bColor); 25 | void LCD_Write_Char_CH(uint16 x,uint16 y,const uint8 *str,uint16 Color,uint16 bColor); 26 | void LCD_Write_String(uint16 x,uint16 y,const uint8 *p,uint16 Color,uint16 bColor); 27 | void LCD_Write_String_CH(uint16 x,uint16 y,const uint8 *str,uint16 Color,uint16 bColor); 28 | void LCD_Write_Bmp(uint16 x,uint16 y,uint16 lenth,uint16 wide,const uint8 *p); 29 | uint32 Get_GBKChineseCode(const unsigned char *c); 30 | uint32 Get_GBKSmallCode(const uint8 chn[2]); 31 | 32 | 33 | void LCD_Clear_All(uint16 bColor); 34 | void LCD_Clear_Select(uint16 x,uint16 y,uint16 len,uint16 wide,uint16 bColor); 35 | void Reset_LCD(void); 36 | 37 | void Draw_Point(uint16 x,uint16 y,uint16 Color); 38 | uint16 Get_Point(uint16 x,uint16 y); 39 | void Set_Cursor(uint16 x,uint16 y); 40 | void Draw_Line(uint16 X0,uint16 Y0,uint16 X1,uint16 Y1,uint16 color); 41 | void Draw_DottedHLine(uint16 X0,uint16 Y0,uint16 X1,uint16 Y1,uint16 color,uint16 Distance); 42 | void Draw_DottedVLine(uint16 X0,uint16 Y0,uint16 X1,uint16 Y1,uint16 color,uint16 Distance); 43 | void Draw_Rectangle( uint16 left,uint16 top,uint16 right,uint16 bottom,uint32 color); 44 | void Draw_Sin(uint16 A,uint16 T,uint16 cx,uint16 py,unsigned int color); 45 | void Draw_Circle(uint16 cx,uint16 cy,uint16 r,uint16 color,uint8 fill); 46 | void Draw_Picture(uint16 x,uint16 y,uint8 *pic); 47 | 48 | uint16 BGR_To_RGB(uint16 c); 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /程序/user/tft_drive.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/tft_drive.c -------------------------------------------------------------------------------- /程序/user/tft_drive.h: -------------------------------------------------------------------------------- 1 | #ifndef __TFT_DRIVE_H 2 | #define __TFT_DRIVE_H 3 | 4 | #include "tft_api.h" 5 | 6 | #define Bank1_LCD_D ((uint32_t)0x60020000) //disp Data ADDR 7 | #define Bank1_LCD_C ((uint32_t)0x60000000) //disp Reg ADDR 8 | 9 | 10 | void LCD1963_Init(void); 11 | void FSMC_LCD_Init(void); 12 | unsigned short LCD_RD_data(void); 13 | void LCD_WR_CMD(unsigned int index,unsigned int val); 14 | void LCD_WR_Data(unsigned int val); 15 | void LCD_WR_Data_8(unsigned int val); 16 | void LCD_WR_REG(unsigned int index); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /程序/user/timer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/timer.c -------------------------------------------------------------------------------- /程序/user/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIMER_H 2 | #define __TIMER_H 3 | 4 | #include "misc.h" 5 | 6 | void TIM5_Set_Time(unsigned short int Auto_Reload); 7 | void TIM5_Config(unsigned short int Period,unsigned short int Prescaler); 8 | void TIM4_Config(unsigned short int Period,unsigned short int Prescaler); 9 | int GetSquareWaveHightLevelTime(void); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /程序/user/tsc2046.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/tsc2046.c -------------------------------------------------------------------------------- /程序/user/tsc2046.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/tsc2046.h -------------------------------------------------------------------------------- /程序/user/usart1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/usart1.c -------------------------------------------------------------------------------- /程序/user/usart1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/程序/user/usart1.h -------------------------------------------------------------------------------- /设计文档/STM32示波器通信协议.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/设计文档/STM32示波器通信协议.xlsx -------------------------------------------------------------------------------- /设计文档/增益计算表.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/设计文档/增益计算表.xlsx -------------------------------------------------------------------------------- /设计文档/用四个字节十六进制数表示单精度浮点数.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/设计文档/用四个字节十六进制数表示单精度浮点数.docx -------------------------------------------------------------------------------- /设计文档/示波器时间表.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/设计文档/示波器时间表.docx -------------------------------------------------------------------------------- /设计文档/设计指标.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sky-Tim/OSC_STM32/590b368aed220f6965b6615578a04ff98a36b7d7/设计文档/设计指标.docx --------------------------------------------------------------------------------