fiatlux/firmware/bus.h

33 lines
514 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);
2023-02-19 12:36:53 +00:00
uint32_t bus_transfer_msg(uint8_t addr, uint16_t dat);
2023-02-12 05:53:41 +00:00
bool bus_transfer_msg_arr(uint8_t addr, uint16_t dat[], uint8_t len);
uint16_t bus_get_version();
bool bus_ping();
2023-02-19 12:36:53 +00:00
void reset_bus();
bool bus_init();
bool bus_init_next();
2023-02-12 05:53:41 +00:00
#ifdef __cplusplus
}
#endif
#endif //FIATLUX_BUS_H