Skip to content

nrf528xx.zon sets values for Pull incorrectly #1030

Closed

Description

@TJ-C

/Users/tjc/Code/zig/MicroZig/Microbit/zig-pkg/microzig-0.15.2-D20YSeS94gDPQ34p7Lfjuucvrv4xVcFQm6YxIiOzU_yh/port/nordic/nrf5x/patches/nrf528xx.zon

.up value should be 0x3 not 0x2.

PIN_CNF[x]

.{
        .add_enum = .{
            .parent = "types.peripherals.P0",
            .@"enum" = .{
                .name = "Pull",
                .bitsize = 2,
                .fields = .{
                    .{ .value = 0x0, .name = "disabled" },
                    .{ .value = 0x1, .name = "down" },
                    .{ .value = 0x2, .name = "up" },
                },
            },
        },
    },
    .{ .set_enum_type = .{ .of = "types.peripherals.P0.PIN_CNF.PULL", .to = "types.peripherals.P0.Pull" } },
# should be:
.{
        .add_enum = .{
            .parent = "types.peripherals.P0",
            .@"enum" = .{
                .name = "Pull",
                .bitsize = 2,
                .fields = .{
                    .{ .value = 0x0, .name = "disabled" },
                    .{ .value = 0x1, .name = "down" },
                    .{ .value = 0x3, .name = "up" },
                },
            },
        },
    },
    .{ .set_enum_type = .{ .of = "types.peripherals.P0.PIN_CNF.PULL", .to = "types.peripherals.P0.Pull" } },

Activity

  1. Grazfather commented on Sep 12, 2026

    @Grazfather
    Collaborator

    Another good find. Fixed in #1035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions