/* param base ENET peripheral base address. param config The configuration for ENET. param bufferConfig All buffers configuration.  */
status_t ENET_DescriptorInit(ENET_Type *base, enet_config_t *config, enet_buffer_config_t *bufferConfig)
/* param base ENET peripheral base address. param config The configuration for ENET. param bufferConfig All buffers configuration.  */
status_t ENET_DescriptorInit(ENET_Type *base, enet_config_t *config, enet_buffer_config_t *bufferConfig)
{
    assert(config);
    assert(bufferConfig);
    uint8_t ringNum = config->multiqueueCfg == NULL ? 1U : 2U;
    uint8_t channel;
    for (channel = 0; channel < ringNum; channel++)
    {
        if (ENET_TxDescriptorsInit(base, bufferConfig, channel) != kStatus_Success)
        {
            return kStatus_Fail;
        }
        if (ENET_RxDescriptorsInit(base, config, bufferConfig, channel) != kStatus_Success)
        {
            return kStatus_Fail;
        }
        bufferConfig++;
    }
    return kStatus_Success;
}