| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

isf.c
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2015, Freescale Semiconductor, Inc.
4 *
5 */
6
7 /*!
8 * @file isf.c
9 * @brief Internal Isf library configuration.
10 *
11 */
12
13 #include "isf_target.h"
14 #include "isf.h"
15 #include "version.h"
16
17
18 /*!
19 * @brief ISF build commit_id information
20 */
21 const char isf_commit_id[] = ISF_BUILD_COMMIT_ID_STR;
22
23 /*!
24 * @brief ISF Global Information.
25 */
26 static isf_info_t gIsfInfo;
27
28 // See isf.h for documentation
29 isf_info_t isf_get_info(void)
30 {
31
32 int index;
33
34 /* Update ISF version information */
35 gIsfInfo.version_info.majorVersion = ISF_LIB_VERSION_MAJOR;
36 gIsfInfo.version_info.minorVersion = ISF_LIB_VERSION_MINOR;
37
38 /* Update ISF build information */
39 gIsfInfo.build_info.buildYear = ISF_BUILD_YEAR;
40 gIsfInfo.build_info.buildMonth = ISF_BUILD_MONTH;
41 gIsfInfo.build_info.buildDay = ISF_BUILD_DAY;
42 gIsfInfo.build_info.buildHours = ISF_BUILD_HOURS;
43 gIsfInfo.build_info.buildMinutes = ISF_BUILD_MINUTES;
44 gIsfInfo.build_info.buildSeconds = ISF_BUILD_SECONDS;
45
46 /* Update ISF build commit_id information */
47 for (index = 0; index < MAX_ISF_COMMIT_ID_SIZE; index++)
48 {
49 gIsfInfo.build_info.buildId[index] = isf_commit_id[index];
50 }
51
52 return gIsfInfo;
53 }
54
55
56 /*************************************************************************************************
57 * @brief API to retrieve device information and ISF information.
58 *
59 * @details API to retrieve device information such as system device id
60 * and number of EmbApps present in image. It also copies ISF version
61 * and build information into a memory location.
62 *
63 * @param[in, out] Pointer to device info structure.
64 *
65 * The device info structure contains:
66 * uint32 system_device_id; - Device: System Device Identification info of
67 * the device (SIM_SDID Register)
68 * uint8 emb_app_present; - ISF: The number of Embedded Apps present
69 * in the image
70 * isf_info_t isf_info; - ISF: The ISF information
71 *
72 * The values marked DEVICE are retrieved from the system device using the device info command
73 * , while the vales marked with isf are written by the ISF SW.
74 *
75 * @return None
76 ************************************************************************************************/
77 void _fw_device_info_get(device_info_t *device_info)
78 {
79
80 /* Retrieve system device identification */
81 device_info->system_device_id = SIM_SDID; //SYSTEM_DEVICE_ID;
82
83 /* Retrieve information on number of Embedded Applications present in the image */
84 device_info->emb_apps_present = ISF_EMB_APPS_PRESENT;
85
86 /* Retrieve ISF version and build information */
87 device_info->isf_info = isf_get_info();
88
89 }
90
91
isf_target.h
ISF board support header files.
isf_commit_id
const char isf_commit_id[]
ISF build commit_id information.
Definition: isf.c:21
ISF_LIB_VERSION_MAJOR
#define ISF_LIB_VERSION_MAJOR
Definition: version.h:21
isf_get_info
isf_info_t isf_get_info(void)
API to get ISF information.
Definition: isf.c:29
device_info_t
This structure holds the ROM device information such as device id and number of EmbApps present...
Definition: isf.h:187
_fw_device_info_get
void _fw_device_info_get(device_info_t *device_info)
Definition: isf.c:77
ISF_BUILD_HOURS
#define ISF_BUILD_HOURS
Definition: version.h:26
device_info_t::emb_apps_present
uint8 emb_apps_present
Definition: isf.h:191
ISF_BUILD_DAY
#define ISF_BUILD_DAY
Definition: version.h:25
ISF_EMB_APPS_PRESENT
#define ISF_EMB_APPS_PRESENT
The number of separate addressable apps in the build.
Definition: isf.h:122
ISF_BUILD_YEAR
#define ISF_BUILD_YEAR
Definition: version.h:23
build_info_t::buildMinutes
uint8 buildMinutes
The time of build in minutes (valid values: 0 to 59)
Definition: isf.h:156
build_info_t::buildDay
uint8 buildDay
The Day of the build (valid values: 1 to 31)
Definition: isf.h:152
version_info_t::majorVersion
uint8 majorVersion
Major version number information.
Definition: isf.h:133
build_info_t::buildSeconds
uint8 buildSeconds
The time of build in seconds (valid values: 0 to 59)
Definition: isf.h:158
build_info_t::buildYear
uint8 buildYear
The Year of the build (valid values: 2000 + buildYear, max value = 2255)
Definition: isf.h:148
isf_info_t::build_info
build_info_t build_info
ISF build information.
Definition: isf.h:176
build_info_t::buildId
uint8 buildId[MAX_ISF_COMMIT_ID_SIZE]
The last commit_id from which the build is made.
Definition: isf.h:160
ISF_LIB_VERSION_MINOR
#define ISF_LIB_VERSION_MINOR
Definition: version.h:22
ISF_BUILD_MINUTES
#define ISF_BUILD_MINUTES
Definition: version.h:27
version.h
Device and ISF Version information.
build_info_t::buildHours
uint8 buildHours
The time of build in hours (in 24-hour notation) (valid values: 0 to 23)
Definition: isf.h:154
isf_info_t::version_info
version_info_t version_info
ISF version information.
Definition: isf.h:174
isf.h
Main ISF header file. Contains code common to all ISF components.
device_info_t::isf_info
isf_info_t isf_info
Definition: isf.h:193
isf_info_t
Definition: isf.h:171
ISF_BUILD_SECONDS
#define ISF_BUILD_SECONDS
Definition: version.h:28
device_info_t::system_device_id
uint32 system_device_id
Definition: isf.h:189
version_info_t::minorVersion
uint8 minorVersion
Minor version number information.
Definition: isf.h:135
ISF_BUILD_COMMIT_ID_STR
#define ISF_BUILD_COMMIT_ID_STR
Definition: version.h:29
ISF_BUILD_MONTH
#define ISF_BUILD_MONTH
Definition: version.h:24
MAX_ISF_COMMIT_ID_SIZE
#define MAX_ISF_COMMIT_ID_SIZE
The maximum size of the ISF commit_id.
Definition: isf.h:111
build_info_t::buildMonth
uint8 buildMonth
The Month of the build (valid values: 1(JAN) to 12(DEC))
Definition: isf.h:150
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.