Merge remote-tracking branch 'origin/mohr/rust' into nehlich/ffs

This commit is contained in:
paul nehlich
2024-07-26 12:53:39 +02:00
26 changed files with 513 additions and 110 deletions

View File

@ -9,6 +9,24 @@
void rust_main();
#include <hardware/interfaces.h>
#include <unistd.h>
void test_hardware() {
int fd0 = hw_device_open("uart0", 5);
write(fd0, "uart0\n", 6);
int fd1 = hw_device_open("uart1", 5);
write(fd1, "uart1\n", 6);
vTaskDelay(3000 / portTICK_PERIOD_MS);
uint8_t buffer[100];
int read_bytes = read(fd0, buffer, sizeof(buffer));
write(1, buffer, read_bytes);
read_bytes = read(fd1, buffer, sizeof(buffer));
write(1, buffer, read_bytes);
}
// called to stop execution (either a panic or program ended)
// to be implemented by bsp (do not return from it!)
void done();
@ -16,6 +34,8 @@ void done();
void init_task(void *) {
// printf("Starting Mission\n");
test_hardware();
rust_main();
// printf("Started Tasks, deleting init task\n");
@ -25,6 +45,8 @@ void init_task(void *) {
vTaskDelete(NULL);
}
void mission(void) {
int taskParameters = 0;