Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
AS5145< chainlength > Struct Template Reference

Class describing a chain of AS5145 Hall sensors. More...

#include <AS5145.h>

Inherits SPI::Device.

Collaboration diagram for AS5145< chainlength >:
[legend]

Public Member Functions

 AS5145 (Sink< SPI::Request > &bus, DIO cs)
 Constructor.
 
int16_t getVal (int i=0)
 
void sense ()
 request measurement of sensor data
 
void callback (const SPI::Request rq) override
 is called as soon as requested data arrived over wire
 
void select (bool sel)
 chipselect activation
 

Public Attributes

DIO cs
 GPIO chipselect line.
 
struct SPI::Device::Conf conf
 necessary SPI configuration
 

Detailed Description

template<int chainlength>
struct AS5145< chainlength >

Class describing a chain of AS5145 Hall sensors.

Constructor & Destructor Documentation

◆ AS5145()

template<int chainlength>
AS5145< chainlength >::AS5145 ( Sink< SPI::Request > &  bus,
DIO  cs 
)
inline

Constructor.

Parameters
busSPI bus
csChipSelect pin

Member Function Documentation

◆ getVal()

template<int chainlength>
int16_t AS5145< chainlength >::getVal ( int  i = 0)
inline
Parameters
iindex of sensor in chain
Returns
measured sensor angle

◆ select()

void SPI::Device::select ( bool  sel)
inlineinherited

chipselect activation

Parameters
seltrue/false

The documentation for this struct was generated from the following file: