summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-10-18 17:50:29 +0700
committerhathach <[email protected]>2019-10-18 17:50:29 +0700
commit558b4dbde3b9c5e575de08399bad94ae2737d697 (patch)
tree519a057d2afbb65075b8cf059e3eb0d332010237 /hw
parent90b6b5d137af680e807bc2909d9d0e79b9f118ce (diff)
change DEBUG optimization option from O0 to Og
add uart write to board test example
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/board.h4
-rw-r--r--hw/bsp/pca10056/pca10056.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/bsp/board.h b/hw/bsp/board.h
index e0455b80d..4c5716d96 100644
--- a/hw/bsp/board.h
+++ b/hw/bsp/board.h
@@ -107,10 +107,10 @@ static inline void board_delay(uint32_t ms)
}
}
-static inline int8_t board_uart_getchar(void)
+static inline int board_uart_getchar(void)
{
uint8_t c;
- return board_uart_read(&c, 1) ? c : (-1);
+ return board_uart_read(&c, 1) ? (int) c : (-1);
}
static inline int board_uart_putchar(uint8_t c)
diff --git a/hw/bsp/pca10056/pca10056.c b/hw/bsp/pca10056/pca10056.c
index 78d9cc2cd..2eaed0255 100644
--- a/hw/bsp/pca10056/pca10056.c
+++ b/hw/bsp/pca10056/pca10056.c
@@ -156,6 +156,7 @@ int board_uart_read(uint8_t* buf, int len)
(void) buf;
(void) len;
return 0;
+// return NRFX_SUCCESS == nrfx_uart_rx(&_uart_id, buf, (size_t) len) ? len : 0;
}
int board_uart_write(void const * buf, int len)