Mercurial > hg > beaglert
comparison include/PRU.h @ 41:4255ecbb9bec ultra-staging
Timers to measure performances, ultra experimental
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 19 May 2015 16:41:07 +0100 |
parents | c98863e63174 |
children | 3068421c0737 |
comparison
equal
deleted
inserted
replaced
40:419ce4ebfc4c | 41:4255ecbb9bec |
---|---|
7 | 7 |
8 #ifndef PRU_H_ | 8 #ifndef PRU_H_ |
9 #define PRU_H_ | 9 #define PRU_H_ |
10 | 10 |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 #include "../include/RTAudio.h" // to schedule lower prio parallel process |
13 #include "../include/intervals.h" | |
13 class PRU | 14 class PRU |
14 { | 15 { |
15 private: | 16 private: |
16 static const unsigned int kPruGPIODACSyncPin; | 17 static const unsigned int kPruGPIODACSyncPin; |
17 static const unsigned int kPruGPIOADCSyncPin; | 18 static const unsigned int kPruGPIOADCSyncPin; |
49 void disable(); | 50 void disable(); |
50 | 51 |
51 // For debugging: | 52 // For debugging: |
52 void setGPIOTestPin(); | 53 void setGPIOTestPin(); |
53 void clearGPIOTestPin(); | 54 void clearGPIOTestPin(); |
55 Interval renderTimer; | |
56 Interval sleepTimer; | |
57 AuxiliaryTask printIntervalsTask; | |
54 | 58 |
55 private: | 59 private: |
56 int pru_number; // Which PRU we use | 60 int pru_number; // Which PRU we use |
57 bool running; // Whether the PRU is running | 61 bool running; // Whether the PRU is running |
58 bool spi_enabled; // Whether SPI ADC and DAC are used | 62 bool spi_enabled; // Whether SPI ADC and DAC are used |
72 unsigned int digital_buffer_frames; | 76 unsigned int digital_buffer_frames; |
73 unsigned int audio_buffer_frames; | 77 unsigned int audio_buffer_frames; |
74 | 78 |
75 int xenomai_gpio_fd; // File descriptor for /dev/mem for fast GPIO | 79 int xenomai_gpio_fd; // File descriptor for /dev/mem for fast GPIO |
76 uint32_t *xenomai_gpio; // Pointer to GPIO registers | 80 uint32_t *xenomai_gpio; // Pointer to GPIO registers |
81 | |
77 }; | 82 }; |
78 | 83 |
79 | 84 |
80 #endif /* PRU_H_ */ | 85 #endif /* PRU_H_ */ |