1 Star 0 Fork 0

红枫软件 / FreeRTOScpp

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
CallBack.cpp 1.74 KB
Copy Edit Raw Blame History
Richard Damon authored 2020-09-08 21:01 . Add CallBack and Event
/**
* @file CallBack.cpp
* @copyright (c) 2007-2015 Richard Damon
* @author Richard Damon <richard.damon@gmail.com>
* @parblock
* MIT License:
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* It is requested (but not required by license) that any bugs found or
* improvements made be shared, preferably to the author.
* @endparblock
*
* @brief FreeRTOS Callback Wrapper
*
* This file provides the C Trampoline function for the Callback Wrappers
*
* @ingroup FreeRTOSCpp
*/
#include <FreeRTOSpp/CallBack.h>
extern "C" {
void voidCallbackU32(void* cb, uint32_t parm) {
CallBack<void, uint32_t>* callback = static_cast<CallBack<void, uint32_t>* >(cb);
callback->callback(parm);
}
};
C++
1
https://gitee.com/akinggw/FreeRTOScpp.git
git@gitee.com:akinggw/FreeRTOScpp.git
akinggw
FreeRTOScpp
FreeRTOScpp
master

Search