forked from nanoframework/nf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nanoHAL_Capabilites.c
50 lines (43 loc) · 1.37 KB
/
nanoHAL_Capabilites.c
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
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
#include <nanoHAL_Capabilites.h>
// Returns the platform capabilities coded as an uint32_t.
// Implemented as "weak" to allow it to be replaced with "hard" implementation at platform level.
__nfweak uint32_t GetPlatformCapabilities()
{
return 0;
}
// Returns the target capabilities coded as an uint32_t.
// Implemented as "weak" to allow it to be replaced with "hard" implementation at target level.
__nfweak uint32_t GetTargetCapabilities()
{
return 0;
}
// Information on whether updating a configuration block requires previous erase.
// Implemented as "weak" to allow it to be replaced with "hard" implementation at target level.
__nfweak bool Target_ConfigUpdateRequiresErase()
{
return true;
}
// Information on whether the target has a proprietary bootloader
// Implemented as "weak" to allow it to be replaced with "hard" implementation at target level.
__nfweak bool Target_HasProprietaryBooter()
{
return false;
}
// Information on whether the target is capable of IFU
// Implemented as "weak" to allow it to be replaced with "hard" implementation at target level.
__nfweak bool Target_IFUCapable()
{
return false;
}
inline bool Target_HasNanoBooter()
{
#if (TARGET_HAS_NANOBOOTER == TRUE)
return true;
#else
return false;
#endif
}