update to tilelink2
This commit is contained in:
10
tests/pwm.c
10
tests/pwm.c
@@ -1,16 +1,16 @@
|
||||
#define PWM_PERIOD 0x2000
|
||||
#define PWM_DUTY 0x2008
|
||||
#define PWM_ENABLE 0x2010
|
||||
#define PWM_DUTY 0x2004
|
||||
#define PWM_ENABLE 0x2008
|
||||
|
||||
static inline void write_reg(unsigned long addr, unsigned long data)
|
||||
static inline void write_reg(unsigned long addr, unsigned int data)
|
||||
{
|
||||
volatile unsigned long *ptr = (volatile unsigned long *) addr;
|
||||
volatile unsigned int *ptr = (volatile unsigned int *) addr;
|
||||
*ptr = data;
|
||||
}
|
||||
|
||||
static inline unsigned long read_reg(unsigned long addr)
|
||||
{
|
||||
volatile unsigned long *ptr = (volatile unsigned long *) addr;
|
||||
volatile unsigned int *ptr = (volatile unsigned int *) addr;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user