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