scu_pinmux(4,3, MD_PLN, FUNC0); LPC_GPIO_PORT->DIR[2] &= ~(1UL<<3); LPC_SCU->ENAIO0 |= 1<<0; ADC_Init(LPC_ADC0, 2000, 10); ADC_ChannelCmd(LPC_ADC0, ADC_CHANNEL_0 ,ENABLE); //Start burst conversion ADC_BurstCmd(LPC_ADC0,ENABLE); |
DAC_CONVERTER_CFG_Type DAC_ConverterConfigStruct; scu_pinmux(4,4, MD_PLN, FUNC0); LPC_SCU->ENAIO2 |= 1<<0; DAC_Init(LPC_DAC); DAC_ConverterConfigStruct.CNT_ENA = 0; DAC_ConverterConfigStruct.DMA_ENA = 1; DAC_ConfigDAConverterControl (LPC_DAC, &DAC_ConverterConfigStruct); |