Mercurial > hg > beaglert
diff core/PRU.cpp @ 284:7bfb25a2e158 Doxy prerelease
Merge
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Tue, 17 May 2016 15:53:24 +0100 |
parents | 8d80eda512cd |
children | c55c6f6c233c |
line wrap: on
line diff
--- a/core/PRU.cpp Tue May 17 15:40:16 2016 +0100 +++ b/core/PRU.cpp Tue May 17 15:53:24 2016 +0100 @@ -37,8 +37,11 @@ using namespace std; +// PRU memory: PRU0 and PRU1 RAM are 8kB (0x2000) long each +// PRU-SHARED RAM is 12kB (0x3000) long + #define PRU_MEM_MCASP_OFFSET 0x2000 // Offset within PRU-SHARED RAM -#define PRU_MEM_MCASP_LENGTH 0x2000 // Length of McASP memory, in bytes +#define PRU_MEM_MCASP_LENGTH 0x1000 // Length of McASP memory, in bytes #define PRU_MEM_DAC_OFFSET 0x0 // Offset within PRU0 RAM #define PRU_MEM_DAC_LENGTH 0x2000 // Length of ADC+DAC memory, in bytes #define PRU_MEM_COMM_OFFSET 0x0 // Offset within PRU-SHARED RAM @@ -51,12 +54,13 @@ #define PRU_SHOULD_SYNC 3 #define PRU_SYNC_ADDRESS 4 #define PRU_SYNC_PIN_MASK 5 -#define PRU_LED_ADDRESS 6 -#define PRU_LED_PIN_MASK 7 -#define PRU_FRAME_COUNT 8 -#define PRU_USE_SPI 9 +#define PRU_LED_ADDRESS 6 +#define PRU_LED_PIN_MASK 7 +#define PRU_FRAME_COUNT 8 +#define PRU_USE_SPI 9 #define PRU_SPI_NUM_CHANNELS 10 -#define PRU_USE_DIGITAL 11 +#define PRU_USE_DIGITAL 11 +#define PRU_PRU_NUMBER 12 short int digitalPins[NUM_DIGITALS]={ GPIO_NO_BIT_0, @@ -332,6 +336,7 @@ pru_buffer_comm[PRU_SHOULD_SYNC] = 0; pru_buffer_comm[PRU_SYNC_ADDRESS] = 0; pru_buffer_comm[PRU_SYNC_PIN_MASK] = 0; + pru_buffer_comm[PRU_PRU_NUMBER] = pru_number; if(led_enabled) { pru_buffer_comm[PRU_LED_ADDRESS] = USERLED3_GPIO_BASE; pru_buffer_comm[PRU_LED_PIN_MASK] = USERLED3_PIN_MASK; @@ -643,6 +648,8 @@ // Set the test pin high xenomai_gpio[GPIO_CLEARDATAOUT] = TEST_PIN_MASK; } + + BeagleRT_autoScheduleAuxiliaryTasks(); // FIXME: TESTING!! // if(testCount > 100000)