SDK  23.9.2
For IoT System Software Development
Public Types | Public Member Functions | List of all members
SPI Class Referenceabstract

SPI (4-Wire)를 제어하기 위한 클래스 More...

#include <SPI.hpp>

Inheritance diagram for SPI:
ESP32SPI nRF5xSPI SoftwareSPI

Public Types

enum  BitOrder_t { MSBFIRST = 0, LSBFIRST = 1 }
 
enum  Mode_t { MODE0 = 0, MODE1 = 1, MODE2 = 2, MODE3 = 3 }
 

Public Member Functions

virtual void begin (uint32_t frequency=0xFFFFFFFFul, BitOrder_t order=MSBFIRST, Mode_t mode=MODE0)
 SPI 연결을 시작합니다.
 
virtual void end ()=0
 SPI 연결을 종료합니다.
 
virtual uint8_t transfer (uint8_t val)=0
 데이터를 전송합니다. More...
 
int getCPOL ()
 
int getCPHA ()
 

Detailed Description

SPI (4-Wire)를 제어하기 위한 클래스

Member Enumeration Documentation

◆ BitOrder_t

Enumerator
MSBFIRST 

MSB first

LSBFIRST 

LSB first

60  {
62  MSBFIRST = 0,
63 
65  LSBFIRST = 1,
66  } BitOrder_t;

◆ Mode_t

Enumerator
MODE0 

CPOL:0, CPHA:0

MODE1 

CPOL:0, CPHA:1

MODE2 

CPOL:1, CPHA:0

MODE3 

CPOL:1, CPHA:1

68  {
70  MODE0 = 0,
71 
73  MODE1 = 1,
74 
76  MODE2 = 2,
77 
79  MODE3 = 3,
80  } Mode_t;

Member Function Documentation

◆ transfer()

virtual uint8_t SPI::transfer ( uint8_t  val)
pure virtual

데이터를 전송합니다.

Returns
수신 데이터

Implemented in ESP32SPI, nRF5xSPI, and SoftwareSPI.


The documentation for this class was generated from the following file:
SPI::MODE0
@ MODE0
Definition: SPI.hpp:70
SPI::MODE1
@ MODE1
Definition: SPI.hpp:73
SPI::MODE2
@ MODE2
Definition: SPI.hpp:76
SPI::MODE3
@ MODE3
Definition: SPI.hpp:79
SPI::BitOrder_t
BitOrder_t
Definition: SPI.hpp:60
SPI::MSBFIRST
@ MSBFIRST
Definition: SPI.hpp:62
SPI::Mode_t
Mode_t
Definition: SPI.hpp:68
SPI::LSBFIRST
@ LSBFIRST
Definition: SPI.hpp:65