16 #ifdef __MSP430_HAS_SFR__
21 void SFR_enableInterrupt (uint8_t interruptMask)
23 HWREG8(SFR_BASE + OFS_SFRIE1_L) |= interruptMask;
26 void SFR_disableInterrupt (uint8_t interruptMask)
28 HWREG8(SFR_BASE + OFS_SFRIE1_L) &= ~(interruptMask);
31 uint8_t SFR_getInterruptStatus (uint8_t interruptFlagMask)
33 return (
HWREG8(SFR_BASE + OFS_SFRIFG1_L) & interruptFlagMask );
36 void SFR_clearInterrupt (uint8_t interruptFlagMask)
38 HWREG8(SFR_BASE + OFS_SFRIFG1_L) &= ~(interruptFlagMask);
41 void SFR_setResetPinPullResistor (uint16_t pullResistorSetup)
43 HWREG8(SFR_BASE + OFS_SFRRPCR_L) &= ~(SYSRSTRE + SYSRSTUP);
44 HWREG8(SFR_BASE + OFS_SFRRPCR_L) |= pullResistorSetup;
47 void SFR_setNMIEdge (uint16_t edgeDirection)
49 HWREG8(SFR_BASE + OFS_SFRRPCR_L) &= ~(SYSNMIIES);
50 HWREG8(SFR_BASE + OFS_SFRRPCR_L) |= edgeDirection;
53 void SFR_setResetNMIPinFunction (uint8_t resetPinFunction)
55 HWREG8(SFR_BASE + OFS_SFRRPCR_L) &= ~(SYSNMI);
56 HWREG8(SFR_BASE + OFS_SFRRPCR_L) |= resetPinFunction;