aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-01 09:37:24 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-01 09:37:24 +0000
commit7dae784676f600f421e59211697977224165c466 (patch)
treeaf79497a9f16a9ffd07d3bf25ff666f9ac128b74 /os
parent853d2fa07f22a94c8eeaf1c93c45a464743b391c (diff)
downloadChibiOS-7dae784676f600f421e59211697977224165c466.tar.gz
ChibiOS-7dae784676f600f421e59211697977224165c466.tar.bz2
ChibiOS-7dae784676f600f421e59211697977224165c466.zip
Fixes to the CPP wrapper.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5006 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/various/ch.cpp17
-rw-r--r--os/various/ch.hpp19
2 files changed, 27 insertions, 9 deletions
diff --git a/os/various/ch.cpp b/os/various/ch.cpp
index fb4624e95..8b1f66da9 100644
--- a/os/various/ch.cpp
+++ b/os/various/ch.cpp
@@ -280,19 +280,24 @@ namespace chibios_rt {
chEvtUnregister(&event, elp);
}
- void Event::Broadcast(void) {
+ void Event::BroadcastFlags(flagsmask_t flags) {
- chEvtBroadcast(&event);
+ chEvtBroadcastFlags(&event, flags);
}
- eventmask_t Event::ClearFlags(eventmask_t mask) {
+ flagsmask_t GetAndClearFlags(EventListener *elp) {
- return chEvtClearFlags(mask);
+ return chEvtGetAndClearFlags(elp);
}
- eventmask_t Event::AddFlags(eventmask_t mask) {
+ eventmask_t Event::GetAndClearEvents(eventmask_t mask) {
- return chEvtAddFlags(mask);
+ return chEvtGetAndClearEvents(mask);
+ }
+
+ eventmask_t Event::AddEvents(eventmask_t mask) {
+
+ return chEvtAddEvents(mask);
}
void Event::Dispatch(const evhandler_t handlers[], eventmask_t mask) {
diff --git a/os/various/ch.hpp b/os/various/ch.hpp
index a7e645407..f58bd4e8c 100644
--- a/os/various/ch.hpp
+++ b/os/various/ch.hpp
@@ -509,8 +509,21 @@ namespace chibios_rt {
/**
* @brief Broadcasts an event.
* @details All the listeners registered on the event source are signaled.
+ *
+ * @param[in] flags the flags set to be added to the listener
+ * flags mask
*/
- void Broadcast(void);
+ void BroadcastFlags(flagsmask_t flags);
+
+ /**
+ * @brief Clears specified events from the pending events mask.
+ *
+ * @param[in] elp pointer to the @p EventListener structure
+ * @param[in] flags the events to be cleared
+ * @return The flags added to the listener by the
+ * associated event source.
+ */
+ static flagsmask_t GetAndClearFlags(EventListener *elp);
/**
* @brief Clears specified events from the pending events mask.
@@ -518,7 +531,7 @@ namespace chibios_rt {
* @param[in] mask the events to be cleared
* @return The pending events that were cleared.
*/
- static eventmask_t ClearFlags(eventmask_t mask);
+ static eventmask_t GetAndClearEvents(eventmask_t mask);
/**
* @brief Makes an events mask pending in the current thread.
@@ -527,7 +540,7 @@ namespace chibios_rt {
* @param[in] mask the events to be pended
* @return The current pending events mask.
*/
- static eventmask_t AddFlags(eventmask_t mask);
+ static eventmask_t AddEvents(eventmask_t mask);
/**
* @brief Invokes the event handlers associated with a mask.