btstack_event.h (dfc5d4aed94bed8234f94d1fd37178a70255f1ba) | btstack_event.h (01f33f4af1715157f75de0218bdb20ccf6952236) |
---|---|
1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1400 unchanged lines hidden (view full) --- 1409 * @return result 1410 * @note: btstack_type 2 1411 */ 1412static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){ 1413 return little_endian_read_16(event, 4); 1414} 1415 1416/** | 1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1400 unchanged lines hidden (view full) --- 1409 * @return result 1410 * @note: btstack_type 2 1411 */ 1412static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){ 1413 return little_endian_read_16(event, 4); 1414} 1415 1416/** |
1417 * @brief Get field con_handle from event L2CAP_EVENT_INFORMATION_RESPONSE 1418 * @param event packet 1419 * @return con_handle 1420 * @note: btstack_type H 1421 */ 1422static inline hci_con_handle_t l2cap_event_information_response_get_con_handle(const uint8_t * event){ 1423 return little_endian_read_16(event, 2); 1424} 1425/** 1426 * @brief Get field extended_feature_mask from event L2CAP_EVENT_INFORMATION_RESPONSE 1427 * @param event packet 1428 * @return extended_feature_mask 1429 * @note: btstack_type 2 1430 */ 1431static inline uint16_t l2cap_event_information_response_get_extended_feature_mask(const uint8_t * event){ 1432 return little_endian_read_16(event, 4); 1433} 1434/** 1435 * @brief Get field fixed_channels_supported from event L2CAP_EVENT_INFORMATION_RESPONSE 1436 * @param event packet 1437 * @return fixed_channels_supported 1438 * @note: btstack_type 2 1439 */ 1440static inline uint16_t l2cap_event_information_response_get_fixed_channels_supported(const uint8_t * event){ 1441 return little_endian_read_16(event, 6); 1442} 1443 1444/** |
|
1417 * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW 1418 * @param event packet 1419 * @return local_cid 1420 * @note: btstack_type 2 1421 */ 1422static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){ 1423 return little_endian_read_16(event, 2); 1424} 1425 1426/** | 1445 * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW 1446 * @param event packet 1447 * @return local_cid 1448 * @note: btstack_type 2 1449 */ 1450static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){ 1451 return little_endian_read_16(event, 2); 1452} 1453 1454/** |
1455 * @brief Get field local_cid from event L2CAP_EVENT_PACKET_SENT 1456 * @param event packet 1457 * @return local_cid 1458 * @note: btstack_type 2 1459 */ 1460static inline uint16_t l2cap_event_packet_sent_get_local_cid(const uint8_t * event){ 1461 return little_endian_read_16(event, 2); 1462} 1463 1464/** 1465 * @brief Get field local_cid from event L2CAP_EVENT_ERTM_BUFFER_RELEASED 1466 * @param event packet 1467 * @return local_cid 1468 * @note: btstack_type 2 1469 */ 1470static inline uint16_t l2cap_event_ertm_buffer_released_get_local_cid(const uint8_t * event){ 1471 return little_endian_read_16(event, 2); 1472} 1473 1474/** |
|
1427 * @brief Get field address_type from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1428 * @param event packet 1429 * @return address_type 1430 * @note: btstack_type 1 1431 */ | 1475 * @brief Get field address_type from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1476 * @param event packet 1477 * @return address_type 1478 * @note: btstack_type 1 1479 */ |
1432static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){ | 1480static inline uint8_t l2cap_event_cbm_incoming_connection_get_address_type(const uint8_t * event){ |
1433 return event[2]; 1434} 1435/** 1436 * @brief Get field address from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1437 * @param event packet 1438 * @param Pointer to storage for address 1439 * @note: btstack_type B 1440 */ | 1481 return event[2]; 1482} 1483/** 1484 * @brief Get field address from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1485 * @param event packet 1486 * @param Pointer to storage for address 1487 * @note: btstack_type B 1488 */ |
1441static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ | 1489static inline void l2cap_event_cbm_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ |
1442 reverse_bytes(&event[3], address, 6); 1443} 1444/** 1445 * @brief Get field handle from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1446 * @param event packet 1447 * @return handle 1448 * @note: btstack_type H 1449 */ | 1490 reverse_bytes(&event[3], address, 6); 1491} 1492/** 1493 * @brief Get field handle from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1494 * @param event packet 1495 * @return handle 1496 * @note: btstack_type H 1497 */ |
1450static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){ | 1498static inline hci_con_handle_t l2cap_event_cbm_incoming_connection_get_handle(const uint8_t * event){ |
1451 return little_endian_read_16(event, 9); 1452} 1453/** 1454 * @brief Get field psm from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1455 * @param event packet 1456 * @return psm 1457 * @note: btstack_type 2 1458 */ | 1499 return little_endian_read_16(event, 9); 1500} 1501/** 1502 * @brief Get field psm from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1503 * @param event packet 1504 * @return psm 1505 * @note: btstack_type 2 1506 */ |
1459static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){ | 1507static inline uint16_t l2cap_event_cbm_incoming_connection_get_psm(const uint8_t * event){ |
1460 return little_endian_read_16(event, 11); 1461} 1462/** 1463 * @brief Get field local_cid from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1464 * @param event packet 1465 * @return local_cid 1466 * @note: btstack_type 2 1467 */ | 1508 return little_endian_read_16(event, 11); 1509} 1510/** 1511 * @brief Get field local_cid from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1512 * @param event packet 1513 * @return local_cid 1514 * @note: btstack_type 2 1515 */ |
1468static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){ | 1516static inline uint16_t l2cap_event_cbm_incoming_connection_get_local_cid(const uint8_t * event){ |
1469 return little_endian_read_16(event, 13); 1470} 1471/** 1472 * @brief Get field remote_cid from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1473 * @param event packet 1474 * @return remote_cid 1475 * @note: btstack_type 2 1476 */ | 1517 return little_endian_read_16(event, 13); 1518} 1519/** 1520 * @brief Get field remote_cid from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1521 * @param event packet 1522 * @return remote_cid 1523 * @note: btstack_type 2 1524 */ |
1477static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){ | 1525static inline uint16_t l2cap_event_cbm_incoming_connection_get_remote_cid(const uint8_t * event){ |
1478 return little_endian_read_16(event, 15); 1479} 1480/** 1481 * @brief Get field remote_mtu from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1482 * @param event packet 1483 * @return remote_mtu 1484 * @note: btstack_type 2 1485 */ | 1526 return little_endian_read_16(event, 15); 1527} 1528/** 1529 * @brief Get field remote_mtu from event L2CAP_EVENT_CBM_INCOMING_CONNECTION 1530 * @param event packet 1531 * @return remote_mtu 1532 * @note: btstack_type 2 1533 */ |
1486static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){ | 1534static inline uint16_t l2cap_event_cbm_incoming_connection_get_remote_mtu(const uint8_t * event){ |
1487 return little_endian_read_16(event, 17); 1488} 1489 1490/** 1491 * @brief Get field status from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1492 * @param event packet 1493 * @return status 1494 * @note: btstack_type 1 1495 */ | 1535 return little_endian_read_16(event, 17); 1536} 1537 1538/** 1539 * @brief Get field status from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1540 * @param event packet 1541 * @return status 1542 * @note: btstack_type 1 1543 */ |
1496static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){ | 1544static inline uint8_t l2cap_event_cbm_channel_opened_get_status(const uint8_t * event){ |
1497 return event[2]; 1498} 1499/** 1500 * @brief Get field address_type from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1501 * @param event packet 1502 * @return address_type 1503 * @note: btstack_type 1 1504 */ | 1545 return event[2]; 1546} 1547/** 1548 * @brief Get field address_type from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1549 * @param event packet 1550 * @return address_type 1551 * @note: btstack_type 1 1552 */ |
1505static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){ | 1553static inline uint8_t l2cap_event_cbm_channel_opened_get_address_type(const uint8_t * event){ |
1506 return event[3]; 1507} 1508/** 1509 * @brief Get field address from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1510 * @param event packet 1511 * @param Pointer to storage for address 1512 * @note: btstack_type B 1513 */ | 1554 return event[3]; 1555} 1556/** 1557 * @brief Get field address from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1558 * @param event packet 1559 * @param Pointer to storage for address 1560 * @note: btstack_type B 1561 */ |
1514static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ | 1562static inline void l2cap_event_cbm_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ |
1515 reverse_bytes(&event[4], address, 6); 1516} 1517/** 1518 * @brief Get field handle from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1519 * @param event packet 1520 * @return handle 1521 * @note: btstack_type H 1522 */ | 1563 reverse_bytes(&event[4], address, 6); 1564} 1565/** 1566 * @brief Get field handle from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1567 * @param event packet 1568 * @return handle 1569 * @note: btstack_type H 1570 */ |
1523static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){ | 1571static inline hci_con_handle_t l2cap_event_cbm_channel_opened_get_handle(const uint8_t * event){ |
1524 return little_endian_read_16(event, 10); 1525} 1526/** 1527 * @brief Get field incoming from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1528 * @param event packet 1529 * @return incoming 1530 * @note: btstack_type 1 1531 */ | 1572 return little_endian_read_16(event, 10); 1573} 1574/** 1575 * @brief Get field incoming from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1576 * @param event packet 1577 * @return incoming 1578 * @note: btstack_type 1 1579 */ |
1532static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){ | 1580static inline uint8_t l2cap_event_cbm_channel_opened_get_incoming(const uint8_t * event){ |
1533 return event[12]; 1534} 1535/** 1536 * @brief Get field psm from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1537 * @param event packet 1538 * @return psm 1539 * @note: btstack_type 2 1540 */ | 1581 return event[12]; 1582} 1583/** 1584 * @brief Get field psm from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1585 * @param event packet 1586 * @return psm 1587 * @note: btstack_type 2 1588 */ |
1541static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){ | 1589static inline uint16_t l2cap_event_cbm_channel_opened_get_psm(const uint8_t * event){ |
1542 return little_endian_read_16(event, 13); 1543} 1544/** 1545 * @brief Get field local_cid from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1546 * @param event packet 1547 * @return local_cid 1548 * @note: btstack_type 2 1549 */ | 1590 return little_endian_read_16(event, 13); 1591} 1592/** 1593 * @brief Get field local_cid from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1594 * @param event packet 1595 * @return local_cid 1596 * @note: btstack_type 2 1597 */ |
1550static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){ | 1598static inline uint16_t l2cap_event_cbm_channel_opened_get_local_cid(const uint8_t * event){ |
1551 return little_endian_read_16(event, 15); 1552} 1553/** 1554 * @brief Get field remote_cid from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1555 * @param event packet 1556 * @return remote_cid 1557 * @note: btstack_type 2 1558 */ | 1599 return little_endian_read_16(event, 15); 1600} 1601/** 1602 * @brief Get field remote_cid from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1603 * @param event packet 1604 * @return remote_cid 1605 * @note: btstack_type 2 1606 */ |
1559static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){ | 1607static inline uint16_t l2cap_event_cbm_channel_opened_get_remote_cid(const uint8_t * event){ |
1560 return little_endian_read_16(event, 17); 1561} 1562/** 1563 * @brief Get field local_mtu from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1564 * @param event packet 1565 * @return local_mtu 1566 * @note: btstack_type 2 1567 */ | 1608 return little_endian_read_16(event, 17); 1609} 1610/** 1611 * @brief Get field local_mtu from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1612 * @param event packet 1613 * @return local_mtu 1614 * @note: btstack_type 2 1615 */ |
1568static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){ | 1616static inline uint16_t l2cap_event_cbm_channel_opened_get_local_mtu(const uint8_t * event){ |
1569 return little_endian_read_16(event, 19); 1570} 1571/** 1572 * @brief Get field remote_mtu from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1573 * @param event packet 1574 * @return remote_mtu 1575 * @note: btstack_type 2 1576 */ | 1617 return little_endian_read_16(event, 19); 1618} 1619/** 1620 * @brief Get field remote_mtu from event L2CAP_EVENT_CBM_CHANNEL_OPENED 1621 * @param event packet 1622 * @return remote_mtu 1623 * @note: btstack_type 2 1624 */ |
1577static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){ | 1625static inline uint16_t l2cap_event_cbm_channel_opened_get_remote_mtu(const uint8_t * event){ |
1578 return little_endian_read_16(event, 21); 1579} 1580 | 1626 return little_endian_read_16(event, 21); 1627} 1628 |
1581/** 1582 * @brief Get field local_cid from event L2CAP_EVENT_CBM_CHANNEL_CLOSED 1583 * @param event packet 1584 * @return local_cid 1585 * @note: btstack_type 2 1586 */ 1587static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){ 1588 return little_endian_read_16(event, 2); 1589} | |
1590 1591/** | 1629 1630/** |
1592 * @brief Get field local_cid from event L2CAP_EVENT_CBM_CAN_SEND_NOW 1593 * @param event packet 1594 * @return local_cid 1595 * @note: btstack_type 2 1596 */ 1597static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){ 1598 return little_endian_read_16(event, 2); 1599} 1600 1601/** 1602 * @brief Get field local_cid from event L2CAP_EVENT_CBM_PACKET_SENT 1603 * @param event packet 1604 * @return local_cid 1605 * @note: btstack_type 2 1606 */ 1607static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){ 1608 return little_endian_read_16(event, 2); 1609} 1610 1611/** 1612 * @brief Get field local_cid from event L2CAP_EVENT_ERTM_BUFFER_RELEASED 1613 * @param event packet 1614 * @return local_cid 1615 * @note: btstack_type 2 1616 */ 1617static inline uint16_t l2cap_event_ertm_buffer_released_get_local_cid(const uint8_t * event){ 1618 return little_endian_read_16(event, 2); 1619} 1620 1621 1622/** | |
1623 * @brief Get field address_type from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1624 * @param event packet 1625 * @return address_type 1626 * @note: btstack_type 1 1627 */ | 1631 * @brief Get field address_type from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1632 * @param event packet 1633 * @return address_type 1634 * @note: btstack_type 1 1635 */ |
1628static inline uint8_t l2cap_event_data_channel_incoming_get_address_type(const uint8_t * event){ | 1636static inline uint8_t l2cap_event_ecbm_incoming_connection_get_address_type(const uint8_t * event){ |
1629 return event[2]; 1630} 1631/** 1632 * @brief Get field address from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1633 * @param event packet 1634 * @param Pointer to storage for address 1635 * @note: btstack_type B 1636 */ | 1637 return event[2]; 1638} 1639/** 1640 * @brief Get field address from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1641 * @param event packet 1642 * @param Pointer to storage for address 1643 * @note: btstack_type B 1644 */ |
1637static inline void l2cap_event_data_channel_incoming_get_address(const uint8_t * event, bd_addr_t address){ | 1645static inline void l2cap_event_ecbm_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ |
1638 reverse_bytes(&event[3], address, 6); 1639} 1640/** 1641 * @brief Get field handle from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1642 * @param event packet 1643 * @return handle 1644 * @note: btstack_type H 1645 */ | 1646 reverse_bytes(&event[3], address, 6); 1647} 1648/** 1649 * @brief Get field handle from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1650 * @param event packet 1651 * @return handle 1652 * @note: btstack_type H 1653 */ |
1646static inline hci_con_handle_t l2cap_event_data_channel_incoming_get_handle(const uint8_t * event){ | 1654static inline hci_con_handle_t l2cap_event_ecbm_incoming_connection_get_handle(const uint8_t * event){ |
1647 return little_endian_read_16(event, 9); 1648} 1649/** 1650 * @brief Get field psm from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1651 * @param event packet 1652 * @return psm 1653 * @note: btstack_type 2 1654 */ | 1655 return little_endian_read_16(event, 9); 1656} 1657/** 1658 * @brief Get field psm from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1659 * @param event packet 1660 * @return psm 1661 * @note: btstack_type 2 1662 */ |
1655static inline uint16_t l2cap_event_data_channel_incoming_get_psm(const uint8_t * event){ | 1663static inline uint16_t l2cap_event_ecbm_incoming_connection_get_psm(const uint8_t * event){ |
1656 return little_endian_read_16(event, 11); 1657} 1658/** 1659 * @brief Get field num_channels from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1660 * @param event packet 1661 * @return num_channels 1662 * @note: btstack_type 1 1663 */ | 1664 return little_endian_read_16(event, 11); 1665} 1666/** 1667 * @brief Get field num_channels from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1668 * @param event packet 1669 * @return num_channels 1670 * @note: btstack_type 1 1671 */ |
1664static inline uint8_t l2cap_event_data_channel_incoming_get_num_channels(const uint8_t * event){ | 1672static inline uint8_t l2cap_event_ecbm_incoming_connection_get_num_channels(const uint8_t * event){ |
1665 return event[13]; 1666} 1667/** 1668 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1669 * @param event packet 1670 * @return local_cid 1671 * @note: btstack_type 2 1672 */ | 1673 return event[13]; 1674} 1675/** 1676 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_INCOMING_CONNECTION 1677 * @param event packet 1678 * @return local_cid 1679 * @note: btstack_type 2 1680 */ |
1673static inline uint16_t l2cap_event_data_channel_incoming_get_local_cid(const uint8_t * event){ | 1681static inline uint16_t l2cap_event_ecbm_incoming_connection_get_local_cid(const uint8_t * event){ |
1674 return little_endian_read_16(event, 14); 1675} 1676 1677/** 1678 * @brief Get field status from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1679 * @param event packet 1680 * @return status 1681 * @note: btstack_type 1 1682 */ | 1682 return little_endian_read_16(event, 14); 1683} 1684 1685/** 1686 * @brief Get field status from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1687 * @param event packet 1688 * @return status 1689 * @note: btstack_type 1 1690 */ |
1683static inline uint8_t l2cap_event_data_channel_opened_get_status(const uint8_t * event){ | 1691static inline uint8_t l2cap_event_ecbm_channel_opened_get_status(const uint8_t * event){ |
1684 return event[2]; 1685} 1686/** 1687 * @brief Get field address_type from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1688 * @param event packet 1689 * @return address_type 1690 * @note: btstack_type 1 1691 */ | 1692 return event[2]; 1693} 1694/** 1695 * @brief Get field address_type from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1696 * @param event packet 1697 * @return address_type 1698 * @note: btstack_type 1 1699 */ |
1692static inline uint8_t l2cap_event_data_channel_opened_get_address_type(const uint8_t * event){ | 1700static inline uint8_t l2cap_event_ecbm_channel_opened_get_address_type(const uint8_t * event){ |
1693 return event[3]; 1694} 1695/** 1696 * @brief Get field address from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1697 * @param event packet 1698 * @param Pointer to storage for address 1699 * @note: btstack_type B 1700 */ | 1701 return event[3]; 1702} 1703/** 1704 * @brief Get field address from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1705 * @param event packet 1706 * @param Pointer to storage for address 1707 * @note: btstack_type B 1708 */ |
1701static inline void l2cap_event_data_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ | 1709static inline void l2cap_event_ecbm_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ |
1702 reverse_bytes(&event[4], address, 6); 1703} 1704/** 1705 * @brief Get field handle from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1706 * @param event packet 1707 * @return handle 1708 * @note: btstack_type H 1709 */ | 1710 reverse_bytes(&event[4], address, 6); 1711} 1712/** 1713 * @brief Get field handle from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1714 * @param event packet 1715 * @return handle 1716 * @note: btstack_type H 1717 */ |
1710static inline hci_con_handle_t l2cap_event_data_channel_opened_get_handle(const uint8_t * event){ | 1718static inline hci_con_handle_t l2cap_event_ecbm_channel_opened_get_handle(const uint8_t * event){ |
1711 return little_endian_read_16(event, 10); 1712} 1713/** 1714 * @brief Get field incoming from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1715 * @param event packet 1716 * @return incoming 1717 * @note: btstack_type 1 1718 */ | 1719 return little_endian_read_16(event, 10); 1720} 1721/** 1722 * @brief Get field incoming from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1723 * @param event packet 1724 * @return incoming 1725 * @note: btstack_type 1 1726 */ |
1719static inline uint8_t l2cap_event_data_channel_opened_get_incoming(const uint8_t * event){ | 1727static inline uint8_t l2cap_event_ecbm_channel_opened_get_incoming(const uint8_t * event){ |
1720 return event[12]; 1721} 1722/** 1723 * @brief Get field psm from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1724 * @param event packet 1725 * @return psm 1726 * @note: btstack_type 2 1727 */ | 1728 return event[12]; 1729} 1730/** 1731 * @brief Get field psm from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1732 * @param event packet 1733 * @return psm 1734 * @note: btstack_type 2 1735 */ |
1728static inline uint16_t l2cap_event_data_channel_opened_get_psm(const uint8_t * event){ | 1736static inline uint16_t l2cap_event_ecbm_channel_opened_get_psm(const uint8_t * event){ |
1729 return little_endian_read_16(event, 13); 1730} 1731/** 1732 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1733 * @param event packet 1734 * @return local_cid 1735 * @note: btstack_type 2 1736 */ | 1737 return little_endian_read_16(event, 13); 1738} 1739/** 1740 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1741 * @param event packet 1742 * @return local_cid 1743 * @note: btstack_type 2 1744 */ |
1737static inline uint16_t l2cap_event_data_channel_opened_get_local_cid(const uint8_t * event){ | 1745static inline uint16_t l2cap_event_ecbm_channel_opened_get_local_cid(const uint8_t * event){ |
1738 return little_endian_read_16(event, 15); 1739} 1740/** 1741 * @brief Get field remote_cid from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1742 * @param event packet 1743 * @return remote_cid 1744 * @note: btstack_type 2 1745 */ | 1746 return little_endian_read_16(event, 15); 1747} 1748/** 1749 * @brief Get field remote_cid from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1750 * @param event packet 1751 * @return remote_cid 1752 * @note: btstack_type 2 1753 */ |
1746static inline uint16_t l2cap_event_data_channel_opened_get_remote_cid(const uint8_t * event){ | 1754static inline uint16_t l2cap_event_ecbm_channel_opened_get_remote_cid(const uint8_t * event){ |
1747 return little_endian_read_16(event, 17); 1748} 1749/** 1750 * @brief Get field local_mtu from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1751 * @param event packet 1752 * @return local_mtu 1753 * @note: btstack_type 2 1754 */ | 1755 return little_endian_read_16(event, 17); 1756} 1757/** 1758 * @brief Get field local_mtu from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1759 * @param event packet 1760 * @return local_mtu 1761 * @note: btstack_type 2 1762 */ |
1755static inline uint16_t l2cap_event_data_channel_opened_get_local_mtu(const uint8_t * event){ | 1763static inline uint16_t l2cap_event_ecbm_channel_opened_get_local_mtu(const uint8_t * event){ |
1756 return little_endian_read_16(event, 19); 1757} 1758/** 1759 * @brief Get field remote_mtu from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1760 * @param event packet 1761 * @return remote_mtu 1762 * @note: btstack_type 2 1763 */ | 1764 return little_endian_read_16(event, 19); 1765} 1766/** 1767 * @brief Get field remote_mtu from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1768 * @param event packet 1769 * @return remote_mtu 1770 * @note: btstack_type 2 1771 */ |
1764static inline uint16_t l2cap_event_data_channel_opened_get_remote_mtu(const uint8_t * event){ | 1772static inline uint16_t l2cap_event_ecbm_channel_opened_get_remote_mtu(const uint8_t * event){ |
1765 return little_endian_read_16(event, 21); 1766} 1767 1768/** | 1773 return little_endian_read_16(event, 21); 1774} 1775 1776/** |
1769 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_CHANNEL_OPENED 1770 * @param event packet 1771 * @return local_cid 1772 * @note: btstack_type 2 1773 */ 1774static inline uint16_t l2cap_event_data_channel_closed_get_local_cid(const uint8_t * event){ 1775 return little_endian_read_16(event, 2); 1776} 1777 1778/** 1779 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_CAN_SEND_NOW 1780 * @param event packet 1781 * @return local_cid 1782 * @note: btstack_type 2 1783 */ 1784static inline uint16_t l2cap_event_data_channel_can_send_now_get_local_cid(const uint8_t * event){ 1785 return little_endian_read_16(event, 2); 1786} 1787 1788/** 1789 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_PACKET_SENT 1790 * @param event packet 1791 * @return local_cid 1792 * @note: btstack_type 2 1793 */ 1794static inline uint16_t l2cap_event_data_channel_packet_sent_get_local_cid(const uint8_t * event){ 1795 return little_endian_read_16(event, 2); 1796} 1797 1798/** | |
1799 * @brief Get field remote_cid from event L2CAP_EVENT_ECBM_RECONFIGURED 1800 * @param event packet 1801 * @return remote_cid 1802 * @note: btstack_type 2 1803 */ | 1777 * @brief Get field remote_cid from event L2CAP_EVENT_ECBM_RECONFIGURED 1778 * @param event packet 1779 * @return remote_cid 1780 * @note: btstack_type 2 1781 */ |
1804static inline uint16_t l2cap_event_data_channel_reconfigured_get_remote_cid(const uint8_t * event){ | 1782static inline uint16_t l2cap_event_ecbm_reconfigured_get_remote_cid(const uint8_t * event){ |
1805 return little_endian_read_16(event, 2); 1806} 1807/** 1808 * @brief Get field mtu from event L2CAP_EVENT_ECBM_RECONFIGURED 1809 * @param event packet 1810 * @return mtu 1811 * @note: btstack_type 2 1812 */ | 1783 return little_endian_read_16(event, 2); 1784} 1785/** 1786 * @brief Get field mtu from event L2CAP_EVENT_ECBM_RECONFIGURED 1787 * @param event packet 1788 * @return mtu 1789 * @note: btstack_type 2 1790 */ |
1813static inline uint16_t l2cap_event_data_channel_reconfigured_get_mtu(const uint8_t * event){ | 1791static inline uint16_t l2cap_event_ecbm_reconfigured_get_mtu(const uint8_t * event){ |
1814 return little_endian_read_16(event, 4); 1815} 1816/** 1817 * @brief Get field mps from event L2CAP_EVENT_ECBM_RECONFIGURED 1818 * @param event packet 1819 * @return mps 1820 * @note: btstack_type 2 1821 */ | 1792 return little_endian_read_16(event, 4); 1793} 1794/** 1795 * @brief Get field mps from event L2CAP_EVENT_ECBM_RECONFIGURED 1796 * @param event packet 1797 * @return mps 1798 * @note: btstack_type 2 1799 */ |
1822static inline uint16_t l2cap_event_data_channel_reconfigured_get_mps(const uint8_t * event){ | 1800static inline uint16_t l2cap_event_ecbm_reconfigured_get_mps(const uint8_t * event){ |
1823 return little_endian_read_16(event, 6); 1824} 1825 1826/** 1827 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_RECONFIGURATION_COMPLETE 1828 * @param event packet 1829 * @return local_cid 1830 * @note: btstack_type 2 1831 */ | 1801 return little_endian_read_16(event, 6); 1802} 1803 1804/** 1805 * @brief Get field local_cid from event L2CAP_EVENT_ECBM_RECONFIGURATION_COMPLETE 1806 * @param event packet 1807 * @return local_cid 1808 * @note: btstack_type 2 1809 */ |
1832static inline uint16_t l2cap_event_data_channel_reconfiguration_complete_get_local_cid(const uint8_t * event){ | 1810static inline uint16_t l2cap_event_ecbm_reconfiguration_complete_get_local_cid(const uint8_t * event){ |
1833 return little_endian_read_16(event, 2); 1834} 1835/** 1836 * @brief Get field reconfigure_result from event L2CAP_EVENT_ECBM_RECONFIGURATION_COMPLETE 1837 * @param event packet 1838 * @return reconfigure_result 1839 * @note: btstack_type 2 1840 */ | 1811 return little_endian_read_16(event, 2); 1812} 1813/** 1814 * @brief Get field reconfigure_result from event L2CAP_EVENT_ECBM_RECONFIGURATION_COMPLETE 1815 * @param event packet 1816 * @return reconfigure_result 1817 * @note: btstack_type 2 1818 */ |
1841static inline uint16_t l2cap_event_data_channel_reconfiguration_complete_get_reconfigure_result(const uint8_t * event){ | 1819static inline uint16_t l2cap_event_ecbm_reconfiguration_complete_get_reconfigure_result(const uint8_t * event){ |
1842 return little_endian_read_16(event, 4); 1843} 1844 1845/** | 1820 return little_endian_read_16(event, 4); 1821} 1822 1823/** |
1846 * @brief Get field con_handle from event L2CAP_EVENT_INFORMATION_RESPONSE 1847 * @param event packet 1848 * @return con_handle 1849 * @note: btstack_type H 1850 */ 1851static inline hci_con_handle_t l2cap_event_information_response_get_con_handle(const uint8_t * event){ 1852 return little_endian_read_16(event, 2); 1853} 1854/** 1855 * @brief Get field extended_feature_mask from event L2CAP_EVENT_INFORMATION_RESPONSE 1856 * @param event packet 1857 * @return extended_feature_mask 1858 * @note: btstack_type 2 1859 */ 1860static inline uint16_t l2cap_event_information_response_get_extended_feature_mask(const uint8_t * event){ 1861 return little_endian_read_16(event, 4); 1862} 1863/** 1864 * @brief Get field fixed_channels_supported from event L2CAP_EVENT_INFORMATION_RESPONSE 1865 * @param event packet 1866 * @return fixed_channels_supported 1867 * @note: btstack_type 2 1868 */ 1869static inline uint16_t l2cap_event_information_response_get_fixed_channels_supported(const uint8_t * event){ 1870 return little_endian_read_16(event, 6); 1871} 1872 1873/** | |
1874 * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED 1875 * @param event packet 1876 * @return status 1877 * @note: btstack_type 1 1878 */ 1879static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){ 1880 return event[2]; 1881} --- 10575 unchanged lines hidden --- | 1824 * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED 1825 * @param event packet 1826 * @return status 1827 * @note: btstack_type 1 1828 */ 1829static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){ 1830 return event[2]; 1831} --- 10575 unchanged lines hidden --- |