1
2
3
4
5
6
7
8
9#ifndef __GRLIB_GPTIMER_H__
10#define __GRLIB_GPTIMER_H__
11
12typedef struct {
13 volatile unsigned int val;
14 volatile unsigned int rld;
15 volatile unsigned int ctrl;
16 volatile unsigned int unused;
17} ambapp_dev_gptimer_element;
18
19#define GPTIMER_CTRL_EN 0x1
20#define GPTIMER_CTRL_RS 0x2
21#define GPTIMER_CTRL_LD 0x4
22#define GPTIMER_CTRL_IE 0x8
23#define GPTIMER_CTRL_IP 0x10
24#define GPTIMER_CTRL_CH 0x20
25
26typedef struct {
27 volatile unsigned int scalar;
28 volatile unsigned int scalar_reload;
29 volatile unsigned int config;
30 volatile unsigned int unused;
31 volatile ambapp_dev_gptimer_element e[8];
32} ambapp_dev_gptimer;
33
34#endif
35