examples: Set LED GPIO function (#61)

Set the pin function to SIO instead of null (default).
This commit is contained in:
Hubert Jasudowicz 2023-05-18 09:24:18 +02:00 committed by GitHub
parent abff6d1f4b
commit d1e35696d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ fn core1() void {
}
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
multicore.launch_core1(core1);

View File

@ -28,6 +28,7 @@ pub const std_options = struct {
};
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
led.put(1);

View File

@ -28,6 +28,7 @@ pub const std_options = struct {
};
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
led.put(1);

View File

@ -24,6 +24,7 @@ pub const std_options = struct {
};
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
led.put(1);

View File

@ -138,6 +138,7 @@ pub const std_options = struct {
};
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
led.put(1);

View File

@ -153,6 +153,7 @@ pub const std_options = struct {
};
pub fn main() !void {
led.set_function(.sio);
led.set_direction(.out);
led.put(1);