You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
570 B
Zig

const std = @import("std");
const microzig = @import("microzig");
const rp2040 = microzig.hal;
const gpio = rp2040.gpio;
const clocks = rp2040.clocks;
const time = rp2040.time;
const regs = microzig.chip.registers;
const multicore = rp2040.multicore;
const pin_config = rp2040.pins.GlobalConfiguration{
.GPIO25 = .{ .name = "led", .function = .PWM4_B },
};
pub fn main() !void {
const pins = pin_config.apply();
pins.led.slice().setWrap(100);
pins.led.setLevel(10);
pins.led.slice().enable();
while (true) {
time.sleepMs(250);
}
}