mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
HAL_Linux: added uartF
This commit is contained in:
parent
543604731f
commit
c7dabad02c
@ -43,6 +43,7 @@ static UARTDriver uartCDriver(false);
|
||||
#endif
|
||||
static UARTDriver uartDDriver(false);
|
||||
static UARTDriver uartEDriver(false);
|
||||
static UARTDriver uartFDriver(false);
|
||||
|
||||
static I2CDeviceManager i2c_mgr_instance;
|
||||
|
||||
@ -201,6 +202,7 @@ HAL_Linux::HAL_Linux() :
|
||||
&uartCDriver,
|
||||
&uartDDriver,
|
||||
&uartEDriver,
|
||||
&uartFDriver,
|
||||
&i2c_mgr_instance,
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
|
||||
&i2cDriver0,
|
||||
@ -229,7 +231,7 @@ HAL_Linux::HAL_Linux() :
|
||||
|
||||
void _usage(void)
|
||||
{
|
||||
printf("Usage: -A uartAPath -B uartBPath -C uartCPath -D uartDPath -E uartEPath\n");
|
||||
printf("Usage: -A uartAPath -B uartBPath -C uartCPath -D uartDPath -E uartEPath -F uartFPath\n");
|
||||
printf("Options:\n");
|
||||
printf("\t-serial: -A /dev/ttyO4\n");
|
||||
printf("\t -B /dev/ttyS1\n");
|
||||
@ -255,6 +257,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
{"uartC", true, 0, 'C'},
|
||||
{"uartD", true, 0, 'D'},
|
||||
{"uartE", true, 0, 'E'},
|
||||
{"uartF", true, 0, 'F'},
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
|
||||
{"dsm", true, 0, 'S'},
|
||||
{"ESC", true, 0, 'e'},
|
||||
@ -265,7 +268,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
{0, false, 0, 0}
|
||||
};
|
||||
|
||||
GetOptLong gopt(argc, argv, "A:B:C:D:E:l:t:he:S",
|
||||
GetOptLong gopt(argc, argv, "A:B:C:D:E:F:l:t:he:S",
|
||||
options);
|
||||
|
||||
/*
|
||||
@ -288,6 +291,9 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
case 'E':
|
||||
uartEDriver.set_device_path(gopt.optarg);
|
||||
break;
|
||||
case 'F':
|
||||
uartFDriver.set_device_path(gopt.optarg);
|
||||
break;
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
|
||||
case 'e':
|
||||
rcoutDriver.set_device_path(gopt.optarg);
|
||||
@ -328,6 +334,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
rcin->init();
|
||||
uartA->begin(115200);
|
||||
uartE->begin(115200);
|
||||
uartF->begin(115200);
|
||||
analogin->init();
|
||||
utilInstance.init(argc+gopt.optind-1, &argv[gopt.optind-1]);
|
||||
|
||||
|
@ -346,6 +346,7 @@ void Scheduler::_run_uarts()
|
||||
UARTDriver::from(hal.uartC)->_timer_tick();
|
||||
#endif
|
||||
UARTDriver::from(hal.uartE)->_timer_tick();
|
||||
UARTDriver::from(hal.uartF)->_timer_tick();
|
||||
}
|
||||
|
||||
void Scheduler::_rcin_task()
|
||||
|
Loading…
Reference in New Issue
Block a user