File tree 1 file changed +0
-26
lines changed
1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 11
11
12
12
use log:: warn;
13
13
14
- use core:: ffi:: c_void;
15
-
16
14
use zephyr:: raw:: GPIO_OUTPUT_ACTIVE ;
17
15
use zephyr:: time:: { Duration , sleep } ;
18
16
@@ -22,30 +20,6 @@ extern "C" fn rust_main() {
22
20
23
21
warn ! ( "Starting blinky" ) ;
24
22
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.
49
23
do_blink ( ) ;
50
24
}
51
25
You can’t perform that action at this time.
0 commit comments