This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 - need library function equivalent to SHiftIn() and bitWrite() in Arduino.Pls Help.

hi I'm porting Arduino code which has calls to ShiftIn() to read a byte from a GPIO Pin and bitWrite() to write a bit into a byte variable at a particular position. Below is example arduino code:

data[2] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[1] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[0] = shiftIn(DOUT, PD_SCK, MSBFIRST);
..
..
bitWrite(data[j], i, digitalRead(DOUT));

Kindly suggest an equivalent library function in SoftDevice S132.

thank you

Related