summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-12-14 07:00:37 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-12-14 07:00:37 +0000
commit86dd88c86e56d6ff92b311cdc1ce8f2047dd6425 (patch)
tree69edd967077c582be5d443f61362b83d77a95a3a /firmware/target
parent537832d3c6761aacf47c688840b93281a9a5a239 (diff)
M:Robe 500: Initialize UART1 pins with pin setup function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23988 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/tms320dm320/uart-dm320.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/firmware/target/arm/tms320dm320/uart-dm320.c b/firmware/target/arm/tms320dm320/uart-dm320.c
index 414072c929..6f83b7c3b7 100644
--- a/firmware/target/arm/tms320dm320/uart-dm320.c
+++ b/firmware/target/arm/tms320dm320/uart-dm320.c
@@ -38,15 +38,20 @@ static volatile int uart1_receive_count, uart1_receive_read, uart1_receive_write
void uart_init(void)
{
+ /* Setup UART 1 pins:
+ * 27 - input, uart1 rx
+ * 28 - output, uart1 tx */
+ /* 27: input , non-inverted, no-irq, falling edge, no-chat, UART RX */
+ dm320_set_io(27, true, false, false, false, false, 0x01);
+
+ /* 28: output, non-inverted, no-irq, falling edge, no-chat, UART TX */
+ dm320_set_io(28, false, false, false, false, false, 0x01);
+
// 8-N-1
IO_UART1_MSR = 0xC400;
IO_UART1_BRSR = 0x0057;
IO_UART1_RFCR = 0x8020; /* Trigger later */
IO_UART1_TFCR = 0x0000; /* Trigger level */
- /* gio 27 is input, uart1 rx
- gio 28 is output, uart1 tx */
- IO_GIO_DIR1 |= (1<<11); /* gio 27 */
- IO_GIO_DIR1 &= ~(1<<12); /* gio 28 */
/* init the receive buffer */
uart1_receive_count=0;
@@ -62,7 +67,6 @@ void uart_init(void)
IO_INTC_EINT0 |= INTR_EINT0_UART1;
}
-
/* This function is not interrupt driven */
void uart1_putc(char ch)
{