48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description: tp_api.h
|
|
*
|
|
* Author: luziquan@ss-tjd.com
|
|
*
|
|
* Create: 2024-04-18
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TP_API_H
|
|
#define TP_API_H
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
#endif /* __cplusplus */
|
|
|
|
#include "stdint.h"
|
|
#include "sys_config.h"
|
|
#include <stdbool.h>
|
|
|
|
typedef bool (*tp_touch_event)(void);
|
|
|
|
typedef struct {
|
|
uint32_t (*set_open)(uint8_t open);
|
|
uint32_t (*get_rawdata)(uint8_t *ret_buf);
|
|
uint32_t (*get_chipid)(uint16_t *ret_buf);
|
|
uint32_t (*get_version)(uint16_t *ret_buf);
|
|
uint32_t (*fwupg_auto_upgrade)(void);
|
|
uint32_t (*set_power_mode)(uint8_t power_mode);
|
|
} tp_at_cmd_api;
|
|
|
|
void *tjd_driver_tp_get_at_cmd_api(void);
|
|
void *tjd_driver_tp_get_api(void);
|
|
void *tjd_driver_tp_get_peri_attr(void);
|
|
void tjd_driver_tp_set_wakeup_enable(uint8_t enable);
|
|
void tjd_driver_tp_register_touch_event(tp_touch_event func);
|
|
void tjd_driver_tp_unregister_touch_event(void);
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
#endif /* __cplusplus */
|
|
|
|
#endif |