Lines Matching +full:host +full:- +full:int +full:- +full:gpios
4 * Copyright (c) 2015-2016 Intel Corporation
6 * SPDX-License-Identifier: Apache-2.0
73 * "zephyr,bt-hci-spi-slave". There should just be one in the
84 * the SPI-based BT controller.
92 * The GPIO used to send interrupts to the host,
93 * configured in the 'irq-gpios' property in HCI_SPI_NODE.
103 static inline int spi_send(struct net_buf *buf) in spi_send()
108 int ret; in spi_send()
110 LOG_DBG("buf %p type %u len %u", buf, bt_buf_get_type(buf), buf->len); in spi_send()
122 return -EINVAL; in spi_send()
125 if (buf->len > SPI_MAX_MSG_LEN) { in spi_send()
128 return -EINVAL; in spi_send()
130 header_slave[STATUS_HEADER_TOREAD] = buf->len; in spi_send()
148 tx.buf = buf->data; in spi_send()
149 tx.len = buf->len; in spi_send()
175 int ret; in bt_tx_thread()
210 /* Receiving data from the SPI Host */ in bt_tx_thread()
225 hci_hdr.cmd_hdr->param_len); in bt_tx_thread()
237 sys_le16_to_cpu(hci_hdr.acl_hdr->len)); in bt_tx_thread()
249 buf, bt_buf_get_type(buf), buf->len); in bt_tx_thread()
262 static int hci_spi_init(void) in hci_spi_init()
268 LOG_ERR("SPI bus %s is not ready", spi_hci_dev->name); in hci_spi_init()
269 return -EINVAL; in hci_spi_init()
273 LOG_ERR("IRQ GPIO port %s is not ready", irq.port->name); in hci_spi_init()
274 return -EINVAL; in hci_spi_init()
283 int main(void) in main()
289 int err; in main()
309 evt_hdr->evt = BT_HCI_EVT_VENDOR; in main()
310 evt_hdr->len = 2U; in main()
325 /* Ensure that the IRQ line is de-asserted for some minimum in main()