#include "as5601.h" #include "i2c.h" #include "Hal_gpio.h" #include "stm32l4xx_hal_i2c" #define AS5601_ADDRESS (0x6C) /**< in the as5601 datasheet the address (0x36) is expressed in 7 bit but needs to be left shifted by 1, giving 0x6C*/ #define ZMCO_ADDR (0x00) #define ZPOS_ADDR (0x01) #define CONF_ADDR (0x07) #define ABN_ADDR (0x09) #define PUSHTHR_ADDR (0x0A) #define RAWANGLE_ADDR (0x0C) #define ANGLE_ADDR (0x0E) #define STATUS_ADDR (0x0B) #define AGC_ADDR (0x1A) #define MAGNITUDE_ADDR (0x1B) #define BURN_CMD (0xFF) #define BURN_SETTING (0x40) #define BURN_ANGLE (0x80) extern uint16_t Hal_GetHallSensorRawValue(uint8_t channel);