kopia lustrzana https://github.com/RobertGawron/IonizationChamber
Merge pull request #49 from RobertGawron/feature/basic_sw_components_implementation
added datalogger module, changed cpu id, added ledpull/50/head
commit
b104df06e0
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* DataLogger.h
|
||||
*
|
||||
* Created on: 16.06.2019
|
||||
* Author: robert
|
||||
*/
|
||||
|
||||
#ifndef INC_DATALOGGER_H_
|
||||
#define INC_DATALOGGER_H_
|
||||
|
||||
#include "CommonDataTypes.h"
|
||||
|
||||
bool DataLogger_Init();
|
||||
|
||||
void DataLogger_Tick();
|
||||
|
||||
#endif /* INC_DATALOGGER_H_ */
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
#include "PinoutConfiguration.h"
|
||||
#include "MCP3425A0T.h"
|
||||
#include "PeakDetector.h"
|
||||
#include "DataLogger.h"
|
||||
|
||||
|
||||
static MCP3425A0TConfig_t adcConfig[]={{ADC_CHIP_1_PIN}, {ADC_CHIP_2_PIN}};
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* DataLogger.c
|
||||
*
|
||||
* Created on: 16.06.2019
|
||||
* Author: robert
|
||||
*/
|
||||
|
||||
#include "DataLogger.h"
|
||||
|
||||
bool DataLogger_Init()
|
||||
{
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void DataLogger_Tick()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -9,8 +9,15 @@
|
|||
#include "stm8s_it.h"
|
||||
#include "ApplicationBuilder.h"
|
||||
|
||||
#define LED_GPIO_PORT (GPIOD)
|
||||
#define LED_GPIO_PINS (GPIO_PIN_2 | GPIO_PIN_3)
|
||||
|
||||
int main( void )
|
||||
{
|
||||
// just to test if the firmware is alive
|
||||
GPIO_Init(LED_GPIO_PORT, (GPIO_Pin_TypeDef)LED_GPIO_PINS, GPIO_MODE_OUT_PP_LOW_FAST);
|
||||
GPIO_WriteReverse(LED_GPIO_PORT, (GPIO_Pin_TypeDef)LED_GPIO_PINS);
|
||||
|
||||
ApplicationBuilder_Init();
|
||||
|
||||
while(TRUE)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ INCLUDEDIR = $(STDLIB)/inc Inc
|
|||
LIBSRCDIR = $(STDLIB)/src
|
||||
SRCS = Src
|
||||
|
||||
MCU = STM8S105
|
||||
MCU = STM8S003
|
||||
COMPILER = __SDCC__
|
||||
DEFINES = -D$(COMPILER) -D$(MCU) -DUSE_STDPERIPH_DRIVER
|
||||
|
||||
|
|
@ -49,7 +49,12 @@ $(BUILD_DIR)/MCP3425A0T.rel: $(SRCS)/MCP3425A0T.c
|
|||
$(BUILD_DIR)/PeakDetector.rel: $(SRCS)/PeakDetector.c
|
||||
$(CC) -c $(CFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/ $(SRCS)/PeakDetector.rel $(SRCS)/PeakDetector.c
|
||||
|
||||
$(BUILD_DIR)/ApplicationBuilder.rel: $(SRCS)/ApplicationBuilder.c $(BUILD_DIR)/MCP3425A0T.rel $(BUILD_DIR)/PeakDetector.rel
|
||||
|
||||
$(BUILD_DIR)/DataLogger.rel: $(SRCS)/DataLogger.c
|
||||
$(CC) -c $(CFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/ $(SRCS)/DataLogger.rel $(SRCS)/DataLogger.c
|
||||
|
||||
|
||||
$(BUILD_DIR)/ApplicationBuilder.rel: $(SRCS)/ApplicationBuilder.c $(BUILD_DIR)/MCP3425A0T.rel $(BUILD_DIR)/PeakDetector.rel $(BUILD_DIR)/DataLogger.rel
|
||||
$(CC) -c $(CFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/ $(SRCS)/ApplicationBuilder.rel $(SRCS)/ApplicationBuilder.c
|
||||
|
||||
|
||||
|
|
@ -58,7 +63,7 @@ $(BUILD_DIR)/ApplicationBuilder.rel: $(SRCS)/ApplicationBuilder.c $(BUILD_DIR)/M
|
|||
|
||||
$(IHX): $(SRCS)/$(TARGET).c $(BUILD_DIR)/ApplicationBuilder.rel $(BUILD_DIR)/stm8s_gpio.rel $(BUILD_DIR)/stm8s_it.rel
|
||||
mkdir -p $(BUILD_DIR)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/ $< $(BUILD_DIR)/stm8s_gpio.rel $(BUILD_DIR)/stm8s_it.rel $(BUILD_DIR)/MCP3425A0T.rel $(BUILD_DIR)/ApplicationBuilder.rel $(BUILD_DIR)/PeakDetector.rel
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/ $< $(BUILD_DIR)/stm8s_gpio.rel $(BUILD_DIR)/stm8s_it.rel $(BUILD_DIR)/MCP3425A0T.rel $(BUILD_DIR)/ApplicationBuilder.rel $(BUILD_DIR)/PeakDetector.rel $(BUILD_DIR)/DataLogger.rel
|
||||
$(SIZE) $@
|
||||
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue