diff options
| author | sowgro <tpoke.ferrari@gmail.com> | 2025-09-30 15:30:46 -0400 |
|---|---|---|
| committer | sowgro <tpoke.ferrari@gmail.com> | 2025-09-30 15:30:46 -0400 |
| commit | aff39df39db30502e03297d5754857b21e1a8455 (patch) | |
| tree | fdebaac136f91ce981e78c1444cef78f2f6787b0 /project/Core/Src/Activties/activity7.c | |
| parent | 0062ce3d8c64ed7b0cf0c94e8dcc2cc316df4fb1 (diff) | |
| download | 340-repo-Sowgro-aff39df39db30502e03297d5754857b21e1a8455.tar.gz 340-repo-Sowgro-aff39df39db30502e03297d5754857b21e1a8455.tar.bz2 340-repo-Sowgro-aff39df39db30502e03297d5754857b21e1a8455.zip | |
activity6
Diffstat (limited to '')
| -rw-r--r-- | project/Core/Src/Activties/activity7.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/project/Core/Src/Activties/activity7.c b/project/Core/Src/Activties/activity7.c new file mode 100644 index 0000000..2ffc9e8 --- /dev/null +++ b/project/Core/Src/Activties/activity7.c @@ -0,0 +1,26 @@ +/* + * activity7.c + * + * Created on: Sep 30, 2025 + * Author: sowgro + */ + +#include "LED.h" +#include "UART.h" +#include <stdio.h> + +void activity7_run() { + for(;;) { + uint8_t ch = USART_Read(USART2); + printf("%c", ch); + if (ch == '\r') { + printf("\n"); + } + if (ch == '0') { + LED_On(); + } + if (ch == 'f') { + LED_Off(); + } + } +} |
