Thomas Van Aken
/
UART_Fill_Level
Test
main.cpp@0:91a51c5b8b55, 2018-02-05 (annotated)
- Committer:
- TVA
- Date:
- Mon Feb 05 13:18:42 2018 +0000
- Revision:
- 0:91a51c5b8b55
Test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
TVA | 0:91a51c5b8b55 | 1 | #include "mbed.h" |
TVA | 0:91a51c5b8b55 | 2 | |
TVA | 0:91a51c5b8b55 | 3 | Serial device(PD_5,A0,9600); |
TVA | 0:91a51c5b8b55 | 4 | |
TVA | 0:91a51c5b8b55 | 5 | int main() { |
TVA | 0:91a51c5b8b55 | 6 | device.format(8,SerialBase::None,1); |
TVA | 0:91a51c5b8b55 | 7 | while(1){ |
TVA | 0:91a51c5b8b55 | 8 | printf("0X%x\n\r",device.getc()); |
TVA | 0:91a51c5b8b55 | 9 | } // end while 1 |
TVA | 0:91a51c5b8b55 | 10 | } // end main |