GR712RC unit tests
1.0
Bare-metal C++ hardware tests for the PLATO DPU (IAA-CSIC, 2019)
Loading...
Searching...
No Matches
src
mcal
gr712rc_comercial
mcal_port.cpp
Go to the documentation of this file.
1
2
// Copyright Christopher Kormanyos 2014.
3
// Distributed under the Boost Software License,
4
// Version 1.0. (See accompanying file LICENSE_1_0.txt
5
// or copy at http://www.boost.org/LICENSE_1_0.txt)
6
//
7
8
#include <
mcal_port.h
>
9
#include <
mcal_reg_access.h
>
10
11
void
mcal::port::init
(
const
config_type
*)
12
{
13
// Enable the peripheral clocks for portf and portg.
14
// 0x01 = porta
15
// 0x02 = portb
16
// 0x04 = portc
17
// 0x08 = portd
18
// 0x10 = porte
19
// 0x20 = portf
20
// 0x40 = portg
21
// ------------
22
// So we have:
23
// (portf + portg) = (0x20 + 0x40) = 0x60.
24
25
mcal::reg::access
<std::uint32_t,
26
std::uint32_t,
27
mcal::reg::rcc_ahb1enr,
28
UINT32_C(0x60) >::reg_or();
29
}
mcal_port.h
Port pin abstraction layer.
mcal_reg_access.h
mcal::port::init
void init(const config_type *)
Definition
mcal_port.cpp:11
mcal::port::config_type
void config_type
Definition
mcal_port.h:17
mcal::reg::access
Definition
mcal_reg_access_template.h:20
Generated by
1.15.0