Dependencies:   keypad SDHCFileSystem mbed FPointer wave_player

Committer:
daryl2110
Date:
Mon Feb 20 07:36:06 2012 +0000
Revision:
0:879af6e11219

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
daryl2110 0:879af6e11219 1 //******************************************************************************
daryl2110 0:879af6e11219 2 //*
daryl2110 0:879af6e11219 3 //* FULLNAME: Single-Chip Microcontroller Real-Time Operating System
daryl2110 0:879af6e11219 4 //*
daryl2110 0:879af6e11219 5 //* NICKNAME: scmRTOS
daryl2110 0:879af6e11219 6 //*
daryl2110 0:879af6e11219 7 //* PROCESSOR: ARM Cortex-M3
daryl2110 0:879af6e11219 8 //*
daryl2110 0:879af6e11219 9 //* TOOLKIT: EWARM (IAR Systems)
daryl2110 0:879af6e11219 10 //*
daryl2110 0:879af6e11219 11 //* PURPOSE: Project Level Target Extensions Config
daryl2110 0:879af6e11219 12 //*
daryl2110 0:879af6e11219 13 //* Version: 3.10
daryl2110 0:879af6e11219 14 //*
daryl2110 0:879af6e11219 15 //* $Revision: 196 $
daryl2110 0:879af6e11219 16 //* $Date:: 2008-06-19 #$
daryl2110 0:879af6e11219 17 //*
daryl2110 0:879af6e11219 18 //* Copyright (c) 2003-2010, Harry E. Zhurov
daryl2110 0:879af6e11219 19 //*
daryl2110 0:879af6e11219 20 //* Permission is hereby granted, free of charge, to any person
daryl2110 0:879af6e11219 21 //* obtaining a copy of this software and associated documentation
daryl2110 0:879af6e11219 22 //* files (the "Software"), to deal in the Software without restriction,
daryl2110 0:879af6e11219 23 //* including without limitation the rights to use, copy, modify, merge,
daryl2110 0:879af6e11219 24 //* publish, distribute, sublicense, and/or sell copies of the Software,
daryl2110 0:879af6e11219 25 //* and to permit persons to whom the Software is furnished to do so,
daryl2110 0:879af6e11219 26 //* subject to the following conditions:
daryl2110 0:879af6e11219 27 //*
daryl2110 0:879af6e11219 28 //* The above copyright notice and this permission notice shall be included
daryl2110 0:879af6e11219 29 //* in all copies or substantial portions of the Software.
daryl2110 0:879af6e11219 30 //*
daryl2110 0:879af6e11219 31 //* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
daryl2110 0:879af6e11219 32 //* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
daryl2110 0:879af6e11219 33 //* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
daryl2110 0:879af6e11219 34 //* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
daryl2110 0:879af6e11219 35 //* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
daryl2110 0:879af6e11219 36 //* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
daryl2110 0:879af6e11219 37 //* THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
daryl2110 0:879af6e11219 38 //*
daryl2110 0:879af6e11219 39 //* =================================================================
daryl2110 0:879af6e11219 40 //* See http://scmrtos.sourceforge.net for documentation, latest
daryl2110 0:879af6e11219 41 //* information, license and contact details.
daryl2110 0:879af6e11219 42 //* =================================================================
daryl2110 0:879af6e11219 43 //*
daryl2110 0:879af6e11219 44 //******************************************************************************
daryl2110 0:879af6e11219 45 //* mbed port by Igor Skochinsky
daryl2110 0:879af6e11219 46
daryl2110 0:879af6e11219 47 #ifndef scmRTOS_TARGET_CFG_H
daryl2110 0:879af6e11219 48 #define scmRTOS_TARGET_CFG_H
daryl2110 0:879af6e11219 49
daryl2110 0:879af6e11219 50 #include "device.h"
daryl2110 0:879af6e11219 51
daryl2110 0:879af6e11219 52 // Define SysTick clock frequency and its interrupt rate in Hz.
daryl2110 0:879af6e11219 53 #define SYSTICKFREQ 100000000
daryl2110 0:879af6e11219 54 #define SYSTICKINTRATE 1000
daryl2110 0:879af6e11219 55
daryl2110 0:879af6e11219 56 //------------------------------------------------------------------------------
daryl2110 0:879af6e11219 57 //
daryl2110 0:879af6e11219 58 // System Timer stuff
daryl2110 0:879af6e11219 59 //
daryl2110 0:879af6e11219 60 //
daryl2110 0:879af6e11219 61 namespace OS
daryl2110 0:879af6e11219 62 {
daryl2110 0:879af6e11219 63 extern "C" void SysTick_Handler();
daryl2110 0:879af6e11219 64 }
daryl2110 0:879af6e11219 65
daryl2110 0:879af6e11219 66 #define LOCK_SYSTEM_TIMER() ( *CPU_SYSTICKCSR &= ~CPU_SYSTICKCSR_EINT )
daryl2110 0:879af6e11219 67 #define UNLOCK_SYSTEM_TIMER() ( *CPU_SYSTICKCSR |= CPU_SYSTICKCSR_EINT )
daryl2110 0:879af6e11219 68
daryl2110 0:879af6e11219 69 //------------------------------------------------------------------------------
daryl2110 0:879af6e11219 70 //
daryl2110 0:879af6e11219 71 // Context Switch ISR stuff
daryl2110 0:879af6e11219 72 //
daryl2110 0:879af6e11219 73 //
daryl2110 0:879af6e11219 74 namespace OS
daryl2110 0:879af6e11219 75 {
daryl2110 0:879af6e11219 76 #if scmRTOS_IDLE_HOOK_ENABLE == 1
daryl2110 0:879af6e11219 77 void IdleProcessUserHook();
daryl2110 0:879af6e11219 78 #endif
daryl2110 0:879af6e11219 79
daryl2110 0:879af6e11219 80 #if scmRTOS_CONTEXT_SWITCH_SCHEME == 1
daryl2110 0:879af6e11219 81
daryl2110 0:879af6e11219 82 INLINE inline void RaiseContextSwitch() { *CPU_ICSR |= 0x10000000; }
daryl2110 0:879af6e11219 83
daryl2110 0:879af6e11219 84 #define ENABLE_NESTED_INTERRUPTS()
daryl2110 0:879af6e11219 85
daryl2110 0:879af6e11219 86 #if scmRTOS_SYSTIMER_NEST_INTS_ENABLE == 0
daryl2110 0:879af6e11219 87 #define DISABLE_NESTED_INTERRUPTS() TCritSect cs
daryl2110 0:879af6e11219 88 #else
daryl2110 0:879af6e11219 89 #define DISABLE_NESTED_INTERRUPTS()
daryl2110 0:879af6e11219 90 #endif
daryl2110 0:879af6e11219 91
daryl2110 0:879af6e11219 92 #else
daryl2110 0:879af6e11219 93 #error "Cortex-M3 port supports software interrupt switch method only!"
daryl2110 0:879af6e11219 94
daryl2110 0:879af6e11219 95 #endif // scmRTOS_CONTEXT_SWITCH_SCHEME
daryl2110 0:879af6e11219 96
daryl2110 0:879af6e11219 97 }
daryl2110 0:879af6e11219 98 //-----------------------------------------------------------------------------
daryl2110 0:879af6e11219 99
daryl2110 0:879af6e11219 100 #endif // scmRTOS_TARGET_CFG_H
daryl2110 0:879af6e11219 101 //-----------------------------------------------------------------------------
daryl2110 0:879af6e11219 102