examples: Set LED GPIO function (#61)
Set the pin function to SIO instead of null (default).
This commit is contained in:
parent
abff6d1f4b
commit
d1e35696d4
|
@ -18,6 +18,7 @@ fn core1() void {
|
|||
}
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
multicore.launch_core1(core1);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ pub const std_options = struct {
|
|||
};
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
led.put(1);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ pub const std_options = struct {
|
|||
};
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
led.put(1);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ pub const std_options = struct {
|
|||
};
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
led.put(1);
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ pub const std_options = struct {
|
|||
};
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
led.put(1);
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ pub const std_options = struct {
|
|||
};
|
||||
|
||||
pub fn main() !void {
|
||||
led.set_function(.sio);
|
||||
led.set_direction(.out);
|
||||
led.put(1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user