72e6b30033
► the mainboard can now send and receive Serial data from the sideboards ► heavy refactored the `main.c`. It was becoming too large to manage... Therefore, `util.c` and `util.h` was created ► added new functionality for `VARIANT_HOVERCAR` and variants with `CONTROL_ADC` in general: - ADC limits auto-calibration mode (long press of the power button) - calibration will not be lost at power-off - Max Current and Max Speed adjustment mode (long press followed by a short press of the power button) - calibration will not be lost at power-off - added one sideboard functionality: - LEDs are used to display battery level, Motor Enable, Errors, Reverse driving, Braking. - Photo sensors are used as push buttons: One for changing Control Mode, One for Activating/Deactivating the Field Weakening on the fly
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
/*
|
|
* This file is part of the hoverboard-firmware-hack project.
|
|
*
|
|
* Copyright (C) 2017-2018 Rene Hopf <renehopf@mac.com>
|
|
* Copyright (C) 2017-2018 Nico Stute <crinq@crinq.de>
|
|
* Copyright (C) 2017-2018 Niklas Fauth <niklas.fauth@kit.fail>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
// Define to prevent recursive inclusion
|
|
#ifndef SETUP_H
|
|
#define SETUP_H
|
|
|
|
#include "stm32f1xx_hal.h"
|
|
|
|
void MX_GPIO_Init(void);
|
|
void MX_TIM_Init(void);
|
|
void MX_ADC1_Init(void);
|
|
void MX_ADC2_Init(void);
|
|
void UART2_Init(void);
|
|
void UART3_Init(void);
|
|
|
|
#endif
|
|
|