Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vts sensor #100

Open
wants to merge 2 commits into
base: celadon/s/mr0/stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bluetooth/h4_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//

#include "h4_protocol.h"
#include "hcidefs.h"

#define LOG_TAG "android.hardware.bluetooth-hci-h4"

Expand All @@ -25,6 +24,15 @@
#include <linux/usb/ch9.h>
#include <libusb/libusb.h>

#define HCI_COMMAND_COMPLETE_EVT 0x0E
#define HCI_COMMAND_STATUS_EVT 0x0F
#define HCI_ESCO_CONNECTION_COMP_EVT 0x2C
#define HCI_RESET_SUPPORTED(x) ((x)[5] & 0x80)
#define HCI_GRP_INFORMATIONAL_PARAMS (0x04 << 10) /* 0x1000 */
#define HCI_READ_LOCAL_SUPPORTED_CMDS (0x0002 | HCI_GRP_INFORMATIONAL_PARAMS)
#define HCI_GRP_HOST_CONT_BASEBAND_CMDS (0x03 << 10) /* 0x0C00 */
#define HCI_RESET (0x0003 | HCI_GRP_HOST_CONT_BASEBAND_CMDS)

#define INTEL_VID 0x8087
#define INTEL_PID_8265 0x0a2b // Windstorm peak
#define INTEL_PID_3168 0x0aa7 //SandyPeak (SdP)
Expand Down
3 changes: 0 additions & 3 deletions bluetooth/vendor_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#include <dlfcn.h>
#include <fcntl.h>

#include "esco_parameters.h"
#include "hcidefs.h"

#include "bluetooth_address.h"
#include "h4_protocol.h"
#include "mct_protocol.h"
Expand Down
14 changes: 14 additions & 0 deletions sensors/2.0/iiohal_mediation_v2.0/Sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,23 @@ struct Sensors : public ISensorsInterface, public ISensorsEventCallback {
}

Return<Result> setOperationMode(OperationMode mode) override {
ALOGE("H_shivani Sensors.h called setOperationMode %d",mode);

#ifndef DISABLE_STATIC_SENSOR_LIST
ALOGE("H_shivani Sensors.h setOperationMode data injection");

if(mode == OperationMode::DATA_INJECTION && !(mSensors.size() > 0)) {

ALOGE("H_shivani setOperationMode data injection returning BAD_VALUE");

return Result::BAD_VALUE;

}

for (auto sensor : mSensors) {
sensor.second->setOperationMode(mode);
}
#endif
return Result::OK;
}

Expand Down