<ahref="ch_8cpp.html">Go to the documentation of this file.</a><divclass="fragment"><preclass="fragment"><aname="l00001"></a>00001 <spanclass="comment">/*</span>
<aname="l00055"></a>00055 <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a><aclass="code"href="classchibios__rt_1_1_system.html#a74fb442c63f2a34c0a81dbfa42319976"title="Returns the system time as system ticks.">System::GetTime</a>(<spanclass="keywordtype">void</span>) {
<aname="l00056"></a>00056
<aname="l00057"></a>00057 <spanclass="keywordflow">return</span><aclass="code"href="group__time.html#ga137c8f67c450f34416a786d169be90e2"title="Current system time.">chTimeNow</a>();
<aname="l00063"></a>00063 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_timer.html#a375cb7ce8108c24336016a94efd8a787"title="Starts the timer.">Timer::Set</a>(<aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time, <aclass="code"href="group__time.html#gae6dbe55ffac66f346e05fd99cb4a76b2"title="Virtual Timer callback function.">vtfunc_t</a> vtfunc, <spanclass="keywordtype">void</span> *par) {
<aname="l00064"></a>00064
<aname="l00065"></a>00065 <aclass="code"href="group__time.html#ga1c44c3a0bc64b2954d95cd98b2e7124e"title="Enables a virtual timer.">chVTSetI</a>(&<aclass="code"href="classchibios__rt_1_1_timer.html#a0b126ef3347ec88a54c11e10070d4270"title="Embedded VirtualTimer structure.">timer</a>, time, vtfunc, par);
<aname="l00068"></a>00068 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_timer.html#a065b7fbc2a055152c39505ae91ea9754"title="Resets the timer.">Timer::Reset</a>() {
<aname="l00069"></a>00069
<aname="l00070"></a>00070 <aclass="code"href="group__time.html#ga680d851a74e594cc965101e79891840f"title="Disables a Virtual Timer.">chVTResetI</a>(&<aclass="code"href="classchibios__rt_1_1_timer.html#a0b126ef3347ec88a54c11e10070d4270"title="Embedded VirtualTimer structure.">timer</a>);
<aname="l00073"></a>00073 <spanclass="keywordtype">bool</span><aclass="code"href="classchibios__rt_1_1_timer.html#a97e29d53a4aaf2ef997732be63fdee6e"title="Returns the timer status.">Timer::IsArmed</a>(<spanclass="keywordtype">void</span>) {
<aname="l00074"></a>00074
<aname="l00075"></a>00075 <spanclass="keywordflow">return</span><aclass="code"href="group__time.html#gae54e6dd40bc7b9cdeb409393ec9e134a"title="Returns TRUE if the speciified timer is armed.">chVTIsArmedI</a>(&<aclass="code"href="classchibios__rt_1_1_timer.html#a0b126ef3347ec88a54c11e10070d4270"title="Embedded VirtualTimer structure.">timer</a>);
<aname="l00081"></a>00081 <spanclass="keyword">static</span><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> thdstart(<spanclass="keywordtype">void</span> *arg) {
<aname="l00082"></a>00082
<aname="l00083"></a>00083 <spanclass="keywordflow">return</span> ((<aclass="code"href="classchibios__rt_1_1_base_thread.html"title="Base class for a ChibiOS/RT thread.">BaseThread</a> *)arg)->Main();
<aname="l00086"></a>00086 <aclass="code"href="classchibios__rt_1_1_base_thread.html#a48012dd4151de3d40aa5139b230ed627"title="Thread constructor.">BaseThread::BaseThread</a>(<spanclass="keywordtype">void</span> *workspace, <spanclass="keywordtype">size_t</span> wsize, <aclass="code"href="group__types.html#ga5f2488ba73e5969cbc0f7033735374ee"title="Priority, use the fastest unsigned type.">tprio_t</a> prio) {
<aname="l00087"></a>00087
<aname="l00088"></a>00088 <aclass="code"href="classchibios__rt_1_1_base_thread.html#a5cfa916d9b0888507756a6d1be7e7778"title="Pointer to the system thread.">thread_ref</a> = <aclass="code"href="group__threads.html#ga048e588238dd336c6059133b3d0c3435"title="Creates a new thread into a static memory area.">chThdCreateStatic</a>(workspace, wsize, prio, thdstart, <spanclass="keyword">this</span>);
<aname="l00091"></a>00091 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#abc119aef948c9050d2e18a5a2686d88d"title="Thread exit.">BaseThread::Exit</a>(<aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg) {
<aname="l00092"></a>00092
<aname="l00093"></a>00093 <aclass="code"href="group__threads.html#ga24ab3a3a4d70214ee360867a1c3c75ac"title="Terminates the current thread by specifying an exit status code.">chThdExit</a>(msg);
<aname="l00097"></a>00097 <spanclass="preprocessor"></span><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#a8b4a3de70b98980e6836a48f3e97969c"title="Synchronization on Thread exit.">BaseThread::Wait</a>(<spanclass="keywordtype">void</span>) {
<aname="l00099"></a>00099 <spanclass="keywordflow">return</span><aclass="code"href="group__threads.html#ga94a5727ecdbe0f738dfc8e1ede1c3409"title="Blocks the execution of the invoking thread until the specified thread terminates then the exit code ...">chThdWait</a>(<aclass="code"href="classchibios__rt_1_1_base_thread.html#a5cfa916d9b0888507756a6d1be7e7778"title="Pointer to the system thread.">thread_ref</a>);
<aname="l00103"></a>00103 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#aa824957049b5d62a4d23b0c9758b30a5"title="Changes the thread priority.">BaseThread::SetPriority</a>(<aclass="code"href="group__types.html#ga5f2488ba73e5969cbc0f7033735374ee"title="Priority, use the fastest unsigned type.">tprio_t</a> newprio) {
<aname="l00104"></a>00104
<aname="l00105"></a>00105 <aclass="code"href="group__threads.html#ga5a5d9388c64e4c1a3aec129d2831eefe"title="Changes the running thread priority level then reschedules if necessary.">chThdSetPriority</a>(newprio);
<aname="l00108"></a>00108 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#a6cde6d5b592476aded69ee10b5adc912"title="Resumes the thread.">BaseThread::Resume</a>(<spanclass="keywordtype">void</span>) {
<aname="l00109"></a>00109
<aname="l00110"></a>00110 <aclass="code"href="group__threads.html#ga2c1ce2be73cd177af7e577b282232a7d"title="Resumes a suspended thread.">chThdResume</a>(<aclass="code"href="classchibios__rt_1_1_base_thread.html#a5cfa916d9b0888507756a6d1be7e7778"title="Pointer to the system thread.">thread_ref</a>);
<aname="l00115"></a>00115 <aclass="code"href="group__threads.html#ga7ea7371fa41598ebd523622587ce3f22"title="Requests a thread termination.">chThdTerminate</a>(<aclass="code"href="classchibios__rt_1_1_base_thread.html#a5cfa916d9b0888507756a6d1be7e7778"title="Pointer to the system thread.">thread_ref</a>);
<aname="l00118"></a>00118 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#a44de1239fc6517ddf735405dd7fc8463"title="Suspends the thread execution for the specified number of system ticks.">BaseThread::Sleep</a>(<aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> n) {
<aname="l00119"></a>00119
<aname="l00120"></a>00120 <aclass="code"href="group__threads.html#ga8b10a49e2ec522a5ddecabdc453afcab"title="Suspends the invoking thread for the specified time.">chThdSleep</a>(n);
<aname="l00123"></a>00123 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#a0589beba9bb4c959b3f49a82b24562eb"title="Suspends the thread execution until the specified time arrives.">BaseThread::SleepUntil</a>(<aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00125"></a>00125 <aclass="code"href="group__threads.html#ga9e6e2f8d46d415e8f0862daf0be1d984"title="Suspends the invoking thread until the system time arrives to the specified value.">chThdSleepUntil</a>(time);
<aname="l00129"></a>00129 <spanclass="preprocessor"></span><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#a1557c9e6e0b61a7eb848ce928115973d"title="Sends a message to the thread and returns the answer.">BaseThread::SendMessage</a>(::<aclass="code"href="struct_thread.html"title="Structure representing a thread.">Thread</a>* tp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg) {
<aname="l00130"></a>00130
<aname="l00131"></a>00131 <spanclass="keywordflow">return</span><aclass="code"href="group__messages.html#ga29a48a438e97dc47cb798a84e13764cb"title="Sends a message to the specified thread.">chMsgSend</a>(tp, msg);
<aname="l00134"></a>00134 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#a1557c9e6e0b61a7eb848ce928115973d"title="Sends a message to the thread and returns the answer.">BaseThread::SendMessage</a>(<aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg) {
<aname="l00135"></a>00135
<aname="l00136"></a>00136 <spanclass="keywordflow">return</span><aclass="code"href="group__messages.html#ga29a48a438e97dc47cb798a84e13764cb"title="Sends a message to the specified thread.">chMsgSend</a>(<aclass="code"href="classchibios__rt_1_1_base_thread.html#a5cfa916d9b0888507756a6d1be7e7778"title="Pointer to the system thread.">thread_ref</a>, msg);
<aname="l00139"></a>00139 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#ae960dbec72042a9072e35984523694b8"title="Waits for a message and returns it.">BaseThread::WaitMessage</a>(<spanclass="keywordtype">void</span>) {
<aname="l00140"></a>00140
<aname="l00141"></a>00141 <spanclass="keywordflow">return</span><aclass="code"href="group__messages.html#gae68fefbf9d0404bbf56ae354961fae41"title="Suspends the thread and waits for an incoming message.">chMsgWait</a>();
<aname="l00144"></a>00144 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#ab8e737914200f075bf02ade85876764d"title="Returns an enqueued message or NULL.">BaseThread::GetMessage</a>(<spanclass="keywordtype">void</span>) {
<aname="l00145"></a>00145
<aname="l00146"></a>00146 <spanclass="keywordflow">return</span><aclass="code"href="group__messages.html#ga65dda189b03b238412301ce5d80bfcf4"title="Returns the next message in the queue.">chMsgGet</a>();
<aname="l00149"></a>00149 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#a4ecedb2d2b646ea4a9261c0e62f16945"title="Releases the next message in queue with a reply.">BaseThread::ReleaseMessage</a>(<aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg) {
<aname="l00150"></a>00150
<aname="l00151"></a>00151 <aclass="code"href="group__messages.html#ga19a54b3b4b0e3677c47d650a3be3c7aa"title="Releases the thread waiting on top of the messages queue.">chMsgRelease</a>(msg);
<aname="l00154"></a>00154 <spanclass="keywordtype">bool</span><aclass="code"href="classchibios__rt_1_1_base_thread.html#a4477cb3ed6fc3250638bb21d8199f573"title="Returns true if there is at least one message in queue.">BaseThread::IsPendingMessage</a>(<spanclass="keywordtype">void</span>) {
<aname="l00155"></a>00155
<aname="l00156"></a>00156 <spanclass="keywordflow">return</span><aclass="code"href="group__messages.html#ga4e0eafdfd51c042d765e2949e6171093"title="Evaluates to TRUE if the thread has pending messages.">chMsgIsPendingI</a>(<aclass="code"href="group__scheduler.html#ga1a5fddde56420e8accd0c09c1abb32a7"title="Current thread pointer access macro.">currp</a>);
<aname="l00160"></a>00160 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_base_thread.html#ae973df26215c254288eaf844c7eef637"title="Thread body function.">BaseThread::Main</a>(<spanclass="keywordtype">void</span>) {
<aname="l00171"></a>00171 <aclass="code"href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58"title="Initializes a semaphore with the specified counter value.">chSemInit</a>(&<aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>, n);
<aname="l00174"></a>00174 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_semaphore.html#aecb934714ebe5658c857ef1021dd5f2b"title="Resets a semaphore.">Semaphore::Reset</a>(<aclass="code"href="group__types.html#ga090b3bab5602157ebf706a44041dc05e"title="Counter, recommended fastest signed.">cnt_t</a> n) {
<aname="l00175"></a>00175
<aname="l00176"></a>00176 <aclass="code"href="group__semaphores.html#ga58e266e609cfd3dbc67f299b3ae9debb"title="Performs a reset operation on the semaphore.">chSemReset</a>(&<aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>, n);
<aname="l00179"></a>00179 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_semaphore.html#abfb1b068e95063f490b27cc3b467f63f"title="Wait operation on the semaphore.">Semaphore::Wait</a>(<spanclass="keywordtype">void</span>) {
<aname="l00180"></a>00180
<aname="l00181"></a>00181 <spanclass="keywordflow">return</span><aclass="code"href="group__semaphores.html#gabc8f7e509870e9b0527a6a68fad71425"title="Performs a wait operation on a semaphore.">chSemWait</a>(&<aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>);
<aname="l00184"></a>00184 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_semaphore.html#a589b4780f60d73929bd77a652b526868"title="Wait operation on the semaphore with timeout.">Semaphore::WaitTimeout</a>(<aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00185"></a>00185
<aname="l00186"></a>00186 <spanclass="keywordflow">return</span><aclass="code"href="group__semaphores.html#ga0bc227311e5be3e3b6e3aee6a68169da"title="Performs a wait operation on a semaphore with timeout specification.">chSemWaitTimeout</a>(&<aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>, time);
<aname="l00189"></a>00189 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_semaphore.html#a202630db53afefbe5c419ee6d2eddab1"title="Signal operation on the semaphore.">Semaphore::Signal</a>(<spanclass="keywordtype">void</span>) {
<aname="l00190"></a>00190
<aname="l00191"></a>00191 <aclass="code"href="group__semaphores.html#ga7ec0cbda23e49e2370e0b91f20baf05e"title="Performs a signal operation on a semaphore.">chSemSignal</a>(&<aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>);
<aname="l00195"></a>00195 <spanclass="preprocessor"></span><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_semaphore.html#a3f2ad5962e43c82fc56b1e0e76a58c9a"title="Atomic signal and wait operations.">Semaphore::SignalWait</a>(<aclass="code"href="classchibios__rt_1_1_semaphore.html"title="Class encapsulating a semaphore.">Semaphore</a> *ssem, <aclass="code"href="classchibios__rt_1_1_semaphore.html"title="Class encapsulating a semaphore.">Semaphore</a> *wsem) {
<aname="l00196"></a>00196
<aname="l00197"></a>00197 <spanclass="keywordflow">return</span><aclass="code"href="group__semaphores.html#ga0dc7b4339506de346d67b4560b271e44"title="Performs atomic signal and wait operations on two semaphores.">chSemSignalWait</a>(&ssem-><aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>, &wsem-><aclass="code"href="classchibios__rt_1_1_semaphore.html#a604ce05f129534b4b3ad76366f2d90c5"title="Embedded Semaphore structure.">sem</a>);
<aname="l00211"></a>00211 <spanclass="keywordtype">bool</span><aclass="code"href="classchibios__rt_1_1_mutex.html#a787ecfd207fd25760a3c07517b69c148"title="Tries a lock operation on the mutex.">Mutex::TryLock</a>(<spanclass="keywordtype">void</span>) {
<aname="l00212"></a>00212
<aname="l00213"></a>00213 <spanclass="keywordflow">return</span><aclass="code"href="group__mutexes.html#gaada14e216460dc55e1816234168cf95c"title="Tries to lock a mutex.">chMtxTryLock</a>(&<aclass="code"href="classchibios__rt_1_1_mutex.html#a6fe411dfe88642cc7c379a59ea931da2"title="Embedded Mutex structure.">mutex</a>);
<aname="l00216"></a>00216 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_mutex.html#a1726d7244983f7be74fcfa9cfb63745f"title="Locks the mutex.">Mutex::Lock</a>(<spanclass="keywordtype">void</span>) {
<aname="l00217"></a>00217
<aname="l00218"></a>00218 <aclass="code"href="group__mutexes.html#gafa06b82e3496c44eb7bf31d9f1b655ba"title="Locks the specified mutex.">chMtxLock</a>(&<aclass="code"href="classchibios__rt_1_1_mutex.html#a6fe411dfe88642cc7c379a59ea931da2"title="Embedded Mutex structure.">mutex</a>);
<aname="l00221"></a>00221 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_mutex.html#a03150e8fa423f7e042661d350d238b84"title="Unlocks the mutex.">Mutex::Unlock</a>(<spanclass="keywordtype">void</span>) {
<aname="l00222"></a>00222
<aname="l00223"></a>00223 <aclass="code"href="group__mutexes.html#gae9ae07165126c9f6c0ce0b17bdb53669"title="Unlocks the next owned mutex in reverse lock order.">chMtxUnlock</a>();
<aname="l00228"></a>00228 <aclass="code"href="group__mutexes.html#ga853b4ced43d22fb5d82678dd2f0aba75"title="Unlocks all the mutexes owned by the invoking thread.">chMtxUnlockAll</a>();
<aname="l00240"></a>00240 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_cond_var.html#a075c5724485b6f47bdf6f1f003154f02"title="Signals the CondVar.">CondVar::Signal</a>(<spanclass="keywordtype">void</span>) {
<aname="l00241"></a>00241
<aname="l00242"></a>00242 <aclass="code"href="group__condvars.html#gadddadb68e2a2ce061c7df0d647da9996"title="Signals one thread that is waiting on the condition variable.">chCondSignal</a>(&<aclass="code"href="classchibios__rt_1_1_cond_var.html#a726124b6782ea9e073d6be739ad75f53"title="Embedded CondVar structure.">condvar</a>);
<aname="l00245"></a>00245 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_cond_var.html#a0111c4947178c9ef6b15e03f24d2e861"title="Broadcasts the CondVar.">CondVar::Broadcast</a>(<spanclass="keywordtype">void</span>) {
<aname="l00246"></a>00246
<aname="l00247"></a>00247 <aclass="code"href="group__condvars.html#ga60c24a8060a884313efe82b8404e77f6"title="Signals all threads that are waiting on the condition variable.">chCondBroadcast</a>(&<aclass="code"href="classchibios__rt_1_1_cond_var.html#a726124b6782ea9e073d6be739ad75f53"title="Embedded CondVar structure.">condvar</a>);
<aname="l00250"></a>00250 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_cond_var.html#a37e0b0cb4ac5cbe6bbb56c51539284c8"title="Waits on the CondVar while releasing the controlling mutex.">CondVar::Wait</a>(<spanclass="keywordtype">void</span>) {
<aname="l00251"></a>00251
<aname="l00252"></a>00252 <spanclass="keywordflow">return</span><aclass="code"href="group__condvars.html#ga466f912bc9b09b133fae862993004ffe"title="Waits on the condition variable releasing the mutex lock.">chCondWait</a>(&<aclass="code"href="classchibios__rt_1_1_cond_var.html#a726124b6782ea9e073d6be739ad75f53"title="Embedded CondVar structure.">condvar</a>);
<aname="l00256"></a>00256 <spanclass="preprocessor"></span><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="classchibios__rt_1_1_cond_var.html#a866a352fb3bc95f07abda728d4ae4906"title="Waits on the CondVar while releasing the controlling mutex.">CondVar::WaitTimeout</a>(<aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00257"></a>00257
<aname="l00258"></a>00258 <spanclass="keywordflow">return</span><aclass="code"href="group__condvars.html#ga07a0c55ac1002a64e8c7f9b7e3ca1caf"title="Waits on the condition variable releasing the mutex lock.">chCondWaitTimeout</a>(&<aclass="code"href="classchibios__rt_1_1_cond_var.html#a726124b6782ea9e073d6be739ad75f53"title="Embedded CondVar structure.">condvar</a>, time);
<aname="l00273"></a>00273 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_event.html#a871e59df8f46225845806ebdec4e832c"title="Registers a listener on the event source.">Event::Register</a>(<aclass="code"href="struct_event_listener.html"title="Event Listener structure.">EventListener</a> *elp, <aclass="code"href="group__types.html#gada5ed33935b8347e213aeb76582642e7"title="Event Id, use fastest signed.">eventid_t</a> eid) {
<aname="l00274"></a>00274
<aname="l00275"></a>00275 <aclass="code"href="group__events.html#gad478062f3e09d00e1ad8ebe65a06ec0c"title="Registers an Event Listener on an Event Source.">chEvtRegister</a>(&<aclass="code"href="classchibios__rt_1_1_event.html#a39ab1be709273f81cd1f9318abfe1508"title="Embedded EventSource structure.">event</a>,elp, eid);
<aname="l00278"></a>00278 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_event.html#a39acaf2436f139a798973308c1929031"title="Registers an Event Listener on an Event Source.">Event::RegisterMask</a>(<aclass="code"href="struct_event_listener.html"title="Event Listener structure.">EventListener</a> *elp, <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> emask) {
<aname="l00279"></a>00279
<aname="l00280"></a>00280 <aclass="code"href="group__events.html#ga4002600fe552128aaf96a6a1d3ada3ee"title="Registers an Event Listener on an Event Source.">chEvtRegisterMask</a>(&<aclass="code"href="classchibios__rt_1_1_event.html#a39ab1be709273f81cd1f9318abfe1508"title="Embedded EventSource structure.">event</a>,elp, emask);
<aname="l00283"></a>00283 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_event.html#a177bc72df220068c9d620b8e9f42f2f5"title="Unregisters a listener.">Event::Unregister</a>(<aclass="code"href="struct_event_listener.html"title="Event Listener structure.">EventListener</a> *elp) {
<aname="l00284"></a>00284
<aname="l00285"></a>00285 <aclass="code"href="group__events.html#ga68d15e1c7e12e96edd40069a27981d38"title="Unregisters an Event Listener from its Event Source.">chEvtUnregister</a>(&<aclass="code"href="classchibios__rt_1_1_event.html#a39ab1be709273f81cd1f9318abfe1508"title="Embedded EventSource structure.">event</a>, elp);
<aname="l00288"></a>00288 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_event.html#a665b23d0d212b06107a27f118021238c"title="Broadcasts an event.">Event::Broadcast</a>(<spanclass="keywordtype">void</span>) {
<aname="l00289"></a>00289
<aname="l00290"></a>00290 <aclass="code"href="group__events.html#ga44015af4dd20f74b0f73824ff1c1b2f4"title="Signals all the Event Listeners registered on the specified Event Source.">chEvtBroadcast</a>(&<aclass="code"href="classchibios__rt_1_1_event.html#a39ab1be709273f81cd1f9318abfe1508"title="Embedded EventSource structure.">event</a>);
<aname="l00293"></a>00293 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#ae3c7092d78ac9dda43c109b356826f41"title="Clears specified events from the pending events mask.">Event::Clear</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> mask) {
<aname="l00294"></a>00294
<aname="l00295"></a>00295 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga76f41b9668c3f1adafc516a8f92b9cad"title="Clears the pending events specified in the mask.">chEvtClear</a>(mask);
<aname="l00298"></a>00298 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#aca48258fbffb54c6e19bbb9016c4cee1"title="Makes an events mask pending in the current thread.">Event::Pend</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> mask) {
<aname="l00300"></a>00300 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga94f14b6063f42b9be79a7dabde18232d"title="Pends a set of event flags on the current thread, this is much faster than using chEvtBroadcast() or ...">chEvtPend</a>(mask);
<aname="l00303"></a>00303 <spanclass="keywordtype">void</span><aclass="code"href="classchibios__rt_1_1_event.html#afde2cfb76dbd552ebb05bc6c6c8b2969"title="Invokes the event handlers associated with a mask.">Event::Dispatch</a>(<spanclass="keyword">const</span><aclass="code"href="group__events.html#ga1a153010620569dd0cac24da8952269f"title="Event Handler callback function.">evhandler_t</a> handlers[], <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> mask) {
<aname="l00304"></a>00304
<aname="l00305"></a>00305 <aclass="code"href="group__events.html#gaba2061f315848a8a722efcae258edc8c"title="Invokes the event handlers associated to an event flags mask.">chEvtDispatch</a>(handlers, mask);
<aname="l00308"></a>00308 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#a5853ef97699efe31a969c7fc200e09a1"title="Waits for a single event.">Event::WaitOne</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask) {
<aname="l00309"></a>00309
<aname="l00310"></a>00310 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga77651e22578713ebe355c1213286c2e9"title="Waits for exactly one of the specified events.">chEvtWaitOne</a>(ewmask);
<aname="l00313"></a>00313 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#aeb53e2435cf8f614ea51e3c90334d5ae"title="Waits for any of the specified events.">Event::WaitAny</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask) {
<aname="l00314"></a>00314
<aname="l00315"></a>00315 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#gabd731d3ed2f037b2409e370676575f8d"title="Waits for any of the specified events.">chEvtWaitAny</a>(ewmask);
<aname="l00318"></a>00318 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#a55bd3220048e77217f5f75af7697d46f"title="Waits for all the specified event flags then clears them.">Event::WaitAll</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask) {
<aname="l00319"></a>00319
<aname="l00320"></a>00320 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga8c5c6bf310a08cdc836d23f98a87dbf5"title="Waits for all the specified events.">chEvtWaitAll</a>(ewmask);
<aname="l00324"></a>00324 <spanclass="preprocessor"></span><aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#ab8fc502561437fec0194653052202b82"title="Waits for a single event.">Event::WaitOneTimeout</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00325"></a>00325
<aname="l00326"></a>00326 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga2944a7fc82e7cc15537f5a7c04f457d3"title="Waits for exactly one of the specified events.">chEvtWaitOneTimeout</a>(ewmask, time);
<aname="l00329"></a>00329 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#a4870dfce1f2ace0ab434718b0960b960"title="Waits for any of the specified events.">Event::WaitAnyTimeout</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00330"></a>00330
<aname="l00331"></a>00331 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#gaf690406ccc833e2c9235e7e2041a6715"title="Waits for any of the specified events.">chEvtWaitAnyTimeout</a>(ewmask, time);
<aname="l00334"></a>00334 <aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a><aclass="code"href="classchibios__rt_1_1_event.html#ab8c805f6b615e47050a75b16fd94492d"title="Waits for all the specified event flags then clears them.">Event::WaitAllTimeout</a>(<aclass="code"href="group__types.html#gabff0c32475baf20ea8c5c710d6e8b708"title="Event Mask, recommended fastest unsigned.">eventmask_t</a> ewmask, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00335"></a>00335
<aname="l00336"></a>00336 <spanclass="keywordflow">return</span><aclass="code"href="group__events.html#ga90d702300eecee3d05f83e95b155c3ee"title="Waits for all the specified events.">chEvtWaitAllTimeout</a>(ewmask, time);
Generated on Sun Nov 28 2010 14:09:48 for ChibiOS/RT by <ahref="http://www.doxygen.org/index.html"><imgsrc="doxygen.png"alt="doxygen"align="middle"border="0"></a> 1.7.1</small></address>