2019-03-24 09:43发布
数码小叶 发表于 2015-10-28 15:33 void GPIO setAsPeripheralModuleFunctionOutputPin ( uint8 t selectedPort, uint16 t selectedPins, uin ...
最多设置5个标签!
事实上我也是这样写的,可是管脚没有输出啊
- void main(void)
- {
- WDT_A_hold(WDT_A_BASE);
- PMM_unlockLPM5();
- // system_clock_init();
- // CS_setDCOFreq(CS_DCORSEL_1, CS_DCOFSEL_2);
- // GPIO_setAsOutputPin(GPIO_PORT_P5,GPIO_PIN2);
- // GPIO_setOutputHighOnPin(GPIO_PORT_P5,GPIO_PIN2);
- // CS_setExternalClockSource(32768, 0);
- GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P5,GPIO_PIN2,GPIO_TERNARY_MODULE_FUNCTION );
- GPIO_setAsOutputPin(GPIO_PORT_P5,GPIO_PIN3);
- while(1)
- {
- GPIO_toggleOutputOnPin(GPIO_PORT_P5,GPIO_PIN3);
- __delay_cycles(100000);
- }
- }
复制代码一周热门 更多>