43 lines
931 B
C
43 lines
931 B
C
//
|
|
// Created by cfif on 17.11.22.
|
|
//
|
|
|
|
#ifndef PWM_CAPTURE_FLAGCHIP_H
|
|
#define PWM_CAPTURE_FLAGCHIP_H
|
|
|
|
#include "PwmIO.h"
|
|
#include "cmsis_os2.h"
|
|
#include "fc7xxx_driver_tpu.h"
|
|
#include "interrupt_manager.h"
|
|
|
|
typedef struct {
|
|
uint32_t ActiveTime;
|
|
uint32_t PeriodTime;
|
|
} tPwmCaptureData;
|
|
|
|
typedef struct {
|
|
|
|
TPU_InterruptCfgType etpu_Int_config_tbl;
|
|
TPU_CaptureCfgType etpu_captureconfig_tbl;
|
|
|
|
uint8_t TPU_CAPTURE_CHANNEL;
|
|
|
|
osMessageQueueId_t q_u32PeriodActiveTime;
|
|
|
|
} tPwmCaptureFlagchip;
|
|
|
|
|
|
void PWM_Capture_Initial(
|
|
tPwmCaptureFlagchip *env,
|
|
bool isDeInit,
|
|
uint8_t TPU_CAPTURE_CHANNEL,
|
|
uint8 TPU_PRIORITY,
|
|
TPU_EventCallbackType Bsp_Tpu_PwmCallback,
|
|
TPU_TCR1OverflowCallbackType Bsp_Tpu_OverflowCallBack);
|
|
|
|
tPwmCaptureIO vPwmCaptureGetIo(tPwmCaptureFlagchip *env);
|
|
|
|
void Get_Set_Tpu_PwmCaptureCallback(tPwmCaptureFlagchip *env);
|
|
|
|
#endif //PWM_CAPTURE_FLAGCHIP_H
|