Skip to content

Commit aeede17

Browse files
committed
Moved atsam4s power to atsamxx
1 parent d923083 commit aeede17

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef KLIB_ATSAM3X8E_POWER_HPP
2+
#define KLIB_ATSAM3X8E_POWER_HPP
3+
4+
#include <targets/core/atmel/atsamxx/power.hpp>
5+
6+
namespace klib::atsam3x8e::io {
7+
using power_control = klib::core::atsamxx::io::power_control;
8+
}
9+
10+
#endif

targets/chip/atsam3x8e/io/watchdog.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#include <cstdint>
55

6-
#include <atsam3x8e.hpp>
7-
86
#include <targets/core/atmel/atsamxx/watchdog.hpp>
97

108
namespace klib::atsam3x8e::io::periph {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef KLIB_ATSAM4S2B_POWER_HPP
22
#define KLIB_ATSAM4S2B_POWER_HPP
33

4-
#include <targets/core/atmel/atsam4s/power.hpp>
4+
#include <targets/core/atmel/atsamxx/power.hpp>
55

66
namespace klib::atsam4s2b::io {
7-
using power_control = klib::core::atsam4s::io::power_control;
7+
using power_control = klib::core::atsamxx::io::power_control;
88
}
99

1010
#endif

targets/core/atmel/atsam4s/clocks.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ namespace klib::core::atsam4s::io {
2727
template <id Ids>
2828
static void enable() {
2929
// disable the write protect
30-
power_control::write_protect<false>();
30+
target::io::power_control::write_protect<false>();
3131

3232
// set the bit to enable the clock on the peripheral
3333
PMC->PMC_SCER = (0x1 << static_cast<uint8_t>(Ids));
3434

3535
// enable the write protect again
36-
power_control::write_protect<true>();
36+
target::io::power_control::write_protect<true>();
3737
}
3838

3939
/**
@@ -44,13 +44,13 @@ namespace klib::core::atsam4s::io {
4444
template <id Ids>
4545
static void disable() {
4646
// disable the write protect
47-
power_control::write_protect<false>();
47+
target::io::power_control::write_protect<false>();
4848

4949
// set the bit to enable the clock on the peripheral
5050
PMC->PMC_SCDR = (0x1 << static_cast<uint8_t>(Ids));
5151

5252
// enable the write protect again
53-
power_control::write_protect<true>();
53+
target::io::power_control::write_protect<true>();
5454
}
5555

5656
/**
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#ifndef KLIB_ATMEL_ATSAM4S_POWER_CONTROL_HPP
2-
#define KLIB_ATMEL_ATSAM4S_POWER_CONTROL_HPP
1+
#ifndef KLIB_ATMEL_ATSAMXX_POWER_CONTROL_HPP
2+
#define KLIB_ATMEL_ATSAMXX_POWER_CONTROL_HPP
33

44
#include <klib/klib.hpp>
55

6-
namespace klib::core::atsam4s::io {
6+
namespace klib::core::atsamxx::io {
77
class power_control {
88
public:
99
/**

0 commit comments

Comments
 (0)