Обновление
This commit is contained in:
parent
28a87268f1
commit
2519f4815f
6
Pwms.c
6
Pwms.c
|
|
@ -5,6 +5,8 @@
|
||||||
#include "fc7xxx_driver_port.h"
|
#include "fc7xxx_driver_port.h"
|
||||||
#include "Pwms.h"
|
#include "Pwms.h"
|
||||||
|
|
||||||
|
#define LOG_SIGN "INIT"
|
||||||
|
#define LOGGER logger
|
||||||
|
|
||||||
tPwms PWMS;
|
tPwms PWMS;
|
||||||
|
|
||||||
|
|
@ -24,7 +26,7 @@ void Bsp_Tpu_Capture_OverflowCallBack(void) {
|
||||||
asm("nop");
|
asm("nop");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pwms_Init() {
|
void Pwms_Init(tLoggerInterface *logger) {
|
||||||
tPwms *env = &PWMS;
|
tPwms *env = &PWMS;
|
||||||
|
|
||||||
PORT_InitType tInitStruct = {0};
|
PORT_InitType tInitStruct = {0};
|
||||||
|
|
@ -76,6 +78,8 @@ void Pwms_Init() {
|
||||||
Bsp_Tpu_Capture_OverflowCallBack
|
Bsp_Tpu_Capture_OverflowCallBack
|
||||||
);
|
);
|
||||||
|
|
||||||
|
LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization PWM - OK")
|
||||||
|
|
||||||
env->pwmCaptureIO = vPwmCaptureGetIo(&env->pwmCapture);
|
env->pwmCaptureIO = vPwmCaptureGetIo(&env->pwmCapture);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
Pwms.h
3
Pwms.h
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "PwmFlagchip.h"
|
#include "PwmFlagchip.h"
|
||||||
#include "PwmCaptureFlagchip.h"
|
#include "PwmCaptureFlagchip.h"
|
||||||
|
#include "LoggerInterface.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
tPwmFlagchip pwm;
|
tPwmFlagchip pwm;
|
||||||
|
|
@ -19,6 +20,6 @@ typedef struct {
|
||||||
|
|
||||||
extern tPwms PWMS;
|
extern tPwms PWMS;
|
||||||
|
|
||||||
void Pwms_Init();
|
void Pwms_Init(tLoggerInterface *logger);
|
||||||
|
|
||||||
#endif //FLAG_PWMS_H
|
#endif //FLAG_PWMS_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue