File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed
ref_app/src/mcal/r7fa4m1ab Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1010
1111 #define MY_PROGMEM
1212
13- #include < cstdint>
14-
1513 namespace mcal { namespace cpu {
1614
1715 auto init () -> void;
Original file line number Diff line number Diff line change 99#include < mcal_osc.h>
1010#include < mcal_reg.h>
1111
12- #include < cstddef>
13-
1412auto mcal::osc::init (const config_type*) -> void
1513{
1614 // Disable register write protection for clock module.
Original file line number Diff line number Diff line change 1414 {
1515 namespace reg
1616 {
17+ // Register bases.
18+ constexpr std::uint32_t system_base { UINT32_C (0x4001E000 ) };
19+ constexpr std::uint32_t unknown_hococr2 { UINT32_C (0x4001E037 ) };
20+ constexpr std::uint32_t pfs_base { UINT32_C (0x40040800 ) };
21+ constexpr std::uint32_t pmisc_base { UINT32_C (0x40040D00 ) };
22+
1723 // System registers.
18- constexpr std::uint32_t system_base { UINT32_C (0x4001E000 ) };
19- constexpr std::uint32_t unknown_hococr2 { UINT32_C (0x4001E037 ) };
20-
21- constexpr std::uint32_t system_sckdivcr { system_base + UINT32_C (0x00000020 ) };
22- constexpr std::uint32_t system_sckscr { system_base + UINT32_C (0x00000026 ) };
23- constexpr std::uint32_t system_memwait { system_base + UINT32_C (0x00000031 ) };
24- constexpr std::uint32_t system_hococr { system_base + UINT32_C (0x00000036 ) };
25- constexpr std::uint32_t system_oscsf { system_base + UINT32_C (0x0000003C ) };
26- constexpr std::uint32_t system_opccr { system_base + UINT32_C (0x000000A0 ) };
27- constexpr std::uint32_t system_prcr { system_base + UINT32_C (0x000003FE ) };
24+ constexpr std::uint32_t system_sckdivcr { system_base + UINT32_C (0x00000020 ) };
25+ constexpr std::uint32_t system_sckscr { system_base + UINT32_C (0x00000026 ) };
26+ constexpr std::uint32_t system_memwait { system_base + UINT32_C (0x00000031 ) };
27+ constexpr std::uint32_t system_hococr { system_base + UINT32_C (0x00000036 ) };
28+ constexpr std::uint32_t system_oscsf { system_base + UINT32_C (0x0000003C ) };
29+ constexpr std::uint32_t system_opccr { system_base + UINT32_C (0x000000A0 ) };
30+ constexpr std::uint32_t system_prcr { system_base + UINT32_C (0x000003FE ) };
31+
32+ // Port registers.
33+ constexpr std::uint32_t pfs_p001pfs_base { pfs_base + UINT32_C (0x00000004 ) };
34+ constexpr std::uint32_t pfs_p010pfs_base { pfs_base + UINT32_C (0x00000028 ) };
35+
2836 } // namespace reg
2937 } // namespace mcal
3038
You can’t perform that action at this time.
0 commit comments