/************************************************************************* * 蓝宙电子工作室 * * 函数名称:gpio_turn * 功能说明:指定引脚的状态(1或0) * 参数说明:ptxn:端口号(gpio.h中宏定义,gpio_cfg.h) * 函数返回:无 * 修改时间:2014-9-18 已测试 * 备 注: *************************************************************************/ void gpio_turn(PTxn ptxn) { GPIO_TURN(PTX(ptxn), PTn(ptxn)); }
/************************************************************************* * 野火嵌入式开发工作室 * * 函数名称:gpio_turn * 功能说明:反转引脚状态 * 参数说明:PORTx 端口号(PORTA,PORTB,PORTC,PORTD,PORTE) * n 端口引脚 * 函数返回:无 * 修改时间:2012-1-15 已测试 * 备 注:PTOR输出取反寄存器 *************************************************************************/ void gpio_turn (PORTx portx, u8 n) { ASSERT( n < 32u ); //使用断言检查引脚号 GPIO_TURN(portx, n); }