首页>>论坛 >>技术社区 >>飞思卡尔社区论坛 >>安飞东专栏
|
我要发帖  | 我要投票  | 我要回复  | 收藏
1

MC9S08LL16.H 库函数解析说明一

版主:  
MC9S08LL16.H 库函数解析说明一
 

#ifndef _MC9S08LL16_H
#define _MC9S08LL16_H

//下面这部分是类型定义,方便我们在程序编写的时候对各种类型记忆。

/* Types definition */
typedef unsigned char byte;
typedef unsigned int word;
typedef unsigned long dword;
typedef unsigned long dlong[2];

//下面这部分是用来使用看门狗的,及看门狗的喂狗操作。

/* Watchdog reset macro */
#ifndef __RESET_WATCHDOG
#ifdef _lint
  #define __RESET_WATCHDOG()  /* empty */
#else
  #define __RESET_WATCHDOG() {asm sta SRS;}
#endif
#endif /* __RESET_WATCHDOG */

//下面是定义IO寄存器区域的基准地址

#define REG_BASE 0x0000                /* Base address for the I/O register block */
#pragma MESSAGE DISABLE C1106 /* WARNING C1106: Non-standard bitfield type */

//下面是中断向量数

/**************** interrupt vector numbers ****************/
#define VectorNumber_Vtod               19
#define VectorNumber_Vacmp              18
#define VectorNumber_Vadc               17
#define VectorNumber_Vkeyboard          16
#define VectorNumber_Viic               15
#define VectorNumber_Vscitx             14
#define VectorNumber_Vscirx             13
#define VectorNumber_Vscierr            12
#define VectorNumber_Vspi               11
#define VectorNumber_Vlcd               10
#define VectorNumber_Vtpm2ovf           9
#define VectorNumber_Vtpm2ch1           8
#define VectorNumber_Vtpm2ch0           7
#define VectorNumber_Vtpm1ovf           6
#define VectorNumber_Vtpm1ch1           5
#define VectorNumber_Vtpm1ch0           4
#define VectorNumber_Vlvd               3
#define VectorNumber_Virq               2
#define VectorNumber_Vswi               1
#define VectorNumber_Vreset             0

//下面是中断向量地址列表,我们只使用中断中可以使用上诉中断号或者下面的列表。

/**************** interrupt vector table ****************/
#define Vtod                            0x0000FFD8
#define Vacmp                           0x0000FFDA
#define Vadc                            0x0000FFDC
#define Vkeyboard                       0x0000FFDE
#define Viic                            0x0000FFE0
#define Vscitx                          0x0000FFE2
#define Vscirx                          0x0000FFE4
#define Vscierr                         0x0000FFE6
#define Vspi                            0x0000FFE8
#define Vlcd                            0x0000FFEA
#define Vtpm2ovf                        0x0000FFEC
#define Vtpm2ch1                        0x0000FFEE
#define Vtpm2ch0                        0x0000FFF0
#define Vtpm1ovf                        0x0000FFF2
#define Vtpm1ch1                        0x0000FFF4
#define Vtpm1ch0                        0x0000FFF6
#define Vlvd                            0x0000FFF8
#define Virq                            0x0000FFFA
#define Vswi                            0x0000FFFC
#define Vreset                          0x0000FFFE

 
相关主题
站在ARM的平台上看DSP,我们还需要奋进。
回复 链接 收藏
 
我要发帖  | 我要投票  | 我要回复  | 收藏
1