MP6602 library
Loading...
Searching...
No Matches
MP6602SPI Class Reference

#include <MP6602.h>

Public Member Functions

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

Detailed Description

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

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

Definition at line 41 of file MP6602.h.

Member Function Documentation

◆ readReg() [1/2]

uint16_t MP6602SPI::readReg ( MP6602RegAddr address)
inline

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

Definition at line 69 of file MP6602.h.

◆ readReg() [2/2]

uint16_t MP6602SPI::readReg ( uint8_t address)
inline

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

Definition at line 55 of file MP6602.h.

◆ setChipSelectPin()

void MP6602SPI::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 MP6602 requires it.

Definition at line 47 of file MP6602.h.

◆ writeReg() [1/2]

void MP6602SPI::writeReg ( MP6602RegAddr address,
uint16_t value )
inline

Writes the specified value to a register.

Definition at line 87 of file MP6602.h.

◆ writeReg() [2/2]

void MP6602SPI::writeReg ( uint8_t address,
uint16_t value )
inline

Writes the specified value to a register.

Definition at line 75 of file MP6602.h.


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