From: Andreas Schweigstill <andreas@schweigstill.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Do we enable Interrupts in U-Boot?
Date: Tue, 08 Jan 2008 18:51:23 +0100 [thread overview]
Message-ID: <4783B81B.3030509@schweigstill.de> (raw)
In-Reply-To: <7f245da80801080727o460b630esf14697414f76ce33@mail.gmail.com>
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/
next prev parent reply other threads:[~2008-01-08 17:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 12:11 [U-Boot-Users] Do we enable Interrupts in U-Boot? Chetan Nanda
2008-01-08 12:34 ` Stefan Roese
2008-01-08 12:52 ` Chetan Nanda
2008-01-08 13:03 ` Andreas Schweigstill
2008-01-08 13:08 ` Andreas Schweigstill
2008-01-08 13:27 ` Stefan Roese
2008-01-08 15:27 ` Chetan Nanda
2008-01-08 15:35 ` Ben Warren
2008-01-08 17:51 ` Andreas Schweigstill [this message]
2008-01-08 12:47 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4783B81B.3030509@schweigstill.de \
--to=andreas@schweigstill.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.