36 lines
765 B
C
36 lines
765 B
C
/*
|
|
* Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef __AMLOGIC_WATCHKEY_H
|
|
#define __AMLOGIC_WATCHKEY_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Key type definition */
|
|
#define WATCHKEY_ID_ADCKEY 0
|
|
#define WATCHKEY_ID_GPIOKEY 1
|
|
|
|
typedef void (*ctrl_callback)(uint16_t id, bool active);
|
|
|
|
void vWatchKeyCreate(uint16_t id, ctrl_callback callback);
|
|
void vWatchKeyDestroy(uint16_t id);
|
|
void vWatchKeyInit(void);
|
|
void vWatchKeyDeinit(void);
|
|
void vWatchKeySetTest(uint16_t id, bool value);
|
|
void vWatchKeySetData(uint16_t id, uint32_t d0, uint32_t d1, uint32_t d2);
|
|
bool xWatchKeyIsActive(uint16_t id);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __AMLOGIC_WATCHKEY_H */
|