Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
c485420
fix pitch
rs2k Oct 8, 2018
6a3496a
fix compile error
rs2k Oct 8, 2018
094fc3e
uncrustify
rs2k Oct 10, 2018
78824b6
make uncrustify work on mac and windows
rs2k Oct 10, 2018
a9fadd1
make uncrustify smarter and safer
rs2k Oct 10, 2018
52306c2
move file where it belongs
rs2k Oct 10, 2018
f86acf2
uncrustify template folder and add dshot drivers set helio spring to use
rs2k Oct 10, 2018
a81d49c
dshot changes
rs2k Oct 10, 2018
ed40f6a
fix indent, uncrustify
rs2k Oct 10, 2018
e1bed14
fix compile errors
rs2k Oct 10, 2018
5055b25
fix uncrustify again! D:
rs2k Oct 10, 2018
62f8f6e
adjust frequency of dshot
rs2k Oct 10, 2018
f37a735
adding OSD enable/disable setting and hooking that into the OSD init
orneryd Oct 10, 2018
8b5837c
FU mode
orneryd Oct 11, 2018
f30735a
reformat rx.c
orneryd Oct 11, 2018
02f0e0c
dshot throttle works, but frequency is calculated wrong
rs2k Oct 11, 2018
a7dc7e5
FU mode v2.0
orneryd Oct 11, 2018
c363d37
seems to work!
rs2k Oct 11, 2018
e44d1e7
add craft name config property
orneryd Oct 11, 2018
f29c421
add uncrustify and mode template back where it belongs
rs2k Oct 11, 2018
dfe4c05
uncrustify
rs2k Oct 11, 2018
140d532
uncrustify
rs2k Oct 11, 2018
3008c60
uncrustify crlf
rs2k Oct 11, 2018
6f2611f
uncrustify crlf
rs2k Oct 11, 2018
57468af
resolve conflicts
rs2k Oct 11, 2018
57c9bc8
Merge pull request #9 from heliorc/pegasus_stable_uncrustfied
rs2k Oct 11, 2018
a504fbb
fix compile errors
rs2k Oct 11, 2018
cd99586
actuators
rs2k Oct 11, 2018
b6088c6
more actuator changes
rs2k Oct 12, 2018
7935779
more protocol changes
rs2k Oct 12, 2018
7c0dad9
servos, and motors, and dshot, oh my!
rs2k Oct 12, 2018
7c4cc85
set actuators updated, need to go through and adjust where it's used
rs2k Oct 12, 2018
08a5138
mixer pointers added to actuator array
rs2k Oct 12, 2018
0857fba
add motor calibration, fl;esh out more actuator changes
rs2k Oct 12, 2018
803c72a
cleanup
rs2k Oct 12, 2018
dd1b57e
fix typedef
rs2k Oct 12, 2018
6c60a46
fixing compile errors
rs2k Oct 12, 2018
ec09b23
remove old function
rs2k Oct 12, 2018
8c06cfc
fixing compile errors
rs2k Oct 12, 2018
44a0453
more updates to actuators
rs2k Oct 12, 2018
7bfe427
more compile errors fixed. making new actuator stuff work
rs2k Oct 12, 2018
71e8a2f
more changes to actuators
rs2k Oct 17, 2018
475d2b0
uncrsust, update names and remove old calibration
rs2k Oct 17, 2018
d6fa792
update naming
rs2k Oct 17, 2018
bfedc37
compiles
rs2k Oct 18, 2018
0171021
pwm works
rs2k Oct 19, 2018
a2f7ede
make dshot work
rs2k Oct 20, 2018
bc842c3
remove test function
rs2k Oct 20, 2018
f8495dd
movin' stuff
rs2k Oct 20, 2018
f53f52e
more changes for hardware outputs
rs2k Oct 20, 2018
74ded3c
better defs
rs2k Oct 20, 2018
8c2a7ed
uncrust
rs2k Oct 20, 2018
d872531
dshot changes
rs2k Oct 20, 2018
23208f2
dshot changes
rs2k Oct 20, 2018
bec04bd
dma changes for dshot
rs2k Oct 20, 2018
edccf86
dshot changes
rs2k Oct 20, 2018
d9ca6f6
add output array settings for actuators on heliospring
rs2k Oct 20, 2018
bc2ce77
uncrust
rs2k Oct 20, 2018
cf740ea
compiles
rs2k Oct 20, 2018
8b429b0
better hardware def
rs2k Oct 20, 2018
c769fb1
uncrustify
rs2k Oct 20, 2018
03cd8c2
more dshot changes
rs2k Oct 20, 2018
c23d7ce
update dshot again :)
rs2k Oct 20, 2018
ca8c258
compiles
rs2k Oct 21, 2018
19c3d93
works!
rs2k Oct 21, 2018
9251665
remove half transer complete callback, not needed
rs2k Oct 22, 2018
1f15561
add dshot commands
rs2k Oct 22, 2018
2486e59
uncrustify
rs2k Oct 22, 2018
d79e63f
bugfix
rs2k Oct 22, 2018
bc8ba0e
fix stuff
rs2k Oct 22, 2018
dd37b6b
wizard and actuator updates
rs2k Oct 23, 2018
e563284
bug fixes, flight loop settings, dshot, added CPU load check
rs2k Oct 23, 2018
836058c
adjust wix rx timing
rs2k Oct 23, 2018
b309023
make wiz rx great again!
rs2k Oct 23, 2018
ae4e91c
debug stuff, calibratiion
rs2k Oct 24, 2018
586c7b6
debug
rs2k Oct 24, 2018
42b88ce
remove julian and bear
rs2k Oct 24, 2018
5b3558b
debug crc errors
rs2k Oct 24, 2018
11e7e3b
add debug starting values
rs2k Oct 24, 2018
c87f815
debug order
rs2k Oct 24, 2018
11dc837
fix debug output
rs2k Oct 24, 2018
1682872
cleanup rx code
rs2k Oct 25, 2018
a2d2303
uncrustify, cleanup bad chars
rs2k Oct 25, 2018
0251d6e
remove old soft serial crap and modify wiz rc and dshot 1200 ouput
rs2k Oct 25, 2018
20f4514
modify wiz rc arm disarm switch order
rs2k Oct 25, 2018
bdc06c0
update wizard for wizarding stuff
rs2k Oct 25, 2018
c0b818d
add imuf updating over HID
rs2k Oct 25, 2018
00f16b1
optimize RF1 btter
rs2k Oct 26, 2018
0e235cf
uncrustify
rs2k Oct 26, 2018
f31e00f
disable OSD, enable logging
rs2k Oct 26, 2018
98afd26
update make and ld
rs2k Oct 26, 2018
465e548
cleanup config and naming
rs2k Oct 26, 2018
0f83044
fixing filtering settings
orneryd Oct 26, 2018
33be71a
flash, osd, flight logger, spi changes, esc override
rs2k Oct 27, 2018
bba678a
merge incoming changes
rs2k Oct 27, 2018
037169a
redo spi for flash
rs2k Oct 27, 2018
e303e6d
uncrustify
rs2k Oct 27, 2018
69b3848
max osd
rs2k Oct 27, 2018
6e61a6b
osd+flash
rs2k Oct 27, 2018
4c488ad
remove some old revolt only code
rs2k Oct 30, 2018
142be0d
osd+flash
rs2k Oct 31, 2018
8e1bcca
uncrust, compile error fix
rs2k Oct 31, 2018
17de7a4
bugfix
rs2k Oct 31, 2018
78bf54d
increment version
rs2k Oct 31, 2018
4073d92
full featured osd config initial
rs2k Oct 31, 2018
20f4502
fix flash logging
rs2k Oct 31, 2018
fe24a32
logging changes
rs2k Oct 31, 2018
9f064b5
osd works!!
rs2k Nov 1, 2018
e5b0f34
fix voltage
rs2k Nov 1, 2018
315fd4d
uncrust
rs2k Nov 1, 2018
db4f8d0
increment build
rs2k Nov 1, 2018
e9d312b
add osd menus
rs2k Nov 1, 2018
c3a47ab
basic osd menu
rs2k Nov 1, 2018
1c2955f
osd menus
rs2k Nov 1, 2018
83e82e5
fix compile error
rs2k Nov 1, 2018
7a0cdb3
increment config
rs2k Nov 1, 2018
7eed192
add esc override variable
rs2k Nov 1, 2018
c7bf1a0
increment config
rs2k Nov 1, 2018
0cfa69e
fix osd bug
rs2k Nov 2, 2018
f6ecf24
add tempString length
rs2k Nov 2, 2018
10c12f3
increase menu sensitivity
rs2k Nov 2, 2018
1e1b271
flightSetPoints
rs2k Nov 2, 2018
3a0d9b9
setpoint as an int
orneryd Nov 2, 2018
fbec096
add bf style osd entry
rs2k Nov 2, 2018
18811e5
adding OSD output to config
orneryd Nov 2, 2018
797773f
fixing imuf_mode and acc update for 32Khz mode
orneryd Nov 2, 2018
c80a861
add myrtle mode
rs2k Nov 2, 2018
02fcaaa
setting default w 16 and Q 3000
orneryd Nov 3, 2018
704db20
set osd spi speed in half, add debug for osd
rs2k Nov 3, 2018
dbc7819
char map no longer auto update. force 16KHz.
rs2k Nov 5, 2018
b89f316
increment config
rs2k Nov 5, 2018
ddfe65e
adding imuf version to version output
orneryd Nov 5, 2018
7777ebc
updating config string, WIP
orneryd Nov 5, 2018
a1d7e26
change version printingm uncrustify
rs2k Nov 5, 2018
769525b
unknown vs expected imuf version
orneryd Nov 6, 2018
a773a94
fix dumb bug
rs2k Nov 6, 2018
6e75a8e
fix inits, uncrust
rs2k Nov 6, 2018
42771e1
replace imuf commands
rs2k Nov 6, 2018
92ec361
WIP: changing temp buffer to 20
orneryd Nov 6, 2018
1ae668d
fix imufloadbuin
rs2k Nov 7, 2018
fd54374
show the dog where the bowl is
rs2k Nov 7, 2018
df43d80
uncrust, cleanup
rs2k Nov 7, 2018
371c3d9
report imuf right
rs2k Nov 8, 2018
1059732
make osd entry better
rs2k Nov 8, 2018
40c65e0
fix imuf versioning
rs2k Nov 9, 2018
6c74f40
fix arm mode
rs2k Nov 9, 2018
fbd9653
fixo buggo
rs2k Nov 9, 2018
09d22c4
myrtle change, fix pitch in bblog
rs2k Nov 15, 2018
69823ce
updating settings values
orneryd Nov 15, 2018
3869131
uncrust and add menu.c
rs2k Nov 15, 2018
c877466
increment version
rs2k Nov 15, 2018
e8201f5
fix menu
rs2k Nov 15, 2018
f783508
beep!
rs2k Nov 17, 2018
dd5d015
myrtle fix
rs2k Nov 17, 2018
fbf9252
arm mode default
rs2k Nov 17, 2018
691ab8f
set volatage buzzer default lower
rs2k Nov 26, 2018
03d1115
update version
rs2k Nov 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .vscodeMac/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": "0.2.0",
"configurations": [
{
"name": "Flight HELIO_SPRING",
"preLaunchTask": "Flight HELIO_SPRING",
"name": "Flight HELIOSPRING",
"preLaunchTask": "Flight HELIOSPRING",
"type": "gdb",
"request": "attach",
"executable": "./output/HELIO_SPRING.elf",
"executable": "./output/HELIOSPRING.elf",
"target": "127.0.0.1:3333",
"remote": true,
"cwd": "${workspaceRoot}",
Expand All @@ -20,19 +20,19 @@
"monitor sleep 100",
"set debug remote 0",
"mon version",
"file ${workspaceRoot}/output/HELIO_SPRING.elf",
"file ${workspaceRoot}/output/HELIOSPRING.elf",
"load",
"monitor reset init",
"break main"
],
"gdbpath": "arm-none-eabi-gdb"
},
{
"name": "Recovery HELIO_SPRING",
"preLaunchTask": "Recovery HELIO_SPRING",
"name": "Recovery HELIOSPRING",
"preLaunchTask": "Recovery HELIOSPRING",
"type": "gdb",
"request": "attach",
"executable": "./output/HELIO_SPRING_nrecovery.elf",
"executable": "./output/HELIOSPRING_nrecovery.elf",
"target": "127.0.0.1:3333",
"remote": true,
"cwd": "${workspaceRoot}",
Expand All @@ -46,7 +46,7 @@
"monitor sleep 100",
"set debug remote 0",
"mon version",
"file ${workspaceRoot}/output/HELIO_SPRING_nrecovery.elf",
"file ${workspaceRoot}/output/HELIOSPRING_nrecovery.elf",
"load",
"monitor reset init",
"break main"
Expand Down
8 changes: 4 additions & 4 deletions .vscodeMac/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"version": "0.1.0",
"tasks": [
{
"taskName": "Flight HELIO_SPRING",
"taskName": "Flight HELIOSPRING",
"command": "python",
"args": [
"make.py",
"-THELIO_SPRING",
"-THELIOSPRING",
"-D"
],
"isShellCommand": true
},
{
"taskName": "Recovery HELIO_SPRING",
"taskName": "Recovery HELIOSPRING",
"command": "python",
"args": [
"make.py",
"-THELIO_SPRING_nrecovery",
"-THELIOSPRING_nrecovery",
"-D"
],
"isShellCommand": true
Expand Down
24 changes: 12 additions & 12 deletions .vscodeWin/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": "0.2.0",
"configurations": [
{
"name": "Flight HELIO_SPRING Debug",
"preLaunchTask": "Flight HELIO_SPRING Debug",
"name": "Flight HELIOSPRING Debug",
"preLaunchTask": "Flight HELIOSPRING Debug",
"type": "gdb",
"request": "attach",
"executable": "./output/HELIO_SPRING.elf",
"executable": "./output/HELIOSPRING.elf",
"target": "127.0.0.1:3333",
"remote": true,
"cwd": "${workspaceRoot}",
Expand All @@ -20,19 +20,19 @@
"monitor sleep 100",
"set debug remote 0",
"mon version",
"file ./output/HELIO_SPRING.elf",
"file ./output/HELIOSPRING.elf",
"load",
"monitor reset init",
"break main"
],
"gdbpath": "arm-none-eabi-gdb"
},
{
"name": "Flight HELIO_SPRING Opt",
"preLaunchTask": "Flight HELIO_SPRING Opt",
"name": "Flight HELIOSPRING Opt",
"preLaunchTask": "Flight HELIOSPRING Opt",
"type": "gdb",
"request": "attach",
"executable": "./output/HELIO_SPRING.elf",
"executable": "./output/HELIOSPRING.elf",
"target": "127.0.0.1:3333",
"remote": true,
"cwd": "${workspaceRoot}",
Expand All @@ -46,19 +46,19 @@
"monitor sleep 100",
"set debug remote 0",
"mon version",
"file ./output/HELIO_SPRING.elf",
"file ./output/HELIOSPRING.elf",
"load",
"monitor reset init",
"break main"
],
"gdbpath": "arm-none-eabi-gdb"
},
{
"name": "Recovery HELIO_SPRING",
"preLaunchTask": "Recovery HELIO_SPRING",
"name": "Recovery HELIOSPRING",
"preLaunchTask": "Recovery HELIOSPRING",
"type": "gdb",
"request": "attach",
"executable": "./output/HELIO_SPRING_nrecovery.elf",
"executable": "./output/HELIOSPRING_nrecovery.elf",
"target": "127.0.0.1:3333",
"remote": true,
"cwd": "${workspaceRoot}",
Expand All @@ -72,7 +72,7 @@
"monitor sleep 100",
"set debug remote 0",
"mon version",
"file ./output/HELIO_SPRING_nrecovery.elf",
"file ./output/HELIOSPRING_nrecovery.elf",
"load",
"monitor reset init",
"break main"
Expand Down
12 changes: 6 additions & 6 deletions .vscodeWin/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"args": ["/C"],
"tasks": [
{
"taskName": "Flight HELIO_SPRING Debug",
"taskName": "Flight HELIOSPRING Debug",
"suppressTaskName": true,
"isBuildCommand": true,
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIO_SPRING -D" ]
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIOSPRING -D" ]
},
{
"taskName": "Flight HELIO_SPRING Opt",
"taskName": "Flight HELIOSPRING Opt",
"suppressTaskName": true,
"isBuildCommand": true,
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIO_SPRING" ]
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIOSPRING" ]
},
{
"taskName": "Recovery HELIO_SPRING",
"taskName": "Recovery HELIOSPRING",
"suppressTaskName": true,
"isBuildCommand": true,
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIO_SPRING_nrecovery -D" ]
"args": [ "powershell -Command \"Start-Process 'cmd' -Verb RunAs -ArgumentList '/c C:\\dev\\scripts\\openocd.bat f4'\" & cd ${workspaceFolderBasename} & python.exe make.py -THELIOSPRING_nrecovery -D" ]
},
{
"taskName": "Flight REVOLT",
Expand Down
3 changes: 3 additions & 0 deletions lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, ui
* @param DataLength: The length of data to be transferred from source to destination
* @retval HAL status
*/
#pragma GCC push_options
#pragma GCC optimize ("O3")
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
{
HAL_StatusTypeDef status = HAL_OK;
Expand Down Expand Up @@ -504,6 +506,7 @@ HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress,

return status;
}
#pragma GCC pop_options

/**
* @brief Aborts the DMA Transfer.
Expand Down
3 changes: 3 additions & 0 deletions lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,8 @@ HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, u
* @param Size: amount of data to be sent
* @retval HAL status
*/
#pragma GCC push_options
#pragma GCC optimize ("O3")
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)
{
uint32_t tmp = 0U, tmp1 = 0U;
Expand Down Expand Up @@ -1594,6 +1596,7 @@ error :
__HAL_UNLOCK(hspi);
return errorcode;
}
#pragma GCC pop_options

/**
* @brief Pause the DMA Transfer.
Expand Down
13 changes: 7 additions & 6 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,29 @@ def configure_target(TARGET):
FEATURES.extend(["usb_fs"])
OPTIMIZE_FLAGS = "-Og"

elif TARGET == "HELIO_SPRING":
elif TARGET == "HELIOSPRING":
if args.debug:
os.system("PID=\"$(ps -elf | grep openocd | grep -v 'grep' | sed -e 's/ / /g' | sed -e 's/ / /g' | sed -e 's/ / /g' | cut -d ' ' -f 3)\";kill $PID")
os.system("openocd -s ~/dev -s /usr/local/share/openocd/scripts -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32f4x.cfg &> redirection &")
FC_NAME = "HELIO_SPRING"
FC_NAME = "HELIOSPRING"
TARGET_DEVICE_LC = "stm32f405xx"
PROJECT = "flight_controller"
TARGET_DEVICE = "STM32F405xx"
TARGET_SCRIPT = "stm32_flash_f405.ld"
TARGET_PROCESSOR_TYPE = "f4"
FEATURES.extend(["usb_otg_fs"])
FEATURES.extend(["imuf9001/spi"])
OPTIMIZE_FLAGS = "-Og"
OPTIMIZE_FLAGS = "-O2"
THIS_ADDRESS = str(0x08020000)
EXTRA_DEF_FLAGS = ""
STM32F4_ARCH_FLAGS_ADD = ""
#STM32F4_ARCH_FLAGS_ADD = "-s -fdata-sections -ffunction-sections -flto"

elif TARGET == "HELIO_SPRING_nrecovery":
elif TARGET == "HELIOSPRING_nrecovery":
if args.debug:
os.system("PID=\"$(ps -elf | grep openocd | grep -v 'grep' | sed -e 's/ / /g' | sed -e 's/ / /g' | sed -e 's/ / /g' | cut -d ' ' -f 3)\";kill $PID")
os.system("openocd -s ~/dev -s /usr/local/share/openocd/scripts -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32f4x.cfg &> redirection &")
FC_NAME = "HELIO_SPRING"
FC_NAME = "HELIOSPRING"
TARGET_DEVICE_LC = "stm32f405xx"
PROJECT = "new_bootloader"
TARGET_DEVICE = "STM32F405xx"
Expand Down Expand Up @@ -429,7 +429,7 @@ def configure_target(TARGET):
INCLUDE_DIRS.append("src/flight_controller/inc/input")
SOURCE_DIRS.append("src/flight_controller/src/telemetry")
SOURCE_DIRS.append("src/flight_controller/src/input")
FEATURES.extend(["adc", "transponder", "softSerial", "maxOsd", "esc_1wire", "leds", "dmaShenanigans", "actuator_output", "buzzer", "flash_chip", "rx", "serial", "spm_laptimer"])
FEATURES.extend(["adc", "transponder", "dshot", "softSerial", "maxOsd", "shared_spi", "esc_1wire", "leds", "dmaShenanigans", "actuator_output", "buzzer", "flash_chip", "rx", "serial", "spm_laptimer"])
elif PROJECT == "nesc":
excluded_files.append("stm32f3xx_spi_msp.c")
excluded_files.append("stm32f4xx_spi_msp.c")
Expand Down Expand Up @@ -545,6 +545,7 @@ def configure_target(TARGET):
"-Wl,-gc-sections,-Map," + mapFile,
"-Wl,-L" + linkerDir,
"-Wl,--cref",
"-Wl,--print-memory-usage",
"-T" + ldScript
])

Expand Down
2 changes: 1 addition & 1 deletion src/esc/inc/includes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#include "target.h"
#include "mcu_include.h"
#include "mcu_include.h"
35 changes: 18 additions & 17 deletions src/esc/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,35 @@
/* Private function prototypes -----------------------------------------------*/
int BoardInit(void);
void SystemClock_Config(void);
void InitializeLED(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
void InitializeLED(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);

/* Private functions ---------------------------------------------------------*/

int main(void)
{
BoardInit();
InitializeLED(LED1_GPIO_PORT, LED1_PIN);

BoardInit();
InitializeLED(LED1_GPIO_PORT, LED1_PIN);
while (1)
{
HAL_GPIO_TogglePin(LED1_GPIO_PORT, LED1_PIN);
HAL_GPIO_TogglePin(SERVO1_GPIO_PORT, SERVO1_PIN);

while (1) {
HAL_GPIO_TogglePin(LED1_GPIO_PORT, LED1_PIN);
HAL_GPIO_TogglePin(SERVO1_GPIO_PORT, SERVO1_PIN);

HAL_Delay(100);
}
HAL_Delay(100);
}
}

void InitializeLED(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)

void InitializeLED(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
{
HAL_GPIO_WritePin(GPIOx, GPIO_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOx, GPIO_Pin, GPIO_PIN_RESET);

GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;

GPIO_InitStructure.Pin = GPIO_Pin;
GPIO_InitStructure.Pin = GPIO_Pin;

GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
GPIO_InitStructure.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOx, &GPIO_InitStructure);
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Speed = GPIO_SPEED_LOW;
GPIO_InitStructure.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOx, &GPIO_InitStructure);
}
Loading