[U-Boot-Users] Do we enable Interrupts in U-Boot?
Andreas Schweigstill
andreas at schweigstill.de
Tue Jan 8 18:51:23 CET 2008
Hello!
Chetan Nanda schrieb:
> Thanks, for explaining the things,
> But how can we wait for two events simultaneously (that is also under
> a single thread of execution)? Can you give me pointer to the code ?
As mentioned before, U-Boot is not an operating system which provides
such means. It doesn't have a driver layer with file operations similar
to Linux. The only way to wait for events exactly simultaneously is
using a hardware which provides these events in one hardware register.
Usually one would poll the event sources:
...
while (1) {
if (driver_a_check_data_available()) {
driver_a_read_data();
}
if (driver_b_check_data_available()) {
driver_b_read_data();
}
}
if this will be implemented in an U-Boot command, you probably want
this loop also to be left, e.g. by pressing Ctrl-C:
while (!ctrlc()) {
...
}
Regards
Andreas Schweigstill
--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstraße 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
More information about the U-Boot
mailing list