mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 07:13:33 +08:00
Resync new repository with old repo r5166
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5153 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
This directory contains header files common to all SH architectures.
|
||||
Sub-directories within this directory contain header files unique to
|
||||
specific SH chip architectures. At configuration time, additional directories
|
||||
will be linked here: 'build' will be a link to the configs/*/include
|
||||
directory; 'chip' will be a link to the SH chip sub-directory.
|
||||
@@ -0,0 +1,79 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/arch.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/arch.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_ARCH_H
|
||||
#define __ARCH_SH_INCLUDE_ARCH_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_ARCH_H */
|
||||
@@ -0,0 +1,85 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/irq.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 Gregory Nutt 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_IRQ_H
|
||||
#define __ARCH_SH_INCLUDE_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/irq.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_IRQ_H */
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/limits.h
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_LIMITS_H
|
||||
#define __ARCH_SH_INCLUDE_LIMITS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <arch/chip/limits.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_LIMITS_H */
|
||||
@@ -0,0 +1 @@
|
||||
This directory contains header files specific to the M16c architectures.
|
||||
@@ -0,0 +1,322 @@
|
||||
/************************************************************************************
|
||||
* arch/sh/include/m16c/irq.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_M16C_IRQ_H
|
||||
#define __ARCH_SH_INCLUDE_M16C_IRQ_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* IRQ numbers **********************************************************************/
|
||||
|
||||
/* Fixed vector table */
|
||||
|
||||
#define M16C_UNDEFINST_IRQ 0 /* fffdc: Undefined instruction */
|
||||
#define M16C_OVERFLOW_IRQ 1 /* fffe0: Overflow */
|
||||
#define M16C_BRK_IRQ 2 /* fffe4: BRK instruction */
|
||||
#define M16C_ADDRMATCH_IRQ 3 /* fffe8: Address match */
|
||||
#ifdef CONFIG_M16C_DEBUGGER
|
||||
# define M16C_SSTEP_IRQ 4 /* fffec: Single step */
|
||||
# define M16C_WDOG_IRQ 5 /* ffff0: Watchdog timer */
|
||||
# define M16C_DBC_IRQ 6 /* ffff4: DBC */
|
||||
# define M16C_NMI_IRQ 7 /* ffff8: NMI */
|
||||
# define _LAST_FIXED 7
|
||||
#else
|
||||
# define M16C_WDOG_IRQ 4 /* ffff0: Watchdog timer */
|
||||
# define M16C_NMI_IRQ 5 /* ffff8: NMI */
|
||||
# define _LAST_FIXED 5
|
||||
#endif
|
||||
|
||||
/* Variable vector table (fixed at address 0xffd00) */
|
||||
|
||||
#ifdef CONFIG_M16C_SWINTS
|
||||
# define M16C_BRK_IRQ (_LAST_FIXED+1) /* ffd00: BRK instruction */
|
||||
# define M16C_SWINT0_IRQ M16C_BRK_IRQ /* S/W interrupt 0 */
|
||||
# define M16C_INT3_IRQ (_LAST_FIXED+2) /* ffd10: INT3 */
|
||||
# define M16C_SWINT4_IRQ M16C_INT3_IRQ /* S/W interrupt 4 */
|
||||
# define M16C_CTXSV_SWINT (_LAST_FIXED+3) /* ffd14: Reserved -- used by NuttX */
|
||||
# define M16C_SWINT5_IRQ M16C_CTXSV_SWINT /* S/W interrupt 5 */
|
||||
# define M16C_SWINT6_IRQ (_LAST_FIXED+4) /* ffd18: Reserved / S/W interrupt 6 */
|
||||
# define M16C_SWINT7_IRQ (_LAST_FIXED+5) /* ffd1c: Reserved / S/W interrupt 7 */
|
||||
# define M16C_INT5_IRQ (_LAST_FIXED+6) /* ffd20: INT5 */
|
||||
# define M16C_SWINT8_IRQ M16C_INT5_IRQ /* S/W interrupt 8 */
|
||||
# define M16C_INT4_IRQ (_LAST_FIXED+7) /* ffd24: INT4 */
|
||||
# define M16C_SWINT9_IRQ M16C_INT4_IRQ /* S/W interrupt 9 */
|
||||
# define M16C_UART2BCD_IRQ (_LAST_FIXED+8) /* ffd28: UART2 bus collision detection */
|
||||
# define M16C_SWINT10_IRQ M16C_UART2BCD_IRQ /* S/W interrupt 10 */
|
||||
# define M16C_DMA0_IRQ (_LAST_FIXED+9) /* ffd2c: DMA0 */
|
||||
# define M16C_SWINT11_IRQ M16C_DMA0_IRQ /* S/W interrupt 11 */
|
||||
# define M16C_DMA1_IRQ (_LAST_FIXED+10) /* ffd30: DMA1 */
|
||||
# define M16C_SWINT12_IRQ M16C_DMA1_IRQ /* S/W interrupt 12 */
|
||||
# define M16C_KEYINP_IRQ (_LAST_FIXED+11) /* ffd34: Key input interrupt */
|
||||
# define M16C_SWINT13_IRQ M16C_KEYINP_IRQ /* S/W interrupt 13 */
|
||||
# define M16C_ADC_IRQ (_LAST_FIXED+12) /* ffd38: A-D */
|
||||
# define M16C_SWINT14_IRQ M16C_ADC_IRQ /* S/W interrupt 14 */
|
||||
# define M16C_UARTXNAK_IRQ (_LAST_FIXED+13) /* ffd3c UART2 transmit/NACK2 */
|
||||
# define M16C_SWINT15_IRQ M16C_UARTNAK_IRQ /* S/W interrupt 15 */
|
||||
# define M16C_UARTRACK_IRQ (_LAST_FIXED+14) /* ffd40: UART2 receive/ACK2 */
|
||||
# define M16C_SWINT16_IRQ M16C_UARTRACK_IRQ /* S/W interrupt 16 */
|
||||
# define M16C_UART0XMT_IRQ (_LAST_FIXED+15) /* ffd44: UART0 transmit */
|
||||
# define M16C_SWINT17_IRQ M16C_UART0XMT_IRQ /* S/W interrupt 17 */
|
||||
# define M16C_UART0RCV_IRQ (_LAST_FIXED+16) /* ffd48: UART0 receive */
|
||||
# define M16C_SWINT18_IRQ M16C_UART0RCV_IRQ /* S/W interrupt 18 */
|
||||
# define M16C_UART1XMT_IRQ (_LAST_FIXED+17) /* ffd4c: UART1 transmit */
|
||||
# define M16C_SWINT19_IRQ M16C_UART1XMT_IRQ /* S/W interrupt 19 */
|
||||
# define M16C_UART1RCV_IRQ (_LAST_FIXED+18) /* ffd50: UART1 receive */
|
||||
# define M16C_SWINT20_IRQ M16C_UART1RCV_IRQ /* S/W interrupt 20 */
|
||||
# define M16C_TMRA0_IRQ (_LAST_FIXED+19) /* ffd54: Timer A0 */
|
||||
# define M16C_SWINT21_IRQ M16C_TMRA0_IRQ /* S/W interrupt 21 */
|
||||
# define M16C_TMRA1_IRQ (_LAST_FIXED+20) /* ffd58: Timer A1 */
|
||||
# define M16C_SWINT22_IRQ M16C_TMRA1_IRQ /* S/W interrupt 22 */
|
||||
# define M16C_TMRA2_IRQ (_LAST_FIXED+21) /* ffd5c: Timer A2 */
|
||||
# define M16C_SWINT23_IRQ M16C_TMRA2_IRQ /* S/W interrupt 23 */
|
||||
# define M16C_TMRA3_IRQ (_LAST_FIXED+22) /* ffd60: Timer A3 */
|
||||
# define M16C_SWINT24_IRQ M16C_TMRA3_IRQ /* S/W interrupt 24 */
|
||||
# define M16C_TMRA4_IRQ (_LAST_FIXED+23) /* ffd64: Timer A4 */
|
||||
# define M16C_SWINT25_IRQ M16C_TMRA4_IRQ /* S/W interrupt 25 */
|
||||
# define M16C_TMRB0_IRQ (_LAST_FIXED+24) /* ffd68: Timer B0 */
|
||||
# define M16C_SWINT26_IRQ M16C_TMRB0_IRQ /* S/W interrupt 26 */
|
||||
# define M16C_TMRB1_IRQ (_LAST_FIXED+25) /* ffd6c: Timer B1 */
|
||||
# define M16C_SWINT27_IRQ M16C_TMRB1_IRQ /* S/W interrupt 27 */
|
||||
# define M16C_TMRB2_IRQ (_LAST_FIXED+26) /* ffd70: Timer B2 */
|
||||
# define M16C_SWINT28_IRQ M16C_TMRB2_IRQ /* S/W interrupt 28 */
|
||||
# define M16C_INT0_IRQ (_LAST_FIXED+27) /* ffd74: INT0 */
|
||||
# define M16C_SWINT29_IRQ M16C_INT0_IRQ /* S/W interrupt 29 */
|
||||
# define M16C_INT1_IRQ (_LAST_FIXED+28) /* ffd78: INT1 */
|
||||
# define M16C_SWINT30_IRQ M16C_INT1_IRQ /* S/W interrupt 30 */
|
||||
# define M16C_SWINT31_IRQ (_LAST_FIXED+29) /* ffd7c: Reserved / S/W interrupt 31 */
|
||||
# define M16C_CTXRSTR_SWINT (_LAST_FIXED+30) /* ffd80: Used by NuttX */
|
||||
# define M16C_SWINT32IRQ M16C_CTXRSTR_SWINT /* S/W interrupt 32 */
|
||||
# define M16C_SWINT33_IRQ (_LAST_FIXED+31) /* ffd84: S/W interrupt 33 */
|
||||
# define M16C_SWINT34_IRQ (_LAST_FIXED+32) /* ffd88: S/W interrupt 34 */
|
||||
# define M16C_SWINT35_IRQ (_LAST_FIXED+33) /* ffd8c: S/W interrupt 35 */
|
||||
# define M16C_SWINT36_IRQ (_LAST_FIXED+34) /* ffd90: S/W interrupt 36 */
|
||||
# define M16C_SWINT37_IRQ (_LAST_FIXED+35) /* ffd94: S/W interrupt 37 */
|
||||
# define M16C_SWINT38_IRQ (_LAST_FIXED+36) /* ffd98: S/W interrupt 38 */
|
||||
# define M16C_SWINT39_IRQ (_LAST_FIXED+37) /* ffd9c: S/W interrupt 39 */
|
||||
# define M16C_SWINT40_IRQ (_LAST_FIXED+38) /* ffda0: S/W interrupt 40 */
|
||||
# define M16C_SWINT41_IRQ (_LAST_FIXED+39) /* ffda4: S/W interrupt 41 */
|
||||
# define M16C_SWINT42_IRQ (_LAST_FIXED+40) /* ffda8: S/W interrupt 42 */
|
||||
# define M16C_SWINT43_IRQ (_LAST_FIXED+41) /* ffdac: S/W interrupt 43 */
|
||||
# define M16C_SWINT44_IRQ (_LAST_FIXED+42) /* ffdb0: S/W interrupt 44 */
|
||||
# define M16C_SWINT45_IRQ (_LAST_FIXED+43) /* ffdb4: S/W interrupt 45 */
|
||||
# define M16C_SWINT46_IRQ (_LAST_FIXED+44) /* ffdb8: S/W interrupt 46 */
|
||||
# define M16C_SWINT47_IRQ (_LAST_FIXED+45) /* ffdbc: S/W interrupt 47 */
|
||||
# define M16C_SWINT48_IRQ (_LAST_FIXED+46) /* ffdc0: S/W interrupt 48 */
|
||||
# define M16C_SWINT49_IRQ (_LAST_FIXED+47) /* ffdc4: S/W interrupt 49 */
|
||||
# define M16C_SWINT50_IRQ (_LAST_FIXED+48) /* ffdc8: S/W interrupt 50 */
|
||||
# define M16C_SWINT51_IRQ (_LAST_FIXED+49) /* ffdcc: S/W interrupt 51 */
|
||||
# define M16C_SWINT52_IRQ (_LAST_FIXED+50) /* ffdd0: S/W interrupt 52 */
|
||||
# define M16C_SWINT53_IRQ (_LAST_FIXED+51) /* ffdd4: S/W interrupt 53 */
|
||||
# define M16C_SWINT54_IRQ (_LAST_FIXED+52) /* ffdd8: S/W interrupt 54 */
|
||||
# define M16C_SWINT55_IRQ (_LAST_FIXED+53) /* ffddc: S/W interrupt 55 */
|
||||
# define M16C_SWINT56_IRQ (_LAST_FIXED+54) /* ffde0: S/W interrupt 56 */
|
||||
# define M16C_SWINT57_IRQ (_LAST_FIXED+55) /* ffde4: S/W interrupt 57 */
|
||||
# define M16C_SWINT58_IRQ (_LAST_FIXED+56) /* ffde8: S/W interrupt 58 */
|
||||
# define M16C_SWINT59_IRQ (_LAST_FIXED+57) /* ffdec: S/W interrupt 59 */
|
||||
# define M16C_SWINT60_IRQ (_LAST_FIXED+58) /* ffdf0: S/W interrupt 60 */
|
||||
# define M16C_SWINT61_IRQ (_LAST_FIXED+59) /* ffdf4: S/W interrupt 61 */
|
||||
# define M16C_SWINT62_IRQ (_LAST_FIXED+60) /* ffdf8: S/W interrupt 62 */
|
||||
# define M16C_SWINT63_IRQ (_LAST_FIXED+61) /* ffdfc: S/W interrupt 63 */
|
||||
|
||||
# define NR_IRQS (_LAST_FIXED+62) /* Total number of supported IRQs */
|
||||
#else
|
||||
# define M16C_BRK_IRQ (_LAST_FIXED+1) /* ffd00: BRK instruction */
|
||||
# define M16C_INT3_IRQ (_LAST_FIXED+2) /* ffd10: INT3 */
|
||||
# define M16C_CTXSV_SWINT (_LAST_FIXED+3) /* ffd14: Reserved -- SWINT5 used by NuttX */
|
||||
# define M16C_INT5_IRQ (_LAST_FIXED+5) /* ffd20: INT5 */
|
||||
# define M16C_INT4_IRQ (_LAST_FIXED+6) /* ffd24: INT4 */
|
||||
# define M16C_UART2BCD_IRQ (_LAST_FIXED+7) /* ffd28: UART2 bus collision detection */
|
||||
# define M16C_DMA0_IRQ (_LAST_FIXED+8) /* ffd2c: DMA0 */
|
||||
# define M16C_DMA1_IRQ (_LAST_FIXED+9) /* ffd30: DMA1 */
|
||||
# define M16C_KEYINP_IRQ (_LAST_FIXED+10) /* ffd34: Key input interrupt */
|
||||
# define M16C_ADC_IRQ (_LAST_FIXED+11) /* ffd38: A-D */
|
||||
# define M16C_UARTXNAK_IRQ (_LAST_FIXED+12) /* ffd3c UART2 transmit/NACK2 */
|
||||
# define M16C_UARTRACK_IRQ (_LAST_FIXED+13) /* ffd40: UART2 receive/ACK2 */
|
||||
# define M16C_UART0XMT_IRQ (_LAST_FIXED+14) /* ffd44: UART0 transmit */
|
||||
# define M16C_UART0RCV_IRQ (_LAST_FIXED+15) /* ffd48: UART0 receive */
|
||||
# define M16C_UART1XMT_IRQ (_LAST_FIXED+16) /* ffd4c: UART1 transmit */
|
||||
# define M16C_UART1RCV_IRQ (_LAST_FIXED+17) /* ffd50: UART1 receive */
|
||||
# define M16C_TMRA0_IRQ (_LAST_FIXED+18) /* ffd54: Timer A0 */
|
||||
# define M16C_TMRA1_IRQ (_LAST_FIXED+19) /* ffd58: Timer A1 */
|
||||
# define M16C_TMRA2_IRQ (_LAST_FIXED+20) /* ffd5c: Timer A2 */
|
||||
# define M16C_TMRA3_IRQ (_LAST_FIXED+21) /* ffd60: Timer A3 */
|
||||
# define M16C_TMRA4_IRQ (_LAST_FIXED+22) /* ffd64: Timer A4 */
|
||||
# define M16C_TMRB0_IRQ (_LAST_FIXED+23) /* ffd68: Timer B0 */
|
||||
# define M16C_TMRB1_IRQ (_LAST_FIXED+24) /* ffd6c: Timer B1 */
|
||||
# define M16C_TMRB2_IRQ (_LAST_FIXED+25) /* ffd70: Timer B2 */
|
||||
# define M16C_INT0_IRQ (_LAST_FIXED+26) /* ffd74: INT0 */
|
||||
# define M16C_INT1_IRQ (_LAST_FIXED+27) /* ffd78: INT1 */
|
||||
# define M16C_CTXRSTR_SWINT (_LAST_FIXED+4) /* ffd80: S/W interrupt 32, used by NuttX */
|
||||
|
||||
# define NR_IRQS (_LAST_FIXED+28) /* Total number of supported IRQs */
|
||||
#endif
|
||||
|
||||
/* Timer A0 is the system timer used by NuttX */
|
||||
|
||||
#define M16C_SYSTIMER_IRQ M16C_TMRA0_IRQ
|
||||
|
||||
/* IRQ Stack Frame Format. The M16C has a push down stack. The CPU performs
|
||||
* the following actions when an interrupt is taken:
|
||||
*
|
||||
* - Save FLG register
|
||||
* - Clear I, D, and U flags in FLG register
|
||||
* - Builds stack frame like:
|
||||
*
|
||||
* sp -> PC bits 0-7
|
||||
* sp+1 -> PC bits 8-15
|
||||
* sp+2 -> FLG bits 0-7
|
||||
* sp+3 -> FLG (Bits 12-14) + PC (bits 16-19)
|
||||
*
|
||||
* - Sets IPL
|
||||
* - Vectors to interrupt handler
|
||||
*/
|
||||
|
||||
#define REG_FLGPCHI 0 /* 8-bit FLG (bits 12-14) + PC (bits 16-19) as would be
|
||||
* presented by an interrupt */
|
||||
#define REG_FLG 1 /* 8-bit FLG register (bits 0-7) */
|
||||
#define REG_PC 2 /* 16-bit PC [0]:bits8-15 [1]:bits 0-7 */
|
||||
#define REG_FB 4 /* 16-bit FB register */
|
||||
#define REG_SB 6 /* 16-bit SB register */
|
||||
#define REG_A1 8 /* 16-bit A1 register */
|
||||
#define REG_A0 10 /* 16-bit A0 register */
|
||||
#define REG_R3 12 /* 16-bit R3 register */
|
||||
#define REG_R2 14 /* 16-bit R2 register */
|
||||
#define REG_R1 16 /* 16-bit R1 register */
|
||||
#define REG_R0 18 /* 16-bit R0 register */
|
||||
#define REG_SP 20 /* 16-bit user stack pointer */
|
||||
|
||||
#define XCPTCONTEXT_SIZE 22
|
||||
|
||||
/************************************************************************************
|
||||
* Public Types
|
||||
************************************************************************************/
|
||||
/* This struct defines the way the registers are stored. We need to save: */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and SR used during signal processing. */
|
||||
|
||||
uint8_t saved_pc[2];
|
||||
uint8_t saved_flg;
|
||||
#endif
|
||||
|
||||
/* Register save area */
|
||||
|
||||
uint8_t regs[XCPTCONTEXT_SIZE];
|
||||
};
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Save the current interrupt enable state & disable IRQs */
|
||||
|
||||
static inline irqstate_t irqsave(void)
|
||||
{
|
||||
irqstate_t flags;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"\tstc flg, %0\n"
|
||||
"\tfclr I\n"
|
||||
: "=r" (flags)
|
||||
:
|
||||
: "memory");
|
||||
return flags;
|
||||
}
|
||||
|
||||
/* Restore saved IRQ & FIQ state */
|
||||
|
||||
static inline void irqrestore(irqstate_t flags)
|
||||
{
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"ldc %0, flg"
|
||||
:
|
||||
: "r" (flags)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_M16C_IRQ_H */
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/m16c/limits.h
|
||||
*
|
||||
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_M16C_LIMITS_H
|
||||
#define __ARCH_SH_INCLUDE_M16C_LIMITS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define UCHAR_MAX 255
|
||||
|
||||
/* These could be different on machines where char is unsigned */
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#endif
|
||||
|
||||
#define SHRT_MIN (-32768)
|
||||
#define SHRT_MAX 32767
|
||||
#define USHRT_MAX 65535
|
||||
|
||||
/* For M16C, type int is 16-bits, the same size as type 'short int' */
|
||||
|
||||
#define INT_MIN SHRT_MIN
|
||||
#define INT_MAX SHRT_MAX
|
||||
#define UINT_MAX USHRT_MAX
|
||||
|
||||
/* For M16C, typle 'long int' is 32-bits */
|
||||
|
||||
#define LONG_MIN (-2147483648L)
|
||||
#define LONG_MAX 2147483647L
|
||||
#define ULONG_MAX 4294967295UL
|
||||
|
||||
#define LLONG_MIN (-9223372036854775808LL)
|
||||
#define LLONG_MAX 9223372036854775807LL
|
||||
#define ULLONG_MAX 18446744073709551615ULL
|
||||
|
||||
/* A pointer is 2 bytes */
|
||||
|
||||
#define PTR_MIN (-32768)
|
||||
#define PTR_MAX 32767
|
||||
#define UPTR_MAX 65535
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_M16C_LIMITS_H */
|
||||
@@ -0,0 +1,98 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/m16c/types.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather, only indirectly\
|
||||
* through sys/types.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_M16C_TYPES_H
|
||||
#define __ARCH_SH_INCLUDE_M16C_TYPES_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Type Declarations
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* These are the sizes of the standard integer types. NOTE that these type
|
||||
* names have a leading underscore character. This file will be included
|
||||
* (indirectly) by include/stdint.h and typedef'ed to the final name without
|
||||
* the underscore character. This roundabout way of doings things allows
|
||||
* the stdint.h to be removed from the include/ directory in the event that
|
||||
* the user prefers to use the definitions provided by their toolchain header
|
||||
* files
|
||||
*
|
||||
* int is 16-bits and long is 32-bits
|
||||
*/
|
||||
|
||||
typedef signed char _int8_t;
|
||||
typedef unsigned char _uint8_t;
|
||||
|
||||
typedef signed int _int16_t;
|
||||
typedef unsigned int _uint16_t;
|
||||
|
||||
typedef signed long _int32_t;
|
||||
typedef unsigned long _uint32_t;
|
||||
|
||||
typedef signed long long _int64_t;
|
||||
typedef unsigned long long _uint64_t;
|
||||
#define __INT64_DEFINED
|
||||
|
||||
/* A pointer is 2 bytes */
|
||||
|
||||
typedef signed int _intptr_t;
|
||||
typedef unsigned int _uintptr_t;
|
||||
|
||||
/* This is the size of the interrupt state save returned by
|
||||
* irqsave()
|
||||
*/
|
||||
|
||||
typedef _uint16_t irqstate_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_M16C_TYPES_H */
|
||||
@@ -0,0 +1,57 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/serial.h
|
||||
*
|
||||
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_SERIAL_H
|
||||
#define __ARCH_SH_INCLUDE_SERIAL_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/fs/ioctl.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_SERIAL_H */
|
||||
@@ -0,0 +1 @@
|
||||
This directory contains header files specific to the SH-1 architecture.
|
||||
@@ -0,0 +1,566 @@
|
||||
/************************************************************************************
|
||||
* arch/sh/include/sh1/irq.h
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_SH1_IRQ_H
|
||||
#define __ARCH_SH_INCLUDE_SH1_IRQ_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* IRQ channels */
|
||||
|
||||
/* In the current implementation, CMON catches the following IRQ.
|
||||
* Support for traps can be provided by simply enabling the following, adding
|
||||
* vectors in sh1_head.S and adding handlers in sh1_vector.S
|
||||
*/
|
||||
|
||||
/* Illegal instructions / Address errors */
|
||||
|
||||
#if 0 /* Handled by CMON */
|
||||
# define SH1_INVINSTR_IRQ (0) /* General invalid instruction */
|
||||
# define SH1_INVSLOT_IRQ (1) /* Invalid slot instruction */
|
||||
# define SH1_BUSERR_IRQ (2) /* CPU bus error */
|
||||
# define SH1_DMAERR_IRQ (3) /* DMA bus error */
|
||||
# define SH1_NMI_IRQ (4) /* NMI */
|
||||
# define SH1_USRBRK_IRQ (6) /* User break */
|
||||
# define SH1_TRAP_IRQBASE (7)
|
||||
|
||||
# define SH1_TRAP0_IRQ SH1_TRAP_IRQBASE /* TRAPA instruction (user break) */
|
||||
# define SH1_TRAP1_IRQ (SH1_TRAP_IRQBASE+1) /* " " " " " " " " */
|
||||
# define SH1_TRAP2_IRQ (SH1_TRAP_IRQBASE+2) /* " " " " " " " " */
|
||||
# define SH1_TRAP3_IRQ (SH1_TRAP_IRQBASE+3) /* " " " " " " " " */
|
||||
# define SH1_TRAP4_IRQ (SH1_TRAP_IRQBASE+4) /* " " " " " " " " */
|
||||
# define SH1_TRAP5_IRQ (SH1_TRAP_IRQBASE+5) /* " " " " " " " " */
|
||||
# define SH1_TRAP6_IRQ (SH1_TRAP_IRQBASE+6) /* " " " " " " " " */
|
||||
# define SH1_TRAP7_IRQ (SH1_TRAP_IRQBASE+7) /* " " " " " " " " */
|
||||
# define SH1_TRAP8_IRQ (SH1_TRAP_IRQBASE+8) /* " " " " " " " " */
|
||||
# define SH1_TRAP9_IRQ (SH1_TRAP_IRQBASE+9) /* " " " " " " " " */
|
||||
# define SH1_TRAP10_IRQ (SH1_TRAP_IRQBASE+10) /* " " " " " " " " */
|
||||
# define SH1_TRAP11_IRQ (SH1_TRAP_IRQBASE+11) /* " " " " " " " " */
|
||||
# define SH1_TRAP12_IRQ (SH1_TRAP_IRQBASE+12) /* " " " " " " " " */
|
||||
# define SH1_TRAP13_IRQ (SH1_TRAP_IRQBASE+13) /* " " " " " " " " */
|
||||
# define SH1_TRAP14_IRQ (SH1_TRAP_IRQBASE+14) /* " " " " " " " " */
|
||||
# define SH1_TRAP15_IRQ (SH1_TRAP_IRQBASE+15) /* " " " " " " " " */
|
||||
# define SH1_TRAP16_IRQ (SH1_TRAP_IRQBASE+16) /* " " " " " " " " */
|
||||
# define SH1_TRAP17_IRQ (SH1_TRAP_IRQBASE+17) /* " " " " " " " " */
|
||||
# define SH1_TRAP18_IRQ (SH1_TRAP_IRQBASE+18) /* " " " " " " " " */
|
||||
# define SH1_TRAP19_IRQ (SH1_TRAP_IRQBASE+19) /* " " " " " " " " */
|
||||
# define SH1_TRAP20_IRQ (SH1_TRAP_IRQBASE+20) /* " " " " " " " " */
|
||||
# define SH1_TRAP21_IRQ (SH1_TRAP_IRQBASE+21) /* " " " " " " " " */
|
||||
# define SH1_TRAP22_IRQ (SH1_TRAP_IRQBASE+22) /* " " " " " " " " */
|
||||
# define SH1_TRAP23_IRQ (SH1_TRAP_IRQBASE+23) /* " " " " " " " " */
|
||||
# define SH1_TRAP24_IRQ (SH1_TRAP_IRQBASE+24) /* " " " " " " " " */
|
||||
# define SH1_TRAP25_IRQ (SH1_TRAP_IRQBASE+25) /* " " " " " " " " */
|
||||
# define SH1_TRAP26_IRQ (SH1_TRAP_IRQBASE+26) /* " " " " " " " " */
|
||||
# define SH1_TRAP27_IRQ (SH1_TRAP_IRQBASE+27) /* " " " " " " " " */
|
||||
# define SH1_TRAP28_IRQ (SH1_TRAP_IRQBASE+28) /* " " " " " " " " */
|
||||
# define SH1_TRAP29_IRQ (SH1_TRAP_IRQBASE+29) /* " " " " " " " " */
|
||||
# define SH1_TRAP30_IRQ (SH1_TRAP_IRQBASE+30) /* " " " " " " " " */
|
||||
# define SH1_TRAP31_IRQ (SH1_TRAP_IRQBASE+31) /* " " " " " " " " */
|
||||
# define SH1_IRQ_IRQBASE (SH1_TRAP_IRQBASE+32)
|
||||
|
||||
/* Interrupts */
|
||||
|
||||
# define SH1_IRQ0_IRQ SH1_IRQ_IRQBASE /* IRQ0 */
|
||||
# define SH1_IRQ1_IRQ (SH1_IRQ_IRQBASE+1) /* IRQ1 */
|
||||
# define SH1_IRQ2_IRQ (SH1_IRQ_IRQBASE+2) /* IRQ2 */
|
||||
# define SH1_IRQ3_IRQ (SH1_IRQ_IRQBASE+3) /* IRQ3 */
|
||||
# define SH1_IRQ4_IRQ (SH1_IRQ_IRQBASE+4) /* IRQ4 */
|
||||
# define SH1_IRQ5_IRQ (SH1_IRQ_IRQBASE+5) /* IRQ5 */
|
||||
# define SH1_IRQ6_IRQ (SH1_IRQ_IRQBASE+6) /* IRQ6 */
|
||||
# define SH1_IRQ7_IRQ (SH1_IRQ_IRQBASE+7) /* IRQ7 */
|
||||
# define SH1_CHIP_IRQBASE (SH1_IRQ_IRQBASE+8)
|
||||
#else
|
||||
# define SH1_CHIP_IRQBASE (0)
|
||||
#endif
|
||||
|
||||
/* On-chip modules -- The following may be unique to the 7032 */
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_SH7032
|
||||
|
||||
/* DMAC */
|
||||
|
||||
#ifdef CONFIG_SH1_DMAC0 /* DMAC0 */
|
||||
# define SH1_DEI0_IRQ SH1_CHIP_IRQBASE /* DEI0 */
|
||||
# define SH1_DMAC1_IRQBASE (SH1_CHIP_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_DMAC1_IRQBASE SH1_CHIP_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_DMAC1 /* DMAC1 */
|
||||
# define SH1_DEI1_IRQ SH1_DMAC1_IRQBASE /* DEI1 */
|
||||
# define SH1_DMAC2_IRQBASE (SH1_DMAC1_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_DMAC2_IRQBASE SH1_DMAC1_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_DMAC2 /* DMAC2 */
|
||||
# define SH1_DEI2_IRQ SH1_DMAC2_IRQBASE /* DEI2 */
|
||||
# define SH1_DMAC3_IRQBASE (SH1_DMAC2_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_DMAC3_IRQBASE SH1_DMAC2_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_DMAC3 /* DMAC3 */
|
||||
# define SH1_DEI3_IRQ SH1_DMAC3_IRQBASE /* DEI3 */
|
||||
# define SH1_ITU0_IRQBASE (SH1_DMAC3_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_ITU0_IRQBASE SH1_DMAC3_IRQBASE
|
||||
#endif
|
||||
|
||||
/* ITU */
|
||||
|
||||
/* ITU0 is the system clock and is always defined */
|
||||
|
||||
#define SH1_IMIA0_IRQ SH1_ITU0_IRQBASE /* IMIA0 */
|
||||
#define SH1_IMIB0_IRQ (SH1_ITU0_IRQBASE+1) /* IMIB0 */
|
||||
#define SH1_OVI0_IRQ (SH1_ITU0_IRQBASE+2) /* OVI0 */
|
||||
#define SH1_ITU1_IRQBASE (SH1_ITU0_IRQBASE+3)
|
||||
|
||||
#ifdef CONFIG_SH1_ITU1 /* ITU1 */
|
||||
# define SH1_IMIA1_IRQ SH1_ITU1_IRQBASE /* IMIA1 */
|
||||
# define SH1_IMIB1_IRQ (SH1_ITU1_IRQBASE+1) /* IMIB1 */
|
||||
# define SH1_OVI1_IRQ (SH1_ITU1_IRQBASE+2) /* OVI1 */
|
||||
# define SH1_ITU2_IRQBASE (SH1_ITU1_IRQBASE+3)
|
||||
#else
|
||||
# define SH1_ITU2_IRQBASE SH1_ITU1_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_ITU2 /* ITU2 */
|
||||
# define SH1_IMIA2_IRQ SH1_ITU2_IRQBASE /* IMIA2 */
|
||||
# define SH1_IMIB2_IRQ (SH1_ITU2_IRQBASE+1) /* IMIB2 */
|
||||
# define SH1_OVI2_IRQ (SH1_ITU2_IRQBASE+2) /* OVI2 */
|
||||
# define SH1_ITU3_IRQBASE (SH1_ITU2_IRQBASE+3)
|
||||
#else
|
||||
# define SH1_ITU3_IRQBASE SH1_ITU2_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_ITU3 /* ITU3 */
|
||||
# define SH1_IMIA3_IRQ SH1_ITU3_IRQBASE /* IMIA3 */
|
||||
# define SH1_IMIB3_IRQ (SH1_ITU3_IRQBASE+1) /* IMIB3 */
|
||||
# define SH1_OVI3_IRQ (SH1_ITU3_IRQBASE+2) /* OVI3 */
|
||||
# define SH1_ITU4_IRQBASE (SH1_ITU3_IRQBASE+3)
|
||||
#else
|
||||
# define SH1_ITU4_IRQBASE SH1_ITU3_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_ITU4 /* ITU4 */
|
||||
# define SH1_IMIA4_IRQ SH1_ITU4_IRQBASE /* IMIA4 */
|
||||
# define SH1_IMIB4_IRQ (SH1_ITU4_IRQBASE+1) /* IMIB4 */
|
||||
# define SH1_OVI4_IRQ (SH1_ITU4_IRQBASE+2) /* OVI4 */
|
||||
# define SH1_SCI0_IRQBASE (SH1_ITU4_IRQBASE+3)
|
||||
#else
|
||||
# define SH1_SCI0_IRQBASE SH1_ITU4_IRQBASE
|
||||
#endif
|
||||
|
||||
/* SCI */
|
||||
|
||||
#define SH1_ERI_IRQ_OFFSET (0) /* ERI0 */
|
||||
#define SH1_RXI_IRQ_OFFSET (1) /* RxI0 */
|
||||
#define SH1_TXI_IRQ_OFFSET (2) /* TxI0 */
|
||||
#define SH1_TEI_IRQ_OFFSET (3) /* TEI0 */
|
||||
#define SH1_SCI_NIRQS (4)
|
||||
|
||||
#ifdef CONFIG_SH1_SCI0 /* SCI0 */
|
||||
# define SH1_ERI0_IRQ (SH1_SCI0_IRQBASE+SH1_ERI_IRQ_OFFSET) /* ERI0 */
|
||||
# define SH1_RXI0_IRQ (SH1_SCI0_IRQBASE+SH1_RXI_IRQ_OFFSET) /* RxI0 */
|
||||
# define SH1_TXI0_IRQ (SH1_SCI0_IRQBASE+SH1_TXI_IRQ_OFFSET) /* TxI0 */
|
||||
# define SH1_TEI0_IRQ (SH1_SCI0_IRQBASE+SH1_TEI_IRQ_OFFSET) /* TEI0 */
|
||||
# define SH1_SCI1_IRQBASE (SH1_SCI0_IRQBASE+SH1_SCI_NIRQS)
|
||||
#else
|
||||
# define SH1_SCI1_IRQBASE SH1_SCI0_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_SCI1 /* SCI1 */
|
||||
# define SH1_ERI1_IRQ (SH1_SCI1_IRQBASE+SH1_ERI_IRQ_OFFSET) /* ERI1 */
|
||||
# define SH1_RXI1_IRQ (SH1_SCI1_IRQBASE+SH1_RXI_IRQ_OFFSET) /* RxI1 */
|
||||
# define SH1_TXI1_IRQ (SH1_SCI1_IRQBASE+SH1_TXI_IRQ_OFFSET) /* TxI1 */
|
||||
# define SH1_TEI1_IRQ (SH1_SCI1_IRQBASE+SH1_TEI_IRQ_OFFSET) /* TEI1 */
|
||||
# define SH1_PEI_IRQBASE (SH1_SCI1_IRQBASE+SH1_SCI_NIRQS)
|
||||
#else
|
||||
# define SH1_PEI_IRQBASE SH1_SCI1_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_PCU
|
||||
# define SH1_PEI_IRQ SH1_PEI_IRQBASE /* Parity control unit PEI */
|
||||
# define SH1_AD_IRQBASE (SH1_PEI_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_AD_IRQBASE SH1_PEI_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_AD
|
||||
# define SH1_ADITI_IRQ SH1_AD_IRQBASE /* A/D ITI */
|
||||
# define SH1_WDT_IRQBASE (SH1_AD_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_WDT_IRQBASE SH1_AD_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_WDT
|
||||
# define SH1_WDTITI_IRQ SH1_WDT_IRQBASE /* WDT ITI */
|
||||
# define SH1_CMI_IRQBASE (SH1_WDT_IRQBASE+1)
|
||||
#else
|
||||
# define SH1_CMI_IRQBASE SH1_WDT_IRQBASE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SH1_CMI
|
||||
# define SH1_CMI_IRQ SH1_CMI_IRQBASE /* REF CMI */
|
||||
# define NR_IRQS (SH1_CMI_IRQBASE+1) /* Total number of supported IRQs */
|
||||
#else
|
||||
# define NR_IRQS SH1_CMI_IRQBASE /* Total number of supported IRQs */
|
||||
#endif
|
||||
|
||||
#define SH1_SYSTIMER_IRQ SH1_IMIA0_IRQ
|
||||
#endif
|
||||
|
||||
/* Vector table offets **************************************************************/
|
||||
|
||||
/* The following provides the vector numbers for each IRQ. The IRQ numbers (above)
|
||||
* form the densely packet number space used by the system to identify IRQs. The
|
||||
* following are the (relatively) loosely spaced offsets that identify the location
|
||||
* of the corresponding vector in the vector table.
|
||||
*
|
||||
* These offsets are specified as a vector number (suitably for indexing an array
|
||||
* of uint32_t) but would have to by multiplied by 4 to get an addressable, byte
|
||||
* offset.
|
||||
*/
|
||||
|
||||
/* Resets */
|
||||
|
||||
#define SH1_PWRONPC_VNDX (0) /* 0: Power-on reset (hard, NMI high) PC*/
|
||||
#define SH1_PWRONSP_VNDX (1) /* 1: Power-on reset (hard, NMI high) SP */
|
||||
#define SH1_MRESETPC_VNDX (2) /* 2: Power-on reset (hard, NMI high) PC*/
|
||||
#define SH1_MRESETSP_VNDX (3) /* 3: Power-on reset (hard, NMI high) SP */
|
||||
|
||||
/* Illegal instructions / Address errors */
|
||||
|
||||
#define SH1_INVINSTR_VNDX (4) /* 4: General invalid instruction */
|
||||
/* 5: Reserved for system */
|
||||
#define SH1_INVSLOT_VNDX (6) /* 6: Invalid slot instruction */
|
||||
/* 7-8: Reserved for system */
|
||||
#define SH1_BUSERR_VNDX (9) /* 9: CPU bus error */
|
||||
#define SH1_DMAERR_VNDX (10) /* 10: DMA bus error */
|
||||
|
||||
/* NMI, user break */
|
||||
|
||||
#define SH1_NMI_VNDX (11) /* 11: NMI */
|
||||
#define SH1_USRBRK_VNDX (12) /* 12: User break */
|
||||
/* 13-31: Reserved for system */
|
||||
/* Trap instruction */
|
||||
|
||||
#define SH1_TRAP_VNDX (32) /* 32-63: TRAPA instruction (user break) */
|
||||
#define SH1_TRAP0_VNDX (32) /* 32: TRAPA instruction (user break) */
|
||||
#define SH1_TRAP1_VNDX (33) /* 33: " " " " " " " " */
|
||||
#define SH1_TRAP2_VNDX (34) /* 34: " " " " " " " " */
|
||||
#define SH1_TRAP3_VNDX (35) /* 35: " " " " " " " " */
|
||||
#define SH1_TRAP4_VNDX (36) /* 36: " " " " " " " " */
|
||||
#define SH1_TRAP5_VNDX (37) /* 37: " " " " " " " " */
|
||||
#define SH1_TRAP6_VNDX (38) /* 38: " " " " " " " " */
|
||||
#define SH1_TRAP7_VNDX (39) /* 39: " " " " " " " " */
|
||||
#define SH1_TRAP8_VNDX (40) /* 40: " " " " " " " " */
|
||||
#define SH1_TRAP9_VNDX (41) /* 41: " " " " " " " " */
|
||||
#define SH1_TRAP10_VNDX (42) /* 42: " " " " " " " " */
|
||||
#define SH1_TRAP11_VNDX (43) /* 43: " " " " " " " " */
|
||||
#define SH1_TRAP12_VNDX (44) /* 44: " " " " " " " " */
|
||||
#define SH1_TRAP13_VNDX (45) /* 45: " " " " " " " " */
|
||||
#define SH1_TRAP14_VNDX (46) /* 46: " " " " " " " " */
|
||||
#define SH1_TRAP15_VNDX (47) /* 47: " " " " " " " " */
|
||||
#define SH1_TRAP16_VNDX (48) /* 48: " " " " " " " " */
|
||||
#define SH1_TRAP17_VNDX (49) /* 49: " " " " " " " " */
|
||||
#define SH1_TRAP18_VNDX (50) /* 50: " " " " " " " " */
|
||||
#define SH1_TRAP19_VNDX (51) /* 51: " " " " " " " " */
|
||||
#define SH1_TRAP20_VNDX (52) /* 52: " " " " " " " " */
|
||||
#define SH1_TRAP21_VNDX (53) /* 53: " " " " " " " " */
|
||||
#define SH1_TRAP22_VNDX (54) /* 54: " " " " " " " " */
|
||||
#define SH1_TRAP23_VNDX (55) /* 55: " " " " " " " " */
|
||||
#define SH1_TRAP24_VNDX (56) /* 56: " " " " " " " " */
|
||||
#define SH1_TRAP25_VNDX (57) /* 57: " " " " " " " " */
|
||||
#define SH1_TRAP26_VNDX (58) /* 58: " " " " " " " " */
|
||||
#define SH1_TRAP27_VNDX (59) /* 59: " " " " " " " " */
|
||||
#define SH1_TRAP28_VNDX (60) /* 60: " " " " " " " " */
|
||||
#define SH1_TRAP29_VNDX (61) /* 61: " " " " " " " " */
|
||||
#define SH1_TRAP30_VNDX (62) /* 62: " " " " " " " " */
|
||||
#define SH1_TRAP31_VNDX (63) /* 63: " " " " " " " " */
|
||||
|
||||
/* Interrupts */
|
||||
|
||||
#define SH1_IRQ_VNDX (64) /* 64-71: IRQ0-7 */
|
||||
#define SH1_IRQ0_VNDX (64) /* 64: IRQ0 */
|
||||
#define SH1_IRQ1_VNDX (65) /* 65: IRQ1 */
|
||||
#define SH1_IRQ2_VNDX (66) /* 66: IRQ2 */
|
||||
#define SH1_IRQ3_VNDX (67) /* 67: IRQ3 */
|
||||
#define SH1_IRQ4_VNDX (68) /* 68: IRQ4 */
|
||||
#define SH1_IRQ5_VNDX (69) /* 69: IRQ5 */
|
||||
#define SH1_IRQ6_VNDX (70) /* 70: IRQ6 */
|
||||
#define SH1_IRQ7_VNDX (71) /* 71: IRQ7 */
|
||||
|
||||
#define SH1_LASTCMN_VNDX (71)
|
||||
#define SH1_NCMN_VECTORS (72)
|
||||
|
||||
/* On-chip modules -- The following may be unique to the 7032 */
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_SH7032
|
||||
|
||||
/* DMAC */
|
||||
|
||||
#define SH1_DMAC0_VNDX (72) /* 72-73: DMAC0 */
|
||||
#define SH1_DEI0_VNDX (72) /* 72: DMAC0 DEI0 */
|
||||
/* 73: Reserved */
|
||||
#define SH1_DMAC1_VNDX (74) /* 74-75: DMAC1 */
|
||||
#define SH1_DEI1_VNDX (74) /* 74: DMAC1 DEI1 */
|
||||
/* 75: Reserved */
|
||||
#define SH1_DMAC2_VNDX (76) /* 76-77: DMAC2 */
|
||||
#define SH1_DEI2_VNDX (76) /* 76: DMAC2 DEI2 */
|
||||
/* 77: Reserved */
|
||||
#define SH1_DMAC3_VNDX (78) /* 78-79: DMAC3 */
|
||||
#define SH1_DEI3_VNDX (78) /* 78: DMAC3 DEI3 */
|
||||
/* 79: Reserved */
|
||||
/* ITU */
|
||||
|
||||
#define SH1_IMIA0_VNDX (80) /* 80: ITU0 IMIA0 */
|
||||
#define SH1_IMIB0_VNDX (81) /* 81: IMIB0 */
|
||||
#define SH1_OVI0_VNDX (82) /* 82: OVI0 */
|
||||
/* 83: Reserved */
|
||||
#define SH1_IMIA1_VNDX (84) /* 84: ITU1 IMIA1 */
|
||||
#define SH1_IMIB1_VNDX (85) /* 85: IMIB1 */
|
||||
#define SH1_OVI1_VNDX (86) /* 86: OVI1 */
|
||||
/* 87: Reserved */
|
||||
#define SH1_IMIA2_VNDX (88) /* 88: ITU2 IMIA2 */
|
||||
#define SH1_IMIB2_VNDX (89) /* 89: IMIB2 */
|
||||
#define SH1_OVI2_VNDX (90) /* 90: OVI2 */
|
||||
/* 91: Reserved */
|
||||
#define SH1_IMIA3_VNDX (92) /* 92: ITU3 IMIA3 */
|
||||
#define SH1_IMIB3_VNDX (93) /* 93: IMIB3 */
|
||||
#define SH1_OVI3_VNDX (94) /* 94: OVI3 */
|
||||
/* 95: Reserved */
|
||||
#define SH1_IMIA4_VNDX (96) /* 96: ITU4 IMIA4 */
|
||||
#define SH1_IMIB4_VNDX (97) /* 97: IMIB4 */
|
||||
#define SH1_OVI4_VNDX (98) /* 98: OVI4 */
|
||||
/* 99: Reserved */
|
||||
/* SCI */
|
||||
|
||||
#define SH1_ERI0_VNDX (100) /* 100: SCI0 ERI0 */
|
||||
#define SH1_RXI0_VNDX (101) /* 101: RxI0 */
|
||||
#define SH1_TXI0_VNDX (102) /* 102: TxI0 */
|
||||
#define SH1_TEI0_VNDX (103) /* 103: TEI0 */
|
||||
|
||||
#define SH1_ERI1_VNDX (104) /* 104: SCI1 ERI1 */
|
||||
#define SH1_RXI1_VNDX (105) /* 105: RxI1 */
|
||||
#define SH1_TXI1_VNDX (106) /* 106: TxI1 */
|
||||
#define SH1_TEI1_VNDX (107) /* 107: TEI1 */
|
||||
|
||||
#define SH1_PEI_VNDX (108) /* 108: Parity control unit PEI */
|
||||
#define SH1_ADITI_VNDX (109) /* 109: A/D ITI */
|
||||
/* 110-111: Reserved */
|
||||
#define SH1_WDTITI_VNDX (112) /* 112: WDT ITI */
|
||||
#define SH1_CMI_VNDX (113) /* 113: REF CMI */
|
||||
/* 114-115: Reserved */
|
||||
/* 116-255 reserved */
|
||||
#endif
|
||||
|
||||
#define SH1_LAST_VNDX (255)
|
||||
#define SH1_NVECTORS (256)
|
||||
|
||||
/* IRQ Stack Frame Format. The SH-1 has a push down stack. The PC
|
||||
* and SR are pushed by hardware at the time an IRQ is taken.
|
||||
*/
|
||||
|
||||
/* Saved to the stacked by up_vector */
|
||||
|
||||
#define REG_R8 (0)
|
||||
#define REG_R9 (1)
|
||||
#define REG_R10 (2)
|
||||
#define REG_R11 (3)
|
||||
#define REG_R12 (4)
|
||||
#define REG_R13 (5)
|
||||
#define REG_R14 (6)
|
||||
|
||||
#define REG_PR (7)
|
||||
#define REG_GBR (8)
|
||||
|
||||
/* The value of the stack pointer *before* the interrupt occurred */
|
||||
|
||||
#define REG_R15 (9)
|
||||
#define REG_SP REG_R15
|
||||
|
||||
/* These registers do not need to be preserved by up_saveusercontext */
|
||||
|
||||
#define REG_MACL (10)
|
||||
#define REG_MACH (11)
|
||||
#define REG_R0 (12)
|
||||
#define REG_R1 (13)
|
||||
#define REG_R2 (14)
|
||||
#define REG_R3 (15)
|
||||
#define REG_R5 (16)
|
||||
#define REG_R6 (17)
|
||||
#define REG_R7 (18)
|
||||
|
||||
/* Saved to the stack by the trampoline logic */
|
||||
|
||||
#define REG_R4 (19)
|
||||
|
||||
/* Pushed by hardware when the exception is taken */
|
||||
|
||||
#define REG_PC (20)
|
||||
#define REG_SR (21)
|
||||
|
||||
#define XCPTCONTEXT_REGS (22)
|
||||
#define XCPTCONTEXT_SIZE (4 * XCPTCONTEXT_REGS)
|
||||
|
||||
/************************************************************************************
|
||||
* Public Types
|
||||
************************************************************************************/
|
||||
|
||||
/* This struct defines the way the registers are stored. We need to save: */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
struct xcptcontext
|
||||
{
|
||||
/* The following function pointer is non-zero if there are pending signals
|
||||
* to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* These are saved copies of LR and SR used during signal processing. */
|
||||
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_sr;
|
||||
#endif
|
||||
|
||||
/* Register save area */
|
||||
|
||||
uint32_t regs[XCPTCONTEXT_REGS];
|
||||
};
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Get the current value of the SR */
|
||||
|
||||
static inline irqstate_t __getsr(void)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
__asm__ __volatile__ ("stc sr, %0" : "=r" (flags));
|
||||
return flags;
|
||||
}
|
||||
|
||||
/* Set the new value of the SR */
|
||||
|
||||
static inline void __setsr(irqstate_t sr)
|
||||
{
|
||||
__asm__ __volatile__ ("ldc %0, sr" : : "r" (sr));
|
||||
}
|
||||
|
||||
/* Return the current interrupt enable state & disable IRQs */
|
||||
|
||||
static inline irqstate_t irqsave(void)
|
||||
{
|
||||
irqstate_t flags = __getsr();
|
||||
__setsr(flags | 0x000000f0);
|
||||
return flags;
|
||||
}
|
||||
|
||||
/* Disable IRQs */
|
||||
|
||||
static inline void irqdisable(void)
|
||||
{
|
||||
uint32_t flags = __getsr();
|
||||
__setsr(flags | 0x000000f0);
|
||||
}
|
||||
/* Enable IRQs */
|
||||
|
||||
static inline void irqenable(void)
|
||||
{
|
||||
uint32_t flags = __getsr();
|
||||
__setsr(flags & ~0x000000f0);
|
||||
}
|
||||
|
||||
/* Restore saved IRQ state */
|
||||
|
||||
static inline void irqrestore(irqstate_t flags)
|
||||
{
|
||||
if ((flags & 0x000000f0) != 0x000000f0)
|
||||
{
|
||||
irqenable();
|
||||
}
|
||||
else
|
||||
{
|
||||
irqdisable();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_SH1_IRQ_H */
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/sh1/limits.h
|
||||
*
|
||||
* Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_SH1_LIMITS_H
|
||||
#define __ARCH_SH_INCLUDE_SH1_LIMITS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
#define UCHAR_MAX 255
|
||||
|
||||
/* These could be different on machines where char is unsigned */
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#endif
|
||||
|
||||
#define SHRT_MIN (-32768)
|
||||
#define SHRT_MAX 32767
|
||||
#define USHRT_MAX 65535
|
||||
|
||||
/* On SH-1, type 'int' is 32-bits */
|
||||
|
||||
#define INT_MIN (-2147483648)
|
||||
#define INT_MAX 2147483647
|
||||
#define UINT_MAX 4294967295
|
||||
|
||||
/* On SH-1, type 'long' is the same size as type 'int', 32-bits */
|
||||
|
||||
#define LONG_MIN (-2147483648L)
|
||||
#define LONG_MAX 2147483647L
|
||||
#define ULONG_MAX 4294967295UL
|
||||
|
||||
#define LLONG_MIN (-9223372036854775808LL)
|
||||
#define LLONG_MAX 9223372036854775807LL
|
||||
#define ULLONG_MAX 18446744073709551615ULL
|
||||
|
||||
/* A pointer is 4 bytes */
|
||||
|
||||
#define PTR_MIN (-2147483648)
|
||||
#define PTR_MAX 2147483647
|
||||
#define UPTR_MAX 4294967295
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_SH1_LIMITS_H */
|
||||
@@ -0,0 +1,96 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/sh1/types.h
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather, only indirectly\
|
||||
* through sys/types.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_SH1_TYPES_H
|
||||
#define __ARCH_SH_INCLUDE_SH1_TYPES_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Type Declarations
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* These are the sizes of the standard integer types. NOTE that these type
|
||||
* names have a leading underscore character. This file will be included
|
||||
* (indirectly) by include/stdint.h and typedef'ed to the final name without
|
||||
* the underscore character. This roundabout way of doings things allows
|
||||
* the stdint.h to be removed from the include/ directory in the event that
|
||||
* the user prefers to use the definitions provided by their toolchain header
|
||||
* files
|
||||
*/
|
||||
|
||||
typedef signed char _int8_t;
|
||||
typedef unsigned char _uint8_t;
|
||||
|
||||
typedef signed short _int16_t;
|
||||
typedef unsigned short _uint16_t;
|
||||
|
||||
typedef signed int _int32_t;
|
||||
typedef unsigned int _uint32_t;
|
||||
|
||||
typedef signed long long _int64_t;
|
||||
typedef unsigned long long _uint64_t;
|
||||
#define __INT64_DEFINED
|
||||
|
||||
/* A pointer is 4 bytes */
|
||||
|
||||
typedef signed int _intptr_t;
|
||||
typedef unsigned int _uintptr_t;
|
||||
|
||||
/* This is the size of the interrupt state save returned by
|
||||
* irqsave()
|
||||
*/
|
||||
|
||||
typedef unsigned long irqstate_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_SH1_TYPES_H */
|
||||
@@ -0,0 +1,82 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/syscall.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather, only indirectly
|
||||
* through include/syscall.h or include/sys/sycall.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_SYSCALL_H
|
||||
#define __ARCH_SH_INCLUDE_SYSCALL_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_SYSCALL_H */
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/types.h
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather, only indirectly
|
||||
* through sys/types.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_TYPES_H
|
||||
#define __ARCH_SH_INCLUDE_TYPES_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <arch/chip/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Type Declarations
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_TYPES_H */
|
||||
@@ -0,0 +1,59 @@
|
||||
/****************************************************************************
|
||||
* arch/sh/include/watchdog.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 NuttX 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 AND CONTRIBUTORS
|
||||
* "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 OWNER OR CONTRIBUTORS 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_SH_INCLUDE_WATCHDOG_H
|
||||
#define __ARCH_SH_INCLUDE_WATCHDOG_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_SH_INCLUDE_WATCHDOG_H */
|
||||
Reference in New Issue
Block a user