diff --git a/Pwms.c b/Pwms.c index d1889d9..ae358e8 100644 --- a/Pwms.c +++ b/Pwms.c @@ -5,6 +5,8 @@ #include "fc7xxx_driver_port.h" #include "Pwms.h" +#define LOG_SIGN "INIT" +#define LOGGER logger tPwms PWMS; @@ -24,7 +26,7 @@ void Bsp_Tpu_Capture_OverflowCallBack(void) { asm("nop"); } -void Pwms_Init() { +void Pwms_Init(tLoggerInterface *logger) { tPwms *env = &PWMS; PORT_InitType tInitStruct = {0}; @@ -76,6 +78,8 @@ void Pwms_Init() { Bsp_Tpu_Capture_OverflowCallBack ); + LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization PWM - OK") + env->pwmCaptureIO = vPwmCaptureGetIo(&env->pwmCapture); } diff --git a/Pwms.h b/Pwms.h index fe1913f..bdd9278 100644 --- a/Pwms.h +++ b/Pwms.h @@ -7,6 +7,7 @@ #include "PwmFlagchip.h" #include "PwmCaptureFlagchip.h" +#include "LoggerInterface.h" typedef struct { tPwmFlagchip pwm; @@ -19,6 +20,6 @@ typedef struct { extern tPwms PWMS; -void Pwms_Init(); +void Pwms_Init(tLoggerInterface *logger); #endif //FLAG_PWMS_H