1 // Copyright 2010-2020 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 
16 #pragma once
17 
18 // NOTE: From the view of master
19 #define CMD_HD_WRBUF_REG    0x01
20 #define CMD_HD_RDBUF_REG    0x02
21 #define CMD_HD_WRDMA_REG    0x03
22 #define CMD_HD_RDDMA_REG    0x04
23 
24 #define CMD_HD_ONEBIT_MODE  0x00
25 #define CMD_HD_DOUT_MODE    0x10
26 #define CMD_HD_QOUT_MODE    0x20
27 #define CMD_HD_DIO_MODE     0x50
28 #define CMD_HD_QIO_MODE     0xA0
29 
30 #define CMD_HD_SEG_END_REG  0x05
31 #define CMD_HD_EN_QPI_REG   0x06
32 #define CMD_HD_WR_END_REG   0x07
33 #define CMD_HD_INT0_REG     0x08
34 #define CMD_HD_INT1_REG     0x09
35 #define CMD_HD_INT2_REG     0x0A
36 #define CMD_HD_EX_QPI_REG   0xDD
37 
38 #define SPI_SLAVE_HD_BUFFER_SIZE 64
39