conflicting types for __putchar
Hello,
i tried to build a older project in CrossStudio for ARM.
Now i get an error "conflicting types for __putchar"
This is my code in the c file:
/**
* @brief Retargets the C library printf function to the USART.
* @param None
* @retval None
*/
int __putchar(int ch){
if (ch == '\n') {
putchar('\r');
}
while (USART_GetFlagStatus(UART5, USART_FLAG_TXE) == RESET){
};
USART_SendData(UART5, (uint8_t)ch);
while (USART_GetFlagStatus(UART5, USART_FLAG_TC) == RESET){
};
return ch;
}
and this from the .h file:
int __putchar(int ch);
Do i need to define something in the setting to get rid of this error?
Best regards
Max
Please sign in to leave a comment.
Comments
2 comments