summaryrefslogtreecommitdiff
path: root/bsp/libwrap/sys
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-05-04 05:50:00 -0700
committerGitHub <noreply@github.com>2017-05-04 05:49:59 -0700
commit5b2498467020616de013fd557b6a1e685544ee18 (patch)
treebb197ca9ef8f9265a79485f3a13e4e921a0ff93b /bsp/libwrap/sys
parent3a01ac1b7c0e72c04679f0cd6552c4ff0b308863 (diff)
parent4d5cbec9118cbedf2d4ae5b54acaa22862245a4c (diff)
Merge pull request #54 from sifive/tag_v20170504
Update SDK For E31/E51 Coreplex IP Evaluation
Diffstat (limited to 'bsp/libwrap/sys')
-rw-r--r--bsp/libwrap/sys/_exit.c2
-rw-r--r--bsp/libwrap/sys/read.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/bsp/libwrap/sys/_exit.c b/bsp/libwrap/sys/_exit.c
index 7261891..a548a91 100644
--- a/bsp/libwrap/sys/_exit.c
+++ b/bsp/libwrap/sys/_exit.c
@@ -5,9 +5,7 @@
void __wrap__exit(int code)
{
-//volatile uint32_t* leds = (uint32_t*) (GPIO_BASE_ADDR + GPIO_OUT_OFFSET);
const char message[] = "\nProgam has exited with code:";
-//*leds = (~(code));
write(STDERR_FILENO, message, sizeof(message) - 1);
write_hex(STDERR_FILENO, code);
diff --git a/bsp/libwrap/sys/read.c b/bsp/libwrap/sys/read.c
index 4e57f08..4e35364 100644
--- a/bsp/libwrap/sys/read.c
+++ b/bsp/libwrap/sys/read.c
@@ -11,8 +11,8 @@
ssize_t __wrap_read(int fd, void* ptr, size_t len)
{
uint8_t * current = (uint8_t *)ptr;
- volatile uint32_t * uart_rx = (uint32_t *)(UART0_BASE_ADDR + UART_REG_RXFIFO);
- volatile uint8_t * uart_rx_cnt = (uint8_t *)(UART0_BASE_ADDR + UART_REG_RXCTRL + 2);
+ volatile uint32_t * uart_rx = (uint32_t *)(UART0_CTRL_ADDR + UART_REG_RXFIFO);
+ volatile uint8_t * uart_rx_cnt = (uint8_t *)(UART0_CTRL_ADDR + UART_REG_RXCTRL + 2);
ssize_t result = 0;