User guide

CIF Peripheral Model - SimpleTimer
124 CoMET Version 5.9 – Tutorial
break;
}
}
void disableMtr(tInt8 mtrId){
tWord32 *terPtr = (tWord32 *) TER_PTR;
tWord32 *tierPtr = (tWord32 *) TIER_PTR;
switch (mtrId) {
case MTR_1:
*terPtr = *terPtr & ~ TER_ENABLE_1;
*tierPtr = *tierPtr & ~ TIER_ENABLE_1;
break;
case MTR_2:
*terPtr = *terPtr & ~ TER_ENABLE_2;
*tierPtr = *tierPtr & ~ TIER_ENABLE_2;
break;
case MTR_ALL:
*terPtr = TER_ENABLE_NONE;
*tierPtr = TIER_ENABLE_NONE;
break;
default:
*terPtr = TER_ENABLE_NONE;
*tierPtr = TIER_ENABLE_NONE;
break;
}
}
void deAssertInterrupt(tInt8 mtrId){
tWord32 *tifrPtr = (tWord32 *) TIFR_PTR;
switch (mtrId) {
case MTR_1:
*tifrPtr = *tifrPtr & ~ TIFR_SET_1;
break;
case MTR_2:
*tifrPtr = *tifrPtr & ~ TIFR_SET_2;
break;
case MTR_ALL:
*tifrPtr = TIFR_SET_NONE;
break;
default:
*tifrPtr = TIFR_SET_NONE;
break;
}
}
tWord32 readTIFR(){
tWord32 *tifrPtr = (tWord32 *) TIFR_PTR;
return *tifrPtr;
}