• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 请教:谁能帮我解释下文件htc.h?为什么要定义那些变量?从那些内容来看,可以从外部来定义,若是这样的,具体该如何定义?谢过了~~
#2
資深會員
資深會員


查看用戶資訊
因為HI-TECH compiler 可以用來做不同廠牌的MCU,也就必須載入不同的定義的檔案.
例如:如果使用的是8051的MCU.
#define _HTC8051_

也可以直接定義8051.h的定義檔就可以了.
#include <8051.h>

發表於: 2007/5/10 11:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


请教:谁能帮我解释下文件htc.h?为什么要定义那些变量?从那些内容来看,可以从外部来定义,若是这样的,具体该如何定义?谢过了~~
#1
新會員
新會員


查看用戶資訊
為什麼要定義那些變數?從那些內容來看,可以從外部來定義,若是這樣的,具體該如何定義?謝過了~~
#ifndef _HTC_H_
#define _HTC_H_

/* Definitions for _HTC_EDITION_ values */
#define __LITE__ 0
#define __STD__ 1
#define __PRO__ 2
/* common definitions */
#define ___mkstr1(x) #x
#define ___mkstr(x) ___mkstr1(x)
/* HI-TECH PICC / PICC-Lite compiler */
#if defined(__PICC__) || defined(__PICCLITE__)
#include <pic.h>
#endif
/* HI-TECH PICC-18 compiler */
#if defined(__PICC18__)
#include <pic18.h>
#endif
/* HI-TECH dsPICC compiler */
#if defined(__DSPICC__)
#include <dspic.h>
#endif
/* HI-TECH HTKC compiler for Holtek MCUs */
#if defined(_HTKC_)
#include <htk.h>
#endif
/* HI-TECH C for 8051 */
#if defined(__HTC8051__)
#include <8051.h>
#endif
/* HI-TECH C for MSP430 */
#if defined(__MSP430C__)
#include <msp430.h>
#endif
/* HI-TECH C for ARM */
#if defined(__ARMC__)
#include <arm.h>
#endif
/* HI-TECH HTFSC compiler for Fortune MCUs */
#if defined(__HTFSC__) || defined(_HTFSC_)
#include <htfsc.h>
#endif
#endif


發表於: 2007/5/8 23:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------