44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/*----------------------------------------------------------------------------
|
|
* Copyright (c) Fenda Technologies Co., Ltd. 2021. All rights reserved.
|
|
*
|
|
* Description: ppg_api.h
|
|
*
|
|
* Author: shey.tanxiaoyu
|
|
*
|
|
* Create: 2022-04-20
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef __PPG_API__H
|
|
#define __PPG_API__H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include "ppg_drv_gh3011.h"
|
|
|
|
typedef enum {
|
|
PPG_EVENT_IRQ,
|
|
PPG_EVENT_QUEUQ_IRQ,
|
|
} ppg_event_e;
|
|
|
|
typedef void (*ppg_event_handler_ptr)(ppg_event_e);
|
|
|
|
void ppg_api_queue_irq_handler(void);
|
|
int32_t ppg_api_init(void);
|
|
int32_t ppg_api_get_chip_id(uint16_t *chip_id);
|
|
int32_t ppg_api_get_run_mode(uint8_t *run_mode); //GH3011_RUN_MODE
|
|
int32_t ppg_api_open(GH3011_RUN_MODE run_mode, ppg_event_handler_ptr event_cb);
|
|
void ppg_api_close(void);
|
|
void ppg_api_read(int32_t read_buf[][2], uint16_t *read_len);
|
|
void ppg_api_current_set(uint16_t cur0, uint16_t cur1, uint16_t cur2);
|
|
void ppg_api_current_get(uint16_t *cur0, uint16_t *cur1, uint16_t *cur2);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __PPG_API__H */
|
|
|