示例#1
0
static uint8 i2cMstRepeatedStrt(uint8 RD_WRn)
{
    I2C_STRT();

    if (I2CSTAT == mstRepStart) {
        I2C_WRITE(i2cAddr | RD_WRn);
    }

    return I2CSTAT;
}
示例#2
0
/**************************************************************************************************
 * @fn          i2cMstStrt
 *
 * @brief       Attempt to send an I2C bus START and Slave Address as an I2C bus Master.
 *
 * input parameters
 *
 * @param       RD_WRn - The LSB of the Slave Address as Read/~Write.
 *
 * @return      The I2C status of the START request or of the Slave Address Ack.
 */
static uint8 i2cMstStrt(uint8 RD_WRn)
{
  I2C_STRT();

  if (I2CSTAT == mstStarted) /* A start condition has been transmitted */
  {
    I2C_WRITE(i2cAddr | RD_WRn);
  }

  return I2CSTAT;
}