2018-06-07 08:58:23 -03:00
|
|
|
{# jinja template to generate the serial parameters. #}
|
|
|
|
|
|
|
|
|
|
|
|
{% for serial_device in serial_devices -%}
|
|
|
|
|
|
|
|
/**
|
2018-08-27 06:35:11 -03:00
|
|
|
* Baudrate for the {{ serial_device.label }} Serial Port
|
2018-06-07 08:58:23 -03:00
|
|
|
*
|
|
|
|
* Configure the Baudrate for the {{ serial_device.label }} Serial Port.
|
|
|
|
*
|
2018-08-27 06:35:11 -03:00
|
|
|
* Note: certain drivers such as the GPS can determine the Baudrate automatically.
|
2018-06-07 08:58:23 -03:00
|
|
|
*
|
|
|
|
* @value 0 Auto
|
|
|
|
* @value 50 50 8N1
|
|
|
|
* @value 75 75 8N1
|
|
|
|
* @value 110 110 8N1
|
|
|
|
* @value 134 134 8N1
|
|
|
|
* @value 150 150 8N1
|
|
|
|
* @value 200 200 8N1
|
|
|
|
* @value 300 300 8N1
|
|
|
|
* @value 600 600 8N1
|
|
|
|
* @value 1200 1200 8N1
|
|
|
|
* @value 1800 1800 8N1
|
|
|
|
* @value 2400 2400 8N1
|
|
|
|
* @value 4800 4800 8N1
|
|
|
|
* @value 9600 9600 8N1
|
|
|
|
* @value 19200 19200 8N1
|
|
|
|
* @value 38400 38400 8N1
|
|
|
|
* @value 57600 57600 8N1
|
|
|
|
* @value 115200 115200 8N1
|
|
|
|
* @value 230400 230400 8N1
|
|
|
|
* @value 460800 460800 8N1
|
|
|
|
* @value 500000 500000 8N1
|
|
|
|
* @value 921600 921600 8N1
|
|
|
|
* @value 1000000 1000000 8N1
|
|
|
|
* @value 1500000 1500000 8N1
|
2018-08-27 06:35:11 -03:00
|
|
|
* @value 2000000 2000000 8N1
|
2018-06-07 08:58:23 -03:00
|
|
|
* @value 3000000 3000000 8N1
|
|
|
|
* @group Serial
|
|
|
|
* @reboot_required true
|
|
|
|
*/
|
2018-08-27 06:35:11 -03:00
|
|
|
PARAM_DEFINE_INT32(SER_{{ serial_device.tag }}_BAUD, {{ serial_device.default_baudrate }});
|
2018-06-07 08:58:23 -03:00
|
|
|
|
2018-08-27 06:35:11 -03:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
{%- if serial_devices|length > 0 %}
|
|
|
|
{% for command in commands -%}
|
2018-06-07 08:58:23 -03:00
|
|
|
/**
|
2018-08-27 06:35:11 -03:00
|
|
|
* Serial Configuration for {{ command.label }}
|
|
|
|
{%- if command.multi_instance %} (instance {{ command.instance }}){% endif %}
|
2018-06-07 08:58:23 -03:00
|
|
|
*
|
2018-08-27 06:35:11 -03:00
|
|
|
* Configure on which serial port to run {{ command.label }}.
|
2018-06-07 08:58:23 -03:00
|
|
|
*
|
2019-07-05 09:13:58 -03:00
|
|
|
* {{ command.description_extended | replace("\n", " ") }}
|
|
|
|
*
|
2018-08-27 06:35:11 -03:00
|
|
|
* @value 0 Disabled
|
2019-10-01 14:54:03 -03:00
|
|
|
{%- for serial_device in serial_devices %}
|
2018-08-27 06:35:11 -03:00
|
|
|
* @value {{ serial_device.index }} {{ serial_device.label }}
|
2019-10-01 14:54:03 -03:00
|
|
|
{%- endfor %}
|
2021-04-01 04:39:57 -03:00
|
|
|
{%- if command.supports_networking %}
|
2021-01-31 09:36:27 -04:00
|
|
|
{%- for config in ethernet_configuration %}
|
|
|
|
* @value {{ config.index }} {{ config.label }}
|
2021-04-01 04:39:57 -03:00
|
|
|
{%- endfor %}
|
|
|
|
{%- endif %}
|
2018-08-27 06:35:11 -03:00
|
|
|
* @group {{ command.param_group }}
|
2018-06-07 08:58:23 -03:00
|
|
|
* @reboot_required true
|
|
|
|
*/
|
2018-08-27 06:35:11 -03:00
|
|
|
PARAM_DEFINE_INT32({{ command.port_param_name }}, {{ command.default_port }});
|
2018-06-07 08:58:23 -03:00
|
|
|
|
2018-08-27 06:35:11 -03:00
|
|
|
{% endfor -%}
|
|
|
|
{% endif %}
|
2018-06-07 08:58:23 -03:00
|
|
|
|