qdec.h
Go to the documentation of this file.
1 /********************************************************************************************************
2  * @file putchar.h
3  *
4  * @brief This is the head file for TLSR8258
5  *
6  * @author Driver Group
7  * @date December 5, 2018
8  *
9  * @par Copyright (c) 2018, Telink Semiconductor (Shanghai) Co., Ltd.
10  * All rights reserved.
11  *
12  * The information contained herein is confidential property of Telink
13  * Semiconductor (Shanghai) Co., Ltd. and is available under the terms
14  * of Commercial License Agreement between Telink Semiconductor (Shanghai)
15  * Co., Ltd. and the licensee or the terms described here-in. This heading
16  * MUST NOT be removed from this file.
17  *
18  * Licensees are granted free, non-transferable use of the information in this
19  * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
20  * @par History:
21  * 1.initial release(DEC. 26 2018)
22  *
23  * @version A001
24  *
25  *******************************************************************************************************/
26 #pragma once
27 
28 #include "clock.h"
29 #include "pm.h"
30 #include "analog.h"
31 #include "register.h"
32 
36 typedef enum
37 {
46 
48 
52 typedef enum
53 {
63 
64 
65 #define reg_qdec_set 0xd1
66 #define reg_qdec_channel_a 0xd2
67 #define reg_qdec_channel_b 0xd3
68 
69 #define reg_qdec_mode 0xd7
70 
74 typedef enum
75 {
79 
80 #define rge_qdec_load 0xd8
81 #define reg_qdec_count 0xd0
82 #define reg_qdec_reset 0xd6
83 
91 
98 
104 void qdec_clk_en(void);
105 
111 unsigned char qdec_get_count_value(void);
112 
118 void qdec_clear_conuter(void);
119 
125 void qdec_set_debouncing(char thrsh);
126  //end of GP8
Definition: qdec.h:38
QDEC_InputAchTypeDef
Definition: qdec.h:36
Definition: qdec.h:39
Definition: qdec.h:55
QDEC_ModeTypeDef
Definition: qdec.h:74
void qdec_set_pin(QDEC_InputAchTypeDef channelA, QDEC_InputBchTypeDef channelB)
This function servers to set input port.
Definition: qdec.h:41
unsigned char qdec_get_count_value(void)
This function servers to read hardware counting value.
Definition: qdec.h:59
Definition: qdec.h:76
QDEC_InputBchTypeDef
Definition: qdec.h:52
Definition: qdec.h:58
Definition: qdec.h:44
Definition: qdec.h:57
Definition: qdec.h:40
Definition: qdec.h:42
void qdec_clk_en(void)
This function servers to initials qedc source clock.
Definition: qdec.h:61
void qdec_set_debouncing(char thrsh)
This function servers to set hardware debouncing.
void qdec_set_mode(QDEC_ModeTypeDef mode)
This function servers to set qdec's mode.
Definition: qdec.h:54
void qdec_clear_conuter(void)
This function servers to reset the counter.
Definition: qdec.h:77
Definition: qdec.h:43
Definition: qdec.h:56
Definition: qdec.h:60
Definition: qdec.h:45