3 ms·
The problem with the raw register names is that they're not even consistent between compilers/libraries. However, they're usually the best route to go form an e
by theatrus2 14y ago
The problem with the raw register names is that they're not even consistent between compilers/libraries. However, they're usually the best route to go form an efficiency standpoint.
- IgorPartola 14y agoWell, even doing a #define LED_GREEN BIT6 would be an improvement. However, I'd be willing to pay a small cost in terms of RAM/performance for doing something like this: gpio_get_val(P1, 6); which would return whether port 1, pin 6 is high or low. I think that can even be a macro so it would be compiled down to (P1OUT & BIT6).