You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for this library. It used some macro's i haven't seen before.
I use library's like this on atmel 328. Those have 1024 bytes of ram. So i always try to limit the memory usage to as little as possible.
So i have some questions as i do not fully understand the bidirectional registry.
U can read and write only one byte to the register. If u write one byte u would read the same byte back. Because it would set a low powered pullup or down it's a in and output at the same time.
At startup all pins are high. Given no pins are grounded it will give 0xFF.
So i only think u need two bytes or memory. One for (last) readed value. One for last written value. If i request the status i would be interested in the difference between the two.
Maybe it could be useful to track if a pin was output or input. But on the other hand it does not matter for the device. So why spent a byte on it?
As for the status structure. Why use 8 bytes? 1 byte would do it?
It's not meant to criticize your work. I would like to learn from your considerations. And maybe mine can add something as well.
The text was updated successfully, but these errors were encountered:
The stats structure is a complex structure more flexible and direct usable, and not all like bitwise operation.
When I have more time I add a little enhancement to remove that structure with define flag for low memory usage.
The input and output mask is to prevent human error, and help readability of code.
First of all thanks for this library. It used some macro's i haven't seen before.
I use library's like this on atmel 328. Those have 1024 bytes of ram. So i always try to limit the memory usage to as little as possible.
So i have some questions as i do not fully understand the bidirectional registry.
U can read and write only one byte to the register. If u write one byte u would read the same byte back. Because it would set a low powered pullup or down it's a in and output at the same time.
At startup all pins are high. Given no pins are grounded it will give 0xFF.
So i only think u need two bytes or memory. One for (last) readed value. One for last written value. If i request the status i would be interested in the difference between the two.
Maybe it could be useful to track if a pin was output or input. But on the other hand it does not matter for the device. So why spent a byte on it?
As for the status structure. Why use 8 bytes? 1 byte would do it?
It's not meant to criticize your work. I would like to learn from your considerations. And maybe mine can add something as well.
The text was updated successfully, but these errors were encountered: