Mercurial > hg > beaglert
comparison core/PRU.cpp @ 268:8d80eda512cd prerelease
Added new overlay for using PRU0 or PRU1, a script to halt board on button press, and several example projects
author | andrewm |
---|---|
date | Tue, 17 May 2016 14:46:26 +0100 |
parents | abd3657016ea |
children | c55c6f6c233c |
comparison
equal
deleted
inserted
replaced
267:247a182adb6d | 268:8d80eda512cd |
---|---|
34 #include <native/task.h> | 34 #include <native/task.h> |
35 #include <native/timer.h> | 35 #include <native/timer.h> |
36 #include <rtdk.h> | 36 #include <rtdk.h> |
37 | 37 |
38 using namespace std; | 38 using namespace std; |
39 | |
40 // PRU memory: PRU0 and PRU1 RAM are 8kB (0x2000) long each | |
41 // PRU-SHARED RAM is 12kB (0x3000) long | |
39 | 42 |
40 #define PRU_MEM_MCASP_OFFSET 0x2000 // Offset within PRU-SHARED RAM | 43 #define PRU_MEM_MCASP_OFFSET 0x2000 // Offset within PRU-SHARED RAM |
41 #define PRU_MEM_MCASP_LENGTH 0x1000 // Length of McASP memory, in bytes | 44 #define PRU_MEM_MCASP_LENGTH 0x1000 // Length of McASP memory, in bytes |
42 #define PRU_MEM_DAC_OFFSET 0x0 // Offset within PRU0 RAM | 45 #define PRU_MEM_DAC_OFFSET 0x0 // Offset within PRU0 RAM |
43 #define PRU_MEM_DAC_LENGTH 0x2000 // Length of ADC+DAC memory, in bytes | 46 #define PRU_MEM_DAC_LENGTH 0x2000 // Length of ADC+DAC memory, in bytes |