From ae571ba4bd03376959bec05dc205ffc964b10fb9 Mon Sep 17 00:00:00 2001 From: RobertGawron Date: Sat, 13 Jul 2019 10:49:50 +0100 Subject: [PATCH] cleanup in initializers --- software/Firmware/Inc/PulseCounter.h | 4 +--- software/Firmware/Inc/VoltageSensorActualValue.h | 4 ++-- software/Firmware/Src/ApplicationBuilder.c | 8 +++----- software/Firmware/Src/Logger.c | 4 +--- software/Firmware/Src/PulseCounter.c | 2 +- software/Firmware/Src/VoltageSensorActualValue.c | 4 ++-- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/software/Firmware/Inc/PulseCounter.h b/software/Firmware/Inc/PulseCounter.h index d17327b..8817cd8 100755 --- a/software/Firmware/Inc/PulseCounter.h +++ b/software/Firmware/Inc/PulseCounter.h @@ -8,9 +8,7 @@ #ifndef INC_PULSECOUNTER_H_ #define INC_PULSECOUNTER_H_ -#include "CommonDataTypes.h" - -void PulseCounter_Init(uint8_t pin); +void PulseCounter_Init(); void PulseCounter_Tick(); diff --git a/software/Firmware/Inc/VoltageSensorActualValue.h b/software/Firmware/Inc/VoltageSensorActualValue.h index 71a65a0..0fd5d42 100755 --- a/software/Firmware/Inc/VoltageSensorActualValue.h +++ b/software/Firmware/Inc/VoltageSensorActualValue.h @@ -18,9 +18,9 @@ typedef struct MCP3425A0TConfig_t { -void MCP3425A0T_Init(MCP3425A0TConfig_t *config); +void MCP3425A0T_Init(); -bool MCP3425A0T_GeMeasurementData(/*MCP3425A0TConfig_t *config, MCP3425A0TMeasurementData_t *measurementData*/); +bool MCP3425A0T_GeMeasurementData(MCP3425A0TMeasurementData_t *measurementData); #endif /* SRC_MCP3425A0T_H_ */ diff --git a/software/Firmware/Src/ApplicationBuilder.c b/software/Firmware/Src/ApplicationBuilder.c index a1c829c..337fa60 100755 --- a/software/Firmware/Src/ApplicationBuilder.c +++ b/software/Firmware/Src/ApplicationBuilder.c @@ -15,18 +15,16 @@ #include "VoltageSensorActualValue.h" #include "VoltageSensorPeakValue.h" -static MCP3425A0TConfig_t adcConfig[]={{PIN_ADC_CHIP_1}, {PIN_ADC_CHIP_2}}; - - void ApplicationBuilder_Init() { ClockConfigurator_Init(); TimerConfigurator_Init(); Logger_Init(); - PulseCounter_Init(PIN_PULSE_COUNTER); + PulseCounter_Init(); UserInterface_Init(); - + MCP3425A0T_Init(); + enableInterrupts(); UserInterface_ShowMessage(USER_INTERFAE_STATE_OK_MSG); diff --git a/software/Firmware/Src/Logger.c b/software/Firmware/Src/Logger.c index 71f9c2f..6eabcd5 100755 --- a/software/Firmware/Src/Logger.c +++ b/software/Firmware/Src/Logger.c @@ -61,9 +61,7 @@ void Logger_Init() void Logger_Tick() { - printf ("xyz"); - //printf ('y'); - //printf ('z'); + printf ("ok "); } diff --git a/software/Firmware/Src/PulseCounter.c b/software/Firmware/Src/PulseCounter.c index 30bdeda..2db9f4c 100755 --- a/software/Firmware/Src/PulseCounter.c +++ b/software/Firmware/Src/PulseCounter.c @@ -7,7 +7,7 @@ #include "PulseCounter.h" -void PulseCounter_Init(uint8_t pin) +void PulseCounter_Init() { } diff --git a/software/Firmware/Src/VoltageSensorActualValue.c b/software/Firmware/Src/VoltageSensorActualValue.c index 35ec9e6..18ef8cc 100755 --- a/software/Firmware/Src/VoltageSensorActualValue.c +++ b/software/Firmware/Src/VoltageSensorActualValue.c @@ -9,14 +9,14 @@ #include "stm8s_i2c.h" -void MCP3425A0T_Init(MCP3425A0TConfig_t *config) +void MCP3425A0T_Init() { I2C_DeInit(); } -bool MCP3425A0T_GeMeasurementData(/*MCP3425A0TConfig_t *config, MCP3425A0TMeasurementData_t *measurementData*/) +bool MCP3425A0T_GeMeasurementData(MCP3425A0TMeasurementData_t *measurementData) { return TRUE; }