Comments (3)
I checked the map file, the lookup tables take 160 bytes, no matter if we use digitalWrite or not. When wiring_digital is linked, an additional of 395 bytes will be used.
I think it makes sense to use macros to replace lookup tables, no code space will be used when wiring_digital is not linked. Instead, there can be a wiring_digital_fast
file that uses a lot of macros to reduce code space.
from ch55xduino.
I tried to use Marco to do so. However, the code gets significantly bigger.
#define digitalPinToPort(P) ( ((P%10)<8) ? (P0PORT+(P/10)) : NOT_A_PORT )
#define digitalPinToBitMask(P) ( ((P%10)<8) ? (1<<(P%10)) : 0 )
Seems we need to find a way to make SDCC not link the array if not needed.
from ch55xduino.
fixed
If you don't use any wire analog or digital functions. The LUT won't be linked.
from ch55xduino.
Related Issues (20)
- [Feature request] Configurable bootloader access method HOT 12
- Compilation error for board 'CH552 Board'. HOT 2
- What is the corresponding pin number when use RST as Input? HOT 4
- is there a way to write to port in byte size? semilar to HOT 1
- not an issue, just want to know if there is an equivalent to DDRx is AVR mcu, or ODR in STM32 HOT 2
- Parallel IO
- HID keyboard issue HOT 6
- Error compiling sample file HOT 3
- How to use Mouse_scroll? HOT 7
- PWM glitching with analogWrite() HOT 25
- CH552 strange behavior with USB port HOT 5
- Is it possible to use sqrt() in ch552? HOT 6
- How to install on platformIO ? HOT 1
- Low Speed USB - Device Descriptor Fails HOT 3
- Suggestions for uploading and downloading data on HID HOT 1
- WS2812 with v0.0.18 HOT 1
- Is HID Keyboard + USBSerial (CDC VCP) possible? HOT 1
- watchdog triggers too soon HOT 1
- json不能连接上,添加不了板子啊! HOT 1
- CH554 support HOT 12
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 ch55xduino.