kopia lustrzana https://github.com/RobertGawron/IonizationChamber
Merge pull request #55 from RobertGawron/feature/basic_sw_components_implementation
raw setup on eclipse and raspberrypull/58/head
commit
18a8bd6341
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 $<
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue