mirror of
https://github.com/espressif/openthread.git
synced 2026-08-14 06:37:46 +00:00
[spinel] fix compiling issue of enum multiplication (#9649)
A compiling issue occurred (based on gcc 9.4.0) beacuse the multiplication of different enum types. So it is a good idea to define the `kUsPerMs` as `constexpr` constants instead of `enum`.
This commit is contained in:
@@ -935,11 +935,9 @@ private:
|
||||
kStateTransmitDone, ///< Radio indicated frame transmission is done.
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kUsPerMs = 1000, ///< Microseconds per millisecond.
|
||||
kTxWaitUs = 5000000, ///< Maximum time of waiting for `TransmitDone` event, in microseconds.
|
||||
};
|
||||
static constexpr uint32_t kUsPerMs = 1000; ///< Microseconds per millisecond.
|
||||
static constexpr uint64_t kTxWaitUs =
|
||||
5000000; ///< Maximum time of waiting for `TransmitDone` event, in microseconds.
|
||||
|
||||
typedef otError (RadioSpinel::*ResponseHandler)(const uint8_t *aBuffer, uint16_t aLength);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user