Ejemplo n.º 1
0
uint32_t nrf_drv_ppi_group_free(nrf_ppi_channel_group_t group)
{
    uint32_t err_code;

    if (!is_app_group(group))
    {
        err_code = NRF_ERROR_INVALID_PARAM;
    }
    else if (!is_allocated_group(group))
    {
        err_code = NRF_ERROR_INVALID_STATE;
    }
    else
    {
#if (NRF_PPI_RESTRICTED > 0)
        err_code = sd_ppi_group_task_disable((uint8_t) group);
#else
        nrf_ppi_group_disable(group);
        err_code = NRF_SUCCESS;
#endif
        CRITICAL_REGION_ENTER();
        group_allocated_clr(group);
        CRITICAL_REGION_EXIT();
    }

    return err_code;
}
Ejemplo n.º 2
0
uint32_t nrf_drv_ppi_group_disable(nrf_ppi_channel_group_t group)
{
    if (!is_app_group(group))
    {
        return NRF_ERROR_INVALID_PARAM;
    }
    nrf_ppi_group_disable(group);
    return NRF_SUCCESS;
}
Ejemplo n.º 3
0
uint32_t nrf_drv_ppi_group_disable(nrf_ppi_channel_group_t group)
{
    ret_code_t err_code = NRF_SUCCESS;

    if (!is_app_group(group))
    {
        err_code = NRF_ERROR_INVALID_PARAM;
    }
    else
    {
        nrf_ppi_group_disable(group);
    }
    NRF_LOG_INFO("Function: %s, error code: %s.\r\n", (uint32_t)__func__, (uint32_t)ERR_TO_STR(err_code));
    return err_code;
}
Ejemplo n.º 4
0
uint32_t nrf_drv_ppi_group_free(nrf_ppi_channel_group_t group)
{
    if (!is_app_group(group))
    {
        return NRF_ERROR_INVALID_PARAM;
    }
    if (!is_allocated_group(group))
    {
        return NRF_ERROR_INVALID_STATE;
    }
    else
    nrf_ppi_group_disable(group);
    CRITICAL_REGION_ENTER();
    group_allocated_clr(group);
    CRITICAL_REGION_EXIT();
    return NRF_SUCCESS;
}
Ejemplo n.º 5
0
uint32_t nrf_drv_ppi_group_disable(nrf_ppi_channel_group_t group)
{
    uint32_t err_code;

    if (!is_app_group(group))
    {
        err_code = NRF_ERROR_INVALID_PARAM;
    }
    else
    {
#if (NRF_PPI_RESTRICTED > 0)
        err_code = sd_ppi_group_task_disable((uint8_t) group);
#else
        nrf_ppi_group_disable(group);
        err_code = NRF_SUCCESS;
#endif
    }

    return err_code;
}
Ejemplo n.º 6
0
uint32_t nrf_drv_ppi_group_free(nrf_ppi_channel_group_t group)
{
    ret_code_t err_code = NRF_SUCCESS;

    if (!is_app_group(group))
    {
        err_code = NRF_ERROR_INVALID_PARAM;
    }
    if (!is_allocated_group(group))
    {
        err_code = NRF_ERROR_INVALID_STATE;
    }
    else
    {
        nrf_ppi_group_disable(group);
        CRITICAL_REGION_ENTER();
        group_allocated_clr(group);
        CRITICAL_REGION_EXIT();
    }
    NRF_LOG_INFO("Function: %s, error code: %s.\r\n", (uint32_t)__func__, (uint32_t)ERR_TO_STR(err_code));
    return err_code;
}