?? rom.h
字號:
//*****************************************************************************
//
// rom.h - Macros to facilitate calling functions in the ROM.
//
// Copyright (c) 2007-2008 Luminary Micro, Inc. All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws. All rights are reserved. You may not combine
// this software with "viral" open-source software in order to form a larger
// program. Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 3416 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************
#ifndef __ROM_H__
#define __ROM_H__
//*****************************************************************************
//
// Pointers to the main API tables.
//
//*****************************************************************************
#define ROM_APITABLE ((unsigned long *)0x01000010)
#define ROM_VERSION (ROM_APITABLE[0])
#define ROM_UARTTABLE ((unsigned long *)(ROM_APITABLE[1]))
#define ROM_SSITABLE ((unsigned long *)(ROM_APITABLE[2]))
#define ROM_I2CTABLE ((unsigned long *)(ROM_APITABLE[3]))
#define ROM_GPIOTABLE ((unsigned long *)(ROM_APITABLE[4]))
#define ROM_ADCTABLE ((unsigned long *)(ROM_APITABLE[5]))
#define ROM_COMPARATORTABLE ((unsigned long *)(ROM_APITABLE[6]))
#define ROM_FLASHTABLE ((unsigned long *)(ROM_APITABLE[7]))
#define ROM_PWMTABLE ((unsigned long *)(ROM_APITABLE[8]))
#define ROM_QEITABLE ((unsigned long *)(ROM_APITABLE[9]))
#define ROM_SYSTICKTABLE ((unsigned long *)(ROM_APITABLE[10]))
#define ROM_TIMERTABLE ((unsigned long *)(ROM_APITABLE[11]))
#define ROM_WATCHDOGTABLE ((unsigned long *)(ROM_APITABLE[12]))
#define ROM_SYSCTLTABLE ((unsigned long *)(ROM_APITABLE[13]))
#define ROM_INTERRUPTTABLE ((unsigned long *)(ROM_APITABLE[14]))
//*****************************************************************************
//
// Macros for calling ROM functions in the ADC API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceDataGet \
((long (*)(unsigned long ulBase, \
unsigned long ulSequenceNum, \
unsigned long *pulBuffer))ROM_ADCTABLE[0])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCIntDisable \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[1])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCIntEnable \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[2])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCIntStatus \
((unsigned long (*)(unsigned long ulBase, \
unsigned long ulSequenceNum, \
tBoolean bMasked))ROM_ADCTABLE[3])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCIntClear \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[4])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceEnable \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[5])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceDisable \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[6])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceConfigure \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum, \
unsigned long ulTrigger, \
unsigned long ulPriority))ROM_ADCTABLE[7])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceStepConfigure \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum, \
unsigned long ulStep, \
unsigned long ulConfig))ROM_ADCTABLE[8])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceOverflow \
((long (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[9])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceOverflowClear \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[10])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceUnderflow \
((long (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[11])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCSequenceUnderflowClear \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[12])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCProcessorTrigger \
((void (*)(unsigned long ulBase, \
unsigned long ulSequenceNum))ROM_ADCTABLE[13])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ADCHardwareOversampleConfigure \
((void (*)(unsigned long ulBase, \
unsigned long ulFactor))ROM_ADCTABLE[14])
#endif
//*****************************************************************************
//
// Macros for calling ROM functions in the Comparator API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorIntClear \
((void (*)(unsigned long ulBase, \
unsigned long ulComp))ROM_COMPARATORTABLE[0])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorConfigure \
((void (*)(unsigned long ulBase, \
unsigned long ulComp, \
unsigned long ulConfig))ROM_COMPARATORTABLE[1])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorRefSet \
((void (*)(unsigned long ulBase, \
unsigned long ulRef))ROM_COMPARATORTABLE[2])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorValueGet \
((tBoolean (*)(unsigned long ulBase, \
unsigned long ulComp))ROM_COMPARATORTABLE[3])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorIntEnable \
((void (*)(unsigned long ulBase, \
unsigned long ulComp))ROM_COMPARATORTABLE[4])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorIntDisable \
((void (*)(unsigned long ulBase, \
unsigned long ulComp))ROM_COMPARATORTABLE[5])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_ComparatorIntStatus \
((tBoolean (*)(unsigned long ulBase, \
unsigned long ulComp, \
tBoolean bMasked))ROM_COMPARATORTABLE[6])
#endif
//*****************************************************************************
//
// Macros for calling ROM functions in the Flash API.
//
//*****************************************************************************
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashProgram \
((long (*)(unsigned long *pulData, \
unsigned long ulAddress, \
unsigned long ulCount))ROM_FLASHTABLE[0])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashUsecGet \
((unsigned long (*)(void))ROM_FLASHTABLE[1])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashUsecSet \
((void (*)(unsigned long ulClocks))ROM_FLASHTABLE[2])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashErase \
((long (*)(unsigned long ulAddress))ROM_FLASHTABLE[3])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashProtectGet \
((tFlashProtection (*)(unsigned long ulAddress))ROM_FLASHTABLE[4])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashProtectSet \
((long (*)(unsigned long ulAddress, \
tFlashProtection eProtect))ROM_FLASHTABLE[5])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashProtectSave \
((long (*)(void))ROM_FLASHTABLE[6])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashUserGet \
((long (*)(unsigned long *pulUser0, \
unsigned long *pulUser1))ROM_FLASHTABLE[7])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashUserSet \
((long (*)(unsigned long ulUser0, \
unsigned long ulUser1))ROM_FLASHTABLE[8])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashUserSave \
((long (*)(void))ROM_FLASHTABLE[9])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashIntEnable \
((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[10])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashIntDisable \
((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[11])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashIntGetStatus \
((unsigned long (*)(tBoolean bMasked))ROM_FLASHTABLE[12])
#endif
#if defined(TARGET_IS_DUSTDEVIL_RA0)
#define ROM_FlashIntClear \
((void (*)(unsigned long ulIntFlags))ROM_FLASHTABLE[13])
#endif
//*****************************************************************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -