]> Git Repo - esp-hosted.git/blame - host/linux/host_driver/esp32/spi/esp_spi.h
Merge branch 'pr129_vuhailongkl97' into 'master'
[esp-hosted.git] / host / linux / host_driver / esp32 / spi / esp_spi.h
CommitLineData
5e72bc8b 1/*
683f0529 2 * Copyright (C) 2015-2021 Espressif Systems (Shanghai) PTE LTD
5e72bc8b
MM
3 *
4 * This software file (the "File") is distributed by Espressif Systems (Shanghai)
5 * PTE LTD under the terms of the GNU General Public License Version 2, June 1991
6 * (the "License"). You may use, redistribute and/or modify this File in
7 * accordance with the terms and conditions of the License, a copy of which
8 * is available by writing to the Free Software Foundation, Inc.,
9 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
10 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
11 *
12 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
13 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
14 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
15 * this warranty disclaimer.
16 */
17#ifndef _ESP_SPI_H_
18#define _ESP_SPI_H_
19
20#include "esp.h"
21
d53a8a4a 22#define HANDSHAKE_PIN 22
a9096fbc
MM
23#define SPI_IRQ gpio_to_irq(HANDSHAKE_PIN)
24#define SPI_DATA_READY_PIN 27
25#define SPI_DATA_READY_IRQ gpio_to_irq(SPI_DATA_READY_PIN)
26#define SPI_BUF_SIZE 1600
5e72bc8b
MM
27
28struct esp_spi_context {
a9096fbc
MM
29 struct esp_adapter *adapter;
30 struct spi_device *esp_spi_dev;
4848e879
YM
31 struct sk_buff_head tx_q[MAX_PRIORITY_QUEUES];
32 struct sk_buff_head rx_q[MAX_PRIORITY_QUEUES];
a9096fbc
MM
33 struct workqueue_struct *spi_workqueue;
34 struct work_struct spi_work;
5e72bc8b
MM
35};
36
c746d295
MM
37enum {
38 CLOSE_DATAPATH,
39 OPEN_DATAPATH,
40};
41
5e72bc8b
MM
42
43#endif
This page took 0.030373 seconds and 4 git commands to generate.