diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-21 16:25:01 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-09-21 16:25:01 +0000 |
commit | cf4d20a642bf5ecc1f065c35a5479d0d2276f241 (patch) | |
tree | eba2feb64d7adb5ef93665d9cad2c935b82b4b52 /firmware/src/dfu/dbgu.c | |
parent | 817d9211d5f3c608dc231e1d3232d22294f9c782 (diff) |
DFU works (fix various bugs such as forgetting to shift the page number, checking for invalid page numbers, off-by-one error in flash page calculation, etc.)
git-svn-id: https://svn.openpcd.org:2342/trunk@215 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/dfu/dbgu.c')
-rw-r--r-- | firmware/src/dfu/dbgu.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/src/dfu/dbgu.c b/firmware/src/dfu/dbgu.c index 725d495..4a8d68f 100644 --- a/firmware/src/dfu/dbgu.c +++ b/firmware/src/dfu/dbgu.c @@ -48,16 +48,17 @@ void AT91F_DBGU_Init(void) /* Open PIO for DBGU */ AT91F_DBGU_CfgPIO(); /* Enable Transmitter & receivier */ - ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = AT91C_US_RSTTX | AT91C_US_RSTRX; + ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = + AT91C_US_RSTTX | AT91C_US_RSTRX; /* Configure DBGU */ - AT91F_US_Configure((AT91PS_USART) AT91C_BASE_DBGU, // DBGU base address - MCK, AT91C_US_ASYNC_MODE, // Mode Register to be programmed - AT91C_DBGU_BAUD, // Baudrate to be programmed - 0); // Timeguard to be programmed + AT91F_US_Configure(AT91C_BASE_DBGU, + MCK, AT91C_US_ASYNC_MODE, + AT91C_DBGU_BAUD, 0); /* Enable Transmitter & receivier */ - ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = AT91C_US_RXEN | AT91C_US_TXEN; + ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = + AT91C_US_RXEN | AT91C_US_TXEN; /* Enable USART IT error and AT91C_US_ENDRX */ AT91F_US_EnableIt((AT91PS_USART) AT91C_BASE_DBGU, AT91C_US_RXRDY); |