forked from ROMEO/obsw
save all would be great
This commit is contained in:
parent
08b4bf2ad7
commit
c471de9179
@ -335,5 +335,3 @@ static int RecvFrame(XCanPs *InstancePtr)
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
# define FALSE 2U
|
@ -23,16 +23,17 @@ uint32_t gpio_read_pin(uint32_t pin) {
|
||||
|
||||
void gpio_toggle_pin(uint32_t pin) {
|
||||
}
|
||||
|
||||
endif()
|
||||
|
||||
if(TargetIsZedboard TRUE)
|
||||
|
||||
XGpioPs gpio;
|
||||
XGpioPs gpio; // Global!
|
||||
void gpio_setup() {
|
||||
XGpioPs_Config config;
|
||||
config.DeviceId = 4; // chosen by fair dice throw
|
||||
config.BaseAddr = XPS_GPIO_BASEADDR;
|
||||
s32 returncode = XGpioPs_CfgInitialize(&gpio, &config, XPS_GPIO_BASEADDR);
|
||||
XGpioPs_Config config; // Global!
|
||||
config.DeviceId = 4; // chosen by fair dice throw // Global!
|
||||
config.BaseAddr = XPS_GPIO_BASEADDR; // Global!
|
||||
s32 returncode = XGpioPs_CfgInitialize(&gpio, &config, XPS_GPIO_BASEADDR); // Global!
|
||||
//printf("Configured XGPIO");
|
||||
XGpioPs_SetDirection(&gpio, 0, (1 << 7));
|
||||
XGpioPs_SetOutputEnable(&gpio, 0, (1 << 7));
|
||||
|
@ -170,10 +170,17 @@ impl SystemObjectIF for HandlerSender {
|
||||
}
|
||||
}
|
||||
|
||||
fn mission() {
|
||||
fn mission() { // lets call it "main()"
|
||||
sifln!("Mission enter");
|
||||
|
||||
|
||||
// When the IOs are initialized later.. what do we do here?!
|
||||
setup_all_com_if {
|
||||
|
||||
gpio_cookie.setup() // needs to register cookies -> ComIFs haben ObjectIDs -> Kennt ein ComIF alle seine Cookies? (Potentiell ja, weil sie dort erstellt werden)
|
||||
|
||||
}
|
||||
|
||||
use crate::osal::*;
|
||||
unsafe {
|
||||
sifln!("Setup GPIO");
|
||||
@ -218,6 +225,17 @@ fn mission() {
|
||||
tasks: &mut [&mut t1, &mut t2],
|
||||
};
|
||||
|
||||
|
||||
// Initialize all IOs
|
||||
init_all_com_if {
|
||||
for comIF in comIFs {
|
||||
for cookie in comIF.get_cookies() {
|
||||
cookie.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// At last HERE all IOs must be configerued and ready for operations!
|
||||
task_executor.init_and_run(false);
|
||||
|
||||
sifln!("Mission delay");
|
||||
|
23
structures.txt
Normal file
23
structures.txt
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
C
|
||||
BSP_z7 XGpio...c // Linux (FreeRTOS compiled for Linux! (Wollen wir!))
|
||||
mission-BSP gpio_rust_helper.c
|
||||
FreeRTOS (/ RTEMS / Linux (haben wir nicht vor!)) (Für Hardwareabstractions egal!)
|
||||
Rust
|
||||
mod osal
|
||||
mod safe_osal
|
||||
FSRC
|
||||
|
||||
|
||||
|
||||
BSP_z7
|
||||
FreeRTOS
|
||||
mission
|
||||
osal (-> FreeRTOS / Linux)
|
||||
hal (-> BSP_z7 / BSP_ROMEO_OBC / Linux_Sockets_Simulator)
|
||||
mission_rust
|
||||
fsrc (-> osal (z.B TaskScheduler), hal (zB. trait ComIF))
|
||||
rfsw (-> fsrc )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user