Skip to content

Commit

Permalink
Serial OK. Fail to mount RAM Disk yay!
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Nov 10, 2023
1 parent b80417e commit 27e4a75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions arch/risc-v/src/jh7110/bl602_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
////#include "bl602_config.h"
#include "chip.h"

////TODO
#define HAVE_SERIAL_CONSOLE 1

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
Expand Down Expand Up @@ -885,6 +888,7 @@ void bl602_serialinit(void)
#ifdef HAVE_SERIAL_CONSOLE
int up_putc(int ch)
{
struct bl602_uart_s *priv = (struct bl602_uart_s *)CONSOLE_DEV.priv;
irqstate_t flags = enter_critical_section();

/* Check for LF */
Expand All @@ -893,13 +897,14 @@ int up_putc(int ch)
{
/* Add CR */

riscv_lowputc('\r');
bl602_send(priv, '\r');
}

riscv_lowputc(ch);
bl602_send(priv, ch);
leave_critical_section(flags);
return ch;
}
#endif

void bl602_uart_configure(const struct uart_config_s *config) {} ////TODO
////TODO
void bl602_uart_configure(const struct uart_config_s *config) {}
1 change: 1 addition & 0 deletions boards/risc-v/jh7110/star64/configs/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NSH_PROGNAME="init"
CONFIG_TESTING_GETPRIME=y
CONFIG_UART0_BAUD=2000000
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_USEC_PER_TICK=1000

0 comments on commit 27e4a75

Please sign in to comment.