Now works when having an init.lua

This commit is contained in:
Philip Gladstone 2022-08-14 18:04:47 -04:00
parent 384aff1d09
commit fe0fd813a5
1 changed files with 12 additions and 11 deletions

View File

@ -434,7 +434,7 @@ int platform_uart_start( unsigned id )
/* Tell vfs to use usb-serial-jtag driver */ /* Tell vfs to use usb-serial-jtag driver */
esp_vfs_usb_serial_jtag_use_driver(); esp_vfs_usb_serial_jtag_use_driver();
}
usbcdc_status.line_buffer = malloc(LUA_MAXINPUT); usbcdc_status.line_buffer = malloc(LUA_MAXINPUT);
usbcdc_status.line_position = 0; usbcdc_status.line_position = 0;
if(usbcdc_status.line_buffer == NULL) { if(usbcdc_status.line_buffer == NULL) {
@ -447,6 +447,7 @@ int platform_uart_start( unsigned id )
usbcdc_status.line_buffer = NULL; usbcdc_status.line_buffer = NULL;
return -1; return -1;
} }
}
return 0; return 0;
} }
#endif #endif