From 84f258ce3e60ce2876dccb2a1b56edea39b891c7 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Sat, 9 Sep 2006 17:11:44 +0000 Subject: fix polarity of UDP_PUP git-svn-id: https://svn.openpcd.org:2342/trunk@158 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/firmware/src/os/dbgu.c | 4 ++-- openpcd/firmware/src/os/pcd_enumerate.c | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openpcd/firmware/src/os/dbgu.c b/openpcd/firmware/src/os/dbgu.c index 0cb4244..dc1a040 100644 --- a/openpcd/firmware/src/os/dbgu.c +++ b/openpcd/firmware/src/os/dbgu.c @@ -60,13 +60,13 @@ static void DBGU_irq_handler(void) AT91F_DBGU_Get(&value); switch (value) { case '0': //* info - AT91F_DBGU_Frame("Set Pull up\n\r"); + AT91F_DBGU_Frame("Clear Pull up\n\r"); // Set AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); break; case '1': //* info AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); - AT91F_DBGU_Printk("Clear Pull up\n\r"); + AT91F_DBGU_Printk("Set Pull up\n\r"); // Reset Application Send_reset(); break; diff --git a/openpcd/firmware/src/os/pcd_enumerate.c b/openpcd/firmware/src/os/pcd_enumerate.c index 8a2c4e1..25c76d5 100644 --- a/openpcd/firmware/src/os/pcd_enumerate.c +++ b/openpcd/firmware/src/os/pcd_enumerate.c @@ -339,18 +339,19 @@ void udp_open(void) /* End-of-Bus-Reset is always enabled */ - /* Clear for set the Pull up resistor */ - AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); + /* Set the Pull up resistor */ + AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); + AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); } void udp_reset(void) { volatile int i; - AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); + AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); for (i = 0; i < 0xffff; i++) ; - AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); + AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); } #ifdef DEBUG_UDP_EP0 -- cgit v1.2.3