diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-12-10 19:09:05 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-12-10 19:09:05 +0100 |
commit | 234a69eb4f58a1b57e22656994adbd8f871bf7f5 (patch) | |
tree | 7e255d60152d75b9d48aef4ecfde2d30a456946f /rcc | |
parent | f836b288b019f58c0d0a7e2dcbf56972e42ce4f4 (diff) |
Added ethernet and syscfg register definitions.
Diffstat (limited to 'rcc')
-rw-r--r-- | rcc/rcc.h | 3 | ||||
-rw-r--r-- | rcc/syscfg.h | 19 |
2 files changed, 22 insertions, 0 deletions
@@ -187,6 +187,9 @@ struct RCC_t { DMA1 = 1 << 21, DMA2 = 1 << 22, ETHMAC = 1 << 25, + ETHMACTX = 1 << 26, + ETHMACRX = 1 << 27, + ETHMACPTP = 1 << 28, OTGHS = 1 << 29, OTGHSULPI = 1 << 30, }; diff --git a/rcc/syscfg.h b/rcc/syscfg.h new file mode 100644 index 0000000..74c3a07 --- /dev/null +++ b/rcc/syscfg.h @@ -0,0 +1,19 @@ +#ifndef SYSCFG_H +#define SYSCFG_H + +#include <stdint.h> + +struct SYSCFG_t { + volatile uint32_t MEMRM; + volatile uint32_t PMC; + volatile uint32_t EXTICR[4]; + volatile uint32_t CMPCR; +}; + +#if defined(STM32F4) +static SYSCFG_t& SYSCFG = *(SYSCFG_t*)0x40013800; +#endif + +void rcc_init(); + +#endif |