modm API documentation
modm::as5047< SpiMaster, Cs > Class Template Reference

#include <modm/driver/encoder/as5047.hpp>

Inheritance diagram for modm::as5047< SpiMaster, Cs >:
modm::SpiDevice< SpiMaster > modm::NestedResumable< 5 >

Classes

struct  Data
 

Public Typedefs

using Data = as5047::Data
 

Public Types

enum  Errorfl : uint16_t { Parerr = Bit2, Invcomm = Bit1, Frerr = Bit0 }
 

Public Member Functions

 As5047 (Data &data)
 
modm::ResumableResult< void > initialize ()
 Call this function once before using the device.
 
modm::ResumableResult< void > readout ()
 Read the raw data from the sensor.
 
DatagetData ()
 Get the data object for this sensor.
 
void attachConfigurationHandler (Spi::ConfigurationHandler handler)
 

Protected Member Functions

bool acquireMaster ()
 
bool releaseMaster ()
 
modm::ResumableResult< ReturnType > resumable function (...)
 
int8_t getResumableDepth () const
 
bool isResumableRunning () const
 
void stopResumable ()
 Force all resumable functions to stop running at the current nesting level.
 

Detailed Description

template<typename SpiMaster, typename Cs>
class modm::as5047< SpiMaster, Cs >

Template Parameters
SpiMaster
Cs

Member Function Documentation

template<typename SpiMaster , typename Cs >
modm::as5047< SpiMaster, Cs >::As5047 ( Data data)
Parameters
datapointer to buffer of the internal data of type Data
modm::ResumableResult< ReturnType > resumable modm::NestedResumable< 1 >::function (   ...)
inherited

Run the resumable function.

You need to implement this method in you subclass yourself.

Returns
>NestingError if still running, <=NestingError if it has finished.
int8_t modm::NestedResumable< 1 >::getResumableDepth ( ) const
inheritedinline
Returns
the nesting depth in the current resumable function, or -1 if called outside any resumable function
bool modm::NestedResumable< 1 >::isResumableRunning ( ) const
inheritedinline
Returns
true if a resumable function is running at the current nesting level, else false

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