comparison include/PRU.h @ 19:c98863e63174 matrix_gpio

Renamed matrixGpio to digital and matrix to analog
author Giulio Moro <giuliomoro@yahoo.it>
date Thu, 30 Apr 2015 16:58:41 +0100
parents 670be80463a3
children 4255ecbb9bec 579c86316008
comparison
equal deleted inserted replaced
18:31503d9de101 19:c98863e63174
25 25
26 // Destructor 26 // Destructor
27 ~PRU(); 27 ~PRU();
28 28
29 // Prepare the GPIO pins needed for the PRU 29 // Prepare the GPIO pins needed for the PRU
30 int prepareGPIO(int use_spi, int use_matrix_gpio, int include_test_pin, int include_led); 30 int prepareGPIO(int use_spi, int use_digital, int include_test_pin, int include_led);
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
54 54
55 private: 55 private:
56 int pru_number; // Which PRU we use 56 int pru_number; // Which PRU we use
57 bool running; // Whether the PRU is running 57 bool running; // Whether the PRU is running
58 bool spi_enabled; // Whether SPI ADC and DAC are used 58 bool spi_enabled; // Whether SPI ADC and DAC are used
59 bool matrix_gpio_enabled; // Whether Matrix GPIO is used 59 bool digital_enabled; // Whether digital is used
60 bool gpio_enabled; // Whether GPIO has been prepared 60 bool gpio_enabled; // Whether GPIO has been prepared
61 bool led_enabled; // Whether a user LED is enabled 61 bool led_enabled; // Whether a user LED is enabled
62 bool gpio_test_pin_enabled; // Whether the test pin was also enabled 62 bool gpio_test_pin_enabled; // Whether the test pin was also enabled
63 int spi_num_channels; // How many channels to use for SPI ADC/DAC 63 int spi_num_channels; // How many channels to use for SPI ADC/DAC
64 64
65 volatile uint32_t *pru_buffer_comm; 65 volatile uint32_t *pru_buffer_comm;
66 uint16_t *pru_buffer_spi_dac; 66 uint16_t *pru_buffer_spi_dac;
67 uint16_t *pru_buffer_spi_adc; 67 uint16_t *pru_buffer_spi_adc;
68 uint32_t *pru_buffer_matrix_gpio; 68 uint32_t *pru_buffer_digital;
69 int16_t *pru_buffer_audio_dac; 69 int16_t *pru_buffer_audio_dac;
70 int16_t *pru_buffer_audio_adc; 70 int16_t *pru_buffer_audio_adc;
71 unsigned int spi_buffer_frames; 71 unsigned int spi_buffer_frames;
72 unsigned int matrix_gpio_buffer_frames; 72 unsigned int digital_buffer_frames;
73 unsigned int audio_buffer_frames; 73 unsigned int audio_buffer_frames;
74 74
75 int xenomai_gpio_fd; // File descriptor for /dev/mem for fast GPIO 75 int xenomai_gpio_fd; // File descriptor for /dev/mem for fast GPIO
76 uint32_t *xenomai_gpio; // Pointer to GPIO registers 76 uint32_t *xenomai_gpio; // Pointer to GPIO registers
77 }; 77 };