PAN1080 Peripheral API
Macros | Functions
pan_kscan.h File Reference

Panchip series kscan driver header file. More...

Go to the source code of this file.

Macros

#define KS_PERIPHRAL_ENABLE   (0X00000001)
 
#define KS_WAKEUP_ENABLE   (0X00000002)
 
#define KS_WAKEUP_AND_PERIPH_ENABLE   (0X00000003)
 
#define KS_INTERVAL_TIME_CLK_1   (0X0)
 
#define KS_INTERVAL_TIME_CLK_2   (0X1)
 
#define KS_INTERVAL_TIME_CLK_4   (0X2)
 
#define KS_INTERVAL_TIME_CLK_8   (0X3)
 
#define KS_INTERVAL_TIME_CLK_16   (0X4)
 
#define KS_INTERVAL_TIME_CLK_32   (0X5)
 
#define KS_INTERVAL_TIME_CLK_64   (0X6)
 
#define KS_INTERVAL_TIME_CLK_128   (0X7)
 
#define KS_INTERVAL_TIME_CLK_256   (0X8)
 
#define KS_INTERVAL_TIME_CLK_512   (0X9)
 
#define KS_INTERVAL_TIME_CLK_1024   (0XA)
 
#define KS_INTERVAL_TIME_CLK_2048   (0XB)
 
#define KS_INTERVAL_TIME_CLK_4K   (0XC)
 
#define KS_INTERVAL_TIME_CLK_8K   (0XD)
 
#define KS_INTERVAL_TIME_CLK_16K   (0XE)
 
#define KS_INTERVAL_TIME_CLK_32K   (0XF)
 

Functions

__STATIC_INLINE void KS_Enable (KSCAN_T *ks, FunctionalState NewState, uint32_t func)
 This function is set keyscan enable bit. More...
 
__STATIC_INLINE void KS_InputEnable (KSCAN_T *ks, FunctionalState NewState, uint32_t func)
 This function is set keyscan input enable function. More...
 
__STATIC_INLINE void KS_OutputEnable (KSCAN_T *ks, FunctionalState NewState, uint32_t func)
 This function is set keyscan output enable function. More...
 
__STATIC_INLINE void KS_IntEnable (KSCAN_T *ks, FunctionalState NewState)
 This function is used to check keyscan status. More...
 
__STATIC_INLINE bool KS_StatusCheck (KSCAN_T *ks, uint32_t func)
 This function is used to check keyscan status. More...
 
__STATIC_INLINE void KS_ClearFlag (KSCAN_T *ks, uint32_t func)
 This function is used to clear keyscan status. More...
 
__STATIC_INLINE void KS_SetKeyscanPolarity (KSCAN_T *ks, FunctionalState NewState)
 This function is used to set keyscan polarity as high. More...
 
__STATIC_INLINE void KS_ClearKeyscanStatus (KSCAN_T *ks, FunctionalState NewState)
 This function is used to clear all key status enable. More...
 
__STATIC_INLINE void KS_SetFrameInterval (KSCAN_T *ks, uint32_t func)
 This function is used to set keyscan interval time between current frame to next. More...
 
__STATIC_INLINE uint32_t KS_GetFrameInterval (KSCAN_T *ks)
 This function is used to get keyscan interval time between current frame to next. More...
 
__STATIC_INLINE void KS_SetRowInterval (KSCAN_T *ks, uint32_t func)
 This function is used to set keyscan interval time between current row to next. More...
 
__STATIC_INLINE uint32_t KS_GetRowInterval (KSCAN_T *ks)
 This function is used to get keyscan interval time between current row to next. More...
 
__STATIC_INLINE void KS_SetDebounceTime (KSCAN_T *ks, uint32_t func)
 This function is used to set keyscan debounce time. More...
 
__STATIC_INLINE uint32_t KS_GetDebounceTime (KSCAN_T *ks)
 This function is used to get keyscan debounce time. More...
 
__STATIC_INLINE void KS_WaitScanFinish (KSCAN_T *ks, bool enable)
 This function is used to enable keyscan delay function,if enabled isr will reported after scan finish. More...
 
uint32_t KS_ReadKeyRowInfo (KSCAN_T *ks, uint8_t rowIdx)
 This function is used to read key info. More...
 
bool KS_IsKeyPressed (KSCAN_T *ks, uint8_t rowIdx, uint8_t colIdx)
 This function is used to read key info. More...
 

Detailed Description

Panchip series kscan driver header file.

Version
V1.00
Revision
3
Date
21/11/19 18:33