diff --git a/NexButton.cpp b/NexButton.cpp index 80e3ba5..1447fb5 100644 --- a/NexButton.cpp +++ b/NexButton.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexButton::NexButton(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop, void *pop_ptr) +NexButton::NexButton(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { } diff --git a/NexButton.h b/NexButton.h index f09916c..790fced 100644 --- a/NexButton.h +++ b/NexButton.h @@ -26,7 +26,7 @@ class NexButton: public NexTouch { public: /* methods */ - NexButton(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexButton(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); void attachPop(NexTouchEventCb pop, void *ptr = NULL); void detachPop(void); diff --git a/NexCrop.cpp b/NexCrop.cpp index d46c138..7d181bc 100644 --- a/NexCrop.cpp +++ b/NexCrop.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexCrop::NexCrop(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop, void *pop_ptr) +NexCrop::NexCrop(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { } diff --git a/NexCrop.h b/NexCrop.h index b59e424..7137162 100644 --- a/NexCrop.h +++ b/NexCrop.h @@ -26,7 +26,7 @@ class NexCrop: public NexTouch { public: /* methods */ - NexCrop(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexCrop(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); void attachPop(NexTouchEventCb pop, void *ptr = NULL); void detachPop(void); diff --git a/NexGauge.cpp b/NexGauge.cpp index eedbced..649aacc 100644 --- a/NexGauge.cpp +++ b/NexGauge.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexGauge::NexGauge(NexPid pid, NexCid cid, char *name) +NexGauge::NexGauge(NexPid pid, NexCid cid, const char *name) :NexTouch(pid, cid, name) { } diff --git a/NexGauge.h b/NexGauge.h index dce0820..38f155c 100644 --- a/NexGauge.h +++ b/NexGauge.h @@ -26,7 +26,7 @@ class NexGauge: public NexTouch { public: /* methods */ - NexGauge(NexPid pid, NexCid cid, char *name); + NexGauge(NexPid pid, NexCid cid, const char *name); bool getValue(uint32_t *number); bool setValue(uint32_t number); diff --git a/NexHotspot.cpp b/NexHotspot.cpp index be24ca3..aba96fe 100644 --- a/NexHotspot.cpp +++ b/NexHotspot.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexHotspot::NexHotspot(NexPid pid, NexCid cid, char *name, +NexHotspot::NexHotspot(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr, NexTouchEventCb push, void *push_ptr) :NexTouch(pid, cid, name, pop, pop_ptr, push, push_ptr) diff --git a/NexHotspot.h b/NexHotspot.h index 259b9e2..f739904 100644 --- a/NexHotspot.h +++ b/NexHotspot.h @@ -26,7 +26,7 @@ class NexHotspot: public NexTouch { public: /* methods */ - NexHotspot(NexPid pid, NexCid cid, char *name, + NexHotspot(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL, NexTouchEventCb push = NULL, void *push_ptr = NULL); diff --git a/NexPage.cpp b/NexPage.cpp index 7b03215..e44958e 100644 --- a/NexPage.cpp +++ b/NexPage.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexPage::NexPage(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop, void *pop_ptr) +NexPage::NexPage(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { } diff --git a/NexPage.h b/NexPage.h index 8c56320..1ca2bae 100644 --- a/NexPage.h +++ b/NexPage.h @@ -26,7 +26,7 @@ class NexPage: public NexTouch { public: /* methods */ - NexPage(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexPage(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); bool show(void); void attachPop(NexTouchEventCb pop, void *ptr = NULL); diff --git a/NexPicture.cpp b/NexPicture.cpp index d247d12..4902688 100644 --- a/NexPicture.cpp +++ b/NexPicture.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexPicture::NexPicture(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop, void *pop_ptr) +NexPicture::NexPicture(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { } diff --git a/NexPicture.h b/NexPicture.h index 7dfdbce..887f2e8 100644 --- a/NexPicture.h +++ b/NexPicture.h @@ -26,7 +26,7 @@ class NexPicture: public NexTouch { public: /* methods */ - NexPicture(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexPicture(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); void attachPop(NexTouchEventCb pop, void *ptr = NULL); void detachPop(void); diff --git a/NexProgressBar.cpp b/NexProgressBar.cpp index f7fc321..b33d02c 100644 --- a/NexProgressBar.cpp +++ b/NexProgressBar.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexProgressBar::NexProgressBar(NexPid pid, NexCid cid, char *name) +NexProgressBar::NexProgressBar(NexPid pid, NexCid cid, const char *name) :NexTouch(pid, cid, name) { } diff --git a/NexProgressBar.h b/NexProgressBar.h index 9f04d2c..90740c0 100644 --- a/NexProgressBar.h +++ b/NexProgressBar.h @@ -26,7 +26,7 @@ class NexProgressBar: public NexTouch { public: /* methods */ - NexProgressBar(NexPid pid, NexCid cid, char *name); + NexProgressBar(NexPid pid, NexCid cid, const char *name); bool getValue(uint32_t *number); bool setValue(uint32_t number); diff --git a/NexSlider.cpp b/NexSlider.cpp index 3ec6d49..a529802 100644 --- a/NexSlider.cpp +++ b/NexSlider.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexSlider::NexSlider(NexPid pid, NexCid cid, char *name, +NexSlider::NexSlider(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { diff --git a/NexSlider.h b/NexSlider.h index 5a09ebc..6e7b509 100644 --- a/NexSlider.h +++ b/NexSlider.h @@ -26,7 +26,7 @@ class NexSlider: public NexTouch { public: /* methods */ - NexSlider(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexSlider(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); void attachPop(NexTouchEventCb pop, void *ptr = NULL); void detachPop(void); diff --git a/NexText.cpp b/NexText.cpp index 62d6931..cde4dc6 100644 --- a/NexText.cpp +++ b/NexText.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexText::NexText(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop, void *pop_ptr) +NexText::NexText(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr) :NexTouch(pid, cid, name, pop, pop_ptr) { } diff --git a/NexText.h b/NexText.h index 646d4c5..37e74ab 100644 --- a/NexText.h +++ b/NexText.h @@ -26,7 +26,7 @@ class NexText: public NexTouch { public: /* methods */ - NexText(NexPid pid, NexCid cid, char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); + NexText(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL); void attachPop(NexTouchEventCb pop, void *ptr = NULL); void detachPop(void); diff --git a/NexTouch.cpp b/NexTouch.cpp index 7ac2fac..05dfc3f 100644 --- a/NexTouch.cpp +++ b/NexTouch.cpp @@ -28,7 +28,7 @@ * @param push_ptr - the parameter was transmitted to push event function pointer. * */ -NexTouch::NexTouch(NexPid pid, NexCid cid, char *name, +NexTouch::NexTouch(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop, void *pop_ptr, NexTouchEventCb push, void *push_ptr) { diff --git a/NexTouch.h b/NexTouch.h index 280a227..e8fbf8c 100644 --- a/NexTouch.h +++ b/NexTouch.h @@ -40,7 +40,7 @@ public: /* static methods */ static void iterate(NexTouch **list, NexPid pid, NexCid cid, NexEventType event); public: /* methods */ - NexTouch(NexPid pid, NexCid cid, char *name, + NexTouch(NexPid pid, NexCid cid, const char *name, NexTouchEventCb pop = NULL, void *pop_ptr = NULL, NexTouchEventCb push = NULL, void *push_ptr = NULL); @@ -62,7 +62,7 @@ private: /* methods */ private: /* data */ NexPid pid; /* Page ID */ NexCid cid; /* Component ID */ - char *name; /* An unique name */ + const char *name; /* An unique name */ NexTouchEventCb cbPush; void *__cbpush_ptr; NexTouchEventCb cbPop; diff --git a/NexWaveform.cpp b/NexWaveform.cpp index d45e0ee..3d38243 100644 --- a/NexWaveform.cpp +++ b/NexWaveform.cpp @@ -19,7 +19,7 @@ * Constructor,inherited NexTouch's constructor function. * */ -NexWaveform::NexWaveform(NexPid pid, NexCid cid, char *name) +NexWaveform::NexWaveform(NexPid pid, NexCid cid, const char *name) :NexTouch(pid, cid, name) { } diff --git a/NexWaveform.h b/NexWaveform.h index c069aaa..b6fa2aa 100644 --- a/NexWaveform.h +++ b/NexWaveform.h @@ -25,7 +25,7 @@ class NexWaveform: public NexTouch { public: /* methods */ - NexWaveform(NexPid pid, NexCid cid, char *name); + NexWaveform(NexPid pid, NexCid cid, const char *name); bool addValue(uint8_t ch, uint8_t number); };