• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * @file
19  * Provides platform IDs and versions for implementations of CHRE.
20  */
21 
22 #ifndef CHRE_PLATFORM_PLATFORM_ID_H_
23 #define CHRE_PLATFORM_PLATFORM_ID_H_
24 
25 #include "chre/util/id_from_string.h"
26 
27 #include <stdint.h>
28 
29 namespace chre {
30 
31 //! The vendor ID for Google.
32 constexpr uint64_t kVendorIdGoogle = createIdFromString("Googl");
33 
34 //! The vendor platform ID of the Linux variant is one. All other
35 //  Google implementations will be greater than one. Zero is reserved.
36 constexpr uint32_t kGoogleLinuxPlatformId = 0x001;
37 
38 //! The vendor platform ID of the Qualcomm SLPI variant.
39 constexpr uint32_t kGoogleSlpiPlatformId = 0x002;
40 
41 //! Patch level of the current CHRE implementation, defined by the build system
42 //! and reported in chreGetVersion().
43 constexpr uint16_t kPatchVersion = CHRE_PATCH_VERSION;
44 static_assert(CHRE_PATCH_VERSION <= UINT16_MAX,
45               "Patch version must fit in 16 bits");
46 
47 }  // namespace chre
48 
49 #include "chre/target_platform/platform_id_impl.h"
50 
51 #endif  // CHRE_PLATFORM_PLATFORM_ID_H_
52