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

📄 hw.cfg

📁 《OSEK/VDX汽车电子嵌入式软件编程技术》中光盘的资料
💻 CFG
字号:
/************************************************
*
*	$Copyright    2001 Joseph J. Lemieux  ALL RIGHTS RESERVED. $
*
*	$Filename: C:\OSEKBook\src\CH07\cfg\hw.cfg $
*
*	Description: Declaration of Hardware Configurations
*
************************************************/
#ifndef HWCFG
#define HWCFG

/***********************************************
*
*  Define the mapping of the keypad scan code to 
*  the ASCII value.
*
***********************************************/
#ifdef HWC
KEYPAD_TRANSLATION_TYPE KEYPAD_TRANS[33]= {
   {0x00,0},
   {0x01,0},
   {0x02,0},
   {0x03,0},
   {0x04,0},
   {0x05,0},
   {0x06,0},
   {0x07,0},
   {0x08,0},
   {0x09,0},
   {0x0A,0},
   {0x0B,0},
   {0x0C,0},
   {0x0D,0},
   {0x0E,0},
   {0x0F,0},
   {0x80,'1'},
   {0x81,'2'},
   {0x82,'3'},
   {0x83,'A'},
   {0x84,'4'},
   {0x85,'5'},
   {0x86,'6'},
   {0x87,'B'},
   {0x88,'7'},
   {0x89,'8'},
   {0x8A,'9'},
   {0x8B,'C'},
   {0x8C,'*'},
   {0x8D,'0'},
   {0x8E,'#'},
   {0x8F,'D'},
   {0x00,0xFF}
   };
#else
extern KEYPAD_TRANSLATION_TYPE KEYPAD_TRANS[33];
#endif

 
/***********************************************
*
*  Define the parameters of the keypad.
*  The values are defined in the type definition
*  in the hw.h file.
*
***********************************************/
 
#ifdef HWC
HW_KEYPAD_INPUT_TYPE KEYPAD = {HWKEYPAD,(UINT8 *)0x02000004,0x8F,0x00,KEYPAD_TRANS};
#else
extern HW_KEYPAD_INPUT_TYPE KEYPAD;
#endif


/***********************************************
*
*  Define the parameters of the shuffle switch.
*  The values are defined in the type definition
*  in the hw.h file.
*
***********************************************/
 
#ifdef HWC
HW_DIGITAL16_INPUT_TYPE SHUFFLESWITCH = {HWDIGITAL16,(UINT16 *)0x00B06066,0x8000};
#else
extern HW_DIGITAL16_INPUT_TYPE SHUFFLESWITCH;
#endif


#endif

⌨️ 快捷键说明

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