⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itcn_b.h

📁 摩托罗拉MMC2107在ucosII的移植代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/************************************************************************/
/*	File: itcn_b.h File containing the structures and prototypes	    */
/*            for the ITCN_B                                            */
/*                                                                      */
/*  Design Reference:  Doc. Name                       Version          */
/*                     ---------------------------     -------          */
/*                     ITCN_B Level 1 Service           1.0             */
/*                     Functional Design Specification                  */
/*                                                                      */
/*	(C) Copyright Motorola Inc, 2000.  All rights reserved.		        */
/*                                                                      */
/*	$RCSfile: itcn_b.h,v $                                              */
/*	$Revision: 1.1 $                                                    */
/*	$Date: 2000/06/23 20:22:20 $                                        */
/*	$Author: jeffk $                                                  */
/*                                                                      */
/************************************************************************/

#ifndef _ITCN_B_H
#define _ITCN_B_H

#include "mcore.h"
#include "plibdefs_mmc2107.h"

/*----------------------------------------------------------------------*/
/* Enumerations                                                         */
/*----------------------------------------------------------------------*/

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_Boolean_t -- Boolean                                          */
/*    used by:  ITCN_B_GetStatus                                        */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

typedef enum
{
  ITCN_B_FALSE = 0,
  ITCN_B_TRUE
} ITCN_B_Boolean_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_ReturnCode_t -- Error return codes for ITCN_B                 */
/*    used by:  all functions                                           */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

typedef enum
{
  ITCN_B_ERR_NONE = 0x0L,                 /* No error (force long)      */
  ITCN_B_ERR_INVALID_HANDLE,              /* Invalid device handle      */
  ITCN_B_ERR_INVALID_VECTOR_TYPE,         /* Invalid vector type        */   
  ITCN_B_ERR_INVALID_FAST_INTERRUPT_CONTROL,/* Invalid fast interrupt   */
                                            /* control selection        */         
  ITCN_B_ERR_INVALID_MASK_MODE,           /* Invalid mask mode          */
  ITCN_B_ERR_INVALID_MASK_LEVEL,          /* Invalid mask level         */
  ITCN_B_ERR_INVALID_PRIORITY_LEVEL,      /* Invalid priority level     */     
  ITCN_B_ERR_INVALID_INTERRUPT_TYPE,      /* Invalid interrupt type     */
  ITCN_B_ERR_INVALID_ISR_ADDRESS,         /* Invalid ISR address        */ 
  ITCN_B_ERR_INVALID_INTERRUPT_SOURCE,    /* Invalid interrupt source   */
  ITCN_B_ERR_INVALID_INTERRUPT_CONTROL,   /* Invalid interrupt control  */
                                          /* selection                  */
  ITCN_B_ERR_INVALID_FORCE_CONTROL,       /* invalid force control      */
                                          /* selection                  */
  ITCN_B_ERR_BAD_RESULT_ADDR,             /* bad result address         */
  ITCN_B_ERR_INVALID_REGISTER,            /* invalid register selection */
  ITCN_B_ERR_INVALID_REGISTER_VALUE       /* invalid register value     */
} ITCN_B_ReturnCode_t; /* ITCN_B return codes */


/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_Register_t - Int. Cntrl. Reg Selection                        */
/*    used by:  ITCN_B_SetRegister, ITCN_B_GetRegister                  */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

