fiatlux/firmware/bus.h

31 lines
491 B
C
Raw Normal View History

2023-02-12 05:53:41 +00:00
#ifndef FIATLUX_BUS_H
#define FIATLUX_BUS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
uint32_t spi_transfer_32_duplex(uint8_t bus, uint32_t val);
uint16_t spi_transfer_16_duplex(uint8_t bus, uint32_t val);
void reset_bus();
void bus_init();
uint16_t bus_transfer_msg(uint8_t addr, uint16_t dat);
bool bus_transfer_msg_arr(uint8_t addr, uint16_t dat[], uint8_t len);
uint16_t bus_get_version();
bool bus_ping();
#ifdef __cplusplus
}
#endif
#endif //FIATLUX_BUS_H