Mercurial > hg > beaglert
comparison core/PRU.cpp @ 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 | 5c8f46fcd4d0 |
comparison
equal
deleted
inserted
replaced
319:2c4ddf4277d1 | 320:3a28a4eb948d |
---|---|
395 //TODO: this initialisation should only address the memory effectively used by these buffers, i.e.:depend on the number of frames | 395 //TODO: this initialisation should only address the memory effectively used by these buffers, i.e.:depend on the number of frames |
396 // (otherwise might cause issues if we move memory locations later on) | 396 // (otherwise might cause issues if we move memory locations later on) |
397 if(analog_enabled) { | 397 if(analog_enabled) { |
398 for(int i = 0; i < PRU_MEM_DAC_LENGTH / 2; i++) | 398 for(int i = 0; i < PRU_MEM_DAC_LENGTH / 2; i++) |
399 pru_buffer_spi_dac[i] = 0; | 399 pru_buffer_spi_dac[i] = 0; |
400 if(digital_enabled){ | |
401 for(int i = 0; i < PRU_MEM_DIGITAL_OFFSET*2; i++) | |
402 pru_buffer_digital[i] = 0x0000ffff; // set to all inputs, to avoid unexpected spikes | |
403 } | |
404 } | 400 } |
401 if(digital_enabled){ | |
402 for(int i = 0; i < PRU_MEM_DIGITAL_OFFSET*2; i++) | |
403 pru_buffer_digital[i] = 0x0000ffff; // set to all inputs, to avoid unexpected spikes | |
404 } | |
405 for(int i = 0; i < PRU_MEM_MCASP_LENGTH / 2; i++) | 405 for(int i = 0; i < PRU_MEM_MCASP_LENGTH / 2; i++) |
406 pru_buffer_audio_dac[i] = 0; | 406 pru_buffer_audio_dac[i] = 0; |
407 | 407 |
408 /* If using GPIO test pin for Xenomai (for debugging), initialise the pointer now */ | 408 /* If using GPIO test pin for Xenomai (for debugging), initialise the pointer now */ |
409 if(xenomai_test_pin && xenomai_gpio_fd < 0) { | 409 if(xenomai_test_pin && xenomai_gpio_fd < 0) { |