git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5010 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2013-01-02 08:32:03 +00:00
parent 12286fd5e4
commit 462ab6bcaf
2 changed files with 29 additions and 4 deletions

View File

@ -347,6 +347,11 @@ namespace chibios_rt {
chEvtBroadcastFlags(&event, flags);
}
void Event::broadcastFlagsI(flagsmask_t flags) {
chEvtBroadcastFlagsI(&event, flags);
}
flagsmask_t Event::getAndClearFlags(EventListener *elp) {
return chEvtGetAndClearFlags(elp);

View File

@ -147,7 +147,9 @@ namespace chibios_rt {
*
* @api
*/
ThreadReference(Thread * tp);
ThreadReference(Thread * tp) : thread_ref(tp) {
};
/**
* @brief Suspends the current thread on the reference.
@ -238,7 +240,7 @@ namespace chibios_rt {
* @brief Abstract base class for a ChibiOS/RT thread.
* @details The thread body is the virtual function @p Main().
*/
class BaseThread : ThreadReference{
class BaseThread : public ThreadReference {
public:
/**
@ -255,7 +257,9 @@ namespace chibios_rt {
*
* @api
*/
virtual msg_t Main(void);
virtual msg_t Main(void) {
return 0;
};
/**
* @brief Creates and starts a system thread.
@ -268,7 +272,11 @@ namespace chibios_rt {
*
* @api
*/
virtual bool start(const char *tname, tprio_t prio);
virtual bool start(const char *tname, tprio_t prio){
(void) tname;
(void) prio;
return false;
};
/**
* @brief Thread exit.
@ -409,6 +417,7 @@ namespace chibios_rt {
* @api
*/
bool start(const char *tname, tprio_t prio) {
(void)tname;
msg_t _thd_start(void *arg);
thread_ref = chThdCreateStatic(wa, sizeof(wa), prio, _thd_start, this);
@ -689,6 +698,17 @@ namespace chibios_rt {
*/
void broadcastFlags(flagsmask_t flags);
/**
* @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
*
* @api
*/
void broadcastFlagsI(flagsmask_t flags);
/**
* @brief Clears specified events from the pending events mask.
*