Skip to content

Commit 619fc92

Browse files
committed
Added mutable type qualifier.
Removes the need for removing const type qualifier
1 parent 0519714 commit 619fc92

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

lib/HALInterfaces/src/IDevice.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class IDevice
101101
*
102102
* @return If device is in bootloader mode, it will return true. Otherwise false.
103103
*/
104-
virtual bool isInBootloaderMode() = 0;
104+
virtual bool isInBootloaderMode() const = 0;
105105

106106
protected:
107107
/**

lib/HALTarget/src/Device.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void Device::enterBootloader()
109109
reset();
110110
}
111111

112-
bool Device::isInBootloaderMode()
112+
bool Device::isInBootloaderMode() const
113113
{
114114
return m_usbHost.isBootloaderModeActive();
115115
}

lib/HALTarget/src/Device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Device : public IDevice
109109
*
110110
* @return If device is in bootloader mode, it will return true. Otherwise false.
111111
*/
112-
bool isInBootloaderMode() final;
112+
bool isInBootloaderMode() const final;
113113

114114
private:
115115
/** Time to hold the reset line active in milliseconds. */

lib/HALTarget/src/USBHost.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void USBHost::reset()
283283
}
284284
}
285285

286-
bool USBHost::isBootloaderModeActive()
286+
bool USBHost::isBootloaderModeActive() const
287287
{
288288
return ((true == m_isBootloaderModeActive) && (true == m_acm.isReady()));
289289
}

lib/HALTarget/src/USBHost.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class USBHost : public Stream
190190
*
191191
* @return If the bootloader mode is active, returns true. Otherwise, false.
192192
*/
193-
bool isBootloaderModeActive();
193+
bool isBootloaderModeActive() const;
194194

195195
private:
196196
/** Size of the RX Queue */
@@ -203,7 +203,7 @@ class USBHost : public Stream
203203
ACMAsyncOper m_asyncOper;
204204

205205
/** Instance of ACM */
206-
ACM m_acm;
206+
mutable ACM m_acm;
207207

208208
/** RX Queue */
209209
QueueHandle_t m_rxQueue;

0 commit comments

Comments
 (0)