Exemplo n.º 1
0
/* ===================================================================*/
void BitIoLdd4_PutVal(LDD_TDeviceData *DeviceDataPtr, bool Val)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  if (Val) {
    GPIO_PDD_SetPortDataOutputMask(BitIoLdd4_MODULE_BASE_ADDRESS, BitIoLdd4_PORT_MASK);
  } else { /* !Val */
    GPIO_PDD_ClearPortDataOutputMask(BitIoLdd4_MODULE_BASE_ADDRESS, BitIoLdd4_PORT_MASK);
  } /* !Val */
}
Exemplo n.º 2
0
/* ===================================================================*/
void GPIO2_ClearFieldBits(LDD_TDeviceData *DeviceDataPtr, LDD_GPIO_TBitField Field, GPIO2_TFieldValue Mask)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  switch (Field) {                     /* no break */
    case I2C_DAT: {                    /* bit field #0 */
      GPIO_PDD_ClearPortDataOutputMask(GPIO2_MODULE_BASE_ADDRESS,
        ((GPIO2_TPortValue)GPIO2_I2C_DAT_MASK)
        & ((GPIO2_TPortValue)(Mask << GPIO2_I2C_DAT_START_BIT))
      );
      break;
    }
    case I2C_CLK: {                    /* bit field #1 */
      GPIO_PDD_ClearPortDataOutputMask(GPIO2_MODULE_BASE_ADDRESS,
        ((GPIO2_TPortValue)GPIO2_I2C_CLK_MASK)
        & ((GPIO2_TPortValue)(Mask << GPIO2_I2C_CLK_START_BIT))
      );
      break;
    }
    default:
      break;                           /* Invalid Field is not treated, result is undefined */
  } /* switch (Field) */
}
Exemplo n.º 3
0
/* ===================================================================*/
void LEDRed_ClearFieldBits(LDD_TDeviceData *DeviceDataPtr, LDD_GPIO_TBitField Field, LEDRed_TFieldValue Mask)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  switch (Field) {                     /* no break */
    case LED_RED: {                    /* bit field #0 */
      GPIO_PDD_ClearPortDataOutputMask(LEDRed_MODULE_BASE_ADDRESS,
        ((LEDRed_TPortValue)LEDRed_LED_RED_MASK)
        & ((LEDRed_TPortValue)(Mask << LEDRed_LED_RED_START_BIT))
      );
      break;
    }
    default:
      break;                           /* Invalid Field is not treated, result is undefined */
  } /* switch (Field) */
}
Exemplo n.º 4
0
/*
** ===================================================================
**     Method      :  BitsIoLdd4_ClrBit (component BitsIO_LDD)
**
**     Description :
**         Clears (sets to zero) the specified bit of the Input/Output
**         component. It is the same as [PutBit(Bit, FALSE)]. (Method
**         is available only if the Direction = _[output]_ or
**         _[input/output]_).
**     Parameters  :
**         NAME            - DESCRIPTION
**       * DeviceDataPtr   - Pointer to device data
**                           structure pointer.
**         Bit             - Bit/pin number to clear
**     Returns     :
**         ---             - Error code, possible values:
**                           ERR_OK - OK
**                           ERR_PARAM_MASK - Invalid pin mask
** ===================================================================
*/
LDD_TError BitsIoLdd4_ClrBit(LDD_TDeviceData *DeviceDataPtr, byte Bit)
{
  uint32_t mask = 0;

  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */

  /* Bit number value - this test can be disabled by setting the "Ignore range checking"
     property to the "yes" value in the "Configuration inspector" */
  if (Bit > 3U) {
    return ERR_PARAM_MASK;
  }

  mask = BitsIoLdd4_PIN_MASK_MAP[Bit];
  GPIO_PDD_ClearPortDataOutputMask(BitsIoLdd4_MODULE_BASE_ADDRESS, mask);

  return ERR_OK;
}
Exemplo n.º 5
0
/* ===================================================================*/
void BitIoLdd2_ClrVal(LDD_TDeviceData *DeviceDataPtr)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  GPIO_PDD_ClearPortDataOutputMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
}
/* ===================================================================*/
void TraccionTrasera_Direccion_ClrVal(LDD_TDeviceData *DeviceDataPtr)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  GPIO_PDD_ClearPortDataOutputMask(TraccionTrasera_Direccion_MODULE_BASE_ADDRESS, TraccionTrasera_Direccion_PORT_MASK);
}
Exemplo n.º 7
0
/* ===================================================================*/
void SPI_NEXT_SCLK_ClrVal(LDD_TDeviceData *DeviceDataPtr)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  GPIO_PDD_ClearPortDataOutputMask(SPI_NEXT_SCLK_MODULE_BASE_ADDRESS, SPI_NEXT_SCLK_PORT_MASK);
}