2009-08-30 06:59:43 +00:00
|
|
|
/*
|
2015-01-11 13:45:54 +00:00
|
|
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2015-01-11 13:45:54 +00:00
|
|
|
This file is part of ChibiOS.
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2015-01-11 13:45:54 +00:00
|
|
|
ChibiOS is free software; you can redistribute it and/or modify
|
2009-08-30 06:59:43 +00:00
|
|
|
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.
|
|
|
|
|
2015-01-11 13:45:54 +00:00
|
|
|
ChibiOS is distributed in the hope that it will be useful,
|
2009-08-30 06:59:43 +00:00
|
|
|
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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2013-06-02 12:03:48 +00:00
|
|
|
/**
|
2010-02-06 08:12:31 +00:00
|
|
|
* @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
|
2010-11-11 11:04:05 +00:00
|
|
|
* advantage in doing so, for example because performance concerns.
|
2010-02-06 08:12:31 +00:00
|
|
|
*
|
2009-08-30 06:59:43 +00:00
|
|
|
* @addtogroup core
|
2010-03-16 19:36:21 +00:00
|
|
|
* @details Non portable code templates.
|
2009-08-30 06:59:43 +00:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2009-12-08 17:37:49 +00:00
|
|
|
#include "ch.h"
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module local definitions. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module exported variables. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module local types. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module local variables. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module local functions. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
2014-11-23 18:15:56 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Module exported functions. */
|
|
|
|
/*===========================================================================*/
|
2009-08-30 06:59:43 +00:00
|
|
|
|
|
|
|
/**
|
2014-11-23 18:15:56 +00:00
|
|
|
* @brief Port-related initialization code.
|
|
|
|
* @note This function is usually empty.
|
2009-08-30 06:59:43 +00:00
|
|
|
*/
|
2014-11-23 18:15:56 +00:00
|
|
|
void _port_init(void) {
|
2009-08-30 06:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2010-02-06 08:12:31 +00:00
|
|
|
* @brief Performs a context switch between two threads.
|
2009-08-30 06:59:43 +00:00
|
|
|
* @details This is the most critical code in any port, this function
|
2010-02-06 08:12:31 +00:00
|
|
|
* is responsible for the context switch between 2 threads.
|
|
|
|
* @note The implementation of this code affects <b>directly</b> the context
|
|
|
|
* switch performance so optimize here as much as you can.
|
2009-08-30 06:59:43 +00:00
|
|
|
*
|
2010-03-14 09:13:21 +00:00
|
|
|
* @param[in] ntp the thread to be switched in
|
|
|
|
* @param[in] otp the thread to be switched out
|
2009-08-30 06:59:43 +00:00
|
|
|
*/
|
2014-11-23 18:15:56 +00:00
|
|
|
void _port_switch(thread_t *ntp, thread_t *otp) {
|
2009-08-30 06:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @} */
|