资源简介
DSO138示波器源码,需要的同学可以尝试自己移植,很好的学习资料
代码片段和文件信息
//////////////////////////////////////////////////////////////////////////////
//
// Filename: 113-13801.c
// Version:
// Data:
//
// Author: Liu Zemin
// Company: JYE Tech
//
//-----------------------------------------------------------------------------
//
// Target: STM32F103C8
// Tool chain: CodeSourcery G++
//
// Descriptions: Main firmware for low-cost DSO kit
// PCB: 109-13800-00C
//-----------------------------------------------------------------------------
// Required files:
//
//-----------------------------------------------------------------------------
// ATTENTION:
//-----------------------------------------------------------------------------
// Revision History:
//
//
///////////////////////////////////////////////////////////////////////////////
#include “stm32f10x.h“
#include “stm32f10x_conf.h“
#include “Common.h“
#include “Board.h“
#include “Screen.h“
#include “Command.h“
#include “Eeprom.h“
#include “libdso138.h“
int main (void)
{
U16 tmp1 tmp2;
Clock_Init();
Port_Init();
// Check SW4 pin. If the pin is read LOW enter TEST mode
tmp1 = (PB_Port & PB_Bits) | ~PB_Bits;
if(!BitTest(tmp1 0x8000)) {
// Enter TEST mode
TestMode();
}
/* Unlock the Flash Program Erase controller */
FLASH_Unlock();
/* EEPROM Init */
EE_Init();
TFT_Init_Ili9341();
USART1_Init();
uputs((U8 *)“Uart1 Ok\n\r“ USART1);
SysTick_Init();
TIM3_Init();
TIM4_Init();
ADC2_Init();
AppInit();
tmp1 = clBlack;
PutsGenic(24 120 (U8 *)“FW: 113-13801-037“ clWhite tmp1 &ASC8X16);
PutsGenic(24 140 (U8 *)LibVersion clWhite tmp1 &ASC8X16);
PutsGenic(24 180 (U8 *)“Booting...“ clWhite tmp1 &ASC8X16);
// LED blink twice
Ledblink();
NVIC_Configuration();
Flags = 0;
// Uncomment the following line to disable display of scope panel
// NoScopePanel = 1;
while(1) {
// ============================
// Note: Keep this section in the main loop for proper capture engine running
// even scope panel display is disabled.
DsoDisplay();
tmp1 = GetDsoStatus();
// --------------------------------------------------------
if(BitTest(tmp1 DSO_NormalDisplay)) {
// Add your diaplay codes here
}
// --------------------------------------------------------
if(GTimeout) {
GTimeout = 0;
StartCapture();
}
// ============================
if(BitTest(Keypad.Flags (1 << KF_DoKeyScan))) {
BitClr(Keypad.Flags (1 << KF_DoKeyScan));
// Do key scan
KeyScan();
}
if(Keypad.KeyCode) {
// Process key code
KeyProc();
Keypad.KeyCode = 0;
}
if(GTimer == 0) {
if(BitTest(tmp1 DSO_CaptureDone)) {
UpdateDisp(Disp_Trace);
tmp2 = GetTimebase();
if(tmp2 <= TB_1ms) {
// Start next capture
StartCapture();
}
else {
// Lower capture rate
GTimer = 40;
}
}
}
if(BitTest(tmp1 DSO_Rolling)) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 51089 2015-03-04 21:16 Board.c
文件 46436 2014-12-25 15:03 Board.h
文件 12458 2015-03-06 13:04 Command.c
文件 2610 2015-03-06 13:03 Command.h
文件 978 2014-12-19 01:33 Common.c
文件 1933 2014-12-19 01:33 Common.h
文件 21056 2014-10-30 04:22 Eeprom.c
文件 3940 2014-10-30 04:18 Eeprom.h
文件 26696 2015-03-07 15:36 libdso138.a
文件 3661 2015-03-04 23:21 libdso138.h
文件 19723 2015-03-03 23:44 Makefile
文件 2927 2015-03-06 16:46 readme.txt
文件 31239 2014-12-19 01:42 Screen.c
文件 3625 2015-03-05 20:34 Screen.h
文件 10154 2010-04-22 21:40 startup_stm32f10x_md.S
文件 7213 2014-08-31 02:56 STM32F10x_64k_20k_flash.ld
文件 3206 2014-10-30 02:47 stm32f10x_conf.h
文件 4648 2014-12-25 22:34 stm32f10x_it.c
文件 1923 2014-09-20 03:52 stm32f10x_it.h
文件 31997 2010-04-22 21:40 system_stm32f10x.c
文件 17273 2012-03-28 03:59 Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2012-03-28 03:59 Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
文件 621135 2012-03-28 03:59 Libraries\CMSIS\CM3\CoreSupport\stm32f10x.h
文件 31997 2012-03-28 03:59 Libraries\CMSIS\CM3\CoreSupport\system_stm32f10x.c
文件 2068 2012-03-28 03:59 Libraries\CMSIS\CM3\CoreSupport\system_stm32f10x.h
文件 19836 2012-03-28 03:59 Libraries\CMSIS\CM3\DeviceSupport\ST\Release_Notes_for_STM32F10x_CMSIS.html
文件 15761 2012-03-28 03:59 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15498 2012-03-28 03:59 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 12371 2012-03-28 03:59 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13651 2012-03-28 03:59 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
............此处省略98个文件信息
- 上一篇:哨兵2号数据波段说明
- 下一篇:基于CAFFE的人脸识别系统
评论
共有 条评论