diff --git a/mission/mission.c b/mission/mission.c index ce14781..329828c 100644 --- a/mission/mission.c +++ b/mission/mission.c @@ -6,6 +6,7 @@ #include "FreeRTOS.h" #include "semphr.h" #include "task.h" +#include "uart_rust_helper.h" void rust_main(); @@ -32,7 +33,11 @@ void test_hardware() { void done(); void init_task(void *) { - // printf("Starting Mission\n"); + printf("Starting UART polled Test\n"); + + uart_polled_test(); + + printf("Starting Hardware Test\n"); test_hardware(); diff --git a/mission/uart_rust_helper.c b/mission/uart_rust_helper.c index 5a198d6..9bc2ada 100644 --- a/mission/uart_rust_helper.c +++ b/mission/uart_rust_helper.c @@ -44,8 +44,14 @@ #include "xparameters.h" #include "xstatus.h" #include "xuartlite.h" -#include "xil_printf.h" +#include "xil_types.h" +#include "xil_assert.h" +#include "xstatus.h" +#include "xuartlite.h" +#include "xil_io.h" +#include "xil_printf.h" +#include "uart_rust_helper.h" /************************** Constant Definitions *****************************/ /* @@ -74,11 +80,6 @@ /************************** Function Prototypes ******************************/ -#ifndef SDT -int UartLitePolledExample(u16 DeviceId); -#else -int UartLitePolledExample(UINTPTR BaseAddress); -#endif /************************** Variable Definitions *****************************/ diff --git a/mission/uart_rust_helper.h b/mission/uart_rust_helper.h new file mode 100644 index 0000000..126b37f --- /dev/null +++ b/mission/uart_rust_helper.h @@ -0,0 +1,28 @@ + +#ifndef XUARTLITE_HELPER_H /* prevent circular inclusions */ +#define XUARTLITE_HELPER_H /* by using protection macros */ + +#ifdef __cplusplus +extern "C" { +#endif + +/***************************** Include Files ********************************/ + +#include "xil_types.h" +#include "xil_assert.h" +#include "xuartlite.h" +#include "xstatus.h" + +int uart_polled_test(void); + +#ifndef SDT +int UartLitePolledExample(u16 DeviceId); +#else +int UartLitePolledExample(UINTPTR BaseAddress); +#endif + +#ifdef __cplusplus +} +#endif + +#endif