avr 小问题
刚学习avr,很多东西还不懂!之前看别人的代码,现在有几个问题不懂,希望你们都够帮忙解决一下!
#define ENABLE_TIMER_INTERRUPT( ) ( TIMSK0 |= ( 1<< OCIE0A ) )
#define DISABLE_TIMER_INTERRUPT( ) ( TIMSK0 &= ~( 1<< OCIE0A ) )
#define CLEAR_TIMER_INTERRUPT( ) ( TIFR0 |= ((1 << OCF0A) ) )
#define ENABLE_EXTERNAL0_INTERRUPT( ) ( GIMSK |= ( 1<< INT0 ) )
#define DISABLE_EXTERNAL0_INTERRUPT( ) ( GIMSK &= ~( 1<< INT0 ) )
这几个定义都不知道是什么意思!
../serial_port_24.c:187: error: `GIMSK' undeclared (first use in this function)
../serial_port_24.c:187: error: (Each undeclared identifier is reported only once
../serial_port_24.c:187: error: for each function it appears in.)
../serial_port_24.c:189: error: `TIMSK0' undeclared (first use in this function)
../serial_port_24.c:189: error: `OCIE0A' undeclared (first use in this function)
../serial_port_24.c:190: error: `TCCR0B' undeclared (first use in this function)
../serial_port_24.c:196: error: `OCR0A' undeclared (first use in this function)
../serial_port_24.c:199: error: `TIFR0' undeclared (first use in this function)
../serial_port_24.c:199: error: `OCF0A' undeclared (first use in this function)
只有一编译就会出现这个问题!