summaryrefslogtreecommitdiff
path: root/code/fe310/eos/spi.h
blob: 7cad270d128834bb3043e8230d1f714266be45ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdint.h>

#include "encoding.h"
#include "platform.h"

#include "spi_def.h"

#define SPI_IOF_MASK            (((uint32_t)1 << IOF_SPI1_SCK) | ((uint32_t)1 << IOF_SPI1_MOSI) | ((uint32_t)1 << IOF_SPI1_MISO))

typedef struct SPIBufQ {
    uint8_t idx_r;
    uint8_t idx_w;
    unsigned char *array[SPI_SIZE_BUFQ];
} SPIBufQ;