sk6812d/src/hat_spi.h

15 lines
387 B
C

#ifndef HAT_SPI_H
#define HAT_SPI_H
struct hat_spi_ctx {
int spidev_fd;
};
int hat_spi_init(struct hat_spi_ctx *ctx);
int hat_spi_set_data(struct hat_spi_ctx *ctx, uint8_t strip, size_t len, uint8_t *data);
int hat_spi_flush(struct hat_spi_ctx *ctx);
int hat_spi_config(struct hat_spi_ctx *ctx, uint16_t data_len);
void hat_spi_shutdown(struct hat_spi_ctx *ctx);
#endif // HAT_SPI_H