blob: e219da55168cc2f715bb6297febd57fd45428b7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* Copyright 2022 Daniel Friesel
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "arch.h"
#ifdef __acweaving
#define __delay_cycles(x)
#endif
void Arch::setup(void)
{
}
#ifdef CONFIG_wakeup
extern void wakeup();
#endif
#if defined(CONFIG_loop)
extern void loop();
volatile char run_loop = 0;
#endif
volatile bool sleep_done = false;
void Arch::sleep_ms(unsigned int const ms)
{
}
void Arch::delay_us(unsigned int const us)
{
}
void Arch::delay_ms(unsigned int const ms)
{
}
void Arch::idle_loop(void)
{
while (1) {
#if defined(CONFIG_loop)
if (run_loop) {
loop();
run_loop = 0;
}
#endif
#ifdef CONFIG_wakeup
wakeup();
#endif
}
}
void Arch::idle(void)
{
#ifdef CONFIG_wakeup
wakeup();
#endif
}
Arch arch;
|