您好,欢迎光临本网站![请登录][注册会员]  
文件名称: AVR示波器工程制作
  所属分类: 硬件开发
  开发工具:
  文件大小: 674kb
  下载次数: 0
  上传时间: 2010-04-03
  提 供 者: gllc*****
 详细说明: /********************************************************************** 头文件功能说明:AVR单片机 引脚 位操作 最后修改: SSTA_XJL 时间: 2009.3.28 **********************************************************************/ #ifndef _BIT_H_ #define _BIT_H_ /******************************位段定义*****************************************/ typedef struct{ unsigned BIT0 : 1 ; unsigned BIT1 : 1 ; unsigned BIT2 : 1 ; unsigned BIT3 : 1 ; unsigned BIT4 : 1 ; unsigned BIT5 : 1 ; unsigned BIT6 : 1 ; unsigned BIT7 : 1 ; }PBIT; /*******************************数据类型申明***************************************/ #ifndef uint #define uint unsigned int #endif #ifndef uchar #define uchar unsigned char #endif #ifndef ulong #define ulong unsigned long #endif /**********************************************************************************/ /***********************************************************************/ #define SET_ADDRESS(Var) (*((volatile PBIT *)&(Var))) /**************************************************************************/ #ifdef PORTA #define PORTA_BIT SET_ADDRESS(PORTA) #endif #ifdef PORTB #define PORTB_BIT SET_ADDRESS(PORTB) #endif #ifdef PORTC #define PORTC_BIT SET_ADDRESS(PORTC) #endif #ifdef PORTD #define PORTD_BIT SET_ADDRESS(PORTD) #endif #ifdef PORTE #define PORTE_BIT SET_ADDRESS(PORTE) #endif #ifdef PORTF #define PORTF_BIT SET_ADDRESS(PORTF) #endif #ifdef PORTG #define PORTG_BIT SET_ADDRESS(PORTG) #endif /*******************************************************************************/ #ifdef DDRA #define DDRA_BIT SET_ADDRESS(DDRA) #endif #ifdef DDRB #define DDRB_BIT SET_ADDRESS(DDRB) #endif #ifdef DDRC #define DDRC_BIT SET_ADDRESS(DDRC) #endif #ifdef DDRD #define DDRD_BIT SET_ADDRESS(DDRD) #endif #ifdef DDRE #define DDRE_BIT SET_ADDRESS(DDRE) #endif #ifdef DDRF #define DDRF_BIT SET_ADDRESS(DDRF) #endif #ifdef DDRG #define DDRG_BIT SET_ADDRESS(DDRG) #endif /**********************************************************/ #ifdef PINA #define PINA_BIT SET_ADDRESS(PINA) #endif #ifdef PINB #define PINB_BIT SET_ADDRESS(PINB) #endif #ifdef PINC #define PINC_BIT SET_ADDRESS(PINC) #endif #ifdef PIND #define PIND_BIT SET_ADDRESS(PIND) #endif #ifdef PINE #define PINE_BIT SET_ADDRESS(PINE) #endif #ifdef PINF #define PINF_BIT SET_ADDRESS(PINF) #endif #ifdef PING #define PING_BIT SET_ADDRESS(PING) #endif /******************************************************************************/ #ifdef PORTA #define PA_0 PORTA_BIT.BIT0 #define PA_1 PORTA_BIT.BIT1 #define PA_2 PORTA_BIT.BIT2 #define PA_3 PORTA_BIT.BIT3 #define PA_4 PORTA_BIT.BIT4 #define PA_5 PORTA_BIT.BIT5 #define PA_6 PORTA_BIT.BIT6 #define PA_7 PORTA_BIT.BIT7 #endif #ifdef PORTB #define PB_0 PORTB_BIT.BIT0 #define PB_1 PORTB_BIT.BIT1 #define PB_2 PORTB_BIT.BIT2 #define PB_3 PORTB_BIT.BIT3 #define PB_4 PORTB_BIT.BIT4 #define PB_5 PORTB_BIT.BIT5 #define PB_6 PORTB_BIT.BIT6 #define PB_7 PORTB_BIT.BIT7 #endif #ifdef PORTC #define PC_0 PORTC_BIT.BIT0 #define PC_1 PORTC_BIT.BIT1 #define PC_2 PORTC_BIT.BIT2 #define PC_3 PORTC_BIT.BIT3 #define PC_4 PORTC_BIT.BIT4 #define PC_5 PORTC_BIT.BIT5 #define PC_6 PORTC_BIT.BIT6 #define PC_7 PORTC_BIT.BIT7 #endif #ifdef PORTD #define PD_0 PORTD_BIT.BIT0 #define PD_1 PORTD_BIT.BIT1 #define PD_2 PORTD_BIT.BIT2 #define PD_3 PORTD_BIT.BIT3 #define PD_4 PORTD_BIT.BIT4 #define PD_5 PORTD_BIT.BIT5 #define PD_6 PORTD_BIT.BIT6 #define PD_7 PORTD_BIT.BIT7 #endif #ifdef PORTE #define PE_0 PORTE_BIT.BIT0 #define PE_1 PORTE_BIT.BIT1 #define PE_2 PORTE_BIT.BIT2 #define PE_3 PORTE_BIT.BIT3 #define PE_4 PORTE_BIT.BIT4 #define PE_5 PORTE_BIT.BIT5 #define PE_6 PORTE_BIT.BIT6 #define PE_7 PORTE_BIT.BIT7 #endif #ifdef PORTF #define PF_0 PORTF_BIT.BIT0 #define PF_1 PORTF_BIT.BIT1 #define PF_2 PORTF_BIT.BIT2 #define PF_3 PORTF_BIT.BIT3 #define PF_4 PORTF_BIT.BIT4 #define PF_5 PORTF_BIT.BIT5 #define PF_6 PORTF_BIT.BIT6 #define PF_7 PORTF_BIT.BIT7 #endif #ifdef PORTG #define PG_0 PORTG_BIT.BIT0 #define PG_1 PORTG_BIT.BIT1 #define PG_2 PORTG_BIT.BIT2 #define PG_3 PORTG_BIT.BIT3 #define PG_4 PORTG_BIT.BIT4 #define PG_5 PORTG_BIT.BIT5 #define PG_6 PORTG_BIT.BIT6 #define PG_7 PORTG_BIT.BIT7 #endif /**********************************************************************/ #ifdef DDRA #define DDRA_0 DDRA_BIT.BIT0 #define DDRA_1 DDRA_BIT.BIT1 #define DDRA_2 DDRA_BIT.BIT2 #define DDRA_3 DDRA_BIT.BIT3 #define DDRA_4 DDRA_BIT.BIT4 #define DDRA_5 DDRA_BIT.BIT5 #define DDRA_6 DDRA_BIT.BIT6 #define DDRA_7 DDRA_BIT.BIT7 #endif #ifdef DDRB #define DDRB_0 DDRB_BIT.BIT0 #define DDRB_1 DDRB_BIT.BIT1 #define DDRB_2 DDRB_BIT.BIT2 #define DDRB_3 DDRB_BIT.BIT3 #define DDRB_4 DDRB_BIT.BIT4 #define DDRB_5 DDRB_BIT.BIT5 #define DDRB_6 DDRB_BIT.BIT6 #define DDRB_7 DDRB_BIT.BIT7 #endif #ifdef DDRC #define DDRC_0 DDRC_BIT.BIT0 #define DDRC_1 DDRC_BIT.BIT1 #define DDRC_2 DDRC_BIT.BIT2 #define DDRC_3 DDRC_BIT.BIT3 #define DDRC_4 DDRC_BIT.BIT4 #define DDRC_5 DDRC_BIT.BIT5 #define DDRC_6 DDRC_BIT.BIT6 #define DDRC_7 DDRC_BIT.BIT7 #endif #ifdef DDRD #define DDRD_0 DDRD_BIT.BIT0 #define DDRD_1 DDRD_BIT.BIT1 #define DDRD_2 DDRD_BIT.BIT2 #define DDRD_3 DDRD_BIT.BIT3 #define DDRD_4 DDRD_BIT.BIT4 #define DDRD_5 DDRD_BIT.BIT5 #define DDRD_6 DDRD_BIT.BIT6 #define DDRD_7 DDRD_BIT.BIT7 #endif #ifdef DDRE #define DDRE_0 DDRE_BIT.BIT0 #define DDRE_1 DDRE_BIT.BIT1 #define DDRE_2 DDRE_BIT.BIT2 #define DDRE_3 DDRE_BIT.BIT3 #define DDRE_4 DDRE_BIT.BIT4 #define DDRE_5 DDRE_BIT.BIT5 #define DDRE_6 DDRE_BIT.BIT6 #define DDRE_7 DDRE_BIT.BIT7 #endif #ifdef DDRF #define DDRF_0 DDRF_BIT.BIT0 #define DDRF_1 DDRF_BIT.BIT1 #define DDRF_2 DDRF_BIT.BIT2 #define DDRF_3 DDRF_BIT.BIT3 #define DDRF_4 DDRF_BIT.BIT4 #define DDRF_5 DDRF_BIT.BIT5 #define DDRF_6 DDRF_BIT.BIT6 #define DDRF_7 DDRF_BIT.BIT7 #endif #ifdef DDRG #define DDRG_0 DDRG_BIT.BIT0 #define DDRG_1 DDRG_BIT.BIT1 #define DDRG_2 DDRG_BIT.BIT2 #define DDRG_3 DDRG_BIT.BIT3 #define DDRG_4 DDRG_BIT.BIT4 #define DDRG_5 DDRG_BIT.BIT5 #define DDRG_6 DDRG_BIT.BIT6 #define DDRG_7 DDRG_BIT.BIT7 #endif /*****************************************************************************/ #ifdef PINA #define PINA_0 PINA_BIT.BIT0 #define PINA_1 PINA_BIT.BIT1 #define PINA_2 PINA_BIT.BIT2 #define PINA_3 PINA_BIT.BIT3 #define PINA_4 PINA_BIT.BIT4 #define PINA_5 PINA_BIT.BIT5 #define PINA_6 PINA_BIT.BIT6 #define PINA_7 PINA_BIT.BIT7 #endif #ifdef PINB #define PINB_0 PINB_BIT.BIT0 #define PINB_1 PINB_BIT.BIT1 #define PINB_2 PINB_BIT.BIT2 #define PINB_3 PINB_BIT.BIT3 #define PINB_4 PINB_BIT.BIT4 #define PINB_5 PINB_BIT.BIT5 #define PINB_6 PINB_BIT.BIT6 #define PINB_7 PINB_BIT.BIT7 #endif #ifdef PINC #define PINC_0 PINC_BIT.BIT0 #define PINC_1 PINC_BIT.BIT1 #define PINC_2 PINC_BIT.BIT2 #define PINC_3 PINC_BIT.BIT3 #define PINC_4 PINC_BIT.BIT4 #define PINC_5 PINC_BIT.BIT5 #define PINC_6 PINC_BIT.BIT6 #define PINC_7 PINC_BIT.BIT7 #endif #ifdef PIND #define PIND_0 PIND_BIT.BIT0 #define PIND_1 PIND_BIT.BIT1 #define PIND_2 PIND_BIT.BIT2 #define PIND_3 PIND_BIT.BIT3 #define PIND_4 PIND_BIT.BIT4 #define PIND_5 PIND_BIT.BIT5 #define PIND_6 PIND_BIT.BIT6 #define PIND_7 PIND_BIT.BIT7 #endif #ifdef PINE #define PINE_0 PINE_BIT.BIT0 #define PINE_1 PINE_BIT.BIT1 #define PINE_2 PINE_BIT.BIT2 #define PINE_3 PINE_BIT.BIT3 #define PINE_4 PINE_BIT.BIT4 #define PINE_5 PINE_BIT.BIT5 #define PINE_6 PINE_BIT.BIT6 #define PINE_7 PINE_BIT.BIT7 #endif #ifdef PINF #define PINF_0 PINF_BIT.BIT0 #define PINF_1 PINF_BIT.BIT1 #define PINF_2 PINF_BIT.BIT2 #define PINF_3 PINF_BIT.BIT3 #define PINF_4 PINF_BIT.BIT4 #define PINF_5 PINF_BIT.BIT5 #define PINF_6 PINF_BIT.BIT6 #define PINF_7 PINF_BIT.BIT7 #endif #ifdef PING #define PING_0 PING_BIT.BIT0 #define PING_1 PING_BIT.BIT1 #define PING_2 PING_BIT.BIT2 #define PING_3 PING_BIT.BIT3 #define PING_4 PING_BIT.BIT4 #define PING_5 PING_BIT.BIT5 #define PING_6 PING_BIT.BIT6 #define PING_7 PING_BIT.BIT7 #endif #endif /*******************************************************************************/ ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: AVR 示波器
 输入关键字,在本站1000多万海量源码库中尽情搜索: