ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
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  */
22 
23 /*!
24  * @brief ISF Global Information.
25  */
26 static isf_info_t gIsfInfo;
27 
28 // See isf.h for documentation
30 {
31 
32  int index;
33 
34  /* Update ISF version information */
37 
38  /* Update ISF build information */
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  ************************************************************************************************/
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 */
85 
86  /* Retrieve ISF version and build information */
87  device_info->isf_info = isf_get_info();
88 
89 }
90 
91 
ISF board support header files.
const char isf_commit_id[]
ISF build commit_id information.
Definition: isf.c:21
#define ISF_LIB_VERSION_MAJOR
Definition: version.h:21
isf_info_t isf_get_info(void)
API to get ISF information.
Definition: isf.c:29
This structure holds the ROM device information such as device id and number of EmbApps present...
Definition: isf.h:187
void _fw_device_info_get(device_info_t *device_info)
Definition: isf.c:77
#define ISF_BUILD_HOURS
Definition: version.h:26
uint8 emb_apps_present
Definition: isf.h:191
#define ISF_BUILD_DAY
Definition: version.h:25
#define ISF_EMB_APPS_PRESENT
The number of separate addressable apps in the build.
Definition: isf.h:122
#define ISF_BUILD_YEAR
Definition: version.h:23
uint8 buildMinutes
The time of build in minutes (valid values: 0 to 59)
Definition: isf.h:156
uint8 buildDay
The Day of the build (valid values: 1 to 31)
Definition: isf.h:152
uint8 majorVersion
Major version number information.
Definition: isf.h:133
uint8 buildSeconds
The time of build in seconds (valid values: 0 to 59)
Definition: isf.h:158
uint8 buildYear
The Year of the build (valid values: 2000 + buildYear, max value = 2255)
Definition: isf.h:148
build_info_t build_info
ISF build information.
Definition: isf.h:176
uint8 buildId[MAX_ISF_COMMIT_ID_SIZE]
The last commit_id from which the build is made.
Definition: isf.h:160
#define ISF_LIB_VERSION_MINOR
Definition: version.h:22
#define ISF_BUILD_MINUTES
Definition: version.h:27
Device and ISF Version information.
uint8 buildHours
The time of build in hours (in 24-hour notation) (valid values: 0 to 23)
Definition: isf.h:154
version_info_t version_info
ISF version information.
Definition: isf.h:174
Main ISF header file. Contains code common to all ISF components.
isf_info_t isf_info
Definition: isf.h:193
#define ISF_BUILD_SECONDS
Definition: version.h:28
uint32 system_device_id
Definition: isf.h:189
uint8 minorVersion
Minor version number information.
Definition: isf.h:135
#define ISF_BUILD_COMMIT_ID_STR
Definition: version.h:29
#define ISF_BUILD_MONTH
Definition: version.h:24
#define MAX_ISF_COMMIT_ID_SIZE
The maximum size of the ISF commit_id.
Definition: isf.h:111
uint8 buildMonth
The Month of the build (valid values: 1(JAN) to 12(DEC))
Definition: isf.h:150