Comment

Comment by sammorrowdrums

I was wondering in the P0, P1 issue, why the auther didn't use an Enum, Enums are the easiest way to handle that sort of mixed type.

On my phone something like:

    enum Pin {
       Pin0(P0, usize)
       Pin1(P1, usize)
    }

Assuming that would work in the embedded device which I don't know.

I know the above doesn't affect the general point, but I have found lots of people struggling with Rust haven't yet discovered that you can easily combine types in Enums.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton