Page 1 of 1

Uart reset Status Bit

Posted: Wed Oct 14, 2015 9:49 am
by antoniolinux
Hi to all, in some example i have read the possibility to resetting status bits of UART,
i read

Code: Select all

UART u;
...
  u->SR = ~sr;


the function SR don't exist, in version 3.0 is change the name or others?
bye
A.

Re: Uart reset Status Bit

Posted: Wed Oct 14, 2015 10:52 am
by Giovanni
SR is a register name not a function, it is defined in ST's headers.

Giovanni

Re: Uart reset Status Bit

Posted: Wed Oct 14, 2015 2:11 pm
by antoniolinux
Giovanni thanks for your answer i fix it with

Code: Select all

USART1->SR

but where don't find [code]]UART_SR_ERRORS[/code

Antonio