diff --git a/examples/chapter09_08a/build.sh b/examples/chapter09_08a/build.sh
index 3cfd4fef6..b280d4950 100755
--- a/examples/chapter09_08a/build.sh
+++ b/examples/chapter09_08a/build.sh
@@ -26,7 +26,7 @@
# ./build.sh /usr/local/real-time-cpp/examples/chapter09_08a/tools/Util/MinGW/msys/1.0/local/gcc-9.2.0-avr/bin avr
# Usage example B (from Win* shell such as in Git for Win*)
-# cd C:/Users/User/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter09_08a
+# cd C:/Users/ckorm/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter09_08a
# ./build.sh C:/Users/User/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter09_08a/tools/Util/MinGW/msys/1.0/local/gcc-9.2.0-avr/bin avr
if [[ $# == 0 ]]; then ## $# is the number of arguments
diff --git a/examples/chapter12_04/build.bat b/examples/chapter12_04/build.bat
index 4bbd071b3..38596f52f 100644
--- a/examples/chapter12_04/build.bat
+++ b/examples/chapter12_04/build.bat
@@ -1,6 +1,6 @@
@rem
-@rem Copyright Christopher Kormanyos 2014 - 2021.
+@rem Copyright Christopher Kormanyos 2014 - 2025.
@rem Distributed under the Boost Software License,
@rem Version 1.0. (See accompanying file LICENSE_1_0.txt
@rem or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -12,22 +12,22 @@
@rem build.bat directory_of_gcc_bin prefix_of_avr_gcc
@rem Usage example A,
-@rem cd "C:\Users\User\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
+@rem cd "C:\Users\ckorm\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
@rem build.bat "C:\Users\User\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04\tools\Util\msys64\usr\local\gcc-11.2.0-avr\bin" avr
@rem Usage example A1 (use a relative tool path),
-@rem cd "C:\Users\User\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
-@rem build.bat ".\tools\Util\msys64\usr\local\gcc-11.2.0-avr\bin" avr
+@rem cd "C:\Users\ckorm\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
+@rem build.bat ".\tools\Util\msys64\usr\local\gcc-15.1.0-avr\bin" avr
@rem Usage example B,
-@rem cd "C:\Users\User\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
-@rem build.bat "C:\Program Files (x86)\gcc-11.2.0-avr\bin" avr
+@rem cd "C:\Users\ckorm\Documents\Ks\uC_Software\Boards\real-time-cpp\examples\chapter12_04"
+@rem build.bat "C:\Program Files (x86)\gcc-15.1.0-avr\bin" avr
@set TOOL_PATH=%1
@set TOOL_PREFIX=%2
-@set CFLAGS=-Wall -Wextra -pedantic -mmcu=atmega328p -fsigned-char -O2 -fno-exceptions -gdwarf-2 -ffunction-sections -fdata-sections
+@set CFLAGS=-Wall -Wextra -Wpedantic -mmcu=atmega328p -fsigned-char -O2 -fno-exceptions -gdwarf-2 -ffunction-sections -fdata-sections
@set CPPFLAGS=-std=c++14 -fno-rtti -fstrict-enums -fno-use-cxa-atexit -fno-use-cxa-get-exception-ptr -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs
@set CINCLUDES=-Isrc/util/STL_C++XX_stdfloat -Isrc/util/STL -Isrc/mcal/avr -Isrc
@@ -51,9 +51,6 @@
@echo.Compile : cmath_impl_gamma.cpp to bin/cmath_impl_gamma.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/util/STL/impl/cmath_impl_gamma.cpp -o bin/cmath_impl_gamma.o
-@echo.Compile : avr_float_limits.cpp to bin/avr_float_limits.o
-@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/util/STL/impl/avr/avr_float_limits.cpp -o bin/avr_float_limits.o
-
@echo.Compile : mcal.cpp to bin/mcal.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/mcal.cpp -o bin/mcal.o
@@ -63,6 +60,9 @@
@echo.Compile : mcal_cpu.cpp to bin/mcal_cpu.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_cpu.cpp -o bin/mcal_cpu.o
+@echo.Compile : mcal_eep.cpp to bin/mcal_eep.o
+@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_eep.cpp -o bin/mcal_eep.o
+
@echo.Compile : mcal_gpt.cpp to bin/mcal_gpt.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_gpt.cpp -o bin/mcal_gpt.o
@@ -78,15 +78,18 @@
@echo.Compile : mcal_port.cpp to bin/mcal_port.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_port.cpp -o bin/mcal_port.o
+@echo.Compile : mcal_pwm.cpp to bin/mcal_pwm.o
+@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_pwm.cpp -o bin/mcal_pwm.o
+
+@echo.Compile : mcal_spi.cpp to bin/mcal_spi.o
+@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_spi.cpp -o bin/mcal_spi.o
+
@echo.Compile : mcal_wdg.cpp to bin/mcal_wdg.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/mcal/avr/mcal_wdg.cpp -o bin/mcal_wdg.o
@echo.Compile : os.cpp to bin/os.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/os/os.cpp -o bin/os.o
-@echo.Compile : os.cpp to bin/os_task_control_block.o
-@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/os/os_task_control_block.cpp -o bin/os_task_control_block.o
-
@echo.Compile : sys_idle.cpp to bin/sys_idle.o
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c src/sys/idle/sys_idle.cpp -o bin/sys_idle.o
@@ -109,7 +112,7 @@
@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x c++ %CFLAGS% %CPPFLAGS% %CINCLUDES% -c target/micros/avr/startup/int_vect.cpp -o bin/int_vect.o
@echo.Link : objects to bin/chapter12_04.elf
-@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x none -mrelax -nostartfiles %CFLAGS% %CPPFLAGS% %CINCLUDES% -Wl,--gc-sections -Wl,-Ttarget/micros/avr/make/avr.ld,-Map,bin/chapter12_04.map bin/app_benchmark.o bin/app_led.o bin/cmath_impl_gamma.o bin/avr_float_limits.o bin/mcal.o bin/mcal_gcc_cxx_completion.o bin/mcal_cpu.o bin/mcal_gpt.o bin/mcal_irq.o bin/mcal_led.o bin/mcal_osc.o bin/mcal_port.o bin/mcal_wdg.o bin/os.o bin/os_task_control_block.o bin/sys_idle.o bin/sys_mon.o bin/sys_start.o bin/crt0.o bin/crt0_init_ram.o bin/crt1.o bin/int_vect.o -o bin/chapter12_04.elf
+@%TOOL_PATH%\%TOOL_PREFIX%-g++ -x none -mrelax -nostartfiles %CFLAGS% %CPPFLAGS% %CINCLUDES% -Wl,--gc-sections -Wl,-Ttarget/micros/avr/make/avr.ld,-Map,bin/chapter12_04.map bin/app_benchmark.o bin/app_led.o bin/cmath_impl_gamma.o bin/mcal.o bin/mcal_gcc_cxx_completion.o bin/mcal_cpu.o bin/mcal_eep.o bin/mcal_gpt.o bin/mcal_irq.o bin/mcal_led.o bin/mcal_osc.o bin/mcal_port.o bin/mcal_pwm.o bin/mcal_spi.o bin/mcal_wdg.o bin/os.o bin/sys_idle.o bin/sys_mon.o bin/sys_start.o bin/crt0.o bin/crt0_init_ram.o bin/crt1.o bin/int_vect.o -o bin/chapter12_04.elf
@echo.
@echo.Extract : executable hex file : from bin/chapter12_04.elf
@@ -127,8 +130,7 @@
@echo.Extract : demangled names : from bin/chapter12_04.elf
@%TOOL_PATH%\%TOOL_PREFIX%-nm --numeric-sort --print-size bin/chapter12_04.elf | %TOOL_PATH%\%TOOL_PREFIX%-c++filt > bin\chapter12_04_cppfilt.txt
-dir .\bin\chapter12_04.elf
-dir .\bin\chapter12_04.hex
+dir .\bin\chapter12_04.elf .\bin\chapter12_04.hex
if not exist .\bin\chapter12_04.elf exit 1
if not exist .\bin\chapter12_04.hex exit 1
diff --git a/examples/chapter12_04/build.sh b/examples/chapter12_04/build.sh
index ef9bf9e9a..80b4d497f 100755
--- a/examples/chapter12_04/build.sh
+++ b/examples/chapter12_04/build.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright Christopher Kormanyos 2014 - 2020.
+# Copyright Christopher Kormanyos 2014 - 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)
@@ -26,8 +26,8 @@
# ./build.sh /usr/local/real-time-cpp/examples/chapter12_04/tools/Util/MinGW/msys/1.0/local/gcc-9.2.0-avr/bin avr
# Usage example B (from Win* shell such as in Git for Win*)
-# cd C:/Users/User/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter12_04
-# ./build.sh C:/Users/User/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter12_04/tools/Util/MinGW/msys/1.0/local/gcc-9.2.0-avr/bin avr
+# cd C:/Users/ckorm/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter12_04
+# ./build.sh C:/Users/User/Documents/Ks/uC_Software/Boards/real-time-cpp/examples/chapter12_04/tools/Util/MinGW/msys/1.0/local/gcc-15.1.0-avr/bin avr
if [[ $# == 0 ]]; then ## $# is the number of arguments
if [[ -n "$(which avr-g++)" ]]; then ## -n tests if string is not empty
@@ -70,9 +70,6 @@ $TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/app/led/a
echo "Compile : cmath_impl_gamma.cpp to bin/cmath_impl_gamma.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/util/STL/impl/cmath_impl_gamma.cpp -o bin/cmath_impl_gamma.o
-echo "Compile : avr_float_limits.cpp to bin/avr_float_limits.o"
-$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/util/STL/impl/avr/avr_float_limits.cpp -o bin/avr_float_limits.o
-
echo "Compile : mcal.cpp to bin/mcal.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/mcal.cpp -o bin/mcal.o
@@ -82,6 +79,9 @@ $TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/mcal
echo "Compile : mcal_cpu.cpp to bin/mcal_cpu.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_cpu.cpp -o bin/mcal_cpu.o
+echo "Compile : mcal_eep.cpp to bin/mcal_eep.o"
+$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_eep.cpp -o bin/mcal_eep.o
+
echo "Compile : mcal_gpt.cpp to bin/mcal_gpt.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_gpt.cpp -o bin/mcal_gpt.o
@@ -100,12 +100,15 @@ $TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/
echo "Compile : mcal_wdg.cpp to bin/mcal_wdg.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_wdg.cpp -o bin/mcal_wdg.o
+echo "Compile : mcal_pwm.cpp to bin/mcal_pwm.o"
+$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_pwm.cpp -o bin/mcal_pwm.o
+
+echo "Compile : mcal_spi.cpp to bin/mcal_spi.o"
+$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/mcal/avr/mcal_spi.cpp -o bin/mcal_spi.o
+
echo "Compile : os.cpp to bin/os.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/os/os.cpp -o bin/os.o
-echo "Compile : os.cpp to bin/os_task_control_block.o".
-$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/os/os_task_control_block.cpp -o bin/os_task_control_block.o
-
echo "Compile : sys_idle.cpp to bin/sys_idle.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c src/sys/idle/sys_idle.cpp -o bin/sys_idle.o
@@ -128,7 +131,7 @@ echo "Compile : int_vect.cpp to bin/int_vect.o"
$TOOL_PATH/$TOOL_PREFIX-g++ -x c++ $CFLAGS $CPPFLAGS $CINCLUDES -c target/micros/avr/startup/int_vect.cpp -o bin/int_vect.o
echo "Link : objects to bin/chapter12_04.elf"
-$TOOL_PATH/$TOOL_PREFIX-g++ -x none -mrelax -nostartfiles $CFLAGS $CPPFLAGS $CINCLUDES -Wl,--gc-sections -Wl,-Ttarget/micros/avr/make/avr.ld,-Map,bin/chapter12_04.map bin/app_benchmark.o bin/app_led.o bin/cmath_impl_gamma.o bin/avr_float_limits.o bin/mcal.o bin/mcal_gcc_cxx_completion.o bin/mcal_cpu.o bin/mcal_gpt.o bin/mcal_irq.o bin/mcal_led.o bin/mcal_osc.o bin/mcal_port.o bin/mcal_wdg.o bin/os.o bin/os_task_control_block.o bin/sys_idle.o bin/sys_mon.o bin/sys_start.o bin/crt0.o bin/crt0_init_ram.o bin/crt1.o bin/int_vect.o -o bin/chapter12_04.elf
+$TOOL_PATH/$TOOL_PREFIX-g++ -x none -mrelax -nostartfiles $CFLAGS $CPPFLAGS $CINCLUDES -Wl,--gc-sections -Wl,-Ttarget/micros/avr/make/avr.ld,-Map,bin/chapter12_04.map bin/app_benchmark.o bin/app_led.o bin/cmath_impl_gamma.o bin/mcal.o bin/mcal_gcc_cxx_completion.o bin/mcal_cpu.o bin/mcal_eep.o bin/mcal_gpt.o bin/mcal_irq.o bin/mcal_led.o bin/mcal_osc.o bin/mcal_port.o bin/mcal_pwm.o bin/mcal_spi.o bin/mcal_wdg.o bin/os.o bin/sys_idle.o bin/sys_mon.o bin/sys_start.o bin/crt0.o bin/crt0_init_ram.o bin/crt1.o bin/int_vect.o -o bin/chapter12_04.elf
echo
echo "Extract : executable hex file : from bin/chapter12_04.elf"
diff --git a/examples/chapter12_04/chapter12_04.cppproj b/examples/chapter12_04/chapter12_04.cppproj
index a43857226..e7f78bcb0 100644
--- a/examples/chapter12_04/chapter12_04.cppproj
+++ b/examples/chapter12_04/chapter12_04.cppproj
@@ -42,15 +42,15 @@
2
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
0
@@ -199,6 +199,12 @@
compile
+
+ compile
+
+
+ compile
+
compile
@@ -232,9 +238,39 @@
compile
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
+
+ compile
+
compile
+
+ compile
+
+
+ compile
+
+
+ compile
+
compile
@@ -286,9 +322,6 @@
compile
-
- compile
-
compile
@@ -319,15 +352,18 @@
compile
-
+
compile
-
+
compile
compile
+
+ compile
+
compile
@@ -417,12 +453,30 @@
compile
+
+ compile
+
+
+ compile
+
+
+ compile
+
compile
+
+ compile
+
compile
+
+ compile
+
+
+ compile
+
compile
@@ -444,6 +498,9 @@
compile
+
+ compile
+
compile
@@ -465,9 +522,21 @@
compile
+
+ compile
+
compile
+
+ compile
+
+
+ compile
+
+
+ compile
+
compile
@@ -483,6 +552,9 @@
compile
+
+ compile
+
compile
diff --git a/examples/chapter12_04/chapter12_04.vcxproj b/examples/chapter12_04/chapter12_04.vcxproj
index a9bfff67e..4dc58b07d 100644
--- a/examples/chapter12_04/chapter12_04.vcxproj
+++ b/examples/chapter12_04/chapter12_04.vcxproj
@@ -178,6 +178,10 @@
true
true
+
+ true
+ true
+
true
true
@@ -198,6 +202,14 @@
true
true
+
+ true
+ true
+
+
+ true
+ true
+
true
true
@@ -207,13 +219,18 @@
true
true
+
+
+
+
+
+
-
@@ -240,6 +257,10 @@
true
true
+
+ true
+ true
+
true
true
@@ -264,10 +285,22 @@
true
true
+
+ true
+ true
+
true
true
+
+ true
+ true
+
+
+ true
+ true
+
true
true
@@ -276,14 +309,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -291,6 +337,12 @@
+
+
+
+
+
+
diff --git a/examples/chapter12_04/chapter12_04.vcxproj.filters b/examples/chapter12_04/chapter12_04.vcxproj.filters
index db210cf22..9c37c7f4d 100644
--- a/examples/chapter12_04/chapter12_04.vcxproj.filters
+++ b/examples/chapter12_04/chapter12_04.vcxproj.filters
@@ -73,6 +73,15 @@
{df5781cb-9e5b-4f3c-8e93-6f82e1d6c93f}
+
+ {51e8332d-263d-4033-9812-c48cb215117f}
+
+
+ {2e764459-477f-497d-a7f3-b436e975e679}
+
+
+ {9df4229f-ee8f-4a42-96c3-868db9f071a2}
+
@@ -84,9 +93,6 @@
src\os
-
- src\os
-
src\sys\idle
@@ -96,9 +102,27 @@
src\mcal
+
+ src\util\STL\impl\avr
+
+
+ src\util\STD_LIBC
+
+
+ src\app\led
+
+
+ src\app\benchmark
+
+
+ src\util\STL\impl
+
src\mcal\avr
+
+ src\mcal\avr
+
src\mcal\avr
@@ -114,37 +138,46 @@
src\mcal\avr
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
src\mcal\avr
-
+
src\mcal\win32
-
+
src\mcal\win32
-
+
src\mcal\win32
-
+
src\mcal\win32
-
- src\util\STL\impl\avr
+
+ src\mcal\win32
-
- src\util\STD_LIBC
+
+ src\mcal\win32
-
- src\app\led
+
+ src\mcal\win32
-
- src\app\benchmark
+
+ src\mcal\win32
-
- src\util\STL\impl
+
+ src\mcal\win32
-
+
+ src\mcal\win32
+
+
src\mcal\win32
@@ -203,48 +236,6 @@
src\os
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\avr
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
src\util\utility
@@ -284,15 +275,6 @@
src\util\memory
-
- src\mcal\avr
-
-
- src\mcal\win32
-
-
- src\mcal\win32
-
src\math\functions
@@ -326,15 +308,135 @@
src\mcal_memory
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal_led
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
src\mcal\avr
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\avr
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
src\mcal\win32
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
src\mcal\win32
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal\win32
+
+
+ src\mcal_pwm
+
+
+ src\mcal_pwm
+
+
+ src\mcal_pwm
+
+
+ src\mcal_pwm
+
+
+ src\mcal_spi
+
+
+ src\mcal_spi
+
diff --git a/examples/chapter12_04/src/app/led/app_led.cpp b/examples/chapter12_04/src/app/led/app_led.cpp
index f7bf6e7ff..d6fe2e326 100644
--- a/examples/chapter12_04/src/app/led/app_led.cpp
+++ b/examples/chapter12_04/src/app/led/app_led.cpp
@@ -1,6 +1,5 @@
-
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2007 - 2016.
+// 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)
@@ -9,33 +8,46 @@
#include
#include
-namespace app
+namespace app { namespace led {
+
+auto task_init() -> void;
+auto task_func() -> void;
+
+} // namespace led
+} // namespace app
+
+namespace local
{
- namespace led
- {
- void task_init();
- void task_func();
- }
-}
+ using app_led_timer_type = util::timer;
+
+ using app_led_tick_type = typename app_led_timer_type::tick_type;
+
+ auto app_led_timer() noexcept -> app_led_timer_type&;
-namespace
+ constexpr app_led_tick_type app_led_delay { app_led_timer_type::seconds(app_led_tick_type{ UINT8_C(1) }) };
+} // namespace local
+
+auto local::app_led_timer() noexcept -> app_led_timer_type&
{
- typedef util::timer timer_type;
+ static app_led_timer_type local_app_led_timer
+ {
+ local::app_led_delay
+ };
- timer_type app_led_timer(timer_type::seconds(1U));
+ return local_app_led_timer;
}
-void app::led::task_init()
+auto app::led::task_init() -> void
{
- mcal::led::led0.toggle();
+ mcal::led::led0().toggle();
}
-void app::led::task_func()
+auto app::led::task_func() -> void
{
- if(app_led_timer.timeout())
+ if(local::app_led_timer().timeout())
{
- app_led_timer.start_interval(timer_type::seconds(1U));
+ local::app_led_timer().start_interval(local::app_led_delay);
- mcal::led::led0.toggle();
+ mcal::led::led0().toggle();
}
}
diff --git a/examples/chapter12_04/src/math/constants/constants.h b/examples/chapter12_04/src/math/constants/constants.h
index 9ff6836b2..f0d473c73 100644
--- a/examples/chapter12_04/src/math/constants/constants.h
+++ b/examples/chapter12_04/src/math/constants/constants.h
@@ -1,14 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2012 - 2018.
+// Copyright Christopher Kormanyos 2012 - 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 CONSTANTS_2012_01_09_H_
- #define CONSTANTS_2012_01_09_H_
-
- #include
+#ifndef CONSTANTS_2012_01_09_H
+ #define CONSTANTS_2012_01_09_H
namespace math
{
@@ -17,69 +15,69 @@
template
float_type root_two()
{
- return static_cast(FLOATMAX_C(1.4142135623730950488016887242096980785697));
+ return static_cast(1.4142135623730950488016887242096980785697L);
}
template
float_type pi()
{
- return static_cast(FLOATMAX_C(3.1415926535897932384626433832795028841972));
+ return static_cast(3.1415926535897932384626433832795028841972L);
}
template
float_type half_pi()
{
- return static_cast(FLOATMAX_C(1.5707963267948966192313216916397514420986));
+ return static_cast(1.5707963267948966192313216916397514420986L);
}
template
float_type root_pi()
{
- return static_cast(FLOATMAX_C(1.7724538509055160272981674833411451827975));
+ return static_cast(1.7724538509055160272981674833411451827975L);
}
template
float_type ln_two()
{
- return static_cast(FLOATMAX_C(0.6931471805599453094172321214581765680755));
+ return static_cast(0.6931471805599453094172321214581765680755L);
}
template
float_type e()
{
- return static_cast(FLOATMAX_C(2.7182818284590452353602874713526624977572));
+ return static_cast(2.7182818284590452353602874713526624977572L);
}
template
float_type euler()
{
- return static_cast(FLOATMAX_C(0.5772156649015328606065120900824024310422));
+ return static_cast(0.5772156649015328606065120900824024310422L);
}
template
float_type zeta_three()
{
- return static_cast(FLOATMAX_C(1.2020569031595942853997381615114499907650));
+ return static_cast(1.2020569031595942853997381615114499907650L);
}
template
float_type catalan()
{
- return static_cast(FLOATMAX_C(0.91596559417721901505460351493238411077415));
+ return static_cast(0.91596559417721901505460351493238411077415L);
}
template
float_type glaisher()
{
- return static_cast(FLOATMAX_C(1.2824271291006226368753425688697917277677));
+ return static_cast(1.2824271291006226368753425688697917277677L);
}
template
float_type khinchin()
{
- return static_cast(FLOATMAX_C(2.6854520010653064453097148354817956938204));
+ return static_cast(2.6854520010653064453097148354817956938204L);
}
}
}
-#endif // CONSTANTS_2012_01_09_H_
+#endif // CONSTANTS_2012_01_09_H
diff --git a/examples/chapter12_04/src/math/functions/math_functions_bessel.h b/examples/chapter12_04/src/math/functions/math_functions_bessel.h
index b18131966..20bf91a1c 100644
--- a/examples/chapter12_04/src/math/functions/math_functions_bessel.h
+++ b/examples/chapter12_04/src/math/functions/math_functions_bessel.h
@@ -1,16 +1,14 @@
-
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2014 - 2018.
+// Copyright Christopher Kormanyos 2014 - 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 MATH_FUNCTIONS_BESSEL_2014_04_30_H_
- #define MATH_FUNCTIONS_BESSEL_2014_04_30_H_
+#ifndef MATH_FUNCTIONS_BESSEL_2014_04_30_H
+ #define MATH_FUNCTIONS_BESSEL_2014_04_30_H
#include
- #include
#include