forked from ROMEO/obsw
Added can test code
This commit is contained in:
@ -52,16 +52,15 @@ extern "C" {
|
||||
// TODO: Is u32 compatible to uint32_t?
|
||||
|
||||
|
||||
|
||||
/// Reads the value of a gpio pin
|
||||
///
|
||||
pub fn gpio_read_pin(pin: u32) -> u32;
|
||||
pub fn gpio_toggle_pin(pin: u32) -> ();
|
||||
|
||||
|
||||
// CAN Samples
|
||||
|
||||
|
||||
fn canps_poll_example() -> u32;
|
||||
pub fn canps_poll_example() -> i32;
|
||||
|
||||
}
|
||||
|
||||
|
@ -173,6 +173,23 @@ impl SystemObjectIF for HandlerSender {
|
||||
fn mission() {
|
||||
sifln!("Mission enter");
|
||||
|
||||
|
||||
use crate::osal::*;
|
||||
unsafe {
|
||||
sifln!("Setup GPIO");
|
||||
gpio_setup();
|
||||
sifln!(";");
|
||||
sifln!("✅");
|
||||
gpio_toggle_pin(0x00000070);
|
||||
sifln!("✅");
|
||||
|
||||
|
||||
sifln!("Call canps poll example()");
|
||||
|
||||
canps_poll_example();
|
||||
}
|
||||
sifln!("Called canps poll example()");
|
||||
|
||||
let mut h1 = Handler {
|
||||
id: 1,
|
||||
command_queue: queues::MessageQueue::new(),
|
||||
|
Reference in New Issue
Block a user