Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MODSERIAL by
MODSERIAL_callback Class Reference
#include <MODSERIAL.h>
Public Member Functions | |
MODSERIAL_callback () | |
Constructor. | |
void | attach (void(*function)(MODSERIAL_IRQ_INFO *)=0) |
attach - Overloaded attachment function. | |
template<class T > | |
void | attach (T *item, void(T::*method)(MODSERIAL_IRQ_INFO *)) |
attach - Overloaded attachment function. | |
void | call (MODSERIAL_IRQ_INFO *arg) |
call - Overloaded callback initiator. | |
Protected Attributes | |
void(* | c_callback )(MODSERIAL_IRQ_INFO *) |
C callback function pointer. | |
MODSERIAL_callback_dummy * | obj_callback |
C++ callback object/method pointer (the object part). | |
void(MODSERIAL_callback_dummy::* | method_callback )(MODSERIAL_IRQ_INFO *) |
C++ callback object/method pointer (the method part). |
Detailed Description
MODSERIAL_callback is a class used to hold application callbacks that MODSERIAL can invoke on certain events.
Definition at line 106 of file MODSERIAL.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 123 of file MODSERIAL.h.
Member Function Documentation
void attach | ( | void(*)(MODSERIAL_IRQ_INFO *) | function = 0 ) |
attach - Overloaded attachment function.
Attach a C type function pointer as the callback.
Note, the callback function prototype must be:-
void myCallbackFunction(MODSERIAL_IRQ_INFO *);
- Parameters:
-
A C function pointer to call.
Definition at line 139 of file MODSERIAL.h.
void attach | ( | T * | item, |
void(T::*)(MODSERIAL_IRQ_INFO *) | method | ||
) |
attach - Overloaded attachment function.
Attach a C++ type object/method pointer as the callback.
Note, the callback method prototype must be:-
public: void myCallbackFunction(MODSERIAL_IRQ_INFO *);
- Parameters:
-
A C++ object pointer. A C++ method within the object to call.
Definition at line 154 of file MODSERIAL.h.
void call | ( | MODSERIAL_IRQ_INFO * | arg ) |
call - Overloaded callback initiator.
call the callback function.
- Parameters:
-
A pointer to a MODSERIAL_IRQ_INFO object.
Definition at line 165 of file MODSERIAL.h.
Field Documentation
void(* c_callback)(MODSERIAL_IRQ_INFO *) [protected] |
C callback function pointer.
Definition at line 111 of file MODSERIAL.h.
void(MODSERIAL_callback_dummy::* method_callback)(MODSERIAL_IRQ_INFO *) [protected] |
C++ callback object/method pointer (the method part).
Definition at line 117 of file MODSERIAL.h.
MODSERIAL_callback_dummy* obj_callback [protected] |
C++ callback object/method pointer (the object part).
Definition at line 114 of file MODSERIAL.h.
Generated on Tue Jul 12 2022 23:00:20 by
