added comments

interrupts
polymurph 4 years ago
parent 43a61d02b7
commit 0f28a8480f

@ -4,6 +4,8 @@
#include "pin.hpp"
#include "spi.hpp"
// spi channel has a hardware spi object and a pin object for the chipselect.
template <typename DerivedPin,
typename DerivedSPI>
struct SPICH
@ -19,11 +21,14 @@ struct SPICH
uint8_t read_write_u8(const uint8_t& data)
{
uint8_t temp;
// spiHwCH.takeMutex();
chipSelect.write(false);
temp = spiHwCH.trx_u8(data);
chipSelect.write(true);
// spiHwCH.releaseMutex();
return temp;
}

Loading…
Cancel
Save