Giter Club home page Giter Club logo

Comments (12)

kaweksl avatar kaweksl commented on August 9, 2024

I think best would be to treat periph as defaults (common) and inside device/xxx.h create overrides.

from pdk-includes.

kaweksl avatar kaweksl commented on August 9, 2024

Above example can be solved in another way since from what i can tell uC variants without port B have comparator input on PA6,PA7 and those with port B have it on PB6, PB7 so HAS_PORTB could be used inside comparator.h .

But question how we should deal with differences remains.

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Good catch. I missed that one from earlier.

This changeset should fix that: 7353118

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Have you found any other unaccounted for differences yet?

from pdk-includes.

kaweksl avatar kaweksl commented on August 9, 2024

there are no defines for PADIE/PBDIE values like #define PADIE_PA0_WAKEUP_ENABLE 0x01

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

there are no defines for PADIE/PBDIE values like #define PADIE_PA0_WAKEUP_ENABLE 0x01

Yeah, those didn't really seem all that useful, because PADIER/PBDIER works the same way as PA/PB, PAC/PBC, PAPH/PBPH, and so on. Meaning, PxDIER bit 0 is always tied to pin Px.0 and so on and a 0 always means disable and 1 means enable.

I think the only reason they are broken out in the datasheet is because sometimes some of the pins can't be used for interrupt requests, even though they can still be used for digital inputs / wakeup events.

from pdk-includes.

kaweksl avatar kaweksl commented on August 9, 2024

Yea , past names are also little confusing, maybe add

#define PIN0	0x01
#define PIN1	0x02
#define PIN2	0x04
#define PIN3	0x08
#define PIN4	0x10
#define PIN5	0x20
#define PIN6	0x40
#define PIN7	0x80

So we could for example use:
PADIE = PIN0 | PIN4

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Sure, that sounds reasonable to me. Just have to think of which file that should go in. Maybe the port_a.h file, because so far every device has a port a.

Here you go: 2a273bb

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Just added support for PMS154B and PMS154C, and other than catching one more bug (with PWMG2C), I didn't see any new differences that weren't already accounted for.

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Just added support for PMS131, which was a little different compared to others, but still pretty manageable. Had to #undef a few things.

c745d11

from pdk-includes.

serisman avatar serisman commented on August 9, 2024

Do you still need this issue open?

from pdk-includes.

kaweksl avatar kaweksl commented on August 9, 2024

Issue solved

from pdk-includes.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.