当前位置: 首页>>代码示例>>C++>>正文


C++ UEZDeviceTableGetWorkspace函数代码示例

本文整理汇总了C++中UEZDeviceTableGetWorkspace函数的典型用法代码示例。如果您正苦于以下问题:C++ UEZDeviceTableGetWorkspace函数的具体用法?C++ UEZDeviceTableGetWorkspace怎么用?C++ UEZDeviceTableGetWorkspace使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UEZDeviceTableGetWorkspace函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UEZWAVConfig

/*---------------------------------------------------------------------------*/
void UEZWAVConfig(TUInt8 onBoardSpeakerVolume)
{
    T_uezError error;

    if(UEZAudioAmpOpen("AMP0", &amp) == UEZ_ERROR_NONE){
        UEZAudioAmpSetLevel(amp, onBoardSpeakerVolume);
        G_AudioAmpOpen = ETrue;
    }
    
    volume = onBoardSpeakerVolume;
    error = UEZDeviceTableFind("AudioCodec0", &p_ac);
    error = UEZDeviceTableGetWorkspace(p_ac, (T_uezDeviceWorkspace **)&ac);

    (*ac)->UseConfiguration((void*)ac, 1);
    if(error != UEZ_ERROR_NONE){
        (*ac)->UseConfiguration((void*)ac, 1);
    }

    wav = UEZMemAlloc(DATA_TO_READ);
    wav2 = UEZMemAlloc(DATA_TO_READ);

    error = UEZDeviceTableFind("I2S", &p_i2s);
    error = UEZDeviceTableGetWorkspace(p_i2s, (T_uezDeviceWorkspace **)&i2s);

    (*i2s)->Configure((void*)i2s, (HAL_I2S_Callback_Transmit_Low) i2sCallBack);
    
    UEZSemaphoreCreateBinary(&wavSem);
    playStatus = EFalse;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:30,代码来源:uEZWAVFile.c

示例2: UEZTSOpen

/*---------------------------------------------------------------------------*/
T_uezError UEZTSOpen(
            const char * const aName,
            T_uezDevice *aDevice,
            T_uezQueue *aEventQueue)
{
    T_uezError error;
    DEVICE_TOUCHSCREEN **p;

    if (!G_tsDidInit)
        IUEZTSInitialize();

    error = UEZDeviceTableFind(aName, aDevice);
    if (error)
        return error;

    error = UEZDeviceTableGetWorkspace(*aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    error = (*p)->Open((void *)p);
    if (error)
        return error;

    if (aEventQueue)
        UEZTSAddQueue(*aDevice, *aEventQueue);

    return error;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:29,代码来源:uEZTS.c

示例3: LCD_RH320240T_Configure

/*---------------------------------------------------------------------------*
 * Routine:  LCD_RH320240T_Configure
 *---------------------------------------------------------------------------*
 * Description:
 *      Setup the LCD to use a particular LCD controller.
 * Inputs:
 *      void *aW                -- Workspace
 * Outputs:
 *      T_uezError               -- If the device is successfully configured,
 *                                  returns UEZ_ERROR_NONE.
 *---------------------------------------------------------------------------*/
T_uezError LCD_RH320240T_Configure(
            void *aW,
            HAL_LCDController **aLCDController,
            TUInt32 aBaseAddress,
            DEVICE_Backlight **aBacklight)
{
    T_uezDevice spi;
    T_uezDeviceWorkspace *p_spi;
//    T_uezDeviceWorkspace *p_gpio2;

    T_RH320240TWorkspace *p = (T_RH320240TWorkspace *)aW;
    p->iLCDController = aLCDController;
    p->iBaseAddress = aBaseAddress;

    p->iBacklight = aBacklight;

    UEZDeviceTableFind(p->iSPIBus, &spi);
    UEZDeviceTableGetWorkspace(spi, (T_uezDeviceWorkspace **)&p_spi);

    p->iSPI = (DEVICE_SPI_BUS **)p_spi;

    p->r.iDataMOSI = p->iCmd;
    p->r.iDataMISO = p->iCmd;
    p->r.iNumTransfers = 0;
    p->r.iBitsPerTransfer = 8;
    p->r.iRate = 9000;
    p->r.iClockOutPolarity = ETrue;//EFalse;
    p->r.iClockOutPhase = ETrue;
    p->r.iCSGPIOPort = GPIO_TO_HAL_PORT(p->iCSGPIOPin);
    p->r.iCSGPIOBit = GPIO_TO_PIN_BIT(p->iCSGPIOPin);
    p->r.iCSPolarity = EFalse; // LOW true
    return UEZ_ERROR_NONE;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:44,代码来源:Okaya_rh320240t.c

示例4: UEZI2CWrite

/*---------------------------------------------------------------------------*/
T_uezError UEZI2CWrite(
        T_uezDevice aDevice,
        TUInt8 aAddress,
        TUInt32 aSpeed,
        TUInt8 *aData,
        TUInt8 aDataLength,
        TUInt32 aTimeout)
{
    T_uezError error;
    DEVICE_I2C_BUS **p;
    I2C_Request request;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    // Fill the request structure on the stack and do a standard request
    request.iAddr = aAddress;
    request.iWriteData = aData;
    request.iWriteLength = aDataLength;
    request.iWriteTimeout = aTimeout;
    request.iSpeed = aSpeed;
    request.iReadData = 0;
    request.iReadLength = 0;
    request.iReadTimeout = 0;

    // Do the transactions and return the result
    return (*p)->ProcessRequest((void *)p, &request);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:30,代码来源:uEZI2C.c

示例5: Glyph_uEZ_Open

/******************************************************************************
* ID : 60.0
* Outline : Glyph_uEZ_Open
* Include : Glyph_uEZ_0.h
* Function Name: Glyph_uEZ_Open
* Description : Open and setup the communications channel 0.
* Argument : aHandle - the Glyph handle to setup for the LCD and Communications.
* Return Value : 0=success, not 0= error
* Calling Functions : GlyphCommOpen
******************************************************************************/
T_glyphError Glyph_uEZ_Open(T_glyphHandle aHandle)
{
    int i = 0 ;
    T_uezDevice dev;
    T_uezDeviceWorkspace *G_gpioC;
    
    if (G_spi == 0)  {
        UEZDeviceTableFind("SPI0", &dev);
        UEZDeviceTableGetWorkspace(dev, (T_uezDeviceWorkspace **)&G_spi);
        HALInterfaceFind("GPIOC", (T_halWorkspace **)&G_gpioC);

        G_request.iBitsPerTransfer = 8;
        // Chip select on Port C2 (high true)
        G_request.iCSGPIOPort = (HAL_GPIOPort **)G_gpioC;
        G_request.iCSGPIOBit = (1<<2);
        G_request.iCSPolarity = EFalse;
        G_request.iClockOutPhase = EFalse;
        G_request.iClockOutPolarity = EFalse;
        G_request.iDataMISO = 0;
        G_request.iDataMOSI = 0;
        G_request.iNumTransfers = 0;
        G_request.iRate = 12000; // 12 MHz for now

        /* Set data direction for this bit to output */
        PORTC.DDR.BIT.B3 = 1 ;   // LCD GPIO for Reset LCD
        PORT5.DDR.BIT.B1 = 1 ;   // LCD RS A0

        StartResetLCD() ;
        for (i=0;i<1000000;i++){}
        EndResetLCD() ;
        for (i=0;i<1000000;i++){}
    }

    return GLYPH_ERROR_NONE ;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:45,代码来源:Glyph_uEZ_SPI.c

示例6: Keypad_NXP_PCA9555_Create

T_uezError Keypad_NXP_PCA9555_Create(
        const char *aName,
        const char *aI2CBusName,
        TUInt8 aI2CAddr,
        const char *aExternalInterruptsName,
        TUInt8 aExternalInterruptChannel)
{
    T_Keypad_NXP_I2C_PCA9555_Workspace *p;
    T_uezDevice i2c;
    DEVICE_I2C_BUS **p_i2c;
    T_uezError error;

    UEZDeviceTableRegister(aName,
            (T_uezDeviceInterface *)&Keypad_NXP_PCA9555_Interface, 0,
            (T_uezDeviceWorkspace **)&p);

    error = UEZDeviceTableFind(aI2CBusName, &i2c);
    if (error)
        return error;
    UEZDeviceTableGetWorkspace(i2c, (T_uezDeviceWorkspace **)&p_i2c);

    error = Keypad_NXP_PCA9555_Configure(p, p_i2c, aI2CAddr, aExternalInterruptsName,
        aExternalInterruptChannel);
    return error;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:25,代码来源:Keypad_NXP_I2C_PCA9555_driver.c

示例7: UEZEEPROMClose

/*---------------------------------------------------------------------------*/
T_uezError UEZEEPROMClose(T_uezDevice aDevice)
{
    DEVICE_EEPROM **p_eeprom;

    // Look up its workspace, return any errors
    return UEZDeviceTableGetWorkspace(aDevice,
        (T_uezDeviceWorkspace **)&p_eeprom);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:9,代码来源:uEZEEPROM.c

示例8: UEZStreamFlush

/*---------------------------------------------------------------------------*/
T_uezError UEZStreamFlush(T_uezDevice aDevice) {
    T_uezError error;
    DEVICE_STREAM **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **) &p);
    if (error)
        return error;

    return (*p)->Flush((void *) p);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:11,代码来源:uEZStream.c

示例9: UEZStreamControl

/*---------------------------------------------------------------------------*/
T_uezError UEZStreamControl(T_uezDevice aDevice, TUInt32 aControl,
        void *aControlData) {
    T_uezError error;
    DEVICE_STREAM **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **) &p);
    if (error)
        return error;

    return (*p)->Control((void *) p, aControl, aControlData);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZStream.c

示例10: UEZStreamRead

/*---------------------------------------------------------------------------*/
T_uezError UEZStreamRead(T_uezDevice aDevice, void *aData, TUInt32 aNumBytes,
        TUInt32* aNumBytesRead, TUInt32 aTimeout) {
    T_uezError error;
    DEVICE_STREAM **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **) &p);
    if (error)
        return error;

    return (*p)->Read((void *) p, aData, aNumBytes, aNumBytesRead, aTimeout);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZStream.c

示例11: UEZLEDBankClose

/*---------------------------------------------------------------------------*/
T_uezError UEZLEDBankClose(T_uezDevice aDevice)
{
    T_uezError error;
    DEVICE_LEDBank **p;
    
    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    return error;
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:12,代码来源:uEZLEDBank.c

示例12: UEZI2CResetBus

/*---------------------------------------------------------------------------*/
T_uezError UEZI2CResetBus(T_uezDevice aDevice)
{
    T_uezError error;
    DEVICE_I2C_BUS **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    return (*p)->ResetBus((void *)p);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZI2C.c

示例13: UEZI2CIsHung

/*---------------------------------------------------------------------------*/
T_uezError UEZI2CIsHung(T_uezDevice aDevice, TBool *aBool)
{
    T_uezError error;
    DEVICE_I2C_BUS **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    return (*p)->IsHung((void *)p, aBool);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZI2C.c

示例14: UEZI2CSlaveStart

/*---------------------------------------------------------------------------*/
T_uezError UEZI2CSlaveStart(T_uezDevice aDevice, const T_I2CSlaveSetup *aSetup)
{
    T_uezError error;
    DEVICE_I2C_BUS **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    return (*p)->SlaveStart((void *)p, aSetup);
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZI2C.c

示例15: UEZI2CClose

/*---------------------------------------------------------------------------*/
T_uezError UEZI2CClose(T_uezDevice aDevice)
{
    T_uezError error;
    DEVICE_I2C_BUS **p;

    error = UEZDeviceTableGetWorkspace(aDevice, (T_uezDeviceWorkspace **)&p);
    if (error)
        return error;

    return error;
}
开发者ID:FutureDesigns,项目名称:uEZ,代码行数:12,代码来源:uEZI2C.c


注:本文中的UEZDeviceTableGetWorkspace函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。