comparison core/PRU.cpp @ 52:a6d223473ea2 newapi

Updated examples for new API. tank_wars not yet updated; audio_in_FFT and oscillator_bank not working properly yet.
author andrewm
date Sun, 31 May 2015 02:13:39 -0500
parents be427da6fb9c
children 3c3a1357657d
comparison
equal deleted inserted replaced
51:4f8db16f17b5 52:a6d223473ea2
614 if(out < -32768) out = -32768; 614 if(out < -32768) out = -32768;
615 else if(out > 32767) out = 32767; 615 else if(out > 32767) out = 32767;
616 pru_buffer_audio_dac[n + pru_audio_offset] = (int16_t)out; 616 pru_buffer_audio_dac[n + pru_audio_offset] = (int16_t)out;
617 } 617 }
618 618
619 // Increment total number of samples that have elapsed
620 context->audioSampleCount += context->audioFrames;
621
619 if(xenomai_gpio != 0) { 622 if(xenomai_gpio != 0) {
620 // Set the test pin high 623 // Set the test pin high
621 xenomai_gpio[GPIO_CLEARDATAOUT] = TEST_PIN_MASK; 624 xenomai_gpio[GPIO_CLEARDATAOUT] = TEST_PIN_MASK;
622 } 625 }
623 626