this code starts up the 32kHZ clock

This commit is contained in:
Mariano Alvira 2009-05-21 14:52:27 -04:00
parent 292f20c4ea
commit 34c91a6726
3 changed files with 50 additions and 4 deletions

View file

@ -16,7 +16,7 @@
#define CRM_RTC_TIMEOUT (CRM_BASE+0x2c)
#define CRM_CAL_CNTL (CRM_BASE+0x34)
#define CRM_CAL_COUNT (CRM_BASE+0x38)
#define CRM_RINGOSC_CTNL (CRM_BASE+0x3c)
#define CRM_RINGOSC_CNTL (CRM_BASE+0x3c)
#define CRM_XTAL_CNTL (CRM_BASE+0x40)
#define CRM_XTAL32_CNTL (CRM_BASE+0x44)
#define CRM_VREG_CNTL (CRM_BASE+0x48)

View file

@ -4,4 +4,9 @@
#define reg32(x) (*(volatile uint32_t *)(x))
#define reg16(x) (*(volatile uint16_t *)(x))
#define bit(bit) (1<<bit)
#define bit_is_set(val,bit) (((val & (1<<bit)) >> bit) == 1)
#define clear_bit(val,bit) (val=(val & ~(1<<bit)))
#define set_bit(val,bit) (val=(val | (1<<bit)))
#endif