diff options
Diffstat (limited to 'firmware/src/os')
-rw-r--r-- | firmware/src/os/dbgu.c | 11 | ||||
-rw-r--r-- | firmware/src/os/pcd_enumerate.c | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/firmware/src/os/dbgu.c b/firmware/src/os/dbgu.c index 32432a3..026b56b 100644 --- a/firmware/src/os/dbgu.c +++ b/firmware/src/os/dbgu.c @@ -157,6 +157,17 @@ void AT91F_DBGU_Init(void) "Toggle LED2\r\n9) Reset\n\r"); } +/* + * Disable the PIO assignments for the DBGU + */ +void AT91F_DBGU_Fini(void) +{ + ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = AT91C_US_RXDIS | AT91C_US_TXDIS; + AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, AT91C_PA10_DTXD); + AT91F_PIO_CfgInput(AT91C_BASE_PIOA, AT91C_PA9_DRXD); + // Maybe FIXME, do more? -- Henryk Plötz <henryk@ploetzli.ch> +} + //*---------------------------------------------------------------------------- //* \fn AT91F_DBGU_Printk //* \brief This function is used to send a string through the DBGU channel (Very low level debugging) diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c index 6c45af6..5fc47a3 100644 --- a/firmware/src/os/pcd_enumerate.c +++ b/firmware/src/os/pcd_enumerate.c @@ -557,18 +557,18 @@ out: void udp_pullup_on(void) { - AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); #ifdef PCD - AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4); + AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); #endif + AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4); } void udp_pullup_off(void) { - AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); #ifdef PCD - AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4); + AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP); #endif + AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4); } /* Open USB Device Port */ |