mirror of https://github.com/ARMmbed/mbed-os.git
dr_range bitfield should be unsigned integer
If the value is an integer, the 4th bit is used for sign, so you can store values upto 7 only whereas the datarate values could go upto 15. That's why we need to turn this to an unsigned integer so that the last bit can also be used.pull/6938/head
parent
9ac7f21140
commit
493ae2bd91
|
|
@ -275,7 +275,7 @@ typedef union {
|
||||||
/**
|
/**
|
||||||
* Byte-access to the bits.
|
* Byte-access to the bits.
|
||||||
*/
|
*/
|
||||||
int8_t value;
|
uint8_t value;
|
||||||
/**
|
/**
|
||||||
* The structure to store the minimum and the maximum datarate.
|
* The structure to store the minimum and the maximum datarate.
|
||||||
*/
|
*/
|
||||||
|
|
@ -288,7 +288,7 @@ typedef union {
|
||||||
* The allowed ranges are region-specific.
|
* The allowed ranges are region-specific.
|
||||||
* Please refer to \ref DR_0 to \ref DR_15 for details.
|
* Please refer to \ref DR_0 to \ref DR_15 for details.
|
||||||
*/
|
*/
|
||||||
int8_t min : 4;
|
uint8_t min : 4;
|
||||||
/**
|
/**
|
||||||
* The maximum data rate.
|
* The maximum data rate.
|
||||||
*
|
*
|
||||||
|
|
@ -297,7 +297,7 @@ typedef union {
|
||||||
* The allowed ranges are region-specific.
|
* The allowed ranges are region-specific.
|
||||||
* Please refer to \ref DR_0 to \ref DR_15 for details.
|
* Please refer to \ref DR_0 to \ref DR_15 for details.
|
||||||
*/
|
*/
|
||||||
int8_t max : 4;
|
uint8_t max : 4;
|
||||||
} fields;
|
} fields;
|
||||||
} dr_range_t;
|
} dr_range_t;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue