zhyinch
2019-10-29 bbb68fd93739963f866d0c95246191962b6a7f72
源码/核心板/Src/OnChipDevices/Usart.c
@@ -88,7 +88,7 @@
   GPIO_Init(EU_RX_GPIO, &GPIO_InitStructure);
   
   GPIO_InitStructure.GPIO_Pin = EU_TX_PIN;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;                     //Tx鎺ㄦ尳澶嶇敤杈撳嚭
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;//GPIO_Mode_AF_PP;                     //Tx鎺ㄦ尳澶嶇敤杈撳嚭
   GPIO_Init(EU_TX_GPIO, &GPIO_InitStructure);
   
#ifdef UART_GPIO_REMAP_ENABLE
@@ -288,7 +288,24 @@
      m_EUART_TxFrm_Head = EUART_TX_FRM_SIZE-1;
   m_EUART_TxFrm_FreeFrmLen++;
}
void USART_putc(char c)
{
   //while(!(USART2->SR & 0x00000040));
   //USART_SendData(USART2,c);
   /* e.g. write a character to the USART */
   USART_SendData(USART1, c);
   /* Loop until the end of transmission */
   while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET)   ;
}
void USART_puts(uint8_t *s,uint8_t len)
{
   int i;
   for(i=0; i<len; i++)
   {
      USART_putc(s[i]);
   }
}
int fputc(int ch, FILE *f)
{