From 67b215bf04bcac9da5853762425d6ce1f841452f Mon Sep 17 00:00:00 2001 From: Jacki Date: Fri, 2 Aug 2024 00:59:30 +0200 Subject: [PATCH] Add license comments to all files Signed-off-by: Jacki --- interface_lib/include/hid_ids.h | 35 ++++++++++++++++++++++++++++++++- interface_lib/src/crc32.c | 4 +--- interface_lib/src/hid_ids.c | 30 +++++++++++++++++++++++++--- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/interface_lib/include/hid_ids.h b/interface_lib/include/hid_ids.h index 950036f..d4b71b6 100644 --- a/interface_lib/include/hid_ids.h +++ b/interface_lib/include/hid_ids.h @@ -1,3 +1,28 @@ +#pragma once +// +// Created by wheaney on 20.11.23. +// +// Copyright (c) 2023-2024 thejackimonster. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + #ifndef __cplusplus #include #endif @@ -10,7 +35,15 @@ #define NUM_SUPPORTED_PRODUCTS 3 +#ifdef __cplusplus +extern "C" { +#endif + extern const uint16_t xreal_vendor_id; extern const uint16_t xreal_product_ids[NUM_SUPPORTED_PRODUCTS]; -bool is_xreal_product_id(uint16_t product_id); \ No newline at end of file +bool is_xreal_product_id(uint16_t product_id); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/interface_lib/src/crc32.c b/interface_lib/src/crc32.c index 9cf8809..2e2d955 100644 --- a/interface_lib/src/crc32.c +++ b/interface_lib/src/crc32.c @@ -1,7 +1,7 @@ // // Created by thejackimonster on 21.04.23. // -// Copyright (c) 2023 thejackimonster. All rights reserved. +// Copyright (c) 2023-2024 thejackimonster. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -100,5 +100,3 @@ uint32_t crc32_checksum(const uint8_t* buf, uint32_t len) { return ~CRC32_data; } - - diff --git a/interface_lib/src/hid_ids.c b/interface_lib/src/hid_ids.c index 7fbb07a..93302ed 100644 --- a/interface_lib/src/hid_ids.c +++ b/interface_lib/src/hid_ids.c @@ -1,3 +1,29 @@ +// +// Created by wheaney on 12.11.23. +// +// Copyright (c) 2023-2024 thejackimonster. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#include "hid_ids.h" + #ifndef __cplusplus #include #endif @@ -8,8 +34,6 @@ #include #endif -#include "hid_ids.h" - const uint16_t xreal_vendor_id = 0x3318; const uint16_t xreal_product_ids[NUM_SUPPORTED_PRODUCTS] = { 0x0424, // XREAL Air @@ -24,4 +48,4 @@ bool is_xreal_product_id(uint16_t product_id) { } } return false; -} \ No newline at end of file +}