Fix spiff and stdin_uart_interrupt overiding the same read function (#249)
* Fix spiff and stdin_uart_interrupt overiding the same read function * Make strong function defninition replace a weak one
This commit is contained in:
parent
98de5e573a
commit
e2e6f35288
6 changed files with 34 additions and 24 deletions
|
@ -4,10 +4,12 @@
|
|||
# for 'usage' as this module is a drop-in replacement for the original polled
|
||||
# version of reading from the UART.
|
||||
|
||||
INC_DIRS += $(ROOT)extras/stdin_uart_interrupt
|
||||
INC_DIRS += $(stdin_uart_interrupt_ROOT)
|
||||
|
||||
# args for passing into compile rule generation
|
||||
extras/stdin_uart_interrupt_INC_DIR = $(ROOT)extras/stdin_uart_interrupt
|
||||
extras/stdin_uart_interrupt_SRC_DIR = $(ROOT)extras/stdin_uart_interrupt
|
||||
stdin_uart_interrupt_SRC_DIR = $(stdin_uart_interrupt_ROOT)
|
||||
|
||||
$(eval $(call component_compile_rules,extras/stdin_uart_interrupt))
|
||||
INCLUDE_SRC_IN_AR = 0
|
||||
EXTRA_LDFLAGS = -Wl,--whole-archive $(stdin_uart_interrupt_AR) -Wl,--no-whole-archive
|
||||
|
||||
$(eval $(call component_compile_rules,stdin_uart_interrupt))
|
||||
|
|
|
@ -75,9 +75,9 @@ uint32_t uart0_num_char(void)
|
|||
return count;
|
||||
}
|
||||
|
||||
// _read_r in core/newlib_syscalls.c will be skipped by the linker in favour
|
||||
// _read_stdin_r in core/newlib_syscalls.c will be skipped by the linker in favour
|
||||
// of this function
|
||||
long _read_r(struct _reent *r, int fd, char *ptr, int len)
|
||||
long _read_stdin_r(struct _reent *r, int fd, char *ptr, int len)
|
||||
{
|
||||
if (!inited) uart0_rx_init();
|
||||
for(int i = 0; i < len; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue