Skip to content

Commit

Permalink
Chip enable conditional statement
Browse files Browse the repository at this point in the history
Issue: RF24 radio(10, 10, 1000000) 
OrangePi with GPIO10 as chip enable. SPIDEV1.0 is used. Then if statement is true and does not enable TX on nRF module.
Conditional statement fixes this
  • Loading branch information
fertinator authored Mar 27, 2023
1 parent 6ad390f commit e31f8c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ void RF24::csn(bool mode)

void RF24::ce(bool level)
{
#ifndef RF24_LINUX
//Allow for 3-pin use on ATTiny
if (ce_pin != csn_pin) {
#endif
digitalWrite(ce_pin, level);
#ifndef RF24_LINUX
}
#endif
}

/****************************************************************************/
Expand Down

0 comments on commit e31f8c4

Please sign in to comment.