Commit 7c8dc9fa authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Carles Cufi
Browse files

Bluetooth: Controller: Initial support for BIS on S2/S8 coding



Added implementation to support advertising on S2/S8 coding
scheme.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent e4f12c73
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ struct lll_adv_iso {
	uint8_t bn_curr:3;
	uint8_t bis_curr:5;

	uint8_t phy_flags:1;

	uint8_t term_req:1;
	uint8_t term_ack:1;
	uint8_t term_reason;
+5 −3
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ static int prepare_cb_common(struct lll_prepare_param *p)
#endif

	phy = lll->phy;
	radio_phy_set(phy, 1);
	radio_phy_set(phy, lll->phy_flags);
	radio_pkt_configure(8, lll->max_pdu, (phy << 1));
	radio_aa_set(access_addr);
	radio_crc_configure(((0x5bUL) | ((0x06UL) << 8) | ((0x00UL) << 16)),
@@ -302,7 +302,8 @@ static int prepare_cb_common(struct lll_prepare_param *p)
		uint16_t iss_us;

		iss_us = lll->sub_interval -
			 PDU_BIS_US(pdu->len, lll->enc, lll->phy, 1);
			 PDU_BIS_US(pdu->len, lll->enc, lll->phy,
				    lll->phy_flags);
		radio_tmr_tifs_set(iss_us);
		radio_switch_complete_and_b2b_tx(lll->phy, 0, lll->phy, 0);
	}
@@ -494,7 +495,8 @@ static void isr_tx_common(void *param,
		uint16_t iss_us;

		iss_us = lll->sub_interval -
			 PDU_BIS_US(pdu->len, lll->enc, lll->phy, 1);
			 PDU_BIS_US(pdu->len, lll->enc, lll->phy,
				    lll->phy_flags);
		radio_tmr_tifs_set(iss_us);
		radio_switch_complete_and_b2b_tx(lll->phy, 0, lll->phy, 0);

+3 −2
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ uint8_t ll_big_create(uint8_t big_handle, uint8_t adv_handle, uint8_t num_bis,
	lll_adv_iso->handle = big_handle;
	lll_adv_iso->max_pdu = LL_BIS_OCTETS_TX_MAX;
	lll_adv_iso->phy = phy;
	lll_adv_iso->phy_flags = PHY_FLAGS_S8;

	/* Mandatory Num_BIS = 1 */
	lll_adv_iso->num_bis = num_bis;
@@ -205,10 +206,10 @@ uint8_t ll_big_create(uint8_t big_handle, uint8_t adv_handle, uint8_t num_bis,
	 *       max_tx_time for Max_PDU + tMSS.
	 */
	lll_adv_iso->sub_interval = PDU_BIS_US(lll_adv_iso->max_pdu, encryption,
					       phy, 1) +
					       phy, lll_adv_iso->phy_flags) +
				    EVENT_MSS_US;
	ctrl_spacing = PDU_BIS_US(sizeof(struct pdu_big_ctrl), encryption, phy,
				  1) + EVENT_IFS_US;
				  lll_adv_iso->phy_flags) + EVENT_IFS_US;

	latency_pdu = max_latency * lll_adv_iso->bn / bn;