tinykernel
Toggle main menu visibility
読み取り中…
検索中…
一致する文字列を見つけられません
port_m33.h
[詳解]
1
#pragma once
2
3
#include <stdint.h>
4
5
#include "hardware/structs/scb.h"
6
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
11
// One-time port setup: FPU context policy + SysTick + PendSV priority. Called from tk::start().
12
void
tk_port_init
(uint32_t ticks_per_sec);
13
14
// Build a task's initial stack frame. Returns the SP to start with.
15
uintptr_t
tk_port_make_frame
(uint8_t* base, uint32_t size_bytes,
void
* entry_fn,
void
* arg);
16
17
// Jump into the first task (r0 = SP from tk_port_make_frame). Never returns.
18
void
tk_port_start
(uintptr_t sp);
19
20
// Trigger a PendSV exception to initiate context switching.
21
static
inline
void
tk_port_trigger_pendsv(
void
) {
22
scb_hw->icsr = 1u << 28;
// SCB_ICSR_PENDSVSET_Msk
23
__asm__
volatile
(
"isb"
:::
"memory"
);
24
}
25
26
#ifdef __cplusplus
27
}
28
#endif
tk_port_init
void tk_port_init(uint32_t ticks_per_sec)
定義
port_m33.c:14
tk_port_make_frame
uintptr_t tk_port_make_frame(uint8_t *base, uint32_t size_bytes, void *entry_fn, void *arg)
tk_port_start
void tk_port_start(uintptr_t sp)
tinykernel
src
port
m33
port_m33.h
構築:
1.18.0