Skip to content

Commit

Permalink
Adding Zig examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubberazer committed Jun 26, 2024
1 parent b4eff39 commit af58acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EXAMPLES_Zig/jetgpio_example.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ pub fn main() !void {
std.debug.print("Error initiating jetgpio\n", .{});
}
// Setting up pin 3 as output
const set1 = jetgpio.gpioSetMode(3, 1);
const set1 = jetgpio.gpioSetMode(3, jetgpio.JET_OUTPUT);
if (set1 < 0) {
std.debug.print("Error setting pin 3\n", .{});
}

// Setting up pin 7 as input
const set2 = jetgpio.gpioSetMode(7, 0);
const set2 = jetgpio.gpioSetMode(7, jetgpio.JET_INPUT);
if (set2 < 0) {
std.debug.print("Error setting pin 7\n", .{});
}
Expand Down

0 comments on commit af58acb

Please sign in to comment.