??? 02/15/06 02:24 Read: times |
#109996 - sbit access Responding to: ???'s previous message |
keyID is an unsigned char to identify which key to access.
The code shown is much simplified. My aim is when I change the number of keys used, I just make change in .h file but need not change anything in the .c file If the variables were char, I can declare array of char and access them with index. like usingned char foo(index) { ... return variable(index); } Presently I use preprocessor directives to solve the problem because I don't think of any easy way to access sbits with index, and asking help for a better way. It would be great if something like key[index] can access sbit. Any comment will be welcome. Thanks for your attention. |
Topic | Author | Date |
question on keil C sbit access | 01/01/70 00:00 | |
What are you trying to do? | 01/01/70 00:00 | |
Try or doing | 01/01/70 00:00 | |
sbit access | 01/01/70 00:00 | |
The 8051 does not have indirect bits | 01/01/70 00:00 | |
send me keilc code for keypad | 01/01/70 00:00 | |
Yes sir! Right away sir! | 01/01/70 00:00 | |
How about Fries? | 01/01/70 00:00 | |
please tell more | 01/01/70 00:00 | |
Buttons library | 01/01/70 00:00 | |
how to post code | 01/01/70 00:00 | |
The main question![]() | 01/01/70 00:00 |