Skip to content

Commit 8ac6e2c

Browse files
paul-szczepanek-armpan-
authored andcommitted
added doxygen to constructors and const to getters
1 parent 76624ad commit 8ac6e2c

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

features/FEATURE_BLE/ble/BLETypes.h

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,25 @@ class phy_set_t {
639639
PHY_SET_CODED = 0x04
640640
};
641641

642+
/**
643+
* Create set that indicates no preference.
644+
*/
642645
phy_set_t() : _value(0) { }
646+
647+
/**
648+
* Create a set based on the mask specified in the Bluetooth spec.
649+
*
650+
* @param value Octet containing the set of preferred PHYs
651+
*/
643652
phy_set_t(uint8_t value) : _value(value) { }
653+
654+
/**
655+
* Create a set based on individual settings.
656+
*
657+
* @param phy_1m Prefer LE 1M
658+
* @param phy_2m Prefer LE 2M if avaiable
659+
* @param phy_coded Prefer coded modulation if avaiable
660+
*/
644661
phy_set_t(
645662
bool phy_1m,
646663
bool phy_2m,
@@ -698,23 +715,23 @@ class phy_set_t {
698715
}
699716
}
700717

701-
bool get_1m() {
718+
bool get_1m() const {
702719
return (_value & PHY_SET_1M);
703720
}
704721

705-
bool get_2m() {
722+
bool get_2m() const {
706723
return (_value & PHY_SET_2M);
707724
}
708725

709-
bool get_coded() {
726+
bool get_coded() const {
710727
return (_value & PHY_SET_CODED);
711728
}
712729

713-
operator uint8_t() {
730+
operator uint8_t() const {
714731
return _value;
715732
}
716733

717-
uint8_t value() const {
734+
uint8_t value() const const {
718735
return _value;
719736
}
720737

0 commit comments

Comments
 (0)