summaryrefslogtreecommitdiff
path: root/code/fe310/eos/spi_def.h
blob: e73b5e3f7133ac461eeb05879a8689ac4f86391b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#define SPI_SIZE_BUF            1500
#define SPI_SIZE_BUFQ           2

#define SPI_MODE0               0x00
#define SPI_MODE1               0x01
#define SPI_MODE2               0x02
#define SPI_MODE3               0x03

/* DO NOT TOUCH THEESE */
#define SPI_SIZE_CHUNK          4
#define SPI_SIZE_WM             2

#define SPI_PIN_RTS             21
#define SPI_PIN_CTS             22
#define SPI_PIN_CS              10
#define SPI_IDX_SS              3

#define SPI_FLAG_RDY            0x01
#define SPI_FLAG_RST            0x02
#define SPI_FLAG_RTS            0x04
#define SPI_FLAG_CTS            0x08
#define SPI_FLAG_INIT           0x10
#define SPI_FLAG_ONEW           0x20

/* asm */
#define SPI_BUFQ_OFF_IDXR       0
#define SPI_BUFQ_OFF_IDXW       1
#define SPI_BUFQ_OFF_ARRAY      4