Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3ed8082 authored by Joseph Hwang's avatar Joseph Hwang
Browse files

PDL: support Erroneous Data Reporting

Support the read/write erroneous data reporting commands and
the command complete events in PDL.

Bug: 270651751
Tag: #floss
Test: atest packages/modules/Bluetooth/system/gd/hci/hci_packets_test.cc

Change-Id: Ifb3242a37d0168bff13808f2141abcffe51a9128
parent c714742a
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -2506,6 +2506,40 @@ packet WriteInquiryResponseTransmitPowerLevelComplete : CommandComplete (command
  status : ErrorCode,
}

packet ReadDefaultErroneousDataReporting : Command (op_code = READ_DEFAULT_ERRONEOUS_DATA_REPORTING) {
}

test ReadDefaultErroneousDataReporting {
  "\x5a\x0c\x00",
}

packet ReadDefaultErroneousDataReportingComplete : CommandComplete (command_op_code = READ_DEFAULT_ERRONEOUS_DATA_REPORTING) {
  status : ErrorCode,
  erroneous_data_reporting : Enable,
}

test ReadDefaultErroneousDataReportingComplete {
  "\x0e\x05\x02\x5a\x0c\x00\x00", // status success, Erroneous data reporting disabled
  "\x0e\x05\x02\x5a\x0c\x00\x01", // status success, Erroneous data reporting enabled
}

packet WriteDefaultErroneousDataReporting : Command (op_code = WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING) {
  erroneous_data_reporting : Enable,
}

test WriteDefaultErroneousDataReporting {
  "\x5b\x0c\x01\x00", // disable Erroneous Data reporting
  "\x5b\x0c\x01\x01", // enable Erroneous Data reporting
}

packet WriteDefaultErroneousDataReportingComplete : CommandComplete (command_op_code = WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING) {
  status : ErrorCode,
}

test WriteDefaultErroneousDataReportingComplete {
  "\x0e\x04\x01\x5b\x0c\x00", // status success
}

enum KeypressNotificationType : 8 {
  ENTRY_STARTED = 0,
  DIGIT_ENTERED = 1,