feat(bt): Add APIs to control transmit power level

- API to read ACL real RSSI
- APIs to read/write tx power of inq/iscan/page/pscan/ACL
This commit is contained in:
yangfeng
2026-03-13 10:12:40 +08:00
parent 9af32395e2
commit 7a0771d2c8
32 changed files with 1740 additions and 49 deletions
@@ -1672,6 +1672,28 @@ BOOLEAN btsnd_hcic_read_inq_tx_power (void)
return (TRUE);
}
BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 tx_power)
{
BT_HDR *p;
UINT8 *pp;
if ((p = HCI_GET_CMD_BUF(HCIC_PARAM_SIZE_W_INQ_TX_POWER)) == NULL) {
return (FALSE);
}
pp = (UINT8 *)(p + 1);
p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_W_INQ_TX_POWER;
p->offset = 0;
UINT16_TO_STREAM (pp, HCI_WRITE_INQ_TX_POWER_LEVEL);
UINT8_TO_STREAM (pp, HCIC_PARAM_SIZE_W_INQ_TX_POWER);
INT8_TO_STREAM (pp, tx_power);
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
}
BOOLEAN btsnd_hcic_send_keypress_notif (BD_ADDR bd_addr, UINT8 notif)
{
BT_HDR *p;