Exemplo n.º 1
0
/*********************************************************************************************************
** 函数名称:  InitAllSP
** 函数功能:  对所有串口进行初始化
** 入口参数:  p_u32U2,p_u32U3,p_u32U5	串口2、3、5波特率
** 出口参数:  无
** 函数说明:  初始化网口
*********************************************************************************************************/
void InitAllSP(uint32 p_u32U2, uint32 p_u32U3, uint32 p_u32U5)
{								 
	UART2Init(p_u32U2);	//串口2
	UART3Init(p_u32U3);	//串口3
	UART5Init(p_u32U5);	//串口5
	UART1_Init();	  	//串口1波特率为57600

	memcpy(&g_sniLocal, (uint8 *)&SETUPALIAS.u32LocalIPAddress, sizeof(NetInfo)-2);

	InitializeW5100(&g_sniLocal);//
}
Exemplo n.º 2
0
/*
 * Set up the Optode (give it power and set up UART3).
 * DO THIS BEFORE POLLING.
 */
void openOptode(void)
{
	//set up the Optode's GPIO enable pin (pin 81)
	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
	ROM_GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0);

	//turn on power
	OPTODE_ON;

	//UART3 runs to the Optode, set it up:
	UART3Init();
}