The UART document: http://www.utasker.com/docs/uTasker/uTaskerUART.PDF
should be suitable as a general guide.
- To use the first UART the channel number should be 0.
- To use it for tx only you don't need to enable the Rx:fnDriver( SerialPortID, ( TX_ON
| RX_ON ), 0 ); // enable rx and tx
However, note that in the present LPC2xxx code the open automatically selects the function pins for Tx and Rx: PINSEL0 |= (PINSEL0_P0_2_TXD0 | PINSEL0_P0_3_RXD0); // TXD0 and RXD0 on P0.2 and P0.3
If you don't want the Rx line being configured you can modify that in LPC23xx.c
. In some processor projects the configuration of the pins has been moved from the open to the RX/TX enable code (fnRxOn()
) so that only the actually used pin is configured. It is however rare that onyl one direction is used and the other pin has a different function.
Specifically for the LPC2xxx there is a further details that may be relevant. This concerns the clock speed and Baud accuracy. The UARTs are clocked by default from PCLK/4; in some cases this doesn't allow an accurate 115k Baud to be achieved (depends on crystal and PLL setting). In such a case the UART clock can be configured to be equal to PCLK (increasing the resolution by a factor of 4, but also requiring a bit more current) - there are details about how to do this just before the routine extern void fnConfigSCI(QUEUE_HANDLE Channel, TTYTABLE *pars)