Ejemplo n.º 1
0
CyBool_t NuandRFLinkHaltEndpoint(CyBool_t set, uint16_t endpoint)
{
    CyBool_t isHandled = CyFalse;

    switch(endpoint) {
    case BLADE_RF_SAMPLE_EP_PRODUCER:
    case BLADE_RF_SAMPLE_EP_CONSUMER:
    case BLADE_UART_EP_PRODUCER:
    case BLADE_UART_EP_CONSUMER:
        isHandled = !set;
        RF_status_bits[endpoint] = set;
        break;
    }

    switch(endpoint) {
    case BLADE_RF_SAMPLE_EP_PRODUCER:
        ClearDMAChannel(endpoint, &glChHandleUtoP, BLADE_DMA_TX_SIZE, set);
        break;
    case BLADE_RF_SAMPLE_EP_CONSUMER:
        ClearDMAChannel(endpoint, &glChHandlePtoU, BLADE_DMA_TX_SIZE, set);
        break;
    case BLADE_UART_EP_PRODUCER:
        ClearDMAChannel(endpoint,
                &glChHandlebladeRFUtoUART, BLADE_DMA_TX_SIZE, set);
        break;
    case BLADE_UART_EP_CONSUMER:
        ClearDMAChannel(endpoint,
                &glChHandlebladeRFUARTtoU, BLADE_DMA_TX_SIZE, set);
        break;
    }

    return isHandled;
}
Ejemplo n.º 2
0
CyU3PReturnStatus_t NuandFpgaConfigResetEndpoint(uint8_t endpoint)
{
    CyU3PReturnStatus_t status = CY_U3P_ERROR_BAD_ARGUMENT;

    switch(endpoint) {
        case BLADE_FPGA_EP_PRODUCER:
            status = ClearDMAChannel(endpoint, &glChHandlebladeRFUtoP,
                                    BLADE_DMA_TX_SIZE);
            break;
    }

    return status;
}