MSP430F5529 DriverLib 库函数学习笔记(十五)SFR 模块

平台:Code Composer Studio 10.3.1
MSP430F5529 LaunchPad™ Development Kit
(MSP‑EXP430F5529LP)


API (机翻)

       特殊函数寄存器API提供了一组用于使用MSP430Ware SFR模块的函数。提供了启用和禁用中断和控制~ RST/NMI引脚的功能。
       SFR模块可以使设备的其他外设产生中断。

       SFR APl被分成两组:
       SFR管理中断的函数
       SFR 管理RST/NMI引脚控制的函数

SFR管理中断的函数

SFR_enableInterrupt(uint8_t interruptMask)
//启用选定的SFR中断源
SFR_disableInterrupt(uint8_t interruptMask)
//禁用选定的SFR中断源
SFR_getInterruptStatus(uint8_t interruptFlagMask)
//返回所选SFR中断标志的状态
SFR_clearInterrupt(uint8_t interruptFlagMask)
//清除选定的SFR中断标志

SFR 管理RST/NMI引脚控制的函数

SFR_setResetPinPullResistor(uint16_t pullResistorSetup)
//设置∼RST/NMI引脚上的上/下拉电阻
SFR_setNMIEdge(uint16_t edgeDirection)
//设置边缘方向,如果NMI功能是激活的,将断言一个NMI从∼RST/NMI引脚上的信号。
SFR_setResetNMIPinFunction(uint8_t resetPinFunction)
//设置~RST/NMI引脚的功能

参数

interruptMask

/*is the bit mask of interrupts that will be disabled. Mask value is the logical OR
of any of the following:*/
SFR_JTAG_OUTBOX_INTERRUPT /*- JTAG outbox interrupt enable*/
SFR_JTAG_INBOX_INTERRUPT /*- JTAG inbox interrupt enable*/
SFR_NMI_PIN_INTERRUPT /*- NMI pin interrupt enable, if NMI function is chosen*/
SFR_VACANT_MEMORY_ACCESS_INTERRUPT /*- Vacant memory access interrupt enable*/
SFR_OSCILLATOR_FAULT_INTERRUPT /*- Oscillator fault interrupt enable*/
SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT /*- Watchdog interval timer interrupt enable*/
SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT /*- *Flash controller access violation interrupt enable*/

interruptFlagMask

/*is the bit mask of interrupt flags that should be cleared Mask value is the
logical OR of any of the following:*/
SFR_JTAG_OUTBOX_INTERRUPT /*- JTAG outbox interrupt enable*/
SFR_JTAG_INBOX_INTERRUPT /*- JTAG inbox interrupt enable*/
SFR_NMI_PIN_INTERRUPT /*- NMI pin interrupt enable, if NMI function is chosen*/
SFR_VACANT_MEMORY_ACCESS_INTERRUPT /*- Vacant memory access interrupt enable*/
SFR_OSCILLATOR_FAULT_INTERRUPT /*- Oscillator fault interrupt enable*/
SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT /*- Watchdog interval timer interrupt enable*/
SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT /*- Flash controller access violation interrupt enable*/

pullResistorSetup

/*is the selection of how the pull-up/down resistor on the ∼RST/NMI pin
should be setup or disabled. Valid values are:*/
SFR_RESISTORDISABLE
SFR_RESISTORENABLE_PULLUP /*[Default]*/
SFR_RESISTORENABLE_PULLDOWN
/*Modified bits are SYSRSTUP of SFRRPCR register.*/

edgeDirection

/*is the direction that the signal on the ∼RST/NMI pin should go to signal an
interrupt, if enabled. Valid values are:*/
SFR_NMI_RISINGEDGE /*[Default]*/
SFR_NMI_FALLINGEDGE
/*Modified bits are SYSNMIIES of SFRRPCR register.*/

resetPinFunction

/*is the function that the ∼RST/NMI pin should take on. Valid values are:*/
SFR_RESETPINFUNC_RESET /*[Default]*/
SFR_RESETPINFUNC_NMI
/*Modified bits are SYSNMI of SFRRPCR register.*/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乙酸氧铍

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值