Cortex-M3 port API for AKOS.
More...
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
Cortex-M3 port API for AKOS.
- Author
- Snoopy3921 - AK Foundation
- Date
- 2026/05/08
Definition in file port.h.
◆ port_disable_interrupts
| #define port_disable_interrupts { __asm inline("CPSID I \n"); } |
◆ port_enable_interrupts
| #define port_enable_interrupts { __asm inline("CPSIE I \n"); } |
◆ port_PendSVHandler
| #define port_PendSVHandler |
( |
| void | ) |
|
Value:
Definition at line 55 of file port.h.
◆ port_setup_PendSV
| #define port_setup_PendSV |
( |
| ) |
|
Value:(*(uint32_t volatile *)0xE000ED20 |= (0xFFU << 16))
Definition at line 51 of file port.h.
◆ port_SVCHandler
| #define port_SVCHandler |
( |
| void | ) |
|
Value:
Definition at line 54 of file port.h.
◆ port_SysTickHandler
| #define port_SysTickHandler SysTick_Handler |
◆ port_trigger_PendSV
| #define port_trigger_PendSV |
( |
| ) |
|
Value:(*(uint32_t volatile *)0xE000ED04 = (1U << 28))
Definition at line 52 of file port.h.
◆ akos_port_start_first_task()
| void akos_port_start_first_task |
( |
void | | ) |
|
Start the first thread by restoring the initial exception context.
Definition at line 42 of file port.c.
◆ akos_port_systick_init_freq()
| void akos_port_systick_init_freq |
( |
uint32_t | cpu_freq | ) |
|
Configure SysTick to generate 1ms OS ticks.
- Parameters
-
| cpu_freq | Core clock frequency in Hz. |
Configure SysTick to generate 1ms OS ticks.
- Parameters
-
| cpu_freq | Core clock frequency in Hz. |
Definition at line 25 of file port.c.
◆ akos_port_task_stack_init()
| uint32_t * akos_port_task_stack_init |
( |
uint32_t * | p_stack, |
|
|
size_t | stack_size, |
|
|
void(* | pf_task )(void *), |
|
|
void * | p_arg ) |
Build the initial Cortex-M thread stack frame.
- Parameters
-
| p_stack | Base stack buffer. |
| stack_size | Stack size in 32-bit words. |
| pf_task | Thread entry function. |
| p_arg | Thread argument. |
- Returns
- Initial top-of-stack pointer.
- Parameters
-
| p_stack | Base stack buffer. |
| stack_size | Stack size in 32-bit words. |
| pf_task | Thread entry function. |
| p_arg | Task argument. |
- Returns
- Initial top-of-stack pointer.
Definition at line 67 of file port.c.