summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/spi_cfg.h
blob: 84ab8bba96565c314b9dfd629e01480518ec1ae9 (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
29
30
31
32
33
34
35
36
37
#include <stdint.h>

#define EOS_SPI_MAX_DEV         4

typedef struct {
    uint16_t div;
    uint8_t csid;
    uint8_t cspin;
    unsigned char evt;
} SPIConfig;

static const SPIConfig spi_cfg[EOS_SPI_MAX_DEV] = {
    {   // DEV_NET
        .div = SPI_DIV_NET,
        .csid = SPI_CSID_NET,
        .cspin = SPI_CSPIN_NET,
        .evt = 0,   // Not SPI event
    },
    {   // DEV_EVE
        .div = SPI_DIV_EVE,
        .csid = SPI_CSID_EVE,
        .cspin = SPI_CSPIN_EVE,
        .evt = 0,
    },
    {   // DEV_SDC
        .div = SPI_DIV_SDC,
        .csid = SPI_CSID_SDC,
        .cspin = SPI_CSPIN_SDC,
        .evt = EOS_SPI_EVT_SDC,
    },
    {   // DEV_CAM
        .div = SPI_DIV_CAM,
        .csid = SPI_CSID_CAM,
        .cspin = SPI_CSPIN_CAM,
        .evt = EOS_SPI_EVT_CAM,
    },
};