AWS IoT Over-the-air Update v3.4.0
Client library for AWS IoT OTA
 
Loading...
Searching...
No Matches
ota_appversion32.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v3.4.0
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
30#ifndef IOT_APPVERSION32_H
31#define IOT_APPVERSION32_H
32
33/* *INDENT-OFF* */
34#ifdef __cplusplus
35 extern "C" {
36#endif
37/* *INDENT-ON* */
38
39/* Standard includes. */
40#include <stdint.h>
41
47typedef struct
48{
49 /* MISRA Ref 19.2.1 [Unions] */
50 /* More details at: https://github.com/aws/ota-for-aws-iot-embedded-sdk/blob/main/MISRA.md#rule-192 */
51 /* coverity[misra_c_2012_rule_19_2_violation] */
52 union
53 {
54 #if ( defined( __BYTE_ORDER__ ) && defined( __ORDER_LITTLE_ENDIAN__ ) && ( __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ) ) || ( __little_endian__ == 1 ) || WIN32 || ( __BYTE_ORDER == __LITTLE_ENDIAN )
55 struct version
56 {
57 uint16_t build;
58 uint8_t minor;
60 uint8_t major;
61 } x;
62 #elif ( defined( __BYTE_ORDER__ ) && defined( __ORDER_BIG_ENDIAN__ ) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ) || ( __big_endian__ == 1 ) || ( __BYTE_ORDER == __BIG_ENDIAN )
63 struct version
64 {
65 uint8_t major;
66 uint8_t minor;
68 uint16_t build;
69 } x;
70 #else /* if ( defined( __BYTE_ORDER__ ) && defined( __ORDER_LITTLE_ENDIAN__ ) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ) || ( __little_endian__ == 1 ) || WIN32 || ( __BYTE_ORDER == __LITTLE_ENDIAN ) */
71 #error "Unable to determine byte order!"
72 #endif /* if ( defined( __BYTE_ORDER__ ) && defined( __ORDER_LITTLE_ENDIAN__ ) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ) || ( __little_endian__ == 1 ) || WIN32 || ( __BYTE_ORDER == __LITTLE_ENDIAN ) */
73 uint32_t unsignedVersion32;
74 int32_t signedVersion32;
75 } u;
77
78#if ( defined( OTA_USE_NONCONST_APPVERSION ) && ( OTA_USE_NONCONST_APPVERSION == 1 ) )
80#else
82#endif
83
84/* *INDENT-OFF* */
85#ifdef __cplusplus
86 }
87#endif
88/* *INDENT-ON* */
89
90#endif /* ifndef IOT_APPVERSION32_H */
const AppVersion32_t appFirmwareVersion
Making the version number available globally through external linkage, with const qualifier.
Application version structure.
Definition: ota_appversion32.h:48
uint8_t minor
Minor version number of the firmware (Y in firmware version Z.Y.X).
Definition: ota_appversion32.h:58
uint16_t build
Build of the firmware (Z in firmware version Z.Y.X).
Definition: ota_appversion32.h:57
uint8_t major
Major version number of the firmware (X in firmware version Z.Y.X).
Definition: ota_appversion32.h:60