Comments (4)
Both of those sound useful. One of the original design goals (that it looks like I didn't actually write down), was to avoid modifying the WCH code structure too much, so that it would be easier to pull in updates from WCH. From that angle, I would prefer #ifdefs. Separating them into individual library files does seem to be inline with how SDCC works, though.
from ch554_sdcc.
I think you could probably do a lot better job if you had written it from scratch. The UART code isn't the only thing that needs work; mDelayuS could use a rewrite too. I also would've named it util.c instead of debug, since it's not specific to debugging.
from ch554_sdcc.
Yeah, I agree- This was more of a strategy for keeping the scope of the project small enough so that I could get something working. As long as the example files are modified to work with the changes, it seems reasonable to rename and/or split the files up. We should probably put a short note at the top of the new files to say where they came from originally, for the probably few people who are trying to follow a Keil example.
from ch554_sdcc.
Another idea is to make most of the functions inline.
from ch554_sdcc.
Related Issues (20)
- An arduino wrapper over ch554_sdcc HOT 1
- Win7 needs Zadig driver setup HOT 4
- default CODE_SIZE should be 14kB (0x3800) HOT 2
- Is it possible to rewrite the description without unnecessary words? HOT 1
- x and x2 should not be volatile HOT 3
- race condition in ring buffer
- bug in UART ISR HOT 1
- reconsider 24Mhz for USB CDC HOT 5
- blink example doesn't work with P3
- ws2812 example doesn't work with default clock setting HOT 3
- ws2812 example does not compile under Windows MinGW HOT 4
- UsbHostHub_KM example fails to compile HOT 5
- Linux flash tools HOT 7
- example in readme has wrong command HOT 3
- Official English Datasheets! HOT 1
- Chinese characters HOT 4
- ws2812 Makefile correction HOT 1
- Misused `&=` operator in method `ADCInit()` HOT 2
- Some examples broken with SDCC 4.2.0 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 ch554_sdcc.