2009-08-16 06:07:24 -07:00
|
|
|
/*
|
2018-01-20 03:44:14 -08:00
|
|
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
2009-08-16 06:07:24 -07:00
|
|
|
|
2013-05-10 23:08:17 -07:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
2009-08-16 06:07:24 -07:00
|
|
|
|
2013-05-10 23:08:17 -07:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2009-08-16 06:07:24 -07:00
|
|
|
|
2013-05-10 23:08:17 -07:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
2009-08-16 06:07:24 -07:00
|
|
|
*/
|
|
|
|
/**
|
2010-10-09 03:17:11 -07:00
|
|
|
* @file ch.cpp
|
|
|
|
* @brief C++ wrapper code.
|
|
|
|
*
|
2009-08-30 00:17:22 -07:00
|
|
|
* @addtogroup cpp_library
|
2009-08-16 06:07:24 -07:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2009-12-08 09:37:49 -08:00
|
|
|
#include "ch.hpp"
|
2009-08-16 06:07:24 -07:00
|
|
|
|
|
|
|
namespace chibios_rt {
|
|
|
|
|
2018-04-22 00:40:46 -07:00
|
|
|
#if (CH_CFG_NO_IDLE_THREAD == FALSE) || defined(__DOXYGEN__)
|
2018-04-23 07:01:56 -07:00
|
|
|
ThreadReference System::getIdleThreadX(void) {
|
2018-04-22 00:40:46 -07:00
|
|
|
|
2018-04-23 07:01:56 -07:00
|
|
|
return ThreadReference(chSysGetIdleThreadX());
|
2018-04-22 00:40:46 -07:00
|
|
|
}
|
2018-04-23 07:01:56 -07:00
|
|
|
#endif /* CH_CFG_NO_IDLE_THREAD == FALSE */
|
2018-04-22 00:40:46 -07:00
|
|
|
|
2009-08-16 06:07:24 -07:00
|
|
|
/*------------------------------------------------------------------------*
|
2018-04-21 08:07:13 -07:00
|
|
|
* chibios_rt::BaseStaticThread *
|
2009-08-16 06:07:24 -07:00
|
|
|
*------------------------------------------------------------------------*/
|
2015-04-05 06:03:46 -07:00
|
|
|
|
2015-04-05 03:32:38 -07:00
|
|
|
void _thd_start(void *arg) {
|
2009-08-16 06:07:24 -07:00
|
|
|
|
2015-04-05 03:32:38 -07:00
|
|
|
((BaseThread *)arg)->main();
|
2009-08-16 06:07:24 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @} */
|