From 69dd57fa55dcc7f66a5f2c2254bf9dd1e7ac8b58 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sat, 24 Oct 2020 19:27:40 +0200 Subject: [PATCH] start script for build env, ignore editor swp, play with loop relay --- .gitignore | 1 + cube/User/Src/main2.c | 12 ++++++++++++ tools/startBuildEnv.sh | 3 +++ 3 files changed, 16 insertions(+) create mode 100755 tools/startBuildEnv.sh diff --git a/.gitignore b/.gitignore index e0e9fe6..c80c022 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ cube/build/ +.*.sw? \ No newline at end of file diff --git a/cube/User/Src/main2.c b/cube/User/Src/main2.c index 8b956d2..8b4da52 100644 --- a/cube/User/Src/main2.c +++ b/cube/User/Src/main2.c @@ -31,10 +31,22 @@ void helloWorld(void *handle) { HAL_UART_Transmit_IT(&debugUart, (uint8_t*) hello, strlen(hello)); } +void enableLoop(void *handle) { + HAL_GPIO_WritePin(Loop_Enable_GPIO_Port, Loop_Enable_Pin, GPIO_PIN_SET); + HAL_GPIO_WritePin(Loop_Enable_GPIO_Port, Loop_Enable_Pin, GPIO_PIN_RESET); +} + +void disableLoop(void *handle) { + HAL_GPIO_WritePin(Loop_Disable_GPIO_Port, Loop_Disable_Pin, GPIO_PIN_SET); + HAL_GPIO_WritePin(Loop_Disable_GPIO_Port, Loop_Disable_Pin, GPIO_PIN_RESET); +} + void my_setup_2() { schAdd(blinkRed, NULL, 0, 500); schAdd(blinkGreen, NULL, 0, 1000); schAdd(helloWorld, NULL, 0, 5000); + schAdd(enableLoop, NULL, 10000, 0); + schAdd(disableLoop, NULL, 20000, 0); } void my_loop() { diff --git a/tools/startBuildEnv.sh b/tools/startBuildEnv.sh new file mode 100755 index 0000000..5df0894 --- /dev/null +++ b/tools/startBuildEnv.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run -it --rm -u ${UID} -v ${PWD}:/mnt wollud1969/build-env-arm-none-eabi:1.1.0 bash