No commands are handled yet.
#include <errno.h>
+#include <glib.h>
+
#include "lib/bluetooth.h"
#include "src/shared/mgmt.h"
#include "lib/mgmt.h"
#include "log.h"
+#include "hal-msg.h"
+#include "ipc.h"
#include "adapter.h"
struct bt_adapter {
return adapter;
}
+
+void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
+ uint16_t len)
+{
+ switch (opcode) {
+ default:
+ ipc_send_error(io, HAL_SERVICE_ID_BLUETOOTH, HAL_ERROR_FAILED);
+ break;
+ }
+}
bool bt_adapter_init(uint16_t index, struct mgmt *mgmt_if,
bt_adapter_ready func);
+
+void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
+ uint16_t len);
case HAL_SERVICE_ID_CORE:
handle_service_core(msg->opcode, buf + sizeof(*msg), msg->len);
break;
+ case HAL_SERVICE_ID_BLUETOOTH:
+ bt_adapter_handle_cmd(hal_cmd_io, msg->opcode, msg->payload,
+ msg->len);
+ break;
default:
ipc_send_error(hal_cmd_io, msg->service_id, HAL_ERROR_FAILED);
break;