we should not really mix ChibiOS stuff and out logic

This commit is contained in:
rusefi 2019-06-12 12:54:13 -04:00
parent efa4ccd772
commit 9fdb9c796c
3 changed files with 31 additions and 26 deletions

View File

@ -264,28 +264,3 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
void boardInit(void) {
}
/**
* @brief Board-specific ADC channel configuration code overrides.
* @todo Add your board-specific code, if any.
*/
void setAdcChannelOverrides(void) {
}
#define PROMETHEUS_LED 13
// BLIIINK!!!!!!!!!!
void BLIIINK(int t) {
int i, j;
palSetPadMode(GPIOA, PROMETHEUS_LED, PAL_MODE_OUTPUT_PUSHPULL);
//while (true) {
for (j = 0; j < 2; j++) {
palClearPad(GPIOA, PROMETHEUS_LED);
for (i = 0; i < 2*t; i++) {
palTogglePad(GPIOA, PROMETHEUS_LED);
chThdSleepMilliseconds(250);
}
chThdSleepMilliseconds(1000);
}
}

View File

@ -1,5 +1,7 @@
# List of all the board related files.
BOARDSRC = $(PROJECT_DIR)/config/boards/prometheus/board.c
BOARDSRC = $(PROJECT_DIR)/config/boards/prometheus/board.c \
$(PROJECT_DIR)/config/boards/prometheus/board_extra.c
BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/Prometheus/board_configuration.cpp
# Required include directories

View File

@ -0,0 +1,28 @@
#include "hal.h"
#include "stm32_gpio.h"
/**
* @brief Board-specific ADC channel configuration code overrides.
* @todo Add your board-specific code, if any.
*/
void setAdcChannelOverrides(void) {
}
#define PROMETHEUS_LED 13
// BLIIINK!!!!!!!!!!
void BLIIINK(int t) {
int i, j;
palSetPadMode(GPIOA, PROMETHEUS_LED, PAL_MODE_OUTPUT_PUSHPULL);
//while (true) {
for (j = 0; j < 2; j++) {
palClearPad(GPIOA, PROMETHEUS_LED);
for (i = 0; i < 2*t; i++) {
palTogglePad(GPIOA, PROMETHEUS_LED);
chThdSleepMilliseconds(250);
}
chThdSleepMilliseconds(1000);
}
}