Skip to content

Commit

Permalink
Added set console initialized
Browse files Browse the repository at this point in the history
To get Serial1.setConsole(true) running
  • Loading branch information
jumjum123 committed Jun 10, 2018
1 parent 46eceda commit 5dda6ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions targets/esp32/jshardwareUart.c
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down

1 comment on commit 5dda6ae

@TheReelDill
Copy link

@TheReelDill TheReelDill commented on 5dda6ae Mar 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.