Files
Slotcar-Controller/Core/Inc/TLE5012.hpp
2026-01-02 20:44:24 +01:00

24 lines
463 B
C++

#ifndef TLE5012
#define TLE5012
#include "stm32g030xx.h"
#include "stm32g0xx_hal.h"
#include <cstdint>
constexpr uint16_t RW = 0x8000U;
constexpr uint16_t AVAL = 0x0020U;
constexpr uint16_t SAFETY = 0x0001U;
class Tle5012 {
public:
Tle5012(GPIO_TypeDef * csPort, uint16_t csPin,
SPI_HandleTypeDef * spiHandler);
uint16_t getAngel();
private:
GPIO_TypeDef * csPort;
uint16_t csPin;
SPI_HandleTypeDef * spiHandler;
};
#endif