oscilloscope/User/OSC/OSC.h

46 lines
1.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __OSC_H
#define __OSC_H
#include "rtthread.h"
#include "stm32f10x_it.h"
//操作系统变量
extern rt_mq_t setting_data_queue;
extern rt_mq_t getwave_status_queue;
//线程
extern rt_thread_t GetWave_thread;
//可设置项
extern int8_t SamplStatusNrb;
extern int8_t TriggerModeNrb;
extern int8_t SamplingModeNrb;
extern char* CurSamplStatus; //代号0采样状态0停止采样1正在采样
extern float CurTriggerValue; //代号1触发阀值
extern char* CurTriggerMode; //代号2触发模式0下降沿触发1上升沿触发2上升沿下降沿触发
extern char* CurSamplingMode; //代号3采样模式0自动1普通2单次
extern uint32_t CurTimePerDiv; //代号4每格代表的时间间隔
//要显示的信息
extern __IO uint16_t ADC_ConvertedValue[];//ADC采集数据
extern double CurWaveFrq;//波形频率单位kHz
extern uint32_t TimePerDiv_Group[];
extern uint8_t TimePerDivOderNbr;
extern int8_t TimePerDivOder;//当前每格间隔时间的序号
extern char* SamplStatus[];
extern FlagStatus StopSample;
void Setting_Inf_Update(uint8_t CurSetItem);
void PlotBlackground(void);
void CalculateFrequency(void);
void PlotWave(void* parameter);
void Init(void);
void Run(void);
#endif /* __OSC_H */