Skip to content
Permalink
Browse files

Added set console initialized

To get Serial1.setConsole(true) running
  • Loading branch information...
jumjum123 committed Jun 10, 2018
1 parent 46eceda commit 5dda6ae105a686d62f88ba05ad3e2f08276cf79f
Showing with 3 additions and 0 deletions.
  1. +3 −0 targets/esp32/jshardwareUart.c
@@ -25,6 +25,8 @@
bool serial2_initialized = false;
bool serial3_initialized = false;

void jshSetDeviceInitialised(IOEventFlags device, bool isInit);

void initUart(int uart_num,uart_config_t uart_config,int txpin,int rxpin){
int r;
r = uart_param_config(uart_num, &uart_config); //Configure UART1 parameters
@@ -82,6 +84,7 @@ void initConsole(){
.rx_flow_ctrl_thresh = 122,
};
initUart(uart_console,uart_config,-1,-1);
jshSetDeviceInitialised(EV_SERIAL1,true);
}

uint8_t rxbuf[256];

1 comment on commit 5dda6ae

@TheReelDill

This comment has been minimized.

Copy link

commented on 5dda6ae Mar 25, 2019

@jumjum123
With reference to Espruino forum Serial configuration ignored on ESP32 issue, I am thinking maybe shSetDeviceInitialised(EV_SERIALn, true); should be inside the initUart() function so that it applies to all uarts?

Please sign in to comment.
You can’t perform that action at this time.