Example #1
0
void board_button_initialize(void)
{
  int i;

  /* Configure the GPIO pins as interrupting inputs. */

  for (i = 0; i < BOARD_NUM_BUTTONS; i++)
    {
      lpc43_configgpio(g_buttoncfg[i]);
    }
}
Example #2
0
static void dac_reset(FAR struct dac_dev_s *dev)
{
  irqstate_t flags;
  uint32_t regval;

  flags = irqsave();

  regval  = getreg32(LPC43_SYSCON_PCLKSEL0);
  regval &= ~SYSCON_PCLKSEL0_DAC_MASK;
  regval |= (SYSCON_PCLKSEL_CCLK8 << SYSCON_PCLKSEL0_DAC_SHIFT);
  putreg32(regval, LPC43_SYSCON_PCLKSEL0);

  //putreg32(DAC_CTRL_DBLBUFEN, LPC43_DAC_CTRL); ?

  lpc43_configgpio(GPIO_AOUT);

  irqrestore(flags);
}