mirror of https://github.com/ARMmbed/mbed-os.git
Replace the old deprecated callbacks
parent
379daa653d
commit
597633d445
|
@ -106,7 +106,7 @@ public:
|
|||
template<typename T>
|
||||
inline void onDisconnect(uint8_t intf_nb, T* tptr, void (T::*mptr)(void)) {
|
||||
if ((mptr != NULL) && (tptr != NULL)) {
|
||||
intf[intf_nb].detach.attach(tptr, mptr);
|
||||
intf[intf_nb].detach = callback(tptr, mptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
*/
|
||||
inline void onDisconnect(uint8_t intf_nb, void (*fn)(void)) {
|
||||
if (fn != NULL) {
|
||||
intf[intf_nb].detach.attach(fn);
|
||||
intf[intf_nb].detach = fn;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
template<typename T>
|
||||
inline void attach(T* tptr, void (T::*mptr)(void)) {
|
||||
if((mptr != NULL) && (tptr != NULL)) {
|
||||
rx.attach(tptr, mptr);
|
||||
rx = callback(tptr, mptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
*/
|
||||
inline void attach(void (*fptr)(void)) {
|
||||
if(fptr != NULL) {
|
||||
rx.attach(fptr);
|
||||
rx = fptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ USBHost::USBHost() : usbThread(osPriorityNormal, USB_THREAD_STACK)
|
|||
}
|
||||
#endif
|
||||
|
||||
usbThread.start(this, &USBHost::usb_process);
|
||||
usbThread.start(callback(this, &USBHost::usb_process));
|
||||
}
|
||||
|
||||
USBHost::Lock::Lock(USBHost* pHost) : m_pHost(pHost)
|
||||
|
|
Loading…
Reference in New Issue