Unverified Commit f33df254 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Add SPI::setMOSI/setMISO, better match pin names (#2166)

parent 83a6aaca
......@@ -8,10 +8,10 @@ SPI pinouts can be set **before SPI.begin()** using the following calls:
.. code:: cpp
bool setRX(pin_size_t pin);
bool setRX(pin_size_t pin); // or setMISO()
bool setCS(pin_size_t pin);
bool setSCK(pin_size_t pin);
bool setTX(pin_size_t pin);
bool setTX(pin_size_t pin); // or setMOSI()
Note that the ``CS`` pin can be hardware or software controlled by the sketch.
When software controlled, the ``setCS()`` call is ignored.
......
......@@ -45,9 +45,15 @@ public:
// Assign pins, call before begin()
bool setRX(pin_size_t pin);
inline bool setMISO(pin_size_t pin) {
return setRX(pin);
}
bool setCS(pin_size_t pin);
bool setSCK(pin_size_t pin);
bool setTX(pin_size_t pin);
bool setMOSI(pin_size_t pin) {
return setTX(pin);
}
// Call once to init/deinit SPI class, select pins, etc.
virtual void begin() override {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment