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

  commonPinInit(pin);
  reg->DIR &= ~(1 << pin.data.offset);
}
예제 #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);
}
예제 #3
0
파일: pin.c 프로젝트: stxent/halm
/*----------------------------------------------------------------------------*/
void pinOutput(struct Pin pin, bool value)
{
  commonPinInit(pin);
  ((LPC_GPIO_Type *)pin.reg)->DIR |= 1UL << pin.data.offset;
  pinWrite(pin, value);
}
예제 #4
0
파일: pin.c 프로젝트: stxent/halm
/*----------------------------------------------------------------------------*/
void pinInput(struct Pin pin)
{
  commonPinInit(pin);
  ((LPC_GPIO_Type *)pin.reg)->DIR &= ~(1UL << pin.data.offset);
}