Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions ref_app/src/mcal/am335x/mcal_gpt.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2014.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MCAL_GPT_2011_10_20_H_
#define MCAL_GPT_2011_10_20_H_
#ifndef MCAL_GPT_2011_10_20_H
#define MCAL_GPT_2011_10_20_H

#include <chrono>
#include <cstdint>

#include <util/utility/util_noexcept.h>

// Forward declaration of the util::timer template class.
namespace util
{
template<typename unsigned_tick_type>
class timer;
}

namespace mcal
{
namespace gpt
Expand All @@ -29,16 +19,11 @@

void init(const config_type*);

class secure final
struct secure final
{
static value_type get_time_elapsed();

friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT;

template<typename unsigned_tick_type>
friend class util::timer;
};
}
}

#endif // MCAL_GPT_2011_10_20_H_
#endif // MCAL_GPT_2011_10_20_H
17 changes: 5 additions & 12 deletions ref_app/src/mcal/am335x/mcal_wdg.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2013 - 2020.
// Copyright Christopher Kormanyos 2013 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MCAL_WDG_2010_04_10_H_
#define MCAL_WDG_2010_04_10_H_

extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline));

namespace sys { namespace idle { void task_func(); } }
#ifndef MCAL_WDG_2010_04_10_H
#define MCAL_WDG_2010_04_10_H

namespace mcal
{
Expand All @@ -20,14 +16,11 @@

void init(const config_type*);

class secure final
struct secure final
{
static void trigger();

friend void ::sys::idle::task_func();
friend void ::__my_startup();
};
}
}

#endif // MCAL_WDG_2010_04_10_H_
#endif // MCAL_WDG_2010_04_10_H
14 changes: 0 additions & 14 deletions ref_app/src/mcal/am6254_soc/mcal_gpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@
#ifndef MCAL_GPT_2025_02_22_H
#define MCAL_GPT_2025_02_22_H

#include <chrono>
#include <cstdint>

// Forward declaration of the util::timer template class.
namespace util
{
template<typename unsigned_tick_type>
class timer;
}

namespace mcal
{
namespace gpt
Expand All @@ -29,13 +21,7 @@

struct secure final
{
private:
static auto get_time_elapsed() -> value_type;

friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point;

template<typename unsigned_tick_type>
friend class util::timer;
};
}
}
Expand Down
17 changes: 4 additions & 13 deletions ref_app/src/mcal/am6254_soc/mcal_wdg.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MCAL_WDG_2010_04_10_H_
#define MCAL_WDG_2010_04_10_H_

namespace util { template<typename unsigned_tick_type> class timer; }

namespace sys { namespace idle { auto task_func() -> void; } }
#ifndef MCAL_WDG_2010_04_10_H
#define MCAL_WDG_2010_04_10_H

namespace mcal
{
Expand All @@ -20,16 +16,11 @@

auto init(const config_type*) -> void;

class secure final
struct secure final
{
static auto trigger() -> void;

template<typename unsigned_tick_type>
friend class util::timer;

friend auto ::sys::idle::task_func() -> void;
};
}
}

#endif // MCAL_WDG_2010_04_10_H_
#endif // MCAL_WDG_2010_04_10_H
24 changes: 4 additions & 20 deletions ref_app/src/mcal/atmega2560/mcal_gpt.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2020.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MCAL_GPT_2011_10_20_H_
#define MCAL_GPT_2011_10_20_H_
#ifndef MCAL_GPT_2011_10_20_H
#define MCAL_GPT_2011_10_20_H

#include <chrono>
#include <cstdint>

#include <util/utility/util_noexcept.h>

// Forward declaration of the util::timer template class.
namespace util
{
template<typename unsigned_tick_type>
class timer;
}

namespace mcal
{
namespace gpt
Expand All @@ -31,15 +21,9 @@

struct secure final
{
private:
static value_type get_time_elapsed();

friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT;

template<typename unsigned_tick_type>
friend class util::timer;
};
}
}

