Last active
December 11, 2015 07:18
-
-
Save RickKimball/4565318 to your computer and use it in GitHub Desktop.
forum comment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32_t max31855::memory_read(void) | |
{ | |
uint32_t mask = 0x80000000; | |
uint32_t data = 0; | |
digitalWrite(_cs,LOW); | |
do { | |
digitalWrite(_sclk, HIGH); | |
if (digitalRead(_so)) { | |
data |= mask; | |
} | |
digitalWrite(_sclk,LOW); | |
mask >>= 1; | |
} while(mask); | |
digitalWrite(_cs, HIGH); | |
return data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment