MODSERIAL with support for more devices. Added support for LPC4330

Dependents:   HC05_AT_mode GPS_U-blox_NEO-6M_Test_Code GPS_U-blox_NEO-6M_Code UbloxGPSWithThread ... more

Fork of MODSERIAL by Erik -

Embed: (wiki syntax)

« Back to documentation index

MODSERIAL_callback Class Reference

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

Author:
Andy Kirkham
See also:
http://mbed.org/cookbook/MODSERIAL
example3a.cpp
example3b.cpp
The MODSERIAL API

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:
AC 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:
AC++ object pointer.
AC++ 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:
Apointer 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.