示例#1
0
/* ===================================================================*/
void BitIoLdd4_SetDir(LDD_TDeviceData *DeviceDataPtr, bool Dir)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  if (Dir) {
    /* Output */
    GPIO_PDD_SetPortOutputDirectionMask(BitIoLdd4_MODULE_BASE_ADDRESS, BitIoLdd4_PORT_MASK);
  } else {
    /* Input */
    GPIO_PDD_SetPortInputDirectionMask(BitIoLdd4_MODULE_BASE_ADDRESS, BitIoLdd4_PORT_MASK);
  }
}
示例#2
0
/* ===================================================================*/
void GPIO2_SetFieldInputDirection(LDD_TDeviceData *DeviceDataPtr, LDD_GPIO_TBitField Field)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  switch (Field) {                     /* no break */
    case I2C_DAT: {                    /* bit field #0 */
      GPIO_PDD_SetPortInputDirectionMask(GPIO2_MODULE_BASE_ADDRESS,
        GPIO2_I2C_DAT_MASK
      );
      break;
    }
    case I2C_CLK: {                    /* bit field #1 */
      GPIO_PDD_SetPortInputDirectionMask(GPIO2_MODULE_BASE_ADDRESS,
        GPIO2_I2C_CLK_MASK
      );
      break;
    }
    default:
      break;                           /* Invalid Field is not treated, result is undefined */
  } /* switch (Field) */
}
/* ===================================================================*/
void BitIoLdd13_SetInput(LDD_TDeviceData *DeviceDataPtr)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  GPIO_PDD_SetPortInputDirectionMask(BitIoLdd13_MODULE_BASE_ADDRESS, BitIoLdd13_PORT_MASK);
}