80 lines
3.3 KiB
C
80 lines
3.3 KiB
C
|
/*
|
||
|
ChibiOS - Copyright (C) 2006..2015 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 <http://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @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 <b>directly</b> 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) {
|
||
|
}
|
||
|
|
||
|
/** @} */
|