You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
423 B
19 lines
423 B
#pragma once
|
|
|
|
struct spi_dev;
|
|
|
|
struct spi_ops {
|
|
int (* set_cs_level)(struct spi_dev *dev, int level);
|
|
int (* tx_rx)(struct spi_dev *dev, void *rx_buf, const void *tx_buf,
|
|
size_t len);
|
|
};
|
|
|
|
struct spi_dev {
|
|
struct spi_ops *ops;
|
|
uint32_t dev_id;
|
|
};
|
|
|
|
struct spi_dev *spi_probe(void);
|
|
int spi_set_cs_level(struct spi_dev *dev, int level);
|
|
int spi_tx_rx(struct spi_dev *dev, void *rx_buf, const void *tx_buf,
|
|
size_t len);
|
|
|