Пример #1
0
/* Polling routine for DAC example */
static void App_Polling_Test(void)
{
	uint32_t tmp = 0;
	volatile uint32_t i = 0;

	while (DEBUGIN() != 'x') {
		tmp++;
		if (tmp == (DATA_SIZE - 1)) {
			tmp = 0;
		}
		Chip_DAC_UpdateValue(LPC_DAC, tmp);

		while (!(Chip_DAC_GetIntStatus(LPC_DAC))) {}

		for (i = 0; i < 0x10000; i++) ;
	}
}
void setDacValue (uint16_t dacValue)
{
	Chip_DAC_UpdateValue (LPC_DAC, dacValue);

	while (!(Chip_DAC_GetIntStatus (LPC_DAC)));	 					/*	0 <=> 0V & 1024 <=> 3.3V	*/
}
Пример #3
0
void DAC_Value(int count) {
	Chip_DAC_UpdateValue(LPC_DAC,count);
	while (!(Chip_DAC_GetIntStatus(LPC_DAC))) {};
}