Modification of Mbed-dev library for LQFP48 package microcontrollers: STM32F103C8 (STM32F103C8T6) and STM32F103CB (STM32F103CBT6) (Bluepill boards, Maple mini etc. )

Fork of mbed-STM32F103C8_org by Nothing Special

Embed: (wiki syntax)

« Back to documentation index

Callback< R(A0, A1, A2, A3, A4)> Class Template Reference

Callback< R(A0, A1, A2, A3, A4)> Class Template Reference
[Platform]

Callback class based on template specialization. More...

#include <Callback.h>

Public Member Functions

 Callback (R(*func)(A0, A1, A2, A3, A4)=0)
 Create a Callback with a static function.
 Callback (const Callback< R(A0, A1, A2, A3, A4)> &func)
 Attach a Callback.
template<typename T , typename U >
 Callback (U *obj, R(T::*method)(A0, A1, A2, A3, A4))
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (const U *obj, R(T::*method)(A0, A1, A2, A3, A4) const)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) volatile)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) const volatile)
 Create a Callback with a member function.
template<typename T , typename U >
 Callback (R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(const T *, A0, A1, A2, A3, A4), const U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(volatile T *, A0, A1, A2, A3, A4), volatile U *arg)
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 Callback (R(*func)(const volatile T *, A0, A1, A2, A3, A4), const volatile U *arg)
 Create a Callback with a static function and bound pointer.
template<typename F >
 Callback (F f, typename detail::enable_if< detail::is_type< R(F::*)(A0, A1, A2, A3, A4),&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil())
 Create a Callback with a function object.
template<typename F >
 Callback (const F f, typename detail::enable_if< detail::is_type< R(F::*)(A0, A1, A2, A3, A4) const,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil())
 Create a Callback with a function object.
template<typename F >
 Callback (volatile F f, typename detail::enable_if< detail::is_type< R(F::*)(A0, A1, A2, A3, A4) volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil())
 Create a Callback with a function object.
template<typename F >
 Callback (const volatile F f, typename detail::enable_if< detail::is_type< R(F::*)(A0, A1, A2, A3, A4) const volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil())
 Create a Callback with a function object.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(U *obj
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(const U *obj
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(volatile U *obj
 Create a Callback with a static function and bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(const volatile U *obj
 Create a Callback with a static function and bound pointer.
 ~Callback ()
 Destroy a callback.
 MBED_DEPRECATED_SINCE ("mbed-os-5.4","Replaced by simple assignment 'Callback cb = func") void attach(R(*func)(A0
 Attach a static function.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.4","Replaced by simple assignment 'Callback cb = func") void attach(const U *obj
 Attach a member function.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.4","Replaced by simple assignment 'Callback cb = func") void attach(volatile U *obj
 Attach a member function.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.4","Replaced by simple assignment 'Callback cb = func") void attach(const volatile U *obj
 Attach a member function.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.4","Replaced by simple assignment 'Callback cb = func") void attach(R(*func)(T *
 Attach a static function with a bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(const U *obj
 Attach a static function with a bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(volatile U *obj
 Attach a static function with a bound pointer.
template<typename T , typename U >
 MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(const volatile U *obj
 Attach a static function with a bound pointer.
Callback & operator= (const Callback &that)
 Assign a callback.
call (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
 Call the attached function.
operator() (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
 Call the attached function.
 operator bool () const
 Test if function has been attached.

Static Public Member Functions

static R thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
 Static thunk for passing as C-style function.

Friends

bool operator== (const Callback &l, const Callback &r)
 Test for equality.
bool operator!= (const Callback &l, const Callback &r)
 Test for inequality.

Detailed Description

template<typename R, typename A0, typename A1, typename A2, typename A3, typename A4>
class mbed::Callback< R(A0, A1, A2, A3, A4)>

Callback class based on template specialization.

Synchronization level: Not protected

Definition at line 3041 of file Callback.h.


Constructor & Destructor Documentation

Callback ( R(*)(A0, A1, A2, A3, A4)  func = 0 )

Create a Callback with a static function.

Parameters:
funcStatic function to attach

Definition at line 3046 of file Callback.h.

Callback ( const F  f )

Create a Callback with a function object.

Parameters:
funcFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 3153 of file Callback.h.

Callback ( volatile F  f )

Create a Callback with a function object.

Parameters:
funcFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 3165 of file Callback.h.

Callback ( const volatile F  f )

Create a Callback with a function object.

Parameters:
funcFunction object to attach
Note:
The function object is limited to a single word of storage

Definition at line 3177 of file Callback.h.


Member Function Documentation

MBED_DEPRECATED_SINCE ( "mbed-os-5.4"   )

Attach a static function with a bound pointer.

Parameters:
funcStatic function to attach
argPointer argument to function