#[macro_export]
macro_rules! entry {
($robot_type:ty) => {
static ROBOT: $crate::once::Once<$crate::robot::Competition<$robot_type>> =
$crate::once::Once::new();
#[no_mangle]
unsafe extern "C" fn initialize() {
ROBOT.call_once(|| {
Competition::new($crate::robot::Robot::new(unsafe {
$crate::peripherals::Peripherals::new()
}))
});
}
#[no_mangle]
extern "C" fn opcontrol() {
ROBOT.wait().opcontrol();
}
#[no_mangle]
extern "C" fn autonomous() {
ROBOT.wait().autonomous();
}
#[no_mangle]
extern "C" fn disabled() {
ROBOT.wait().disabled();
}
};
}