[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
чти кусочек
#define SYNC_PORT_SEL P2SEL
#define SYNC_PORT_DIR P2DIR
#define SYNC_PORT_IE P2IE
#define SYNC_PORT_IES P2IES
#define SYNC_PORT_IFG P2IFG
#define SYNC_PORT_IN P2IN
#define SYNC_BIT BIT5
_BIC(SYNC_BIT,SYNC_PORT_SEL);
_BIC(SYNC_BIT,SYNC_PORT_DIR);
_BIC(SYNC_BIT,SYNC_PORT_IFG);
_BIS(SYNC_BIT,SYNC_PORT_IES);//high to low transition interrupt
_BIS(SYNC_BIT,SYNC_PORT_IE);
//Запуск прерываний
_EINT();
void interrupt [PORT2_VECTOR] SyncSignal(void){
_BIC(SYNC_BIT,SYNC_PORT_IFG);
// do ......
}
E-mail: info@telesys.ru