From 98850de2cf574afac300efee10c93140577fb54d Mon Sep 17 00:00:00 2001 From: shennongmin Date: Fri, 14 Aug 2015 11:55:47 +0800 Subject: [PATCH] Update doc of file comments. Signed-off-by: shennongmin --- NexButton.cpp | 4 ++-- NexButton.h | 11 ++++++----- NexSerialConfig.h => NexConfig.h | 19 +++++++++---------- NexCrop.cpp | 4 ++-- NexCrop.h | 11 ++++++----- NexGauge.cpp | 4 ++-- NexGauge.h | 11 ++++++----- NexHardware.cpp | 2 +- NexHardware.h | 4 ++-- NexHotspot.cpp | 4 ++-- NexHotspot.h | 11 ++++++----- NexObject.cpp | 3 +-- NexObject.h | 12 +++++------- NexPage.cpp | 4 ++-- NexPage.h | 11 ++++++----- NexPicture.cpp | 4 ++-- NexPicture.h | 11 ++++++----- NexProgressBar.cpp | 4 ++-- NexProgressBar.h | 11 ++++++----- NexSlider.cpp | 5 ++--- NexSlider.h | 11 ++++++----- NexText.cpp | 5 ++--- NexText.h | 11 ++++++----- NexTouch.cpp | 5 ++--- NexTouch.h | 13 +++++++------ NexWaveform.cpp | 5 ++--- NexWaveform.h | 11 ++++++----- Nextion.h | 7 +++---- 28 files changed, 110 insertions(+), 108 deletions(-) rename NexSerialConfig.h => NexConfig.h (72%) diff --git a/NexButton.cpp b/NexButton.cpp index f673427..5e1b64b 100644 --- a/NexButton.cpp +++ b/NexButton.cpp @@ -1,10 +1,10 @@ /** * @file NexButton.cpp * - * API of NexButton. + * The implementation of class NexButton. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexButton.h b/NexButton.h index 69efa1d..07c9c4a 100644 --- a/NexButton.h +++ b/NexButton.h @@ -1,10 +1,11 @@ /** * @file NexButton.h * - * API of NexButton. + * The definition of class NexButton. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXBUTTON_H__ #define __NEXBUTTON_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setText(const char *buffer); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXBUTTON_H__ */ diff --git a/NexSerialConfig.h b/NexConfig.h similarity index 72% rename from NexSerialConfig.h rename to NexConfig.h index 32cc066..6c86774 100644 --- a/NexSerialConfig.h +++ b/NexConfig.h @@ -1,10 +1,10 @@ /** - * @file NexSerialConfig.h + * @file NexConfig.h * - * Serial configure. + * Options for user can be found here. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,9 +12,8 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - -#ifndef __NexSerialConfig_H__ -#define __NexSerialConfig_H__ +#ifndef __NEXCONFIG_H__ +#define __NEXCONFIG_H__ /* enable debug serial */ #define DEBUG_SERIAL_ENABLE @@ -30,9 +29,9 @@ #define dbSerialPrintln(a) dbSerial.println(a) #define dbSerialBegin(a) dbSerial.begin(a) #else -#define dbSerialPrint(a) -#define dbSerialPrintln(a) -#define dbSerialBegin(a) +#define dbSerialPrint(a) do{}while(0) +#define dbSerialPrintln(a) do{}while(0) +#define dbSerialBegin(a) do{}while(0) #endif -#endif +#endif /* #ifndef __NEXCONFIG_H__ */ diff --git a/NexCrop.cpp b/NexCrop.cpp index 98ebd69..3f75171 100644 --- a/NexCrop.cpp +++ b/NexCrop.cpp @@ -1,10 +1,10 @@ /** * @file NexCrop.cpp * - * API of NexCrop. + * The implementation of class NexCrop. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexCrop.h b/NexCrop.h index 5200335..4c3155a 100644 --- a/NexCrop.h +++ b/NexCrop.h @@ -1,10 +1,11 @@ /** * @file NexCrop.h * - * API of NexCrop. + * The definition of class NexCrop. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXCROP_H__ #define __NEXCROP_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setPic(uint32_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXCROP_H__ */ diff --git a/NexGauge.cpp b/NexGauge.cpp index c6043d5..7ff174d 100644 --- a/NexGauge.cpp +++ b/NexGauge.cpp @@ -1,10 +1,10 @@ /** * @file NexGauge.cpp * - * API of NexGauge. + * The implementation of class NexGauge. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexGauge.h b/NexGauge.h index e7685c8..cf45efb 100644 --- a/NexGauge.h +++ b/NexGauge.h @@ -1,10 +1,11 @@ /** * @file NexGauge.h * - * API of NexGauge. + * The definition of class NexGauge. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXGAUGE_H__ #define __NEXGAUGE_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setValue(uint32_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXGAUGE_H__ */ diff --git a/NexHardware.cpp b/NexHardware.cpp index bcc721a..a2f67d4 100644 --- a/NexHardware.cpp +++ b/NexHardware.cpp @@ -1,7 +1,7 @@ /** * @file NexHardware.cpp * - * Hardware Srial API. + * The implementation of base API for using Nextion. * * @author Wu Pengfei (email:) * @date 2015/8/11 diff --git a/NexHardware.h b/NexHardware.h index 2d60d1a..dc916d0 100644 --- a/NexHardware.h +++ b/NexHardware.h @@ -1,7 +1,7 @@ /** * @file NexHardware.h * - * Hardware Srial API. + * The definition of base API for using Nextion. * * @author Wu Pengfei (email:) * @date 2015/8/11 @@ -15,7 +15,7 @@ #ifndef __NEXHARDWARE_H__ #define __NEXHARDWARE_H__ #include -#include "NexSerialConfig.h" +#include "NexConfig.h" #include "NexTouch.h" bool recvRetNumber(uint32_t *number, uint32_t timeout = 100); diff --git a/NexHotspot.cpp b/NexHotspot.cpp index f35ab56..6b78ebe 100644 --- a/NexHotspot.cpp +++ b/NexHotspot.cpp @@ -1,10 +1,10 @@ /** * @file NexHotspot.cpp * - * API of NexHotspot. + * The implementation of class NexHotspot. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexHotspot.h b/NexHotspot.h index 09f9528..212b5f1 100644 --- a/NexHotspot.h +++ b/NexHotspot.h @@ -1,10 +1,11 @@ /** * @file NexHotspot.h * - * API of NexHotspot. + * The definition of class NexHotspot. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXHOTSPOT_H__ #define __NEXHOTSPOT_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -29,5 +30,5 @@ public: /* methods */ NexHotspot(NexPid pid, NexCid cid, const char *name); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXHOTSPOT_H__ */ diff --git a/NexObject.cpp b/NexObject.cpp index 5c3a51a..ab123ab 100644 --- a/NexObject.cpp +++ b/NexObject.cpp @@ -1,7 +1,7 @@ /** * @file NexObject.cpp * - * The root of all classes in Nextion library. + * The implementation of class NexObject. * * @author Wu Pengfei (email:) * @date 2015/8/13 @@ -12,7 +12,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #include "NexObject.h" /** diff --git a/NexObject.h b/NexObject.h index 11402f8..9519078 100644 --- a/NexObject.h +++ b/NexObject.h @@ -1,10 +1,11 @@ /** * @file NexObject.h * - * The root of all classes in Nextion library. + * The definition of class NexObject. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,12 +13,10 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #ifndef __NEXOBJECT_H__ #define __NEXOBJECT_H__ -#ifdef __cplusplus #include -#include "NexSerialConfig.h" +#include "NexConfig.h" typedef uint8_t NexPid; typedef uint8_t NexCid; @@ -41,5 +40,4 @@ private: /* data */ const char *name; /* An unique name */ }; -#endif /* #ifdef __cplusplus */ #endif /* #ifndef __NEXOBJECT_H__ */ diff --git a/NexPage.cpp b/NexPage.cpp index c14d40e..cc61eb5 100644 --- a/NexPage.cpp +++ b/NexPage.cpp @@ -1,10 +1,10 @@ /** * @file NexPage.cpp * - * API of NexPage. + * The implementation of class NexPage. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexPage.h b/NexPage.h index 5a17d9e..fc67d4e 100644 --- a/NexPage.h +++ b/NexPage.h @@ -1,10 +1,11 @@ /** * @file NexPage.h * - * API of NexPage. + * The definition of class NexPage. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXPAGE_H__ #define __NEXPAGE_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -30,5 +31,5 @@ public: /* methods */ bool show(void); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXPAGE_H__ */ diff --git a/NexPicture.cpp b/NexPicture.cpp index 2933c10..c2bedf4 100644 --- a/NexPicture.cpp +++ b/NexPicture.cpp @@ -1,10 +1,10 @@ /** * @file NexPicture.cpp * - * API of NexPicture. + * The implementation of class NexPicture. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexPicture.h b/NexPicture.h index 8816e6a..dd9e0f3 100644 --- a/NexPicture.h +++ b/NexPicture.h @@ -1,10 +1,11 @@ /** * @file NexPicture.h * - * API of NexPicture. + * The definition of class NexPicture. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXPICTURE_H__ #define __NEXPICTURE_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setPic(uint32_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXPICTURE_H__ */ diff --git a/NexProgressBar.cpp b/NexProgressBar.cpp index 6f06333..dfda0fa 100644 --- a/NexProgressBar.cpp +++ b/NexProgressBar.cpp @@ -1,10 +1,10 @@ /** * @file NexProgressBar.cpp * - * API of NexProgressBar. + * The implementation of class NexProgressBar. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or diff --git a/NexProgressBar.h b/NexProgressBar.h index d0af8a9..c003916 100644 --- a/NexProgressBar.h +++ b/NexProgressBar.h @@ -1,10 +1,11 @@ /** * @file NexProgressBar.h * - * API of NexProgressBar. + * The definition of class NexProgressBar. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXPROGRESSBAR_H__ #define __NEXPROGRESSBAR_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setValue(uint32_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXPROGRESSBAR_H__ */ diff --git a/NexSlider.cpp b/NexSlider.cpp index bae2707..3dcad42 100644 --- a/NexSlider.cpp +++ b/NexSlider.cpp @@ -1,10 +1,10 @@ /** * @file NexSlider.cpp * - * API of NexSlider. + * The implementation of class NexSlider. * * @author Wu Pengfei (email:) - * @date 2015/8/11 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,7 +12,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #include "NexSlider.h" /** diff --git a/NexSlider.h b/NexSlider.h index 4150150..4c5285f 100644 --- a/NexSlider.h +++ b/NexSlider.h @@ -1,10 +1,11 @@ /** * @file NexSlider.h * - * API of NexSlider. + * The definition of class NexSlider. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXSLIDER_H__ #define __NEXSLIDER_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setValue(uint32_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXSLIDER_H__ */ diff --git a/NexText.cpp b/NexText.cpp index 9fee731..643b15a 100644 --- a/NexText.cpp +++ b/NexText.cpp @@ -1,10 +1,10 @@ /** * @file NexText.cpp * - * API of NexText. + * The implementation of class NexText. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,7 +12,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #include "NexText.h" /** diff --git a/NexText.h b/NexText.h index 3c0f167..1e89b1b 100644 --- a/NexText.h +++ b/NexText.h @@ -1,10 +1,11 @@ /** * @file NexText.h * - * API of NexText. + * The definition of class NexText. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,7 +16,7 @@ #ifndef __NEXTEXT_H__ #define __NEXTEXT_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -32,5 +33,5 @@ public: /* methods */ bool setText(const char *buffer); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXTEXT_H__ */ diff --git a/NexTouch.cpp b/NexTouch.cpp index f6ad71a..bd1b068 100644 --- a/NexTouch.cpp +++ b/NexTouch.cpp @@ -1,10 +1,10 @@ /** * @file NexTouch.cpp * - * API of Nextion. + * The implementation of class NexTouch. * * @author Wu Pengfei (email:) - * @date 2015/7/10 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,7 +12,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #include "NexTouch.h" diff --git a/NexTouch.h b/NexTouch.h index bfa127b..c7138dd 100644 --- a/NexTouch.h +++ b/NexTouch.h @@ -1,10 +1,11 @@ /** * @file NexTouch.h * - * API of Nextion. + * The definition of class NexTouch. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/7/10 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -15,9 +16,9 @@ #ifndef __NEXTOUCH_H__ #define __NEXTOUCH_H__ -#ifdef __cplusplus + #include -#include "NexSerialConfig.h" +#include "NexConfig.h" #include "NexObject.h" typedef void (*NexTouchEventCb)(void *ptr); @@ -56,5 +57,5 @@ private: /* data */ void *__cbpop_ptr; }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXTOUCH_H__ */ diff --git a/NexWaveform.cpp b/NexWaveform.cpp index 355f45c..1675bfb 100644 --- a/NexWaveform.cpp +++ b/NexWaveform.cpp @@ -1,10 +1,10 @@ /** * @file NexWaveform.cpp * - * API of NexWaveform. + * The implementation of class NexWaveform. * * @author Wu Pengfei (email:) - * @date 2015/8/11 + * @date 2015/8/13 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -12,7 +12,6 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #include "NexWaveform.h" /** diff --git a/NexWaveform.h b/NexWaveform.h index ba6dbec..8dc5366 100644 --- a/NexWaveform.h +++ b/NexWaveform.h @@ -1,10 +1,11 @@ /** * @file NexWaveform.h * - * API of NexWaveform. + * The definition of class NexWaveform. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 * - * @author Wu Pengfei (email:) - * @date 2015/8/11 * @copyright * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n * This program is free software; you can redistribute it and/or @@ -14,7 +15,7 @@ */ #ifndef __NEXWAVEFORM_H__ #define __NEXWAVEFORM_H__ -#ifdef __cplusplus + #include "NexTouch.h" #include "NexHardware.h" @@ -29,5 +30,5 @@ public: /* methods */ bool addValue(uint8_t ch, uint8_t number); }; -#endif /* #ifdef __cplusplus */ + #endif /* #ifndef __NEXWAVEFORM_H__ */ diff --git a/Nextion.h b/Nextion.h index 65145c8..4ae784a 100644 --- a/Nextion.h +++ b/Nextion.h @@ -1,9 +1,9 @@ /** * @file Nextion.h * - * Header file of Nextion Library. + * The header file including all other header files provided by this library. * - * All examples or sketches need to include this file. + * Every example sketch should include this file. * * @author Wu Pengfei (email:) * @date 2015/8/12 @@ -14,12 +14,11 @@ * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ - #ifndef __NEXTION_H__ #define __NEXTION_H__ #include "Arduino.h" -#include "NexSerialConfig.h" +#include "NexConfig.h" #include "NexTouch.h" #include "NexHardware.h"