??? 09/23/08 12:13 Read: times |
#158552 - Superloop Responding to: ???'s previous message |
Wait a minute.
Can you concurrently keep any combination of keys pressed, or exactly how long should the effect of keypress '1' be active? It is trivial for a super-loop to contain code: <pre> for (;;) { scan_keys(); if (key_1_pressed) { port2 = port1; } if (key_2_pressed) { port4 = port3; } if (key_3_pressed) { if (!report_x_sent) { report_x_sent = TRUE; copy_report_x_to_uart_send_buffer(); } } else { report_x_sent = FALSE; } if (key_4_pressed) { ... } ... if (uart_rx_bytes) { process_uart_rx_data(); } ... } |
Topic | Author | Date |
Multi Threading in C for 89S8253 | 01/01/70 00:00 | |
effective? | 01/01/70 00:00 | |
Protothreads | 01/01/70 00:00 | |
What do you mean? | 01/01/70 00:00 | |
What actually you are looking for | 01/01/70 00:00 | |
Seek Help ! for Serial Communication | 01/01/70 00:00 | |
start a new thread | 01/01/70 00:00 | |
Good reply... | 01/01/70 00:00 | |
hehe... | 01/01/70 00:00 | |
purpose | 01/01/70 00:00 | |
What tasks? | 01/01/70 00:00 | |
tasks | 01/01/70 00:00 | |
Superloop | 01/01/70 00:00 | |
ok...one more thing | 01/01/70 00:00 | |
If Key == '1' Then | 01/01/70 00:00 | |
statemachine | 01/01/70 00:00 | |
An alternative | 01/01/70 00:00 | |
why not in FAQ or personal page? | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
An alternative ? | 01/01/70 00:00 | |
Your Mileage May Vary | 01/01/70 00:00 | |
thanks alot![]() | 01/01/70 00:00 |