From 7b326dd285951515c24780e79098103fa5c09a20 Mon Sep 17 00:00:00 2001 From: Grazfather Date: Sat, 31 May 2025 11:04:03 -0400 Subject: [PATCH] rp2xxx: pio: Fix some exported types --- port/raspberrypi/rp2xxx/src/hal/gpio.zig | 2 +- port/raspberrypi/rp2xxx/src/hal/pio.zig | 6 +++--- port/raspberrypi/rp2xxx/src/hal/pio/common.zig | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/port/raspberrypi/rp2xxx/src/hal/gpio.zig b/port/raspberrypi/rp2xxx/src/hal/gpio.zig index cf6eabac0..d9865fdae 100644 --- a/port/raspberrypi/rp2xxx/src/hal/gpio.zig +++ b/port/raspberrypi/rp2xxx/src/hal/gpio.zig @@ -264,7 +264,7 @@ pub const Mask = pub fn read(self: Mask) u48 { const lower_mask = self.lower_32_mask(); - const lower_val: u32 = SIO.GPIO_IN & lower_mask; + const lower_val: u32 = SIO.GPIO_IN.raw & lower_mask; const upper_mask = self.upper_16_mask(); const upper_val: u16 = @truncate(SIO.GPIO_HI_IN.raw & upper_mask); return (@as(u48, upper_val) << 32) | @as(u48, lower_val); diff --git a/port/raspberrypi/rp2xxx/src/hal/pio.zig b/port/raspberrypi/rp2xxx/src/hal/pio.zig index b1561fbcd..fe39ef8a3 100644 --- a/port/raspberrypi/rp2xxx/src/hal/pio.zig +++ b/port/raspberrypi/rp2xxx/src/hal/pio.zig @@ -15,10 +15,10 @@ pub const StateMachine = common.StateMachine; pub const Instruction = common.Instruction(chip); pub const PinMapping = common.PinMapping; pub const PinMappingOptions = common.PinMappingOptions; -pub const StateMachineInitOptions = chip_specific.StateMachineInitOptions; -pub const LoadAndStartProgramOptions = chip_specific.LoadAndStartProgramOptions; +pub const StateMachineInitOptions = common.StateMachineInitOptions(chip); +pub const LoadAndStartProgramOptions = common.LoadAndStartProgramOptions(chip); pub const ClkDivOptions = common.ClkDivOptions; -pub const ShiftOptions = chip_specific.ShiftOptions; +pub const ShiftOptions = common.ShiftOptions(chip); pub const assembler = @import("pio/assembler.zig"); const encoder = @import("pio/assembler/encoder.zig"); diff --git a/port/raspberrypi/rp2xxx/src/hal/pio/common.zig b/port/raspberrypi/rp2xxx/src/hal/pio/common.zig index b7d8ac6c4..790cf45f3 100644 --- a/port/raspberrypi/rp2xxx/src/hal/pio/common.zig +++ b/port/raspberrypi/rp2xxx/src/hal/pio/common.zig @@ -647,7 +647,7 @@ pub fn StateMachineInitOptions(chip: Chip) type { pub fn LoadAndStartProgramOptions(chip: Chip) type { return struct { - clkdiv: ClkDivOptions, + clkdiv: ClkDivOptions = .{}, shift: ShiftOptions(chip) = .{}, pin_mappings: PinMappingOptions = .{}, exec: ExecOptions = .{},