/* ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio. This file is part of ChibiOS. ChibiOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. ChibiOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /** * @file templates/chcore.c * @brief Port related template code. * @details This file is a template of the system driver functions provided by * a port. Some of the following functions may be implemented as * macros in chcore.h if the implementer decides that there is an * advantage in doing so, for example because performance concerns. * * @addtogroup core * @details Non portable code templates. * @{ */ #include "ch.h" /*===========================================================================*/ /* Module local definitions. */ /*===========================================================================*/ /*===========================================================================*/ /* Module exported variables. */ /*===========================================================================*/ /*===========================================================================*/ /* Module local types. */ /*===========================================================================*/ /*===========================================================================*/ /* Module local variables. */ /*===========================================================================*/ /*===========================================================================*/ /* Module local functions. */ /*===========================================================================*/ /*===========================================================================*/ /* Module exported functions. */ /*===========================================================================*/ /** * @brief Port-related initialization code. * @note This function is usually empty. */ void _port_init(void) { } /** * @brief Performs a context switch between two threads. * @details This is the most critical code in any port, this function * is responsible for the context switch between 2 threads. * @note The implementation of this code affects directly the context * switch performance so optimize here as much as you can. * * @param[in] ntp the thread to be switched in * @param[in] otp the thread to be switched out */ void _port_switch(thread_t *ntp, thread_t *otp) { } /** @} */