前面說過對(duì)于HT66F50和HT46系列芯片使用的不同之處,尤其是對(duì)于頭文件中引腳的定義。這里把我自己寫的一些定義貼上,將這些加在頭文件中以后,就可以對(duì)很方便的對(duì)每一個(gè)I/O進(jìn)行操作了。//PA
#define_pa0_1a_0
#define _pa1_1a_1
#define_pa2_1a_2
#define_pa3_1a_3
#define_pa4_1a_4
#define_pa5_1a_5
#define_pa6_1a_6
#define_pa7_1a_7
//PAC
#define_pac0_1b_0
#define _pac1_1b_1
#define _pac2_1b_2
#define_pac3_1b_3
#define _pac4_1b_4
#define_pac5_1b_5
#define_pac6_1b_6
#define_pac7_1b_7
//PB
#define_pb0_1d_0
#define_pb1_1d_1
#define_pb2_1d_2
#define_pb3_1d_3
#define_pb4_1d_4
#define_pb5_1d_5
#define_pb6_1d_6
#define_pb7_1d_7
//PBC
#define_pbc0_1e_0
#define_pbc1_1e_1
#define_pbc2_1e_2
#define_pbc3_1e_3
#define_pbc4_1e_4
#define_pbc5_1e_5
#define_pbc6_1e_6
#define_pbc7_1e_7
//PC
#define_pc0_20_0
#define_pc1_20_1
#define_pc2_20_2
#define_pc3_20_3
#define_pc4_20_4
#define_pc5_20_5
#define_pc6_20_6
#define_pc7_20_7
//PCC
#define_pcc0_21_0
#define_pcc1_21_1
#define_pcc2_21_2
#define_pcc3_21_3
#define_pcc4_21_4
#define_pcc5_21_5
#define_pcc6_21_6
#define_pcc7_21_7
//PD
#define_pd0_23_0
#define_pd1_23_1
#define_pd2_23_2
#define_pd3_23_3
#define_pd4_23_4
#define_pd5_23_5
#define_pd6_23_6
#define_pd7_23_7
//PDC
#define_pdc0_24_0
#define_pdc1_24_1
#define_pdc2_24_2
#define_pdc3_24_3
#define_pdc4_24_4
#define_pdc5_24_5
#define_pdc6_24_6
#define_pdc7_24_7
本文引用地址:http://m.butianyuan.cn/article/201611/321152.htm
評(píng)論