changeset 320:3a28a4eb948d prerelease

Minor cleanup -- digital status shouldn't be dependent on analog status
author andrewm
date Mon, 30 May 2016 01:21:14 +0100
parents 2c4ddf4277d1
children b99b8ab317dd
files core/PRU.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/core/PRU.cpp	Mon May 30 01:07:22 2016 +0100
+++ b/core/PRU.cpp	Mon May 30 01:21:14 2016 +0100
@@ -397,11 +397,11 @@
     if(analog_enabled) {
 		for(int i = 0; i < PRU_MEM_DAC_LENGTH / 2; i++)
 			pru_buffer_spi_dac[i] = 0;
-		if(digital_enabled){
-			for(int i = 0; i < PRU_MEM_DIGITAL_OFFSET*2; i++)
-				pru_buffer_digital[i] = 0x0000ffff; // set to all inputs, to avoid unexpected spikes
-		}
     }
+	if(digital_enabled){
+		for(int i = 0; i < PRU_MEM_DIGITAL_OFFSET*2; i++)
+			pru_buffer_digital[i] = 0x0000ffff; // set to all inputs, to avoid unexpected spikes
+	}
 	for(int i = 0; i < PRU_MEM_MCASP_LENGTH / 2; i++)
 		pru_buffer_audio_dac[i] = 0;