Mark3 Realtime Kernel
portcfg.h
Go to the documentation of this file.
1 /*===========================================================================
2  _____ _____ _____ _____
3  ___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
4 | \ / | || \ || | || |/ / ||___ |
5 | \/ | || \ || \ || \ ||___ |
6 |__/\__/|__|_||__|\__\ __||__|\__\ __||__|\__\ __||______|
7  |_____| |_____| |_____| |_____|
8 
9 --[Mark3 Realtime Platform]--------------------------------------------------
10 
11 Copyright (c) 2012 - 2019 m0slevin, all rights reserved.
12 See license.txt for more information
13 ===========================================================================*/
24 #pragma once
25 
35 #define KERNEL_NUM_PRIORITIES (16)
36 
37 #define KERNEL_TIMERS_THREAD_PRIORITY (KERNEL_NUM_PRIORITIES - 1)
38 
39 #define THREAD_QUANTUM_DEFAULT (4)
40 
41 #define KERNEL_STACK_GUARD_DEFAULT (32) // words
42 
47 #define PORT_COROUTINE_PRIORITIES (8)
48 
54 #ifndef AVR
55 #define AVR (1)
56 #endif
57 
62 #define K_WORD uint8_t
63 #define K_ADDR uint16_t
64 #define K_INT int32_t
65 
73 #define PORT_PRIO_TYPE uint8_t
74 #define PORT_PRIO_MAP_WORD_SIZE (1)
75 
76 
80 #if !defined(PORT_SYSTEM_FREQ)
81 #define PORT_SYSTEM_FREQ ((uint32_t)16000000)
82 #endif
83 
91 #define PORT_TIMER_FREQ ((uint32_t)(PORT_SYSTEM_FREQ / 1000))
92 
93 
96 #define PORT_KERNEL_DEFAULT_STACK_SIZE ((K_ADDR)384)
97 
101 #define PORT_KERNEL_TIMERS_THREAD_STACK ((K_ADDR)384)
102 
106 #define PORT_TIMER_COUNT_TYPE uint16_t
107 
108 
112 #define PORT_MIN_TIMER_TICKS (0)
113 
119 #define PORT_OVERLOAD_NEW (1)
120 
124 #define PORT_STACK_GROWS_DOWN (1)
125 
131 #define PORT_USE_HW_CLZ (1)