generated from sirlilpanda/kicad-project-template-actionless
Added the zig_main project to software for zig based implementation of code for robot
This commit is contained in:
8
software/zig_main/patches/xport_can_yield.zig
Normal file
8
software/zig_main/patches/xport_can_yield.zig
Normal file
@@ -0,0 +1,8 @@
|
||||
pub fn xPortCanYield() callconv(.c) bool {
|
||||
var threshold: u32 = blk: {
|
||||
break :blk @as([*c]volatile u32, @ptrFromInt(@as(c_int, 545259520) + @as(c_int, 8))).*;
|
||||
};
|
||||
_ = &threshold;
|
||||
threshold = threshold >> @intCast(@as(c_int, 24) + (@as(c_int, 8) - @as(c_int, 3)));
|
||||
return threshold == @as(u32, @bitCast(@as(c_int, 0)));
|
||||
}
|
||||
Reference in New Issue
Block a user