#endif // MCAL_GPT_2011_10_20_H_
#endif // MCAL_GPT_2011_10_20_H
15 changes: 1 addition & 14 deletions ref_app/src/mcal/atmega2560/mcal_wdg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2018.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -8,12 +8,6 @@
#ifndef MCAL_WDT_2010_04_10_H_
#define MCAL_WDT_2010_04_10_H_

extern "C" void __my_startup() __attribute__((section(".startup"), used, noinline));

namespace sys { namespace idle { void task_func(); } }

namespace util { template<typename unsigned_tick_type> class timer; }

namespace mcal
{
namespace wdg
Expand All @@ -24,13 +18,6 @@

struct secure final
{
private:
friend void ::sys::idle::task_func();
friend void ::__my_startup();

template<typename unsigned_tick_type>
friend class util::timer;

static void trigger() { asm volatile("wdr"); }
};
}
Expand Down
24 changes: 4 additions & 20 deletions ref_app/src/mcal/atmega4809/mcal_gpt.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2020.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef MCAL_GPT_2011_10_20_H_
#define MCAL_GPT_2011_10_20_H_
#ifndef MCAL_GPT_2011_10_20_H
#define MCAL_GPT_2011_10_20_H

#include <chrono>
#include <cstdint>

#include <util/utility/util_noexcept.h>

// Forward declaration of the util::timer template class.
namespace util
{
template<typename unsigned_tick_type>
class timer;
}

namespace mcal
{
namespace gpt
Expand All @@ -31,15 +21,9 @@

struct secure final
{
private:
static value_type get_time_elapsed();

friend std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::now() UTIL_NOEXCEPT;

template<typename unsigned_tick_type>
friend class util::timer;
};
}
}

#endif // MCAL_GPT_2011_10_20_H_
#endif // MCAL_GPT_2011_10_20_H
15 changes: 1 addition & 14 deletions ref_app/src/mcal/atmega4809/mcal_wdg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2023.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -8,12 +8,6 @@
#ifndef MCAL_WDT_2010_04_10_H
#define MCAL_WDT_2010_04_10_H

extern "C" auto __my_startup() -> void __attribute__((section(".startup"), used, noinline));

namespace sys { namespace idle { auto task_func() -> void; } }

namespace util { template<typename unsigned_tick_type> class timer; }

namespace mcal
{
namespace wdg
Expand All @@ -24,13 +18,6 @@

struct secure final
{
private:
friend auto ::sys::idle::task_func() -> void;
friend auto ::__my_startup() -> void;

template<typename unsigned_tick_type>
friend class util::timer;

static auto trigger() -> void;
};
}
Expand Down
14 changes: 0 additions & 14 deletions ref_app/src/mcal/avr/mcal_gpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@
#ifndef MCAL_GPT_2011_10_20_H
#define MCAL_GPT_2011_10_20_H

#include <chrono>
#include <cstdint>

// Forward declaration of the util::timer template class.
namespace util
{
template<typename unsigned_tick_type>
class timer;
}

namespace mcal
{
namespace gpt
Expand All @@ -29,13 +21,7 @@

struct secure final
{
private:
static auto get_time_elapsed() -> value_type;

friend auto std::chrono::high_resolution_clock::now() noexcept -> std::chrono::high_resolution_clock::time_point;

template<typename unsigned_tick_type>
friend class util::timer;
};
}
}
Expand Down
15 changes: 0 additions & 15 deletions ref_app/src/mcal/avr/mcal_wdg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
#ifndef MCAL_WDT_2010_04_10_H
#define MCAL_WDT_2010_04_10_H

#include <util/utility/util_attribute.h>

extern "C" void __my_startup() ATTRIBUTE(section(".startup"), used, noinline);

namespace sys { namespace idle { auto task_func() -> void; } }

namespace util { template<typename unsigned_tick_type> class timer; }

namespace mcal
{
namespace wdg
Expand All @@ -26,13 +18,6 @@

struct secure final
{
private:
friend auto ::sys::idle::task_func() -> void;
friend void ::__my_startup();

template<typename unsigned_tick_type>
friend class util::timer;

static auto trigger() -> void;
};
}
Expand Down
Loading
Loading