HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
As5047uHandler.cpp File Reference

Implementation of unified AS5047U magnetic rotary position sensor handler. More...

#include "As5047uHandler.h"
#include <cstring>
#include <algorithm>
#include <cmath>
#include "handlers/logger/Logger.h"
Include dependency graph for As5047uHandler.cpp:

Macros

#define LOG_BANNER(tag, art, format)   Logger::GetInstance().LogBanner(tag, art, format)
 

Functions

std::unique_ptr< As5047uHandlerCreateAs5047uHandler (BaseSpi &spi_interface, const As5047uConfig &config) noexcept
 Create AS5047U handler instance.
 

Detailed Description

Implementation of unified AS5047U magnetic rotary position sensor handler.

This file implements the comprehensive AS5047U handler with CRTP SPI integration, lazy initialization, shared pointer management, and complete exception-free design.

Key implementation features:

  • As5047uSpiAdapter CRTP connecting BaseSpi to as5047u::SpiInterface<As5047uSpiAdapter>
  • Lazy initialization pattern with deferred object creation
  • Shared pointer management for safe cross-component access
  • Thread-safe operations with RtosMutex protection
  • Comprehensive error handling and validation
  • High-level sensor abstraction methods
  • Advanced AS5047U feature implementations
  • Diagnostic and health monitoring
Author
HardFOC Team
Version
1.0
Date
2025

Macro Definition Documentation

◆ LOG_BANNER

#define LOG_BANNER ( tag,
art,
format )   Logger::GetInstance().LogBanner(tag, art, format)

Function Documentation

◆ CreateAs5047uHandler()

std::unique_ptr< As5047uHandler > CreateAs5047uHandler ( BaseSpi & spi_interface,
const As5047uConfig & config = As5047uHandler::GetDefaultConfig() )
noexcept

Create AS5047U handler instance.

Parameters
spi_interfaceReference to SPI interface
configSensor configuration
Returns
Unique pointer to AS5047U handler