@@ -15,47 +15,60 @@ const pbdrv_ioport_platform_data_t pbdrv_ioport_platform_data[PBDRV_CONFIG_IOPOR
1515 {
1616 .port_id = PBIO_PORT_ID_A ,
1717 .motor_driver_index = 0 ,
18+ .counter_driver_index = 0 ,
19+ .external_port_index = 0 ,
1820 .uart_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
1921 .pins = NULL ,
2022 .supported_modes = PBIO_PORT_MODE_QUADRATURE_PASSIVE ,
2123 },
2224 {
2325 .port_id = PBIO_PORT_ID_B ,
2426 .motor_driver_index = 1 ,
27+ .counter_driver_index = 1 ,
28+ .external_port_index = 1 ,
2529 .uart_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
2630 .pins = NULL ,
2731 .supported_modes = PBIO_PORT_MODE_QUADRATURE_PASSIVE ,
2832 },
2933 {
3034 .port_id = PBIO_PORT_ID_C ,
3135 .motor_driver_index = 2 ,
36+ .external_port_index = 2 ,
37+ .counter_driver_index = 2 ,
3238 .uart_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
3339 .pins = NULL ,
3440 .supported_modes = PBIO_PORT_MODE_QUADRATURE_PASSIVE ,
3541 },
3642 {
3743 .port_id = PBIO_PORT_ID_D ,
3844 .motor_driver_index = 3 ,
45+ .external_port_index = 0 ,
46+ .counter_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
3947 .uart_driver_index = 0 ,
4048 .pins = NULL ,
4149 .supported_modes = PBIO_PORT_MODE_LEGO_PUP | PBIO_PORT_MODE_UART ,
4250 },
4351 {
4452 .port_id = PBIO_PORT_ID_E ,
4553 .motor_driver_index = 4 ,
54+ .external_port_index = 4 ,
55+ .counter_driver_index = 4 ,
4656 .uart_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
4757 .pins = NULL ,
4858 .supported_modes = PBIO_PORT_MODE_QUADRATURE_PASSIVE ,
4959 },
5060 {
5161 .port_id = PBIO_PORT_ID_F ,
5262 .motor_driver_index = 5 ,
63+ .external_port_index = 5 ,
64+ .counter_driver_index = 5 ,
5365 .uart_driver_index = PBDRV_IOPORT_INDEX_NOT_AVAILABLE ,
5466 .pins = NULL ,
5567 .supported_modes = PBIO_PORT_MODE_QUADRATURE_PASSIVE ,
5668 },
5769};
5870
71+
5972#define INFINITY (1e100)
6073
6174const pbdrv_motor_driver_virtual_simulation_platform_data_t
0 commit comments