|
按照函数库里面的配制,输出驱动是2mA的:<br />void<br />GPIOPinTypeI2C(unsigned long ulPort, unsigned char ucPins)<br />{<br /> //<br /> // Check the arguments.<br /> //<br /> ASSERT((ulPort == GPIO_PORTA_BASE) || (ulPort == GPIO_PORTB_BASE) ||<br /> (ulPort == GPIO_PORTC_BASE) || (ulPort == GPIO_PORTD_BASE) ||<br /> (ulPort == GPIO_PORTE_BASE) || (ulPort == GPIO_PORTF_BASE) ||<br /> (ulPort == GPIO_PORTG_BASE) || (ulPort == GPIO_PORTH_BASE));<br /><br /> //<br /> // Make the pin(s) be peripheral controlled.<br /> //<br /> GPIODirModeSet(ulPort, ucPins, GPIO_DIR_MODE_HW);<br /><br /> //<br /> // Set the pad(s) for open-drain operation with a weak pull-up.<br /> //<br /> GPIOPadConfigSet(ulPort, ucPins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD_WPU);<br />}<br /><br /><br />输出是不是不可靠?<br /><br />现在有一个项目已经小批量在用,设备会出现I2C被拉底的现象,不知道是什么原因。传输先比较长(最长有2米),速率用50K,通信设备(有射频干扰)
|