Source code for the Trusted Boot Module.
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.
 
 
 
tbm-mcu/source/core/spi.c

21 lines
348 B

#include <stdint.h>
#include <stdlib.h>
#include <spi.h>
int spi_set_cs_level(struct spi_dev *dev, int level)
{
if (!dev)
return -1;
return dev->ops->set_cs_level(dev, level);
}
int spi_tx_rx(struct spi_dev *dev, void *rx_buf, const void *tx_buf,
size_t len)
{
if (!dev)
return -1;
return dev->ops->tx_rx(dev, rx_buf, tx_buf, len);
}