Skip to content

Add ability to configure ethernet RX task stack size #591

@isikkema-ornl

Description

@isikkema-ornl

Motivations

My current eth callback function uses more than the default 4096 bytes of RX task stack size. There should be a way to specify this value in a parameter or config type which is passed to EthDriver.

  • Would you like to implement this feature?
    Yes

Solution

Currently, I have a fork which adds the following function:

pub fn new_openeth_with_configs(
    _mac: impl Peripheral<P = crate::hal::mac::MAC> + 'd,
    sysloop: EspSystemEventLoop,
    mac_config: &eth_mac_config_t,
    phy_config: &eth_phy_config_t,
) -> Result<Self, EspError> {
    let eth = Self::init(
        unsafe { esp_eth_mac_new_openeth(mac_config) },
        unsafe { esp_eth_phy_new_dp83848(phy_config) },
        None,
        OpenEth {},
        sysloop,
    )?;

    Ok(eth)
}

along with making the EthDriver::eth_*_default_config() functions public.

This works for me, but I can understand not wanting to require passing in types from the esp-idf-sys crate directly.

Alternatives

I can also create more high-level config types if the above approach is not acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions