File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 1111
1212use log:: warn;
1313
14- use core:: ffi:: c_void;
15-
1614use zephyr:: raw:: GPIO_OUTPUT_ACTIVE ;
1715use zephyr:: time:: { Duration , sleep } ;
1816
@@ -22,30 +20,6 @@ extern "C" fn rust_main() {
2220
2321 warn ! ( "Starting blinky" ) ;
2422
25- // Invoke "blink" as a user thread.
26- if false {
27- // Note that for now, this is just a 'false', but is an easy test to use to see if
28- // permissions are correct for usermode Rust. At this point, the GPIO won't be accessible,
29- // and neither will the memory needed for allocation.
30- unsafe {
31- zephyr:: raw:: k_thread_user_mode_enter
32- ( Some ( blink) ,
33- core:: ptr:: null_mut ( ) ,
34- core:: ptr:: null_mut ( ) ,
35- core:: ptr:: null_mut ( ) ) ;
36- }
37- } else {
38- unsafe {
39- blink ( core:: ptr:: null_mut ( ) ,
40- core:: ptr:: null_mut ( ) ,
41- core:: ptr:: null_mut ( ) ) ;
42- }
43- }
44- }
45-
46- // fn blink() {
47- unsafe extern "C" fn blink ( _p1 : * mut c_void , _p2 : * mut c_void , _p3 : * mut c_void ) {
48- // Just call a "safe" rust function.
4923 do_blink ( ) ;
5024}
5125
You can’t perform that action at this time.
0 commit comments