nrfcxx  0.1.0
C++-17 Framework for Nordic nRF5 Devices
core.hpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 /* Copyright 2015-2019 Peter A. Bigot */
3 
8 #ifndef NRFCXX_NRF52_CORE_HPP
9 #define NRFCXX_NRF52_CORE_HPP
10 #pragma once
11 
12 #if (NRF52832 - 0)
13 #include "core832.hpp"
14 #elif (NRF52840 - 0)
15 #include "core840.hpp"
16 #else /* NRF52 */
17 #error Unsupported NRF52 MCU
18 #endif /* NRF52 */
19 
20 namespace nrfcxx {
21 namespace nrf5 {
22 namespace series {
23 
25 static constexpr unsigned int CLOCK_MHz = 64;
26 
41 static constexpr unsigned int DELAY_US_OVERHEAD_cyc = 12;
42 
44 void delay_cycles (unsigned int cycles); // see nrf52/delay_cycles.S
45 
64 void enable_pinreset ();
65 
66 } // ns series
67 } // ns nrf5
68 } // ns nrfcxx
69 
70 #endif /* NRFCXX_NRF52_HPP */
nrfcxx::nrf5::series::enable_pinreset
void enable_pinreset()
Enable the nRESET functionality.
core832.hpp
API specific to the nRF52832 product supporting <nrfcxx/core.hpp>.
nrfcxx::nrf5::series::DELAY_US_OVERHEAD_cyc
static constexpr unsigned int DELAY_US_OVERHEAD_cyc
Overhead setting up the call to delay_cycles() in the standard delay_us() implementation.
Definition: core.hpp:65
nrfcxx::nrf5::series::delay_cycles
void delay_cycles(unsigned int cycles)
Loop to delay for a requested number of cycles.
nrfcxx::nrf5::series::CLOCK_MHz
static constexpr unsigned int CLOCK_MHz
CPU clock speed in MHz.
Definition: core.hpp:50
nrfcxx
Primary namespace for nrfcxx functionality.
Definition: clock.hpp:17
core840.hpp
API specific to the nRF52840 product supporting <nrfcxx/core.hpp>.