HF-AS5047U Driver  0.1.0-dev
HF-AS5047U C++ Driver
Loading...
Searching...
No Matches
as5047u.hpp File Reference

Driver for AMS AS5047U Magnetic Rotary Position Sensor (C++21) More...

#include "as5047u_spi_interface.hpp"
#include "as5047u_registers.hpp"
#include "as5047u_version.h"
#include <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <functional>
#include <utility>
#include "as5047u_types.hpp"
#include "as5047u_config.hpp"
#include "../src/as5047u.ipp"
Include dependency graph for as5047u.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  as5047u::AS5047U< SpiType >
 AS5047U magnetic rotary sensor driver class. More...
 
struct  as5047u::AS5047U< SpiType >::Angle
 Angle conversion helpers. More...
 
struct  as5047u::AS5047U< SpiType >::Velocity
 Helper constants and methods for velocity unit conversions. More...
 

Namespaces

namespace  as5047u
 

Macros

#define AS5047U_HEADER_INCLUDED
 

Enumerations

enum class  AS5047U_Error : uint16_t {
  None = 0 , AgcWarning = 1 << 0 , MagHalf = 1 << 1 , P2ramWarning = 1 << 2 ,
  P2ramError = 1 << 3 , FramingError = 1 << 4 , CommandError = 1 << 5 , CrcError = 1 << 6 ,
  WatchdogError = 1 << 7 , OffCompError = 1 << 9 , CordicOverflow = 1 << 10
}
 
enum class  as5047u::AngleUnit : uint8_t { as5047u::Lsb , as5047u::Degrees , as5047u::Radians }
 Units for angle-returning APIs. More...
 
enum class  as5047u::VelocityUnit : uint8_t { as5047u::Lsb , as5047u::DegPerSec , as5047u::RadPerSec , as5047u::Rpm }
 Units for velocity-returning APIs. More...
 

Functions

const char * as5047u::GetDriverVersion () noexcept
 

Detailed Description

Driver for AMS AS5047U Magnetic Rotary Position Sensor (C++21)

Macro Definition Documentation

◆ AS5047U_HEADER_INCLUDED

#define AS5047U_HEADER_INCLUDED

Enumeration Type Documentation

◆ AS5047U_Error

enum class AS5047U_Error : uint16_t
strong
Enumerator
None 
AgcWarning 

AGC reached minimum (0) or maximum (255) value.

MagHalf 

Magnetic field is half of regulated value (AGC=255)

P2ramWarning 

ECC corrected 1 bit in P2RAM customer area.

P2ramError 

ECC detected 2+ uncorrectable errors in P2RAM.

FramingError 

SPI framing error.

CommandError 

Invalid SPI command received.

CrcError 

CRC error during SPI communication.

WatchdogError 

Internal oscillator or watchdog not working proper.

OffCompError 

Internal offset compensation not finished.

CordicOverflow 

CORDIC algorithm overflow.