Loading bluetooth/1.0/default/hci_protocol.cc +0 −17 Original line number Diff line number Diff line Loading @@ -22,23 +22,6 @@ #include <fcntl.h> #include <utils/Log.h> namespace { const size_t preamble_size_for_type[] = { 0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE, HCI_EVENT_PREAMBLE_SIZE}; const size_t packet_length_offset_for_type[] = { 0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO, HCI_LENGTH_OFFSET_EVT}; size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) { size_t offset = packet_length_offset_for_type[type]; if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset]; return (((preamble[offset + 1]) << 8) | preamble[offset]); } } // namespace namespace android { namespace hardware { namespace bluetooth { Loading bluetooth/1.0/default/test/mct_protocol_unittest.cc +0 −3 Original line number Diff line number Diff line Loading @@ -41,11 +41,8 @@ using hci::MctProtocol; static char sample_data1[100] = "A point is that which has no part."; static char sample_data2[100] = "A line is breadthless length."; static char sample_data3[100] = "The ends of a line are points."; static char acl_data[100] = "A straight line is a line which lies evenly with the points on itself."; static char sco_data[100] = "A surface is that which has length and breadth only."; static char event_data[100] = "The edges of a surface are lines."; MATCHER_P3(HidlVecMatches, preamble, preamble_length, payload, "") { Loading Loading
bluetooth/1.0/default/hci_protocol.cc +0 −17 Original line number Diff line number Diff line Loading @@ -22,23 +22,6 @@ #include <fcntl.h> #include <utils/Log.h> namespace { const size_t preamble_size_for_type[] = { 0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE, HCI_EVENT_PREAMBLE_SIZE}; const size_t packet_length_offset_for_type[] = { 0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO, HCI_LENGTH_OFFSET_EVT}; size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) { size_t offset = packet_length_offset_for_type[type]; if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset]; return (((preamble[offset + 1]) << 8) | preamble[offset]); } } // namespace namespace android { namespace hardware { namespace bluetooth { Loading
bluetooth/1.0/default/test/mct_protocol_unittest.cc +0 −3 Original line number Diff line number Diff line Loading @@ -41,11 +41,8 @@ using hci::MctProtocol; static char sample_data1[100] = "A point is that which has no part."; static char sample_data2[100] = "A line is breadthless length."; static char sample_data3[100] = "The ends of a line are points."; static char acl_data[100] = "A straight line is a line which lies evenly with the points on itself."; static char sco_data[100] = "A surface is that which has length and breadth only."; static char event_data[100] = "The edges of a surface are lines."; MATCHER_P3(HidlVecMatches, preamble, preamble_length, payload, "") { Loading