fix: uart auto oversampling calculation (#5319)

This commit is contained in:
richardclli
2024-07-30 11:47:50 +10:00
committed by GitHub
parent 7fb3888b93
commit 56b3d5bbb1
3 changed files with 65 additions and 69 deletions
-4
View File
@@ -69,10 +69,6 @@ static bool _init_serial_driver(etx_module_driver_t* d, const etx_module_port_t*
// S.PORT specific HW settings
if (port->port == ETX_MOD_PORT_SPORT && params->baudrate >= 400000) {
// enable over-sampling by 8
if (drv->setHWOption) drv->setHWOption(d->ctx, ETX_HWOption_OVER8);
// one-bit
if (g_eeGeneral.uartSampleMode == UART_SAMPLE_MODE_ONEBIT) {
if (drv->setHWOption) drv->setHWOption(d->ctx, ETX_HWOption_ONEBIT);