|
这是我的发送程序,请各位大侠帮我看看有没有什么问题?为什么我在小助手看不到我要发送的东西?:
uint8_t menu1[] = "Hello NXP Semiconductors \n\r";
int main(void)
{
Uart3Init();
while(1)
{
DIR_H;
print_menu();
DIR_L;
}
}
void Uart3Init(void)
{
PINSEL_CFG_Type PinCfg;
UART_CFG_Type UARTConfigStruct;
UART_FIFO_CFG_Type UARTFIFOConfigStruct;
PinCfg.Funcnum = 3;
PinCfg.OpenDrain = 0;
PinCfg.Pinmode = 0;
//TXD3-P0.25
PinCfg.Pinnum = 25;
PinCfg.Portnum = 0;
PINSEL_ConfigPin(&PinCfg);
//RXD3-P0.26
PinCfg.Pinnum = 26;
PINSEL_ConfigPin(&PinCfg);
UART_ConfigStructInit(&UARTConfigStruct);
UART_Init((LPC_UART_TypeDef *)LPC_UART3, &UARTConfigStruct);
UART_FIFOConfigStructInit(&UARTFIFOConfigStruct);
UART_FIFOConfig((LPC_UART_TypeDef *)LPC_UART3, &UARTFIFOConfigStruct);
UART_TxCmd((LPC_UART_TypeDef *)LPC_UART3, ENABLE);
UART_IntConfig(LPC_UART3, UART_INTCFG_RBR, ENABLE);
UART_IntConfig(LPC_UART3, UART_INTCFG_RLS, ENABLE/*DISABLE*/);
NVIC_SetPriority(UART3_IRQn, ((0x01<<3)|0x01));
NVIC_EnableIRQ(UART3_IRQn);//
}
void print_menu(void)
{
UART_Send(LPC_UART3, menu1, sizeof(menu1), BLOCKING);
} |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|