Merge pull request #55 from RobertGawron/feature/basic_sw_components_implementation

raw setup on eclipse and raspberry
pull/58/head
Robert 2019-06-29 18:38:12 +02:00 zatwierdzone przez GitHub
commit 18a8bd6341
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 17 dodań i 11 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ static MCP3425A0TConfig_t adcConfig[]={{ADC_CHIP_1_PIN}, {ADC_CHIP_2_PIN}};
bool ApplicationBuilder_Init()
{
uint8_t amountOfADC = sizeof(adcConfig) / sizeof(adcConfig[0]);
/* uint8_t amountOfADC = sizeof(adcConfig) / sizeof(adcConfig[0]);
for(uint8_t i = 0U; i < amountOfADC; i++)
{
@ -26,7 +26,7 @@ bool ApplicationBuilder_Init()
PeakDetector_Init(PEAK_DETECTOR_PIN);
*/
return TRUE;
}

14
software/Firmware/Src/main.c 100644 → 100755
Wyświetl plik

@ -10,32 +10,34 @@
#include "ApplicationBuilder.h"
#define LED_GPIO_PORT (GPIOD)
#define LED_GPIO_PINS (GPIO_PIN_2 | GPIO_PIN_3)
#define LED_GPIO_PINS ( GPIO_PIN_0)
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);
GPIO_Init(LED_GPIO_PORT, LED_GPIO_PINS, GPIO_MODE_OUT_OD_LOW_FAST);
//GPIO_WriteHigh(LED_GPIO_PORT, LED_GPIO_PINS);
GPIO_WriteLow(LED_GPIO_PORT, LED_GPIO_PINS);
ApplicationBuilder_Init();
// ApplicationBuilder_Init();
while(TRUE)
{
ApplicationBuilder_Tick();
//ApplicationBuilder_Tick();
}
}
#ifdef USE_FULL_ASSERT
void assert_failed(uint8_t* file, uint32_t line)
{
{
(void)file;
(void)line;
while (TRUE)
{
// empty
GPIO_WriteHigh(LED_GPIO_PORT, LED_GPIO_PINS);
}
}

10
software/Firmware/makefile 100644 → 100755
Wyświetl plik

@ -28,9 +28,13 @@ IHX = $(BUILD_DIR)/$(TARGET).ihx
################### BUILD PROCESS ###################
.PHONY: all build clean flash
all: build
all: make_build_dir build
build:$(IHX)
make_build_dir:
mkdir -p $(BUILD_DIR)
build: $(IHX)
@ -72,5 +76,5 @@ clean:
rm -rf $(BUILD_DIR)/*
flash: $(IHX)
stm8flash -c stlinkv2 -p stm8s105k4 -s flash -w $<
/opt/stm8flash -c stlink -p stm8s103f3 -w $<