typedef enum 
{
  ITCN_B_ICR,         /* Interrupt Control Register            */
  ITCN_B_ISR,         /* Interrupt Status Register             */
  ITCN_B_IFRH,        /* Interrupt Force Register High         */
  ITCN_B_IFRL,        /* Interrupt Force Register Low          */
  ITCN_B_IPR,         /* Interrupt Pending Register            */
  ITCN_B_NIER,        /* Normal Interrupt Enable Register      */
  ITCN_B_NIPR,        /* Normal Interrupt Pending Register     */
  ITCN_B_FIER,        /* Fast Interrupt Enable Register        */
  ITCN_B_FIPR,        /* Fast Interrupt Pending Register       */
  ITCN_B_PLSR0,       /* Priority Level Select Register 0      */
  ITCN_B_PLSR1,       /* Priority Level Select Register 1      */
  ITCN_B_PLSR2,       /* Priority Level Select Register 2      */
  ITCN_B_PLSR3,       /* Priority Level Select Register 3      */
  ITCN_B_PLSR4,       /* Priority Level Select Register 4      */
  ITCN_B_PLSR5,       /* Priority Level Select Register 5      */
  ITCN_B_PLSR6,       /* Priority Level Select Register 6      */
  ITCN_B_PLSR7,       /* Priority Level Select Register 7      */
  ITCN_B_PLSR8,       /* Priority Level Select Register 8      */
  ITCN_B_PLSR9,       /* Priority Level Select Register 9      */
  ITCN_B_PLSR10,      /* Priority Level Select Register 10     */
  ITCN_B_PLSR11,      /* Priority Level Select Register 11     */
  ITCN_B_PLSR12,      /* Priority Level Select Register 12     */
  ITCN_B_PLSR13,      /* Priority Level Select Register 13     */
  ITCN_B_PLSR14,      /* Priority Level Select Register 14     */
  ITCN_B_PLSR15,      /* Priority Level Select Register 15     */
  ITCN_B_PLSR16,      /* Priority Level Select Register 16     */
  ITCN_B_PLSR17,      /* Priority Level Select Register 17     */
  ITCN_B_PLSR18,      /* Priority Level Select Register 18     */
  ITCN_B_PLSR19,      /* Priority Level Select Register 19     */
  ITCN_B_PLSR20,      /* Priority Level Select Register 20     */
  ITCN_B_PLSR21,      /* Priority Level Select Register 21     */
  ITCN_B_PLSR22,      /* Priority Level Select Register 22     */
  ITCN_B_PLSR23,      /* Priority Level Select Register 23     */
  ITCN_B_PLSR24,      /* Priority Level Select Register 24     */
  ITCN_B_PLSR25,      /* Priority Level Select Register 25     */
  ITCN_B_PLSR26,      /* Priority Level Select Register 26     */
  ITCN_B_PLSR27,      /* Priority Level Select Register 27     */
  ITCN_B_PLSR28,      /* Priority Level Select Register 28     */
  ITCN_B_PLSR29,      /* Priority Level Select Register 29     */
  ITCN_B_PLSR30,      /* Priority Level Select Register 30     */
  ITCN_B_PLSR31,      /* Priority Level Select Register 31     */
  ITCN_B_PLSR32,      /* Priority Level Select Register 32     */
  ITCN_B_PLSR33,      /* Priority Level Select Register 33     */
  ITCN_B_PLSR34,      /* Priority Level Select Register 34     */
  ITCN_B_PLSR35,      /* Priority Level Select Register 35     */
  ITCN_B_PLSR36,      /* Priority Level Select Register 36     */
  ITCN_B_PLSR37,      /* Priority Level Select Register 37     */
  ITCN_B_PLSR38,      /* Priority Level Select Register 38     */
  ITCN_B_PLSR39       /* Priority Level Select Register 39     */
} ITCN_B_Register_t;      

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_Autovector_t - Specify autovectored or vectored               */
/*  interrupts                                                          */
/*    used by:  ITCN_B_Init                                             */
/*              ITCN_B_SetInterruptServiceRoutine                       */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_VECTORED_INTERRUPTS,
  ITCN_B_AUTOVECTORED_INTERRUPTS
} ITCN_B_Autovector_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_FastInterruptControl_t - Enable or disable fast interrupts    */
/*    used by:  ITCN_B_Init                                             */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_FAST_INTERRUPT_DISABLE,
  ITCN_B_FAST_INTERRUPT_ENABLE
} ITCN_B_FastInterruptControl_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_Mask_t - Specify Mask Mode                                    */
/*    used by:  ITCN_B_Init                                             */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_MASK_DISABLE,
  ITCN_B_MASK_ENABLE_ONLY_NORMAL,
  ITCN_B_MASK_ENABLE_FAST_AND_NORMAL
} ITCN_B_Mask_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_InterruptType_t - Specify fast or normal interrupt            */
/*    used by:  ITCN_B_SetInterruptServiceRoutine,                      */
/*              ITCN_B_ControlOperatation                               */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_INTERRUPT_NORMAL,
  ITCN_B_INTERRUPT_FAST
} ITCN_B_InterruptType_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_InterruptSource_t - Specify the source of the interrupt       */
/*    used by:  ITCN_B_SetInterruptServiceRoutine,                      */
/*              ITCN_B_ForceInterrupt                                   */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_ADC_PF1_SOURCE_0 = 0,
  ITCN_B_ADC_CF1_SOURCE_1,
  ITCN_B_ADC_PF2_SOURCE_2,
  ITCN_B_ADC_CF2_SOURCE_3,
  ITCN_B_SPI_MODF_SOURCE_4,
  ITCN_B_SPI_SPIF_SOURCE_5,
  ITCN_B_SCI1_TDRE_SOURCE_6,
  ITCN_B_SCI1_TC_SOURCE_7,
  ITCN_B_SCI1_RDRF_SOURCE_8,
  ITCN_B_SCI1_OR_SOURCE_9,
  ITCN_B_SCI1_IDLE_SOURCE_10,
  ITCN_B_SCI2_TDRE_SOURCE_11,
  ITCN_B_SCI2_TC_SOURCE_12,
  ITCN_B_SCI2_RDRF_SOURCE_13,
  ITCN_B_SCI2_OR_SOURCE_14,
  ITCN_B_SCI2_IDLE_SOURCE_15,
  ITCN_B_TIM1_C0F_SOURCE_16,
  ITCN_B_TIM1_C1F_SOURCE_17,
  ITCN_B_TIM1_C2F_SOURCE_18,
  ITCN_B_TIM1_C3F_SOURCE_19,
  ITCN_B_TIM1_TOF_SOURCE_20,
  ITCN_B_TIM1_PAIF_SOURCE_21,
  ITCN_B_TIM1_PAOVF_SOURCE_22,
  ITCN_B_TIM2_C0F_SOURCE_23,
  ITCN_B_TIM2_C1F_SOURCE_24,
  ITCN_B_TIM2_C2F_SOURCE_25,
  ITCN_B_TIM2_C3F_SOURCE_26,
  ITCN_B_TIM2_TOF_SOURCE_27,
  ITCN_B_TIM2_PAIF_SOURCE_28,
  ITCN_B_TIM2_PAOVF_SOURCE_29,
  ITCN_B_PIT1_PIF_SOURCE_30,
  ITCN_B_PIT2_PIF_SOURCE_31,
  ITCN_B_EDGEPORT_EPF0_SOURCE_32,
  ITCN_B_EDGEPORT_EPF1_SOURCE_33,
  ITCN_B_EDGEPORT_EPF2_SOURCE_34,
  ITCN_B_EDGEPORT_EPF3_SOURCE_35,
  ITCN_B_EDGEPORT_EPF4_SOURCE_36,
  ITCN_B_EDGEPORT_EPF5_SOURCE_37,
  ITCN_B_EDGEPORT_EPF6_SOURCE_38,
  ITCN_B_EDGEPORT_EPF7_SOURCE_39
} ITCN_B_InterruptSource_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_InterruptControl_t - Enable or disable interrupts             */
/*    used by:  ITCN_B_ControlOperation                                 */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_INTERRUPT_DISABLE,
  ITCN_B_INTERRUPT_ENABLE
} ITCN_B_InterruptControl_t;

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* ITCN_B_Force_t - Force or clear interrupts                           */
/*    used by:  ITCN_B_ForceInterrupt                                   */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
typedef enum 
{
  ITCN_B_CLEAR_INTERRUPT,
  ITCN_B_FORCE_INTERRUPT
} ITCN_B_Force_t;


/*----------------------------------------------------------------------*/
/*  Structures                                                          */
/*----------------------------------------------------------------------*/

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*  ITCN_B_t - ITCN_B Register Definitions                              */
/*    used by:  all functions                                           */
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

typedef struct 
{
           UINT16 ICR;         /* Interrupt Control Register            */
  volatile UINT16 ISR;         /* Interrupt Status Register             */
           UINT32 IFRH;        /* Interrupt Force Register High         */
           UINT32 IFRL;        /* Interrupt Force Register Low          */
  volatile UINT32 IPR;         /* Interrupt Pending Register            */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -