David Giles
/
CM-MBED_RSEDP_Test_Suite_LPC1768_V3
This is a complete listing of the RS-EDP software for the mbed module to support the RS-EDP platform.
SourceFiles/RSEDP_ASC0_UART0.cpp@0:5b7639d1f2c4, 2010-11-19 (annotated)
- Committer:
- DavidGilesHitex
- Date:
- Fri Nov 19 09:49:16 2010 +0000
- Revision:
- 0:5b7639d1f2c4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DavidGilesHitex | 0:5b7639d1f2c4 | 1 | /* ASC0/UART0 Configuration for RS-EDP Board */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 2 | /* ***************************************** */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 3 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 4 | /* Configure ASC0/UART0 for General Purpose UART, using mbed libraries */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 5 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 6 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 7 | /* Includes Here */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 8 | #include "mbed.h" |
DavidGilesHitex | 0:5b7639d1f2c4 | 9 | #include "misra_types.h" /* Standard Misra Types For ARM */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 10 | #include "mbed_Port_Structure.h" /* mbed module port structure and port functions */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 11 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 12 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 13 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 14 | /* function Prototypes Defined Here */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 15 | void setup_UART0(void); |
DavidGilesHitex | 0:5b7639d1f2c4 | 16 | uint16_t UART0_Receieve_Byte(void); |
DavidGilesHitex | 0:5b7639d1f2c4 | 17 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 18 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 19 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 20 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 21 | /* Setup UART0 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 22 | void setup_UART0(void) /* Configure UART0 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 23 | { |
DavidGilesHitex | 0:5b7639d1f2c4 | 24 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 25 | /* |
DavidGilesHitex | 0:5b7639d1f2c4 | 26 | UART0 configured as follow: |
DavidGilesHitex | 0:5b7639d1f2c4 | 27 | - Word Length = 8 Bits |
DavidGilesHitex | 0:5b7639d1f2c4 | 28 | - One Stop Bit |
DavidGilesHitex | 0:5b7639d1f2c4 | 29 | - No parity |
DavidGilesHitex | 0:5b7639d1f2c4 | 30 | - BaudRate = 115200 baud |
DavidGilesHitex | 0:5b7639d1f2c4 | 31 | - Hardware flow control disabled (no RTS nor CTS signals) |
DavidGilesHitex | 0:5b7639d1f2c4 | 32 | - Receive and transmit enabled |
DavidGilesHitex | 0:5b7639d1f2c4 | 33 | */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 34 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 35 | UART0.baud(115000); |
DavidGilesHitex | 0:5b7639d1f2c4 | 36 | UART0.format(8,Serial::None,1); |
DavidGilesHitex | 0:5b7639d1f2c4 | 37 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 38 | } |
DavidGilesHitex | 0:5b7639d1f2c4 | 39 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 40 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 41 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 42 | /* UART0 Receieve Routine */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 43 | uint16_t UART0_Receieve_Byte(void) |
DavidGilesHitex | 0:5b7639d1f2c4 | 44 | { |
DavidGilesHitex | 0:5b7639d1f2c4 | 45 | return 0; |
DavidGilesHitex | 0:5b7639d1f2c4 | 46 | } |
DavidGilesHitex | 0:5b7639d1f2c4 | 47 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 48 |