-
Notifications
You must be signed in to change notification settings - Fork 0
/
exitpru.c
61 lines (42 loc) · 1.62 KB
/
exitpru.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/******************************************************************************
* Include Files *
******************************************************************************/
// Standard header files
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
// Driver header file
#include "prussdrv.h"
#include <pruss_intc_mapping.h>
#include "adc.h"
/******************************************************************************
* Local Macro Declarations *
******************************************************************************/
#define PRU_NUM 1
#define DDR_BASEADDR 0x80000000
#define OFFSET_DDR 0x00001008
#define OFFSET_SHAREDRAM 0
#define PRUSS1_SHARED_DATARAM 4
/******************************************************************************
* Local Function Declarations *
******************************************************************************/
static int LOCAL_exampleInit ( );
/******************************************************************************
* Global Variable Definitions *
******************************************************************************/
static int mem_fd;
static void *ddrMem, *sharedMem;
static int chunk;
static unsigned int *sharedMem_int;
int main (void)
{
prussdrv_init ();
prussdrv_pru_disable(PRU_NUM);
prussdrv_exit ();
munmap(ddrMem, 0x0FFFFFFF);
close(mem_fd);
return(0);
}