DRV8434S library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DRV8434SSPI Class Reference

#include <DRV8434S.h>

Public Member Functions

void setChipSelectPin (uint8_t pin)
 
uint8_t readReg (uint8_t address)
 Reads the register at the given address and returns its raw value. More...
 
uint16_t readReg (DRV8434SRegAddr address)
 Reads the register at the given address and returns its raw value. More...
 
uint8_t writeReg (uint8_t address, uint8_t value)
 Writes the specified value to a register. More...
 
void writeReg (DRV8434SRegAddr address, uint8_t value)
 Writes the specified value to a register. More...
 

Public Attributes

uint8_t lastStatus = 0
 

Detailed Description

This class provides low-level functions for reading and writing from the SPI interface of a DRV8434S stepper motor controller IC.

Most users should use the HighPowerStepperDriver class, which provides a higher-level interface, instead of this class.

Definition at line 42 of file DRV8434S.h.

Member Function Documentation

◆ readReg() [1/2]

uint16_t DRV8434SSPI::readReg ( DRV8434SRegAddr  address)
inline

Reads the register at the given address and returns its raw value.

Definition at line 71 of file DRV8434S.h.

◆ readReg() [2/2]

uint8_t DRV8434SSPI::readReg ( uint8_t  address)
inline

Reads the register at the given address and returns its raw value.

Definition at line 56 of file DRV8434S.h.

◆ setChipSelectPin()

void DRV8434SSPI::setChipSelectPin ( uint8_t  pin)
inline

Configures this object to use the specified pin as a chip select pin.

You must use a chip select pin; the DRV8434S requires it.

Definition at line 48 of file DRV8434S.h.

◆ writeReg() [1/2]

void DRV8434SSPI::writeReg ( DRV8434SRegAddr  address,
uint8_t  value 
)
inline

Writes the specified value to a register.

Definition at line 94 of file DRV8434S.h.

◆ writeReg() [2/2]

uint8_t DRV8434SSPI::writeReg ( uint8_t  address,
uint8_t  value 
)
inline

Writes the specified value to a register.

Definition at line 77 of file DRV8434S.h.

Member Data Documentation

◆ lastStatus

uint8_t DRV8434SSPI::lastStatus = 0

The status reported by the driver during the last read or write. This status is the same as that which would be returned by reading the FAULT register with DRV8434S::readFault(), except the upper two bits are always

Definition at line 128 of file DRV8434S.h.


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