HAL_SITL: added uartH

This commit is contained in:
Andrew Tridgell 2019-07-12 14:58:43 +10:00
parent 019f441b2f
commit ac7a67fda0
3 changed files with 8 additions and 1 deletions

View File

@ -49,6 +49,7 @@ static UARTDriver sitlUart3Driver(3, &sitlState);
static UARTDriver sitlUart4Driver(4, &sitlState);
static UARTDriver sitlUart5Driver(5, &sitlState);
static UARTDriver sitlUart6Driver(6, &sitlState);
static UARTDriver sitlUart7Driver(7, &sitlState);
static Util utilInstance(&sitlState);
@ -61,6 +62,7 @@ HAL_SITL::HAL_SITL() :
&sitlUart4Driver, /* uartE */
&sitlUart5Driver, /* uartF */
&sitlUart6Driver, /* uartG */
&sitlUart7Driver, /* uartH */
&i2c_mgr_instance,
&emptySPI, /* spi */
&sitlAnalogIn, /* analogin */

View File

@ -80,6 +80,7 @@ void SITL_State::_usage(void)
"\t--uartE device set device string for UARTE\n"
"\t--uartF device set device string for UARTF\n"
"\t--uartG device set device string for UARTG\n"
"\t--uartH device set device string for UARTH\n"
"\t--rtscts enable rtscts on serial ports (default false)\n"
"\t--base-port PORT set port num for base port(default 5670) must be before -I option\n"
"\t--rc-in-port PORT set port num for rc in\n"
@ -190,10 +191,11 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
CMDLINE_UARTE,
CMDLINE_UARTF,
CMDLINE_UARTG,
CMDLINE_UARTH,
CMDLINE_RTSCTS,
CMDLINE_BASE_PORT,
CMDLINE_RCIN_PORT,
CMDLINE_SIM_ADDRESS = 15,
CMDLINE_SIM_ADDRESS,
CMDLINE_SIM_PORT_IN,
CMDLINE_SIM_PORT_OUT,
CMDLINE_IRLOCK_PORT,
@ -223,6 +225,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
{"uartE", true, 0, CMDLINE_UARTE},
{"uartF", true, 0, CMDLINE_UARTF},
{"uartG", true, 0, CMDLINE_UARTG},
{"uartH", true, 0, CMDLINE_UARTH},
{"rtscts", false, 0, CMDLINE_RTSCTS},
{"base-port", true, 0, CMDLINE_BASE_PORT},
{"rc-in-port", true, 0, CMDLINE_RCIN_PORT},
@ -321,6 +324,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
case CMDLINE_UARTE:
case CMDLINE_UARTF:
case CMDLINE_UARTG:
case CMDLINE_UARTH:
_uart_path[opt - CMDLINE_UARTA] = gopt.optarg;
break;
case CMDLINE_RTSCTS:

View File

@ -205,6 +205,7 @@ void Scheduler::_run_io_procs()
hal.uartE->_timer_tick();
hal.uartF->_timer_tick();
hal.uartG->_timer_tick();
hal.uartH->_timer_tick();
hal.storage->_timer_tick();
check_thread_stacks();