KL25Z: Add low-level up_lowgetc function that can be used to provide an NSH console when the file system (and hence the serial driver) is disabled. From Alan Carvalho de Assis
This commit is contained in:
parent
babcd56908
commit
dc3ac21264
@ -68,7 +68,7 @@ CMN_CSRCS += up_dumpnvic.c
|
||||
endif
|
||||
|
||||
CHIP_ASRCS =
|
||||
CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c kl_irqprio.c
|
||||
CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c kl_irqprio.c kl_lowgetc.c
|
||||
CHIP_CSRCS += kl_lowputc.c kl_serial.c kl_start.c kl_timerisr.c kl_cfmconfig.c
|
||||
|
||||
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
||||
|
@ -60,6 +60,7 @@
|
||||
|
||||
#include "kl_config.h"
|
||||
#include "kl_lowputc.h"
|
||||
#include "kl_lowgetc.h"
|
||||
#include "chip.h"
|
||||
#include "kl_gpio.h"
|
||||
#include "chip/kl_uart.h"
|
||||
@ -955,5 +956,19 @@ int up_putc(int ch)
|
||||
return ch;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getc
|
||||
*
|
||||
* Description:
|
||||
* Provide priority, low-level access to support OS debug writes
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_getc(void)
|
||||
{
|
||||
/* Check for LF */
|
||||
|
||||
return kl_lowgetc();
|
||||
}
|
||||
#endif /* USE_SERIALDRIVER */
|
||||
|
||||
|
@ -94,7 +94,7 @@ const uint32_t g_idle_topstack = IDLE_STACK;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DEBUG) && defined(HAVE_SERIAL_CONSOLE)
|
||||
#if defined(CONFIG_DEBUG)
|
||||
# define showprogress(c) kl_lowputc((uint32_t)c)
|
||||
#else
|
||||
# define showprogress(c)
|
||||
|
Loading…
Reference in New Issue
Block a user