Обновление

This commit is contained in:
cfif 2026-02-05 10:59:40 +03:00
parent 28a87268f1
commit 2519f4815f
2 changed files with 7 additions and 2 deletions

6
Pwms.c
View File

@ -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
View File

@ -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