#ifndef => #if !PIN_EXISTS
This commit is contained in:
parent
001ce7a2fd
commit
c2fc78c3a8
@ -76,7 +76,7 @@ static SPISettings spiConfig;
|
|||||||
* @details Only configures SS pin since libmaple creates and initialize the SPI object
|
* @details Only configures SS pin since libmaple creates and initialize the SPI object
|
||||||
*/
|
*/
|
||||||
void spiBegin() {
|
void spiBegin() {
|
||||||
#ifndef SS_PIN
|
#if !PIN_EXISTS(SS)
|
||||||
#error "SS_PIN not defined!"
|
#error "SS_PIN not defined!"
|
||||||
#endif
|
#endif
|
||||||
SET_OUTPUT(SS_PIN);
|
SET_OUTPUT(SS_PIN);
|
||||||
|
@ -11,7 +11,7 @@ static SPISettings spiConfig;
|
|||||||
// Standard SPI functions
|
// Standard SPI functions
|
||||||
/** Initialise SPI bus */
|
/** Initialise SPI bus */
|
||||||
void spiBegin(void) {
|
void spiBegin(void) {
|
||||||
#ifndef SS_PIN
|
#if !PIN_EXISTS(SS)
|
||||||
#error SS_PIN not defined!
|
#error SS_PIN not defined!
|
||||||
#endif
|
#endif
|
||||||
SET_OUTPUT(SS_PIN);
|
SET_OUTPUT(SS_PIN);
|
||||||
@ -21,7 +21,7 @@ void spiBegin(void) {
|
|||||||
SET_OUTPUT(MOSI_PIN);
|
SET_OUTPUT(MOSI_PIN);
|
||||||
|
|
||||||
//#if DISABLED(SOFTWARE_SPI)
|
//#if DISABLED(SOFTWARE_SPI)
|
||||||
#if false
|
#if 0
|
||||||
// set SS high - may be chip select for another SPI device
|
// set SS high - may be chip select for another SPI device
|
||||||
#if SET_SPI_SS_HIGH
|
#if SET_SPI_SS_HIGH
|
||||||
WRITE(SS_PIN, HIGH);
|
WRITE(SS_PIN, HIGH);
|
||||||
|
Loading…
Reference in New Issue
Block a user