/**************************************************************************/ /*! @file rtx_hook.c @author Hau Huynh @brief Board file for the LPC1347 LPCXpresso board from NXP @ingroup Boards @section LICENSE Software License Agreement (BSD License) Copyright (c) 2012 K. Townsend All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************/ #include "projectconfig.h" #if defined CFG_CMSIS_RTOS /*---------------------------------------------------------------------------- * Global Functions *---------------------------------------------------------------------------*/ /*--------------------------- os_idle_demon ---------------------------------*/ void os_idle_demon (void) { /* The idle demon is a system thread, running when no other thread is */ /* ready to run. */ for (;;) { /* HERE: include optional user code to be executed when no thread runs.*/ } } #if (OS_SYSTICK == 0) // Functions for alternative timer as RTX kernel timer /*--------------------------- os_tick_init ----------------------------------*/ // Initialize alternative hardware timer as RTX kernel timer // Return: IRQ number of the alternative hardware timer int os_tick_init (void) { return (-1); /* Return IRQ number of timer (0..239) */ } /*--------------------------- os_tick_val -----------------------------------*/ // Get alternative hardware timer current value (0 .. OS_TRV) uint32_t os_tick_val (void) { return (0); } /*--------------------------- os_tick_ovf -----------------------------------*/ // Get alternative hardware timer overflow flag // Return: 1 - overflow, 0 - no overflow uint32_t os_tick_ovf (void) { return (0); } /*--------------------------- os_tick_irqack --------------------------------*/ // Acknowledge alternative hardware timer interrupt void os_tick_irqack (void) { /* ... */ } #endif // (OS_SYSTICK == 0) /*--------------------------- os_error --------------------------------------*/ void os_error (uint32_t err_code) { /* This function is called when a runtime error is detected. Parameter */ /* 'err_code' holds the runtime error code (defined in RTL.H). */ /* HERE: include optional code to be executed on runtime error. */ for (;;); } /*---------------------------------------------------------------------------- * end of file *---------------------------------------------------------------------------*/ #endif