#include "pca.h"





bool pcaSwitch(pcaTypedef *pca, uint8_t pcaIndex)
{
    if(pca->isUsePca == true)
    {
        uint8_t data = ((uint8_t)1<<pcaIndex)&0xff;
        if(I2C_TRANSFER_DONE == pca->pcaCom.write( pca->pcaCom.port, pca->pcaAddr, &data, 1))
            return true;
        else
            return false;
    }
    else
    {
        return true;
    }
}


