TMCStepper
SW_SPI.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Arduino.h>
4 #include "TMC_platforms.h"
5 
6 class SW_SPIClass {
7  public:
8  SW_SPIClass(uint16_t sw_mosi_pin, uint16_t sw_miso_pin, uint16_t sw_sck_pin);
9  void init();
10  void begin() {};
11  uint8_t transfer(uint8_t ulVal);
12  uint16_t transfer16(uint16_t data);
13  void endTransaction() {};
14  private:
15  const uint16_t mosi_pin,
16  miso_pin,
17  sck_pin;
18 
19  #if defined(ARDUINO_ARCH_AVR)
20  fastio_bm mosi_bm,
21  miso_bm,
22  sck_bm;
23  fastio_reg mosi_register,
24  miso_register,
25  sck_register;
26  #endif
27 };
SW_SPIClass::transfer16
uint16_t transfer16(uint16_t data)
Definition: SW_SPI.cpp:46
SW_SPIClass
Definition: SW_SPI.h:6
SW_SPIClass::endTransaction
void endTransaction()
Definition: SW_SPI.h:13
SW_SPIClass::transfer
uint8_t transfer(uint8_t ulVal)
Definition: SW_SPI.cpp:24
SW_SPIClass::init
void init()
Definition: SW_SPI.cpp:9
TMC_platforms.h
SW_SPIClass::begin
void begin()
Definition: SW_SPI.h:10
SW_SPIClass::SW_SPIClass
SW_SPIClass(uint16_t sw_mosi_pin, uint16_t sw_miso_pin, uint16_t sw_sck_pin)
Definition: SW_SPI.cpp:3