-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasrTimer.h
More file actions
37 lines (26 loc) · 1.69 KB
/
asrTimer.h
File metadata and controls
37 lines (26 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/********************************************************************/
/* Description: GPTを用いたインターバルタイマの設定 */
/* File: asrTimer.h */
/* Date: 2024/07/19 */
/* Author: Takashi YOSHIOKA */
/********************************************************************/
/********************************************************************/
/* 多重インクルード防止 */
/********************************************************************/
#ifndef _ASRTIMER_H_
#define _ASRTIMER_H_
/********************************************************************/
/* ヘッダファイルのインクルード */
/********************************************************************/
#include <Arduino.h>
#include "motorVar.h"
/********************************************************************/
/* 各種定数定義 */
/********************************************************************/
static constexpr uint16_t INT_GPT_FREQ = 3000; // インターバルタイマ クロック周波数 [kHz]
static constexpr uint16_t PERIOD_ASR_SET = (uint16_t)((uint32_t)INT_GPT_FREQ*PERIOD_ASR/1000); // ASR演算周期のカウント値換算
/********************************************************************/
/* 外部公開関数のプロトタイプ宣言 */
/********************************************************************/
void setup_asr_scan(void);
#endif /* END _ASRTIMER_H_ */