Line |
Branch |
Exec |
Source |
1 |
|
|
/** |
2 |
|
|
* @file sys.Configuration.hpp |
3 |
|
|
* @author Sergey Baigudin, sergey@baigudin.software |
4 |
|
|
* @copyright 2016-2022, Sergey Baigudin, Baigudin Software |
5 |
|
|
*/ |
6 |
|
|
#ifndef SYS_CONFIGURATION_HPP_ |
7 |
|
|
#define SYS_CONFIGURATION_HPP_ |
8 |
|
|
|
9 |
|
|
#include "Types.hpp" |
10 |
|
|
|
11 |
|
|
namespace eoos |
12 |
|
|
{ |
13 |
|
|
namespace sys |
14 |
|
|
{ |
15 |
|
|
|
16 |
|
|
/** |
17 |
|
|
* @class Configuration |
18 |
|
|
* @brief The configuration of a target processor. |
19 |
|
|
*/ |
20 |
|
|
struct Configuration |
21 |
|
|
{ |
22 |
|
|
|
23 |
|
|
public: |
24 |
|
|
|
25 |
|
|
/** |
26 |
|
|
* Constructor. |
27 |
|
|
*/ |
28 |
|
184 |
Configuration() |
29 |
|
184 |
: heapSize_( 0x00000000U ) |
30 |
|
184 |
, stackSize_( 0x00000000U ){ |
31 |
|
184 |
} |
32 |
|
|
|
33 |
|
|
#ifdef EOOS_ENABLE_DYNAMIC_HEAP_MEMORY |
34 |
|
|
|
35 |
|
|
/** |
36 |
|
|
* @brief Returns size of heap memory in bytes. |
37 |
|
|
*/ |
38 |
|
|
size_t getHeapSize() const |
39 |
|
|
{ |
40 |
|
|
return heapSize_; |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
#endif // EOOS_ENABLE_DYNAMIC_HEAP_MEMORY |
44 |
|
|
|
45 |
|
|
/** |
46 |
|
|
* @brief Stack size in bytes for the first user thread to be created. |
47 |
|
|
*/ |
48 |
|
|
size_t getStackSize() const |
49 |
|
|
{ |
50 |
|
|
return stackSize_; |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
private: |
54 |
|
|
|
55 |
|
|
#ifdef EOOS_ENABLE_DYNAMIC_HEAP_MEMORY |
56 |
|
|
|
57 |
|
|
/** |
58 |
|
|
* @brief Size of heap memory in bytes. |
59 |
|
|
*/ |
60 |
|
|
size_t heapSize_; |
61 |
|
|
|
62 |
|
|
#endif // EOOS_ENABLE_DYNAMIC_HEAP_MEMORY |
63 |
|
|
|
64 |
|
|
/** |
65 |
|
|
* @brief Stack size in bytes for the first user thread to be created. |
66 |
|
|
*/ |
67 |
|
|
size_t stackSize_; |
68 |
|
|
|
69 |
|
|
}; |
70 |
|
|
|
71 |
|
|
} // namespace sys |
72 |
|
|
} // namespace eoos |
73 |
|
|
#endif // SYS_CONFIGURATION_HPP_ |
74 |
|
|
|