comparison core/PRU.cpp @ 307:ff5f346a293e prerelease

Changed BelaContext fields to be const where appropriate; there's now an InternalBelaContext used for setting the values within the core code. These need to stay aligned.
author andrewm
date Fri, 27 May 2016 18:12:15 +0100
parents 421a69d42943
children 493a07f6ec09
comparison
equal deleted inserted replaced
306:132fc61893af 307:ff5f346a293e
109 109
110 extern int gShouldStop; 110 extern int gShouldStop;
111 extern int gRTAudioVerbose; 111 extern int gRTAudioVerbose;
112 112
113 // Constructor: specify a PRU number (0 or 1) 113 // Constructor: specify a PRU number (0 or 1)
114 PRU::PRU(BelaContext *input_context) 114 PRU::PRU(InternalBelaContext *input_context)
115 : context(input_context), pru_number(0), running(false), analog_enabled(false), 115 : context(input_context), pru_number(0), running(false), analog_enabled(false),
116 digital_enabled(false), gpio_enabled(false), led_enabled(false), 116 digital_enabled(false), gpio_enabled(false), led_enabled(false),
117 mux_channels(0), 117 mux_channels(0),
118 gpio_test_pin_enabled(false), 118 gpio_test_pin_enabled(false),
119 pru_buffer_comm(0), pru_buffer_spi_dac(0), pru_buffer_spi_adc(0), 119 pru_buffer_comm(0), pru_buffer_spi_dac(0), pru_buffer_spi_adc(0),
628 } 628 }
629 } 629 }
630 630
631 // Call user render function 631 // Call user render function
632 // *********************** 632 // ***********************
633 render(context, userData); 633 render((BelaContext *)context, userData);
634 // *********************** 634 // ***********************
635 635
636 if(analog_enabled) { 636 if(analog_enabled) {
637 if(context->flags & BELA_FLAG_ANALOG_OUTPUTS_PERSIST) { 637 if(context->flags & BELA_FLAG_ANALOG_OUTPUTS_PERSIST) {
638 // Remember the content of the last_analog_out_frame 638 // Remember the content of the last_analog_out_frame