代码拉取完成,页面将自动刷新
#ifndef HWTIMER_H
#define HWTIMER_H
//#include <qglobal.h>
#define HIGH_SPEED // 启用高速度低精度运算,将降低 calcTimerReload32 calcTimerReload64 两个算法的结束条件
#ifdef QT_VERSION
typedef qint32 rt_int32_t;
typedef quint32 rt_uint32_t;
typedef quint64 rt_uint64_t;
typedef quint8 rt_uint8_t;
#else
typedef signed int rt_int32_t;
typedef unsigned int rt_uint32_t;
typedef unsigned long long rt_uint64_t;
typedef unsigned char rt_uint8_t;
#endif
typedef struct rt_hwtimerval
{
rt_int32_t sec; /* second */
rt_int32_t usec; /* microsecond */
} rt_hwtimerval_t;
/* Timer Feature Information */
struct rt_hwtimer_info
{
rt_int32_t maxfreq; /* the maximum count frequency timer support */
rt_int32_t minfreq; /* the minimum count frequency timer support */
rt_uint8_t cntmode; /* count mode (inc/dec) */
};
typedef struct rt_hwtimer_device
{
rt_uint32_t maxcnt; /* counter maximum value */
rt_int32_t freq; /* counting frequency set by the user */
float period_sec;
rt_int32_t cycles; /* how many times will generate a timeout event after overflow */
rt_int32_t reload; /* reload cycles(using in period mode) */
rt_uint32_t counter;
} rt_hwtimer_t;
extern rt_uint32_t calcTimerReload1(rt_hwtimer_t *timer, rt_hwtimerval_t *tv);
extern rt_uint32_t calcTimerReload2(rt_hwtimer_t *timer, rt_hwtimerval_t *tv);
extern void presisionTest();
extern void speedTest();
extern void longTest();
#endif // HWTIMER_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。