Mercurial > hg > beaglert
comparison include/PRU.h @ 12:a6beeba3a648
Initial support for higher matrix sample rates by reducing the number of channels. Input not tested yet, and not all examples updated to new format.
author | andrewm |
---|---|
date | Thu, 22 Jan 2015 19:00:22 +0000 |
parents | 8a575ba3ab52 |
children | 901d205d1a3c |
comparison
equal
deleted
inserted
replaced
11:517715b23df0 | 12:a6beeba3a648 |
---|---|
31 | 31 |
32 // Clean up the GPIO at the end | 32 // Clean up the GPIO at the end |
33 void cleanupGPIO(); | 33 void cleanupGPIO(); |
34 | 34 |
35 // Initialise and open the PRU | 35 // Initialise and open the PRU |
36 int initialise(int pru_num, int frames_per_buffer, bool xenomai_test_pin = false); | 36 int initialise(int pru_num, int frames_per_buffer, int spi_channels, |
37 bool xenomai_test_pin = false); | |
37 | 38 |
38 // Run the code image in the specified file | 39 // Run the code image in the specified file |
39 int start(char * const filename); | 40 int start(char * const filename); |
40 | 41 |
41 // Loop: read and write data from the PRU | 42 // Loop: read and write data from the PRU |
56 bool running; // Whether the PRU is running | 57 bool running; // Whether the PRU is running |
57 bool spi_enabled; // Whether SPI ADC and DAC are used | 58 bool spi_enabled; // Whether SPI ADC and DAC are used |
58 bool gpio_enabled; // Whether GPIO has been prepared | 59 bool gpio_enabled; // Whether GPIO has been prepared |
59 bool led_enabled; // Whether a user LED is enabled | 60 bool led_enabled; // Whether a user LED is enabled |
60 bool gpio_test_pin_enabled; // Whether the test pin was also enabled | 61 bool gpio_test_pin_enabled; // Whether the test pin was also enabled |
62 int spi_num_channels; // How many channels to use for SPI ADC/DAC | |
61 | 63 |
62 volatile uint32_t *pru_buffer_comm; | 64 volatile uint32_t *pru_buffer_comm; |
63 uint16_t *pru_buffer_spi_dac; | 65 uint16_t *pru_buffer_spi_dac; |
64 uint16_t *pru_buffer_spi_adc; | 66 uint16_t *pru_buffer_spi_adc; |
65 int16_t *pru_buffer_audio_dac; | 67 int16_t *pru_buffer_audio_dac; |