Comments (12)
I think best would be to treat periph as defaults (common) and inside device/xxx.h create overrides.
from pdk-includes.
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.
Good catch. I missed that one from earlier.
This changeset should fix that: 7353118
from pdk-includes.
Have you found any other unaccounted for differences yet?
from pdk-includes.
there are no defines for PADIE/PBDIE values like #define PADIE_PA0_WAKEUP_ENABLE 0x01
from pdk-includes.
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.
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.
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.
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.
Just added support for PMS131, which was a little different compared to others, but still pretty manageable. Had to #undef a few things.
from pdk-includes.
Do you still need this issue open?
from pdk-includes.
Issue solved
from pdk-includes.
Related Issues (9)
- PMS150G support? HOT 4
- How to add a new device? HOT 6
- Discrepency with PFS154 fuses versus current datasheet HOT 3
- HAS_* macro names HOT 2
- macros for using factory calibration values HOT 7
- Rework fuse handling? HOT 4
- Add LICENSE HOT 6
- Merge easy-pdk includes into this repository / inclusion in SDCC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdk-includes.