mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] andrzej-kaczmarek commented on a change in pull request #742: nimble/ble_ll: Add support for HCI Test commands
Date Thu, 01 Jan 1970 00:00:00 GMT
andrzej-kaczmarek commented on a change in pull request #742: nimble/ble_ll: Add support for
HCI Test commands
URL: https://github.com/apache/mynewt-core/pull/742#discussion_r162085486
 
 

 ##########
 File path: hw/drivers/nimble/nrf52/src/ble_phy.c
 ##########
 @@ -1824,6 +1833,28 @@ ble_phy_resolv_list_disable(void)
 }
 #endif
 
+#if MYNEWT_VAL(BLE_LL_DIRECT_TEST_MODE) == 1
+void ble_phy_enable_dtm(void)
+{
+    /* Disable whitening */
+    NRF_RADIO->PCNF1 = NRF_MAXLEN |
+                       (RADIO_PCNF1_ENDIAN_Little <<  RADIO_PCNF1_ENDIAN_Pos) |
+                       (NRF_BALEN << RADIO_PCNF1_BALEN_Pos);
+
+    g_ble_phy_dtm = 1;
+}
+
+void ble_phy_disable_dtm(void)
+{
+    /* Enable whitening */
+    NRF_RADIO->PCNF1 = NRF_MAXLEN |
+                       (RADIO_PCNF1_ENDIAN_Little <<  RADIO_PCNF1_ENDIAN_Pos) |
+                       (NRF_BALEN << RADIO_PCNF1_BALEN_Pos) |
+                       RADIO_PCNF1_WHITEEN_Msk;
 
 Review comment:
   ditto

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message