UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
spi.h
1 
15 #ifndef __SPI_H__
16 #define __SPI_H__
17 
18 #include <stddef.h>
19 #include <stdint.h>
20 #include <stdbool.h>
21 
32 uint8_t SPI_cmd(uint8_t spi_num, uint8_t cmd);
33 
45 uint8_t SPI_read8(uint8_t spi_num, uint8_t addr, uint8_t *data);
46 
58 uint8_t SPI_write8(uint8_t spi_num, uint8_t addr, uint8_t *data);
59 
72 uint8_t SPI_burstread8(uint8_t spi_num, uint8_t addr, uint8_t *data, uint32_t len);
73 
86 uint8_t SPI_burstwrite8(uint8_t spi_num, uint8_t addr, uint8_t *data, uint32_t len);
87 
99 uint8_t SPI_read16(uint8_t spi_num, uint16_t addr, uint8_t *data);
100 
112 uint8_t SPI_write16(uint8_t spi_num, uint16_t addr, uint8_t *data);
113 
126 uint8_t SPI_burstread16(uint8_t spi_num, uint16_t addr, uint8_t *data, uint32_t len);
127 
140 uint8_t SPI_burstwrite16(uint8_t spi_num, uint16_t addr, uint8_t *data, uint32_t len);
141 
153 uint8_t SPI_read32(uint8_t spi_num, uint32_t addr, uint8_t *data);
154 
166 uint8_t SPI_write32(uint8_t spi_num, uint32_t addr, uint8_t *data);
167 
180 uint8_t SPI_burstread32(uint8_t spi_num, uint32_t addr, uint8_t *data, uint32_t len);
181 
194 uint8_t SPI_burstwrite32(uint8_t spi_num, uint32_t addr, uint8_t *data, uint32_t len);
195 
196 #endif /* __SPI_H__ */
uint8_t SPI_write32(uint8_t spi_num, uint32_t addr, uint8_t *data)
Definition: spi.c:118
uint8_t SPI_burstread8(uint8_t spi_num, uint8_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:32
uint8_t SPI_burstread32(uint8_t spi_num, uint32_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:108
uint8_t SPI_burstwrite8(uint8_t spi_num, uint8_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:51
uint8_t SPI_read32(uint8_t spi_num, uint32_t addr, uint8_t *data)
Definition: spi.c:99
uint8_t SPI_burstread16(uint8_t spi_num, uint16_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:70
uint8_t SPI_cmd(uint8_t spi_num, uint8_t cmd)
Definition: spi.c:15
uint8_t SPI_write8(uint8_t spi_num, uint8_t addr, uint8_t *data)
Definition: spi.c:42
uint8_t SPI_burstwrite16(uint8_t spi_num, uint16_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:89
uint8_t SPI_write16(uint8_t spi_num, uint16_t addr, uint8_t *data)
Definition: spi.c:80
uint8_t SPI_read8(uint8_t spi_num, uint8_t addr, uint8_t *data)
Definition: spi.c:23
uint8_t SPI_read16(uint8_t spi_num, uint16_t addr, uint8_t *data)
Definition: spi.c:61
uint8_t SPI_burstwrite32(uint8_t spi_num, uint32_t addr, uint8_t *data, uint32_t len)
Definition: spi.c:127