File tree Expand file tree Collapse file tree 3 files changed +23
-22
lines changed
targets/TARGET_CORDIO/source Expand file tree Collapse file tree 3 files changed +23
-22
lines changed Original file line number Diff line number Diff line change @@ -668,26 +668,6 @@ class phy_set_t {
668
668
set_coded (phy_coded);
669
669
}
670
670
671
- /* *
672
- * Create an ALL_PHYS parameter used in LE Set PHY Command
673
- * and LE Set Default PHY Command.
674
- * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 2, Part E - 7.8.49
675
- */
676
- static uint8_t all_phys_value (
677
- const phy_set_t & tx_phys,
678
- const phy_set_t & rx_phys
679
- ) {
680
- /* if phy set is empty set corresponding all_phys bit to 1 */
681
- uint8_t all_phys = 0 ;
682
- if (tx_phys.value () == 0 ) {
683
- all_phys |= 0x01 ;
684
- }
685
- if (rx_phys.value () == 0 ) {
686
- all_phys |= 0x02 ;
687
- }
688
- return all_phys;
689
- }
690
-
691
671
/* * Prefer 1M PHY. */
692
672
void set_1m (bool enabled = true ) {
693
673
if (enabled) {
Original file line number Diff line number Diff line change @@ -802,6 +802,27 @@ struct Gap {
802
802
}
803
803
}
804
804
805
+ public:
806
+ /* *
807
+ * Create an ALL_PHYS parameter used in LE Set PHY Command
808
+ * and LE Set Default PHY Command.
809
+ * @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 2, Part E - 7.8.49
810
+ */
811
+ static uint8_t create_all_phys_value (
812
+ const phy_set_t & tx_phys,
813
+ const phy_set_t & rx_phys
814
+ ) {
815
+ /* if phy set is empty set corresponding all_phys bit to 1 */
816
+ uint8_t all_phys = 0 ;
817
+ if (tx_phys.value () == 0 ) {
818
+ all_phys |= 0x01 ;
819
+ }
820
+ if (rx_phys.value () == 0 ) {
821
+ all_phys |= 0x02 ;
822
+ }
823
+ return all_phys;
824
+ }
825
+
805
826
private:
806
827
/* *
807
828
* Callback called when an event is emitted by the LE subsystem.
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ ble_error_t Gap::set_preferred_phys(
343
343
const phy_set_t & rx_phys
344
344
) {
345
345
DmSetDefaultPhy (
346
- phy_set_t::all_phys_value (tx_phys, rx_phys),
346
+ create_all_phys_value (tx_phys, rx_phys),
347
347
tx_phys.value (),
348
348
rx_phys.value ()
349
349
);
@@ -368,7 +368,7 @@ ble_error_t Gap::set_phy(
368
368
369
369
DmSetPhy (
370
370
connection,
371
- phy_set_t::all_phys_value (tx_phys, rx_phys),
371
+ create_all_phys_value (tx_phys, rx_phys),
372
372
tx_phys.value (),
373
373
rx_phys.value (),
374
374
coded_symbol.value ()
You can’t perform that action at this time.
0 commit comments