forked from espressif/esp-idf
feat(openthread): support bus_latency for dual-chip BR solution
This commit is contained in:
@ -379,6 +379,12 @@ menu "OpenThread"
|
|||||||
help
|
help
|
||||||
The device's XTAL accuracy, in ppm.
|
The device's XTAL accuracy, in ppm.
|
||||||
|
|
||||||
|
config OPENTHREAD_BUS_LATENCY
|
||||||
|
int "The bus latency between host and radio chip"
|
||||||
|
default 4000
|
||||||
|
help
|
||||||
|
The device's bus latency, in us.
|
||||||
|
|
||||||
config OPENTHREAD_MLE_MAX_CHILDREN
|
config OPENTHREAD_MLE_MAX_CHILDREN
|
||||||
int "The size of max MLE children entries"
|
int "The size of max MLE children entries"
|
||||||
default 10
|
default 10
|
||||||
|
@ -516,3 +516,27 @@ uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance)
|
|||||||
// Refer to `GetRadioChannelMask(bool aPreferred)`: FALSE to get supported channel mask
|
// Refer to `GetRadioChannelMask(bool aPreferred)`: FALSE to get supported channel mask
|
||||||
return s_radio.GetRadioChannelMask(false);
|
return s_radio.GetRadioChannelMask(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance)
|
||||||
|
{
|
||||||
|
OT_UNUSED_VARIABLE(aInstance);
|
||||||
|
|
||||||
|
#if CONFIG_OPENTHREAD_RADIO_SPINEL_UART
|
||||||
|
return s_esp_openthread_radio_config->radio_uart_config.uart_config.baud_rate;
|
||||||
|
#elif CONFIG_OPENTHREAD_RADIO_SPINEL_SPI
|
||||||
|
return s_esp_openthread_radio_config->radio_spi_config.spi_device.clock_speed_hz;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t otPlatRadioGetBusLatency(otInstance *aInstance)
|
||||||
|
{
|
||||||
|
OT_UNUSED_VARIABLE(aInstance);
|
||||||
|
|
||||||
|
#if CONFIG_OPENTHREAD_RADIO_SPINEL_UART || CONFIG_OPENTHREAD_RADIO_SPINEL_SPI
|
||||||
|
return CONFIG_OPENTHREAD_BUS_LATENCY;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user