File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -639,8 +639,25 @@ class phy_set_t {
639
639
PHY_SET_CODED = 0x04
640
640
};
641
641
642
+ /* *
643
+ * Create set that indicates no preference.
644
+ */
642
645
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
+ */
643
652
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
+ */
644
661
phy_set_t (
645
662
bool phy_1m,
646
663
bool phy_2m,
@@ -698,23 +715,23 @@ class phy_set_t {
698
715
}
699
716
}
700
717
701
- bool get_1m () {
718
+ bool get_1m () const {
702
719
return (_value & PHY_SET_1M);
703
720
}
704
721
705
- bool get_2m () {
722
+ bool get_2m () const {
706
723
return (_value & PHY_SET_2M);
707
724
}
708
725
709
- bool get_coded () {
726
+ bool get_coded () const {
710
727
return (_value & PHY_SET_CODED);
711
728
}
712
729
713
- operator uint8_t () {
730
+ operator uint8_t () const {
714
731
return _value;
715
732
}
716
733
717
- uint8_t value () const {
734
+ uint8_t value () const const {
718
735
return _value;
719
736
}
720
737
You can’t perform that action at this time.
0 commit comments