Skip to content

Commit c467331

Browse files
committed
Repair syntax multi-channel gpt
1 parent bab7911 commit c467331

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,10 @@ extern "C"
2626
extern auto _start() -> void;
2727
}
2828

29-
extern volatile bool core1_toggle_flag;
30-
3129
namespace local
3230
{
33-
static auto main_core1_worker(mcal::led::led_base& my_led) -> void;
34-
} // namespace local
31+
auto main_worker_core1(mcal::led::led_base& my_led) -> void;
3532

36-
namespace util
37-
{
3833
template<typename unsigned_tick_type>
3934
struct timer_core1_backend
4035
{
@@ -45,7 +40,7 @@ namespace util
4540
return static_cast<tick_type>(mcal::gpt::secure::get_time_elapsed_core1());
4641
}
4742
};
48-
} // namespace util
43+
} // namespace local
4944

5045
extern "C"
5146
auto Mcu_StartCore1() -> void
@@ -146,8 +141,8 @@ auto main_c1() -> void
146141
mcal::irq::init(nullptr);
147142

148143
// Perpetually toggle the LED with a flag-based trigger
149-
// in the for(ever)-loop of main_core1_worker().
150-
local::main_core1_worker(mcal::led::led1());
144+
// in the for(ever)-loop of main_worker_core1().
145+
local::main_worker_core1(mcal::led::led1());
151146
}
152147

153148
auto mcal::cpu::post_init() noexcept -> void
@@ -171,17 +166,13 @@ auto mcal::cpu::init() -> void
171166
mcal::osc::init(nullptr);
172167
}
173168

174-
namespace local
175-
{
176-
}
177-
178-
static auto local::main_core1_worker(mcal::led::led_base& my_led) -> void
169+
auto local::main_worker_core1(mcal::led::led_base& my_led) -> void
179170
{
180171
my_led.toggle();
181172

182173
for(;;)
183174
{
184-
using local_timer_type = util::timer<std::uint32_t, util::timer_core1_backend<std::uint32_t>>;
175+
using local_timer_type = util::timer<std::uint32_t, local::timer_core1_backend<std::uint32_t>>;
185176
using local_tick_type = typename local_timer_type::tick_type;
186177

187178
local_timer_type::blocking_delay(local_timer_type::seconds(local_tick_type { UINT8_C(1) }));

ref_app/target/micros/am6254_soc/Code/Appli/Core/a53/main_cores.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717

1818
namespace local
1919
{
20-
static auto main_core_worker(mcal::led::led_base& my_led) -> void;
20+
auto main_worker_core_x(mcal::led::led_base& my_led) -> void;
2121
}
2222

2323
extern "C" auto main_core1(void) -> void;
2424
extern "C" auto main_core2(void) -> void;
2525
extern "C" auto main_core3(void) -> void;
2626
extern "C" auto main_core0_init(void) -> void;
2727

28-
extern "C" auto main_core1(void) -> void { local::main_core_worker(mcal::led::led1()); }
29-
extern "C" auto main_core2(void) -> void { local::main_core_worker(mcal::led::led2()); }
30-
extern "C" auto main_core3(void) -> void { local::main_core_worker(mcal::led::led3()); }
28+
extern "C" auto main_core1(void) -> void { local::main_worker_core_x(mcal::led::led1()); }
29+
extern "C" auto main_core2(void) -> void { local::main_worker_core_x(mcal::led::led2()); }
30+
extern "C" auto main_core3(void) -> void { local::main_worker_core_x(mcal::led::led3()); }
3131

3232
extern "C" auto main_core0_init(void) -> void
3333
{
@@ -36,7 +36,7 @@ extern "C" auto main_core0_init(void) -> void
3636
mcal::osc::init (nullptr);
3737
}
3838

39-
static auto local::main_core_worker(mcal::led::led_base& my_led) -> void
39+
auto local::main_worker_core_x(mcal::led::led_base& my_led) -> void
4040
{
4141
my_led.toggle();
4242

0 commit comments

Comments
 (0)