From 61aa0d4785dd2e877ac2ccf10f3c4372bcca49cd Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 25 Jul 2022 19:08:23 +0200 Subject: [PATCH] libgpiodJtagBitbang: update copyright + lint --- src/libgpiodJtagBitbang.cpp | 12 +++++++----- src/libgpiodJtagBitbang.hpp | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/libgpiodJtagBitbang.cpp b/src/libgpiodJtagBitbang.cpp index 60c0211..7a99513 100644 --- a/src/libgpiodJtagBitbang.cpp +++ b/src/libgpiodJtagBitbang.cpp @@ -1,10 +1,14 @@ // SPDX-License-Identifier: Apache-2.0 /* - * Copyright (C) 2020 Gwenhael Goavec-Merou + * Copyright (C) 2020-2022 Gwenhael Goavec-Merou + * Copyright (C) 2022 Niklas Ekström * * libgpiod bitbang driver added by Niklas Ekström in 2022 */ +#include "libgpiodJtagBitbang.hpp" + +#include #include #include @@ -14,10 +18,8 @@ #include #include -#include #include "display.hpp" -#include "libgpiodJtagBitbang.hpp" #define DEBUG 1 @@ -111,7 +113,7 @@ gpiod_line *LibgpiodJtagBitbang::get_line(unsigned int offset, int val, int dir) { gpiod_line *line = gpiod_chip_get_line(_chip, offset); if (!line) { - display("Unable to get gpio line %d\n", offset); + display("Unable to get gpio line %u\n", offset); throw std::runtime_error("Unable to get gpio line\n"); } @@ -123,7 +125,7 @@ gpiod_line *LibgpiodJtagBitbang::get_line(unsigned int offset, int val, int dir) int ret = gpiod_line_request(line, &config, val); if (ret < 0) { - display("Error requesting gpio line %d\n", offset); + display("Error requesting gpio line %u\n", offset); throw std::runtime_error("Error requesting gpio line\n"); } diff --git a/src/libgpiodJtagBitbang.hpp b/src/libgpiodJtagBitbang.hpp index 5b2fdae..f5491d9 100644 --- a/src/libgpiodJtagBitbang.hpp +++ b/src/libgpiodJtagBitbang.hpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 /* - * Copyright (C) 2020 Gwenhael Goavec-Merou + * Copyright (C) 2020-2022 Gwenhael Goavec-Merou + * Copyright (C) 2022 Niklas Ekström * * libgpiod bitbang driver added by Niklas Ekström in 2022 */