diff --git a/.metadata/.log b/.metadata/.log index efeabbb..b1c995e 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -9042,3 +9042,220 @@ Command-line arguments: -os linux -ws gtk -arch x86_64 !ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-17 14:15:47.411 !MESSAGE Started RMI Server, listening on port 41337 +!SESSION 2026-03-18 13:19:26.527 ----------------------------------------------- +eclipse.buildId=Version 1.16.0 +java.version=17.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE +Command-line arguments: -os linux -ws gtk -arch x86_64 + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-18 13:19:33.263 +!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-18 13:19:33.264 +!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml + +!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-18 13:19:38.483 +!MESSAGE Started RMI Server, listening on port 41337 + +!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.264 +!MESSAGE Unable to connect to repository https://sw-center.st.com/stm32cubeide/openstlinux/updatesite1/compositeContent.xml +!STACK 0 +java.net.ConnectException + at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198) + at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56) + at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378) + at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126) + at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93) + at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380) + at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449) + at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) + at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950) + at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341) + at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) + at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) + at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:840) +Caused by: java.nio.channels.UnresolvedAddressException + at java.base/sun.nio.ch.Net.checkAddress(Net.java:149) + at java.base/sun.nio.ch.Net.checkAddress(Net.java:157) + at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816) + at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185) + ... 21 more + +!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.275 +!MESSAGE Unable to connect to repository https://sw-center.st.com/stm32cubeide/updatesite1/compositeContent.xml +!STACK 0 +java.net.ConnectException + at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198) + at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56) + at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378) + at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126) + at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93) + at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380) + at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449) + at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) + at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950) + at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341) + at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) + at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) + at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:840) +Caused by: java.nio.channels.UnresolvedAddressException + at java.base/sun.nio.ch.Net.checkAddress(Net.java:149) + at java.base/sun.nio.ch.Net.checkAddress(Net.java:157) + at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816) + at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185) + ... 21 more + +!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.285 +!MESSAGE Unable to connect to repository https://download.eclipse.org/tools/cdt/releases/latest/compositeContent.xml +!STACK 0 +java.net.ConnectException + at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198) + at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56) + at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378) + at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126) + at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93) + at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380) + at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449) + at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) + at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950) + at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341) + at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) + at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) + at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:840) +Caused by: java.nio.channels.UnresolvedAddressException + at java.base/sun.nio.ch.Net.checkAddress(Net.java:149) + at java.base/sun.nio.ch.Net.checkAddress(Net.java:157) + at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816) + at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185) + ... 21 more + +!ENTRY org.eclipse.equinox.p2.transport.ecf 4 1002 2026-03-18 13:20:01.294 +!MESSAGE Unable to connect to repository https://download.eclipse.org/releases/2023-12/compositeContent.xml +!STACK 0 +java.net.ConnectException + at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1055) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:198) + at java.net.http/jdk.internal.net.http.AsyncSSLConnection.connectAsync(AsyncSSLConnection.java:56) + at java.net.http/jdk.internal.net.http.Http2Connection.createAsync(Http2Connection.java:378) + at java.net.http/jdk.internal.net.http.Http2ClientImpl.getConnectionFor(Http2ClientImpl.java:126) + at java.net.http/jdk.internal.net.http.ExchangeImpl.get(ExchangeImpl.java:93) + at java.net.http/jdk.internal.net.http.Exchange.establishExchange(Exchange.java:343) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl0(Exchange.java:475) + at java.net.http/jdk.internal.net.http.Exchange.responseAsyncImpl(Exchange.java:380) + at java.net.http/jdk.internal.net.http.Exchange.responseAsync(Exchange.java:372) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:408) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$7(MultiExchange.java:449) + at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) + at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950) + at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2340) + at java.net.http/jdk.internal.net.http.MultiExchange.responseAsyncImpl(MultiExchange.java:439) + at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsync0$2(MultiExchange.java:341) + at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) + at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) + at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:840) +Caused by: java.nio.channels.UnresolvedAddressException + at java.base/sun.nio.ch.Net.checkAddress(Net.java:149) + at java.base/sun.nio.ch.Net.checkAddress(Net.java:157) + at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816) + at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(PlainHttpConnection.java:183) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) + at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:185) + ... 21 more +!SESSION 2026-03-18 13:36:38.191 ----------------------------------------------- +eclipse.buildId=Version 1.16.0 +java.version=17.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE +Command-line arguments: -os linux -ws gtk -arch x86_64 + +!ENTRY org.eclipse.core.resources 2 10035 2026-03-18 13:36:40.821 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-18 13:36:44.318 +!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-18 13:36:44.319 +!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml + +!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-18 13:36:49.305 +!MESSAGE Started RMI Server, listening on port 41337 +!SESSION 2026-03-20 17:42:29.905 ----------------------------------------------- +eclipse.buildId=Version 1.16.0 +java.version=17.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE +Command-line arguments: -os linux -ws gtk -arch x86_64 + +!ENTRY org.eclipse.core.resources 2 10035 2026-03-20 17:42:32.738 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-20 17:42:36.387 +!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-20 17:42:36.388 +!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml + +!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-20 17:42:42.323 +!MESSAGE Started RMI Server, listening on port 41337 +!SESSION 2026-03-20 18:06:27.774 ----------------------------------------------- +eclipse.buildId=Version 1.16.0 +java.version=17.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE +Command-line arguments: -os linux -ws gtk -arch x86_64 + +!ENTRY org.eclipse.core.resources 2 10035 2026-03-20 18:06:30.631 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 4 4 2026-03-20 18:06:34.323 +!MESSAGE CubeMX plugin appears to be active, Log4j initialization might be too late. + +!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2026-03-20 18:06:34.324 +!MESSAGE Log4j2 initialized with config file /home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/.metadata/.log4j2.xml + +!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2026-03-20 18:06:39.545 +!MESSAGE Started RMI Server, listening on port 41337 diff --git a/.metadata/.plugins/org.eclipse.cdt.core/task1.1727452765701.pdom b/.metadata/.plugins/org.eclipse.cdt.core/task1.1727452765701.pdom index 1465b7a..03a2b95 100644 Binary files a/.metadata/.plugins/org.eclipse.cdt.core/task1.1727452765701.pdom and b/.metadata/.plugins/org.eclipse.cdt.core/task1.1727452765701.pdom differ diff --git a/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log b/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log index 0d598bc..8f0e68b 100644 --- a/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log +++ b/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log @@ -309,3 +309,17 @@ Finished building: default.size.stdout Finished building: task1.list +15:01:24 **** Incremental Build of configuration Debug for project task1 **** +make -j12 all +arm-none-eabi-gcc "../Src/task1.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32G431KBTx -DSTM32 -DSTM32G4 -DNUCLEO_G431KB -c -I../Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Src/task1.d" -MT"Src/task1.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Src/task1.o" +arm-none-eabi-gcc -o "task1.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/task1/STM32G431KBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="task1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: task1.elf + +arm-none-eabi-size task1.elf +arm-none-eabi-objdump -h -S task1.elf > "task1.list" + text data bss dec hex filename + 1692 0 1568 3260 cbc task1.elf +Finished building: default.size.stdout + +Finished building: task1.list + diff --git a/.metadata/.plugins/org.eclipse.cdt.ui/task1.build.log b/.metadata/.plugins/org.eclipse.cdt.ui/task1.build.log index cf47185..40362b7 100644 --- a/.metadata/.plugins/org.eclipse.cdt.ui/task1.build.log +++ b/.metadata/.plugins/org.eclipse.cdt.ui/task1.build.log @@ -1,4 +1,4 @@ -14:21:35 **** Incremental Build of configuration Debug for project task1 **** +15:01:24 **** Incremental Build of configuration Debug for project task1 **** make -j12 all arm-none-eabi-gcc "../Src/task1.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32G431KBTx -DSTM32 -DSTM32G4 -DNUCLEO_G431KB -c -I../Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Src/task1.d" -MT"Src/task1.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Src/task1.o" arm-none-eabi-gcc -o "task1.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/tobii/02_Uni/09_Mikrocomputertechnik/praktikum/mct_bei_workspace_25w/task1/STM32G431KBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="task1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group @@ -13,5 +13,5 @@ Finished building: default.size.stdout Finished building: task1.list -14:21:36 Build Finished. 0 errors, 0 warnings. (took 332ms) +15:01:24 Build Finished. 0 errors, 0 warnings. (took 330ms) diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/21/00d10a47cc2200111412fa6c3f9d8906 b/.metadata/.plugins/org.eclipse.core.resources/.history/21/00d10a47cc2200111412fa6c3f9d8906 new file mode 100644 index 0000000..7a815ea --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/21/00d10a47cc2200111412fa6c3f9d8906 @@ -0,0 +1,36 @@ +/* + * sketch.c + * + * Created on: Mar 18, 2026 + * Author: tobii + */ +int reihenfolge[6] = {0, 1, 2, 3, 2, 1}; + +int main(){ + while(1){ + while(/*schalter gedrückt*/){} + delay(); + while(/*schalter losgelassen*/){} + delay(); + + int aktiv = 1; + while(aktiv){ + for(int i; i < reihenfolge.length - 1 && aktiv = 1; i ++){ + //alle LED einschalten + if(i = 0){/*alles bis auf LED0 auschalten*/} + if(i = 1){/*..*/} + //... + for(int zähler = 0; zähler < 333 && aktiv == 1; zähler++){ + if(/*schalter gerückt*/){ + aktiv = 0; + break; + } + else{ + delay(1); + } + } + while(/*Taster gedrückt*/){} + } + } + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/56/40b0b6e7c42200111a10e980504b778a b/.metadata/.plugins/org.eclipse.core.resources/.history/56/40b0b6e7c42200111a10e980504b778a new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/56/9013a47c032200111ca2ee31eda545ee b/.metadata/.plugins/org.eclipse.core.resources/.history/56/9013a47c032200111ca2ee31eda545ee deleted file mode 100644 index 09bf9b2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/56/9013a47c032200111ca2ee31eda545ee +++ /dev/null @@ -1,211 +0,0 @@ -/* *************************************************************************************** - * Project: task1 - C:GPIO - * File: task1.c - * - * Language: C - * - * Hardware: STefi Light v1.1 - * Processor: STM32G431KBT6U - * - * Author: Manuel Lederhofer - * Datum: 10.09.2021 - * - * Version: 2.1 - * History: - * 10.09.2021 ML create project - * 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U - * 18.02.2025 TK changed projectname to "C: GPIO) - * - * Status: under development - * - * Description: - * Blinks the red LED of STefi Light, currently. - * This file contains the main routine and the initialization. - * - * Notes: - * - MCU speed at startup is 16 MHz - * - * Todo: - * - Change the example code to match the description and requirements - * of the requested application in the lab exercise guide. - * - ************************************************************************************** */ - -/* ------------------------------------ INCLUDES -------------------------------------- */ -#include "stm32g431xx.h" -#include "STefi-Light.h" - -/* ------------------------------------ DEFINES --------------------------------------- */ -#define LOOPS_PER_MS 1244 // NOP-loops for delay() -#define WAITTIME 333 - -/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */ -/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */ -int state = 0; - -/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */ - -/* ------------------------------------ PROTOTYPES ------------------------------------ */ -static void GPIO_init(void); -static void delay(const uint16_t ms); - -/* ------------------------------------ M A I N --------------------------------------- */ -int main(void) -{ - /* --- initialization --- */ - __disable_irq(); // disable interrupts globally - - GPIO_init(); - - __enable_irq(); // enable interrupts globally - - /* --- one time tasks --- */ - - //s0 Hilfvariablen auserhalb von while deklarieren - int running = 0; //0 Lauflicht aus, 1 Lauflicht an - int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung - - /* --- infinite processing loop --- */ - while (1) - { - int buttonState = GPIOB->IDR & (1 << 0); - - // fallende Flanke erkennen - if (lastButtonState && !buttonState) - { - running ^= 1; // toggle running - /* delay(50); // entprellen */ - } - - lastButtonState = buttonState; - - - if(running) - { - switch (state) - { - case 0: - state++; - GPIOA->ODR &= ~(1 << 0); - delay(WAITTIME); - GPIOA->ODR |= (1 << 0); - break; - case 1: - state++; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - case 2: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 3: - state++; - GPIOA->ODR &= ~(1 << 3); - delay(WAITTIME); - GPIOA->ODR |= (1 << 3); - break; - case 4: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 5: - state=0; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - - case 99: - GPIOA->ODR |= MASK_LED_ALL; - while(1){ - if((GPIOB->IDR & (1 << 0)) == 0){ - state=0; - break; - } - } - } - } - - } - //aktuell geht er mit drücken durch die cases - // wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case - - -return 1; -} - -/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */ - -/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */ - -/* ------------------------------------------------------------------------------------ *\ - * method: static void GPIO_init(void) - * - * Initializes GPIOs on STefi Light for pins with peripherals attached. - * - * requires: - nothing - - * parameters: - none - - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void GPIO_init(void) -{ -/* enable port clocks */ -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch - -/* --- LEDs --- */ -GPIOA->ODR |= MASK_LED_ALL; -GPIOA->MODER &= ~(3 << 0); -GPIOA->MODER |= (1 << 0); // set LED pin to output - -/* LED1 als Output */ -GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so -GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so - -/* LED2 als Output */ -GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt -GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt - -/* LED3 als output */ -GPIOA->MODER &= ~(3 << 6); -GPIOA->MODER |= (1 << 6); - -/* s0 (PB0) als Input Versuch */ -GPIOB->MODER &= ~(3 << 0); - -/* Pull-Up Aktivieren Versuch */ -GPIOB->PUPDR &= ~(3 << 0); -GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up -} - -/* ------------------------------------------------------------------------------------ *\ - * method: static void delay(const uint16_t ms) - * - * Realizes a millisecond delay by very bad busy-wait. - * - * requires: - nothing - - * parameters: ms - delay time in milliseconds - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void delay(const uint16_t ms) -{ -for (uint16_t i = 0; i < ms; ++i) -{ - if((GPIOB->IDR & (1 << 0)) == 0){ - state = 99; - break; - } - for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) - { - __asm("NOP"); - } -} -} - -/* ************************************ E O F ***************************************** */ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/73/207d5f35042200111ca2ee31eda545ee b/.metadata/.plugins/org.eclipse.core.resources/.history/73/207d5f35042200111ca2ee31eda545ee deleted file mode 100644 index 196bd9b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/73/207d5f35042200111ca2ee31eda545ee +++ /dev/null @@ -1,212 +0,0 @@ -/* *************************************************************************************** - * Project: task1 - C:GPIO - * File: task1.c - * - * Language: C - * - * Hardware: STefi Light v1.1 - * Processor: STM32G431KBT6U - * - * Author: Manuel Lederhofer - * Datum: 10.09.2021 - * - * Version: 2.1 - * History: - * 10.09.2021 ML create project - * 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U - * 18.02.2025 TK changed projectname to "C: GPIO) - * - * Status: under development - * - * Description: - * Blinks the red LED of STefi Light, currently. - * This file contains the main routine and the initialization. - * - * Notes: - * - MCU speed at startup is 16 MHz - * - * Todo: - * - Change the example code to match the description and requirements - * of the requested application in the lab exercise guide. - * - ************************************************************************************** */ - -/* ------------------------------------ INCLUDES -------------------------------------- */ -#include "stm32g431xx.h" -#include "STefi-Light.h" - -/* ------------------------------------ DEFINES --------------------------------------- */ -#define LOOPS_PER_MS 1244 // NOP-loops for delay() -#define WAITTIME 333 - -/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */ -/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */ -int state = 0; - -/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */ - -/* ------------------------------------ PROTOTYPES ------------------------------------ */ -static void GPIO_init(void); -static void delay(const uint16_t ms); - -/* ------------------------------------ M A I N --------------------------------------- */ -int main(void) -{ - /* --- initialization --- */ - __disable_irq(); // disable interrupts globally - - GPIO_init(); - - __enable_irq(); // enable interrupts globally - - /* --- one time tasks --- */ - - //s0 Hilfvariablen auserhalb von while deklarieren - int running = 0; //0 Lauflicht aus, 1 Lauflicht an - int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung - - /* --- infinite processing loop --- */ - while (1) - { - int buttonState = GPIOB->IDR & (1 << 0); - - // fallende Flanke erkennen - if (lastButtonState && !buttonState) - { - running ^= 1; // toggle running - /* delay(50); // entprellen */ - } - - lastButtonState = buttonState; - - - if(running) - { - switch (state) - { - case 0: - state++; - GPIOA->ODR &= ~(1 << 0); - delay(WAITTIME); - GPIOA->ODR |= (1 << 0); - break; - case 1: - state++; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - case 2: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 3: - state++; - GPIOA->ODR &= ~(1 << 3); - delay(WAITTIME); - GPIOA->ODR |= (1 << 3); - break; - case 4: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 5: - state=0; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - - case 99: - GPIOA->ODR |= MASK_LED_ALL; - while(1){ - if((GPIOB->IDR & (1 << 0)) == 0){ - delay(10); - state=0; - break; - } - } - } - } - - } - //aktuell geht er mit drücken durch die cases - // wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case - - -return 1; -} - -/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */ - -/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */ - -/* ------------------------------------------------------------------------------------ *\ - * method: static void GPIO_init(void) - * - * Initializes GPIOs on STefi Light for pins with peripherals attached. - * - * requires: - nothing - - * parameters: - none - - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void GPIO_init(void) -{ -/* enable port clocks */ -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch - -/* --- LEDs --- */ -GPIOA->ODR |= MASK_LED_ALL; -GPIOA->MODER &= ~(3 << 0); -GPIOA->MODER |= (1 << 0); // set LED pin to output - -/* LED1 als Output */ -GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so -GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so - -/* LED2 als Output */ -GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt -GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt - -/* LED3 als output */ -GPIOA->MODER &= ~(3 << 6); -GPIOA->MODER |= (1 << 6); - -/* s0 (PB0) als Input Versuch */ -GPIOB->MODER &= ~(3 << 0); - -/* Pull-Up Aktivieren Versuch */ -GPIOB->PUPDR &= ~(3 << 0); -GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up -} - -/* ------------------------------------------------------------------------------------ *\ - * method: static void delay(const uint16_t ms) - * - * Realizes a millisecond delay by very bad busy-wait. - * - * requires: - nothing - - * parameters: ms - delay time in milliseconds - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void delay(const uint16_t ms) -{ -for (uint16_t i = 0; i < ms; ++i) -{ - if((GPIOB->IDR & (1 << 0) && state != 99) == 0){ - state = 99; - break; - } - for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) - { - __asm("NOP"); - } -} -} - -/* ************************************ E O F ***************************************** */ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/3060ac31042200111ca2ee31eda545ee b/.metadata/.plugins/org.eclipse.core.resources/.history/82/3060ac31042200111ca2ee31eda545ee deleted file mode 100644 index b049b77..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/3060ac31042200111ca2ee31eda545ee +++ /dev/null @@ -1,212 +0,0 @@ -/* *************************************************************************************** - * Project: task1 - C:GPIO - * File: task1.c - * - * Language: C - * - * Hardware: STefi Light v1.1 - * Processor: STM32G431KBT6U - * - * Author: Manuel Lederhofer - * Datum: 10.09.2021 - * - * Version: 2.1 - * History: - * 10.09.2021 ML create project - * 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U - * 18.02.2025 TK changed projectname to "C: GPIO) - * - * Status: under development - * - * Description: - * Blinks the red LED of STefi Light, currently. - * This file contains the main routine and the initialization. - * - * Notes: - * - MCU speed at startup is 16 MHz - * - * Todo: - * - Change the example code to match the description and requirements - * of the requested application in the lab exercise guide. - * - ************************************************************************************** */ - -/* ------------------------------------ INCLUDES -------------------------------------- */ -#include "stm32g431xx.h" -#include "STefi-Light.h" - -/* ------------------------------------ DEFINES --------------------------------------- */ -#define LOOPS_PER_MS 1244 // NOP-loops for delay() -#define WAITTIME 333 - -/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */ -/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */ -int state = 0; - -/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */ - -/* ------------------------------------ PROTOTYPES ------------------------------------ */ -static void GPIO_init(void); -static void delay(const uint16_t ms); - -/* ------------------------------------ M A I N --------------------------------------- */ -int main(void) -{ - /* --- initialization --- */ - __disable_irq(); // disable interrupts globally - - GPIO_init(); - - __enable_irq(); // enable interrupts globally - - /* --- one time tasks --- */ - - //s0 Hilfvariablen auserhalb von while deklarieren - int running = 0; //0 Lauflicht aus, 1 Lauflicht an - int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung - - /* --- infinite processing loop --- */ - while (1) - { - int buttonState = GPIOB->IDR & (1 << 0); - - // fallende Flanke erkennen - if (lastButtonState && !buttonState) - { - running ^= 1; // toggle running - /* delay(50); // entprellen */ - } - - lastButtonState = buttonState; - - - if(running) - { - switch (state) - { - case 0: - state++; - GPIOA->ODR &= ~(1 << 0); - delay(WAITTIME); - GPIOA->ODR |= (1 << 0); - break; - case 1: - state++; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - case 2: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 3: - state++; - GPIOA->ODR &= ~(1 << 3); - delay(WAITTIME); - GPIOA->ODR |= (1 << 3); - break; - case 4: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 5: - state=0; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - - case 99: - GPIOA->ODR |= MASK_LED_ALL; - while(1){ - if((GPIOB->IDR & (1 << 0)) == 0){ - //delay(10); - state=0; - break; - } - } - } - } - - } - //aktuell geht er mit drücken durch die cases - // wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case - - -return 1; -} - -/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */ - -/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */ - -/* ------------------------------------------------------------------------------------ *\ - * method: static void GPIO_init(void) - * - * Initializes GPIOs on STefi Light for pins with peripherals attached. - * - * requires: - nothing - - * parameters: - none - - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void GPIO_init(void) -{ -/* enable port clocks */ -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch - -/* --- LEDs --- */ -GPIOA->ODR |= MASK_LED_ALL; -GPIOA->MODER &= ~(3 << 0); -GPIOA->MODER |= (1 << 0); // set LED pin to output - -/* LED1 als Output */ -GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so -GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so - -/* LED2 als Output */ -GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt -GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt - -/* LED3 als output */ -GPIOA->MODER &= ~(3 << 6); -GPIOA->MODER |= (1 << 6); - -/* s0 (PB0) als Input Versuch */ -GPIOB->MODER &= ~(3 << 0); - -/* Pull-Up Aktivieren Versuch */ -GPIOB->PUPDR &= ~(3 << 0); -GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up -} - -/* ------------------------------------------------------------------------------------ *\ - * method: static void delay(const uint16_t ms) - * - * Realizes a millisecond delay by very bad busy-wait. - * - * requires: - nothing - - * parameters: ms - delay time in milliseconds - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void delay(const uint16_t ms) -{ -for (uint16_t i = 0; i < ms; ++i) -{ - if((GPIOB->IDR & (1 << 0) && state != 99) == 0){ - state = 99; - break; - } - for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) - { - __asm("NOP"); - } -} -} - -/* ************************************ E O F ***************************************** */ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/a05df39b032200111ca2ee31eda545ee b/.metadata/.plugins/org.eclipse.core.resources/.history/98/a05df39b032200111ca2ee31eda545ee deleted file mode 100644 index c433132..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/a05df39b032200111ca2ee31eda545ee +++ /dev/null @@ -1,212 +0,0 @@ -/* *************************************************************************************** - * Project: task1 - C:GPIO - * File: task1.c - * - * Language: C - * - * Hardware: STefi Light v1.1 - * Processor: STM32G431KBT6U - * - * Author: Manuel Lederhofer - * Datum: 10.09.2021 - * - * Version: 2.1 - * History: - * 10.09.2021 ML create project - * 09.03.2022 ML port from STM32F042K6T6 to STM32G431KBT6U - * 18.02.2025 TK changed projectname to "C: GPIO) - * - * Status: under development - * - * Description: - * Blinks the red LED of STefi Light, currently. - * This file contains the main routine and the initialization. - * - * Notes: - * - MCU speed at startup is 16 MHz - * - * Todo: - * - Change the example code to match the description and requirements - * of the requested application in the lab exercise guide. - * - ************************************************************************************** */ - -/* ------------------------------------ INCLUDES -------------------------------------- */ -#include "stm32g431xx.h" -#include "STefi-Light.h" - -/* ------------------------------------ DEFINES --------------------------------------- */ -#define LOOPS_PER_MS 1244 // NOP-loops for delay() -#define WAITTIME 333 - -/* ------------------------------------ TYPE DEFINITIONS ------------------------------ */ -/* ------------------------------------ GLOBAL VARIABLES ------------------------------ */ -int state = 0; - -/* ------------------------------------ PRIVATE VARIABLES ----------------------------- */ - -/* ------------------------------------ PROTOTYPES ------------------------------------ */ -static void GPIO_init(void); -static void delay(const uint16_t ms); - -/* ------------------------------------ M A I N --------------------------------------- */ -int main(void) -{ - /* --- initialization --- */ - __disable_irq(); // disable interrupts globally - - GPIO_init(); - - __enable_irq(); // enable interrupts globally - - /* --- one time tasks --- */ - - //s0 Hilfvariablen auserhalb von while deklarieren - int running = 0; //0 Lauflicht aus, 1 Lauflicht an - int lastButtonState = 1; // Hilfsvariable zur Flankenerkennung - - /* --- infinite processing loop --- */ - while (1) - { - int buttonState = GPIOB->IDR & (1 << 0); - - // fallende Flanke erkennen - if (lastButtonState && !buttonState) - { - running ^= 1; // toggle running - /* delay(50); // entprellen */ - } - - lastButtonState = buttonState; - - - if(running) - { - switch (state) - { - case 0: - state++; - GPIOA->ODR &= ~(1 << 0); - delay(WAITTIME); - GPIOA->ODR |= (1 << 0); - break; - case 1: - state++; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - case 2: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 3: - state++; - GPIOA->ODR &= ~(1 << 3); - delay(WAITTIME); - GPIOA->ODR |= (1 << 3); - break; - case 4: - state++; - GPIOA->ODR &= ~(1 << 2); - delay(WAITTIME); - GPIOA->ODR |= (1 << 2); - break; - case 5: - state=0; - GPIOA->ODR &= ~(1 << 1); - delay(WAITTIME); - GPIOA->ODR |= (1 << 1); - break; - - case 99: - GPIOA->ODR |= MASK_LED_ALL; - while(1){ - if((GPIOB->IDR & (1 << 0)) == 0){ - delay(10); - state=0; - break; - } - } - } - } - - } - //aktuell geht er mit drücken durch die cases - // wegen break geht er ganz aus der if bedingung raus, nicht nur ausm switch case - - -return 1; -} - -/* ------------------------------------ GLOBAL FUNCTIONS ------------------------------ */ - -/* ------------------------------------ PRIVATE FUNCTIONS ----------------------------- */ - -/* ------------------------------------------------------------------------------------ *\ - * method: static void GPIO_init(void) - * - * Initializes GPIOs on STefi Light for pins with peripherals attached. - * - * requires: - nothing - - * parameters: - none - - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void GPIO_init(void) -{ -/* enable port clocks */ -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; // LEDs: A -RCC->AHB2ENR |= RCC_AHB2ENR_GPIOBEN; //Taster versuch - -/* --- LEDs --- */ -GPIOA->ODR |= MASK_LED_ALL; -GPIOA->MODER &= ~(3 << 0); -GPIOA->MODER |= (1 << 0); // set LED pin to output - -/* LED1 als Output */ -GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so -GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so - -/* LED2 als Output */ -GPIOA->MODER &= ~(3 << 4); // Versuch: LED 2 Mode löschen :klappt -GPIOA->MODER |= (1 << 4); // Versuch: LED 2 PA1 = output :klappt - -/* LED3 als output */ -GPIOA->MODER &= ~(3 << 6); -GPIOA->MODER |= (1 << 6); - -/* s0 (PB0) als Input Versuch */ -GPIOB->MODER &= ~(3 << 0); - -/* Pull-Up Aktivieren Versuch */ -GPIOB->PUPDR &= ~(3 << 0); -GPIOB->PUPDR |= (1 << 0); // 01 = Pull-Up -} - -/* ------------------------------------------------------------------------------------ *\ - * method: static void delay(const uint16_t ms) - * - * Realizes a millisecond delay by very bad busy-wait. - * - * requires: - nothing - - * parameters: ms - delay time in milliseconds - * returns: - nothing - - \* ------------------------------------------------------------------------------------ */ -static void delay(const uint16_t ms) -{ -for (uint16_t i = 0; i < ms; ++i) -{ - if((GPIOB->IDR & (1 << 0)) == 0){ - state = 99; - break; - } - for (uint16_t j = 0; j < LOOPS_PER_MS; ++j) - { - __asm("NOP"); - } -} -} - -/* ************************************ E O F ***************************************** */ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50d5dae2c52200111a10e980504b778a b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50d5dae2c52200111a10e980504b778a new file mode 100644 index 0000000..83aa265 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50d5dae2c52200111a10e980504b778a @@ -0,0 +1,8 @@ +/* + * sketch.c + * + * Created on: Mar 18, 2026 + * Author: tobii + */ + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/b0f5b2bb032200111ca2ee31eda545ee b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/f09ec06d0f2200111ca2ee31eda545ee similarity index 96% rename from .metadata/.plugins/org.eclipse.core.resources/.history/9c/b0f5b2bb032200111ca2ee31eda545ee rename to .metadata/.plugins/org.eclipse.core.resources/.history/cb/f09ec06d0f2200111ca2ee31eda545ee index 196bd9b..5d32b18 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/b0f5b2bb032200111ca2ee31eda545ee +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/f09ec06d0f2200111ca2ee31eda545ee @@ -125,7 +125,7 @@ int main(void) GPIOA->ODR |= MASK_LED_ALL; while(1){ if((GPIOB->IDR & (1 << 0)) == 0){ - delay(10); + delay(150); state=0; break; } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/209aa2a9ca2200111412fa6c3f9d8906 b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/209aa2a9ca2200111412fa6c3f9d8906 new file mode 100644 index 0000000..814d013 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/209aa2a9ca2200111412fa6c3f9d8906 @@ -0,0 +1,24 @@ +/* + * sketch.c + * + * Created on: Mar 18, 2026 + * Author: tobii + */ +int reihenfolge[6] = {0, 1, 2, 3, 2, 1}; + +int main(){ + while(1){ + while(/*schalter gedrückt*/){} + delay(); + while(/*schalter losgelassen*/){} + delay(); + + int aktiv = 1; + while(aktiv){ + for(int i; i < reihenfolge.length - 1; i ++){ + //alle LED einschalten + if(i = 0) + } + } + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.indexes/c4/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.indexes/c4/history.index index 49210ed..c936047 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.indexes/c4/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.indexes/c4/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers index b4b8d47..f8efdb4 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers.snap index 7f76ed9..1b39a06 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.syncinfo.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task1/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.indexes/properties.index index fb0e929..755788d 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.markers.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.syncinfo.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task2/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.markers.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.syncinfo.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task3/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.markers.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.syncinfo.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/task4/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers index 9e5bd15..661c3b5 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap index 0b368ce..414a6b3 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/65.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/66.tree similarity index 69% rename from .metadata/.plugins/org.eclipse.core.resources/.root/65.tree rename to .metadata/.plugins/org.eclipse.core.resources/.root/66.tree index f3057aa..a8bbfbf 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/65.tree and b/.metadata/.plugins/org.eclipse.core.resources/.root/66.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 0e7c9f4..d32477e 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/65.snap b/.metadata/.plugins/org.eclipse.core.resources/65.snap deleted file mode 100644 index d68f871..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/65.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/66.snap b/.metadata/.plugins/org.eclipse.core.resources/66.snap new file mode 100644 index 0000000..f42c958 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/66.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index 7ba146d..3a0425b 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -1,6 +1,6 @@ IMPORT_FILES_AND_FOLDERS_RELATIVE=true IMPORT_FILES_AND_FOLDERS_TYPE=23,1 eclipse.preferences.version=1 -platformState=1772304866315 +platformState=1772304866316 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index 9e53e4d..a041b0b 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,8 +1,8 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration - + @@ -11,9 +11,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:com.st.stm32cube.ide.mcu.informationcenter.actionSet3 persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -67,70 +67,70 @@ persp.viewSC:com.st.stm32cube.ide.mcu.buildanalyzer.view persp.viewSC:com.st.stm32cube.ide.mcu.stackanalyzer.stackanalyzer.view persp.viewSC:com.st.stm32cube.ide.mcu.sfrview - - - + + + View categoryTag:General - + View categoryTag:C/C++ - + View categoryTag:General - - - - - - + + + + + + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + General - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:General - - + + View categoryTag:General - + View categoryTag:General - + View categoryTag:Make @@ -138,7 +138,7 @@ - + persp.actionSet:com.st.stm32cube.ide.mcu.informationcenter.actionSet3 persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -192,121 +192,121 @@ persp.editorOnboardingCommand:Step Over$$$F6 persp.editorOnboardingCommand:Step Return$$$F7 persp.editorOnboardingCommand:Resume$$$F8 - - - + + + org.eclipse.e4.primaryNavigationStack - + View categoryTag:Debug - + View categoryTag:General - - + + View categoryTag:Debug - - - - + + + + org.eclipse.e4.secondaryNavigationStack - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + Debug noFocus - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug @@ -315,2179 +315,2195 @@ - - + + View categoryTag:Help - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Help - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + org.eclipse.e4.primaryDataStack EditorStack active - + noFocus + Editor removeOnHide org.eclipse.cdt.ui.editor.asm.AsmEditor - - + + Editor removeOnHide org.eclipse.cdt.ui.editor.CEditor - + Editor removeOnHide org.eclipse.cdt.ui.editor.CEditor - + Editor removeOnHide org.eclipse.cdt.ui.editor.CEditor - - + + Editor removeOnHide org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.asm.AsmEditor active - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Make - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug activeOnClose - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - - + + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + Draggable - - + + - + toolbarSeparator - + - + Draggable - + Draggable - + Draggable - + Draggable - + toolbarSeparator - + - + Draggable - + - + Draggable - + + Draggable + + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack Draggable - + TrimStack Draggable - + TrimStack Draggable - - + + TrimStack Draggable - + TrimStack Draggable - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + platform:gtk - + platform:gtk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + type:user - + type:user - - + + - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor removeOnHide - + View categoryTag:Device Configuration Tool - + View categoryTag:C/C++ - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:Debug - + View categoryTag:FreeRTOS - + View categoryTag:FreeRTOS - + View categoryTag:FreeRTOS - + View categoryTag:FreeRTOS - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:C/C++ - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:ThreadX - + View categoryTag:C/C++ - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Make - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Help - + View categoryTag:Connections - + View categoryTag:General - + View categoryTag:Version Control (Team) - + View categoryTag:Version Control (Team) - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:C/C++ - + View categoryTag:Debug - + View categoryTag:Other - - + + glue move_after:PerspectiveSpacer SHOW_RESTORE_MENU - + move_after:Spacer Glue HIDEABLE SHOW_RESTORE_MENU - + glue move_after:SearchField SHOW_RESTORE_MENU - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/version.ini b/.metadata/version.ini index 9520d58..5a2a0e8 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Tue Mar 17 14:15:39 CET 2026 +#Fri Mar 20 18:06:30 CET 2026 org.eclipse.core.runtime=2 org.eclipse.platform=4.30.0.v20231201-0110 diff --git a/task1/.settings/language.settings.xml b/task1/.settings/language.settings.xml index db73c0f..9699d9b 100644 --- a/task1/.settings/language.settings.xml +++ b/task1/.settings/language.settings.xml @@ -13,7 +13,7 @@ - + diff --git a/task1/Debug/Src/task1.o b/task1/Debug/Src/task1.o index 4c618fb..ea0955b 100644 Binary files a/task1/Debug/Src/task1.o and b/task1/Debug/Src/task1.o differ diff --git a/task1/Debug/task1.elf b/task1/Debug/task1.elf index d4bddc7..c3d2c10 100755 Binary files a/task1/Debug/task1.elf and b/task1/Debug/task1.elf differ diff --git a/task1/Debug/task1.list b/task1/Debug/task1.list index 6a07827..da448ba 100644 --- a/task1/Debug/task1.list +++ b/task1/Debug/task1.list @@ -333,8 +333,8 @@ __STATIC_FORCEINLINE void __disable_irq(void) 80003d8: f003 0301 and.w r3, r3, #1 80003dc: 2b00 cmp r3, #0 80003de: d1f9 bne.n 80003d4 - delay(20); - 80003e0: 2014 movs r0, #20 + delay(150); + 80003e0: 2096 movs r0, #150 @ 0x96 80003e2: f000 f87b bl 80004dc state=0; 80003e6: 4b03 ldr r3, [pc, #12] @ (80003f4 ) diff --git a/task1/Src/sketch.c b/task1/Src/sketch.c new file mode 100644 index 0000000..c6da3cc --- /dev/null +++ b/task1/Src/sketch.c @@ -0,0 +1,36 @@ +/* + * sketch.c + * + * Created on: Mar 18, 2026 + * Author: tobii + */ +int reihenfolge[6] = {0, 1, 2, 3, 2, 1}; + +int main(){ + while(1){ + while(/*schalter nicht gedrückt*/){} + delay(10); + while(/*schalter losgelassen*/){} + delay(150); + + int aktiv = 1; + while(aktiv){ + for(int i; i < reihenfolge.length - 1 && aktiv = 1; i ++){ + //alle LED einschalten + if(i = 0){/*alles bis auf LED0 auschalten*/} + if(i = 1){/*..*/} + //... + for(int zähler = 0; zähler < 333 && aktiv == 1; zähler++){ + if(/*schalter gerückt*/){ + aktiv = 0; + break; + } + else{ + delay(1); + } + } + while(/*Taster gedrückt*/){} + } + } + } +} diff --git a/task1/Src/task1.c b/task1/Src/task1.c index 4de8f74..1011581 100644 --- a/task1/Src/task1.c +++ b/task1/Src/task1.c @@ -125,7 +125,7 @@ int main(void) GPIOA->ODR |= MASK_LED_ALL; while(1){ if((GPIOB->IDR & (1 << 0)) == 0){ - delay(20); + delay(150); state=0; break; } @@ -166,7 +166,7 @@ GPIOA->MODER &= ~(3 << 0); GPIOA->MODER |= (1 << 0); // set LED pin to output /* LED1 als Output */ -GPIOA->MODER &= ~(3 << 2); // Versuch: LED 1 Mode löschen :klappt so +GPIOA->MODER &= ~(3 ^<< 2); // Versuch: LED 1 Mode löschen :klappt so GPIOA->MODER |= (1 << 2); // Versuch: LED 1 PA1 = output :klappt so /* LED2 als Output */ diff --git a/task2/.settings/language.settings.xml b/task2/.settings/language.settings.xml index 8238781..ac94a18 100644 --- a/task2/.settings/language.settings.xml +++ b/task2/.settings/language.settings.xml @@ -14,7 +14,7 @@ - + diff --git a/task3/.settings/language.settings.xml b/task3/.settings/language.settings.xml index db73c0f..9699d9b 100644 --- a/task3/.settings/language.settings.xml +++ b/task3/.settings/language.settings.xml @@ -13,7 +13,7 @@ - + diff --git a/task4/.settings/language.settings.xml b/task4/.settings/language.settings.xml index 2996d0b..89b9f24 100644 --- a/task4/.settings/language.settings.xml +++ b/task4/.settings/language.settings.xml @@ -13,7 +13,7 @@ - +