Skip to content

Commit f336973

Browse files
committed
Initial commit chapter11_07a with lots TODO
1 parent 2b75918 commit f336973

236 files changed

Lines changed: 45284 additions & 477 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/chapter09_08/src/app/led/app_led.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ auto app::led::task_func() -> void
5454
magenta_to_red
5555
};
5656

57-
using app_led_rgb_timer_type = util::timer<std::uint16_t>;
57+
using app_led_rgb_timer_type = util::timer<std::uint32_t>;
5858

5959
static app_led_rgb_timer_type app_led_rgb_timer { app_led_rgb_timer_type::milliseconds(UINT8_C(30)) };
6060

examples/chapter09_08a/src/app/led/app_led.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ auto app::led::task_func() -> void
3939
// Toggle the monochrome user LED at 1/2 Hz.
4040
mcal::led::led0().toggle();
4141

42-
// Start the next timer interval for the monochrome user LED.
42+
// Start the next 1s timer interval for the monochrome user LED.
4343
app_led_monochrome_timer.start_interval(app_led_monochrome_timer_type::seconds(1U));
4444
}
4545

@@ -54,7 +54,7 @@ auto app::led::task_func() -> void
5454
magenta_to_red
5555
};
5656

57-
using app_led_rgb_timer_type = util::timer<std::uint16_t>;
57+
using app_led_rgb_timer_type = util::timer<std::uint32_t>;
5858

5959
static app_led_rgb_timer_type app_led_rgb_timer { app_led_rgb_timer_type::milliseconds(UINT8_C(30)) };
6060

examples/chapter09_08b/src/app/led/app_led.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ auto app::led::task_func() -> void
5454
magenta_to_red
5555
};
5656

57-
using app_led_rgb_timer_type = util::timer<std::uint16_t>;
57+
using app_led_rgb_timer_type = util::timer<std::uint32_t>;
5858

5959
static app_led_rgb_timer_type app_led_rgb_timer { app_led_rgb_timer_type::milliseconds(UINT8_C(30)) };
6060

examples/chapter11_07/src/app/led/app_led.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void app_led_task_toggle_led0(void*)
7272
mcal::led::led0().toggle();
7373
}
7474

75-
// This application task is programmed to yield every 125ms.
75+
// This application task is programmed to cyclically yield for 125ms.
7676

7777
OS_TASK_WAIT_YIELD(TickType_t { UINT8_C(125) });
7878
}

examples/chapter11_07/src/sys/start/sys_start.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <os/os_task.h>
1111

1212
#if defined(__AVR__)
13-
extern "C" int main(void) __attribute__((used, noinline));
13+
auto main(void) -> int __attribute__((used, noinline));
1414
#endif
1515

16-
extern "C" int main(void)
16+
auto main(void) -> int
1717
{
1818
// Initialize the microcontroller abstraction layer.
1919
mcal::init();

examples/chapter11_07/target/micros/avr/make/avr_flags.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ------------------------------------------------------------------------------
1111

1212
ifneq ($(MAKE),make)
13-
GCC_VERSION = 14.2.0
13+
GCC_VERSION = 15.1.0
1414
endif
1515
GCC_TARGET = avr
1616
GCC_PREFIX = avr

examples/chapter11_07/target/micros/avr/startup/crt0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace crt
2020

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

23-
extern "C" int main(void) __attribute__((used, noinline));
23+
extern auto main(void) -> int __attribute__((used, noinline));
2424

2525
void __my_startup()
2626
{
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36717.8 d17.14
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "target", "target.vcxproj", "{30CE370B-40F3-4BCD-8986-64AAFF8971BD}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chapter11_07a", "chapter11_07a.vcxproj", "{C8B59726-9319-45C3-8F11-F9F388FB6A2C}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Release|x64 = Release|x64
14+
target avr|x64 = target avr|x64
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{30CE370B-40F3-4BCD-8986-64AAFF8971BD}.Debug|x64.ActiveCfg = target avr|x64
18+
{30CE370B-40F3-4BCD-8986-64AAFF8971BD}.Release|x64.ActiveCfg = target avr|x64
19+
{30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target avr|x64.ActiveCfg = target avr|x64
20+
{30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target avr|x64.Build.0 = target avr|x64
21+
{C8B59726-9319-45C3-8F11-F9F388FB6A2C}.Debug|x64.ActiveCfg = Debug|x64
22+
{C8B59726-9319-45C3-8F11-F9F388FB6A2C}.Debug|x64.Build.0 = Debug|x64
23+
{C8B59726-9319-45C3-8F11-F9F388FB6A2C}.Release|x64.ActiveCfg = Release|x64
24+
{C8B59726-9319-45C3-8F11-F9F388FB6A2C}.Release|x64.Build.0 = Release|x64
25+
{C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target avr|x64.ActiveCfg = Release|x64
26+
EndGlobalSection
27+
GlobalSection(SolutionProperties) = preSolution
28+
HideSolutionNode = FALSE
29+
EndGlobalSection
30+
GlobalSection(ExtensibilityGlobals) = postSolution
31+
SolutionGuid = {8CFDC2A7-A7FC-4873-938C-36790C50E02D}
32+
EndGlobalSection
33+
EndGlobal

examples/chapter11_07a/chapter11_07a.vcxproj

Lines changed: 563 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)