serial hello world
This commit is contained in:
@ -1,9 +1,14 @@
|
|||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <PontCoopScheduler.h>
|
#include <PontCoopScheduler.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <main.h>
|
#include <main.h>
|
||||||
|
#include <usart.h>
|
||||||
|
|
||||||
|
|
||||||
void my_setup_2() {
|
void my_setup_1() {
|
||||||
|
schInit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,11 +30,16 @@ void blinkBlue(void *handle) {
|
|||||||
HAL_GPIO_TogglePin(LED_Blue_GPIO_Port, LED_Blue_Pin);
|
HAL_GPIO_TogglePin(LED_Blue_GPIO_Port, LED_Blue_Pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void my_setup_1() {
|
void helloWorld(void *handle) {
|
||||||
schInit();
|
static char hello[] = "Hello World\n\r";
|
||||||
|
HAL_UART_Transmit_IT(&huart1, (uint8_t*) hello, strlen(hello));
|
||||||
|
}
|
||||||
|
|
||||||
|
void my_setup_2() {
|
||||||
schAdd(blinkBlue, NULL, 0, 250);
|
schAdd(blinkBlue, NULL, 0, 250);
|
||||||
schAdd(blinkRed, NULL, 0, 500);
|
schAdd(blinkRed, NULL, 0, 500);
|
||||||
schAdd(blinkGreen, NULL, 0, 1000);
|
schAdd(blinkGreen, NULL, 0, 1000);
|
||||||
|
schAdd(helloWorld, NULL, 0, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void my_loop() {
|
void my_loop() {
|
||||||
|
Reference in New Issue
Block a user