HAL_Linux: added uartH

This commit is contained in:
Andrew Tridgell 2019-07-12 14:58:31 +10:00
parent 4e560a4ae5
commit 019f441b2f
2 changed files with 9 additions and 1 deletions

View File

@ -66,6 +66,7 @@ static UARTDriver uartDDriver(false);
static UARTDriver uartEDriver(false);
static UARTDriver uartFDriver(false);
static UARTDriver uartGDriver(false);
static UARTDriver uartHDriver(false);
static I2CDeviceManager i2c_mgr_instance;
static SPIDeviceManager spi_mgr_instance;
@ -220,6 +221,7 @@ HAL_Linux::HAL_Linux() :
&uartEDriver,
&uartFDriver,
&uartGDriver,
&uartHDriver,
&i2c_mgr_instance,
&spi_mgr_instance,
&analogIn,
@ -237,7 +239,7 @@ HAL_Linux::HAL_Linux() :
void _usage(void)
{
printf("Usage: -A uartAPath -B uartBPath -C uartCPath -D uartDPath -E uartEPath -F uartFPath -G uartGpath\n");
printf("Usage: -A uartAPath -B uartBPath -C uartCPath -D uartDPath -E uartEPath -F uartFPath -G uartGpath -H uartHpath\n");
printf("Options:\n");
printf("\tserial:\n");
printf(" -A /dev/ttyO4\n");
@ -279,6 +281,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
{"uartE", true, 0, 'E'},
{"uartF", true, 0, 'F'},
{"uartG", true, 0, 'G'},
{"uartH", true, 0, 'H'},
{"log-directory", true, 0, 'l'},
{"terrain-directory", true, 0, 't'},
{"storage-directory", true, 0, 's'},
@ -316,6 +319,9 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
case 'G':
uartGDriver.set_device_path(gopt.optarg);
break;
case 'H':
uartHDriver.set_device_path(gopt.optarg);
break;
case 'l':
utilInstance.set_custom_log_directory(gopt.optarg);
break;
@ -349,6 +355,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
uartE->begin(115200);
uartF->begin(115200);
uartG->begin(115200);
uartH->begin(115200);
analogin->init();
utilInstance.init(argc+gopt.optind-1, &argv[gopt.optind-1]);

View File

@ -264,6 +264,7 @@ void Scheduler::_run_uarts()
hal.uartE->_timer_tick();
hal.uartF->_timer_tick();
hal.uartG->_timer_tick();
hal.uartH->_timer_tick();
}
void Scheduler::_rcin_task()