Beispiel #1
0
/*----------------------------------------------------------------------------*/
void pinInput(struct Pin pin)
{
  LPC_GPIO_Type * const reg = calcPort(pin.data);

  commonPinInit(pin);
  reg->DIR &= ~(1 << pin.data.offset);
}
Beispiel #2
0
/*----------------------------------------------------------------------------*/
void pinOutput(struct Pin pin, bool value)
{
  LPC_GPIO_Type * const reg = calcPort(pin.data);

  commonPinInit(pin);
  reg->DIR |= 1 << pin.data.offset;
  pinWrite(pin, value);
}
Beispiel #3
0
Datei: pin.c Projekt: stxent/halm
/*----------------------------------------------------------------------------*/
void pinOutput(struct Pin pin, bool value)
{
  commonPinInit(pin);
  ((LPC_GPIO_Type *)pin.reg)->DIR |= 1UL << pin.data.offset;
  pinWrite(pin, value);
}
Beispiel #4
0
Datei: pin.c Projekt: stxent/halm
/*----------------------------------------------------------------------------*/
void pinInput(struct Pin pin)
{
  commonPinInit(pin);
  ((LPC_GPIO_Type *)pin.reg)->DIR &= ~(1UL << pin.data.offset);
}