ls1x-master-v0.4/private/ls1c103/ls1c103_timer.h
2024-11-27 15:39:05 +08:00

30 lines
871 B
C
Executable File
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 _LS1C103_TIMER_H_
#define _LS1C103_TIMER_H_
#include"Config.h"
#include"test.h"
typedef struct
{
INT32U begin;
INT32U end;
} TIMER_COUNT;
typedef struct //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD>ӽṹ<D3BD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
INT32U TimeStart;//ʱ<><CAB1><EFBFBD><EFBFBD>ʼʱ<CABC><CAB1>
INT32U TimeInter;//<2F><><EFBFBD>ʱ<EFBFBD><CAB1>
} tsTimeType;
INT32U get_count(void);
void start_count(TIMER_COUNT *timer_count);
INT32U stop_count(TIMER_COUNT *timer_count);
void delay_cycle(INT32U num);
void delay_us(INT32U x); //us<75><73>λ,<2C><>׼<EFBFBD><D7BC>ʱ
void delay_ms(INT32U x); //ms<6D><73>λ,<2C><>׼<EFBFBD><D7BC>ʱ
void delay_s(INT32U x); //s <20><>λ,<2C><>׼<EFBFBD><D7BC>ʱ
void SetTime(tsTimeType *TimeType, INT32U TimeInter); //<2F><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>?
INT8U CompareTime(tsTimeType *TimeType);//<2F>ȽϺ<C8BD><CFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><D0B7><EFBFBD>ֵ<EFBFBD><D6B5>ֻҪ<D6BB><D2AA><EFBFBD><EFBFBD><EFBFBD><E1B9B9>ָ<EFBFBD><EFBFBD><EBBCB4>
#endif