HWA
Bare metal programming with style
rcca_2.h
Go to the documentation of this file.
1 
2 /* This file is part of the HWA project.
3  * Copyright (c) 2017 Christophe Duparquet.
4  * All rights reserved. Read LICENSE.TXT for details.
5  */
6 
12 #include "hsia_2.h"
13 #include "hsea_2.h"
14 #include "plla_2.h"
15 #include "sclka_2.h"
16 #include "ahba_2.h"
17 #include "apba_2.h"
18 #include "usba_2.h"
19 
20 /*
21  * The `_rcca` class is not used directly. It holds hardware registers shared by
22  * several objects to access the device's RCC in order to configure the
23  * different clocks of the device.
24  *
25  * The RCC is also used transparently by several other objects to enable/disable
26  * their clocking for power management purpose.
27  */
28 
29 
30 /*******************************************************************************
31  * *
32  * Context management *
33  * *
34  *******************************************************************************/
35 
36 #define _hwa_setup__rcca(o,a) \
37  _hwa_setup_r( o, cr ); \
38  _hwa_setup_r( o, cfgr ); \
39  _hwa_setup_r( o, apb2enr ); \
40  _hwa_setup_r( o, apb1enr )
41 
42 #define _hwa_init__rcca(o,a) \
43  _hwa_init_r( o, cr, 0x00000083 ); \
44  _hwa_init_r( o, cfgr, 0x00000000 ); \
45  _hwa_init_r( o, apb2enr, 0x00000000 ); \
46  _hwa_init_r( o, apb1enr, 0x00000000 )
47 
48 #define _hwa_commit__rcca(o,a) \
49  _hwa_commit_r( o, cr ); \
50  _hwa_commit_r( o, cfgr ); \
51  _hwa_commit_r( o, apb2enr ); \
52  _hwa_commit_r( o, apb1enr )
apba_2.h
APB.
usba_2.h
USB.
sclka_2.h
Class _sclka.
ahba_2.h
AHB.
hsia_2.h
HSI.
plla_2.h
PLL.
hsea_2.h
HSE.