pradeep shekhar
/
14-8-15_beacon_testing
Repo for beacon testing
Diff: main.cpp
- Revision:
- 5:3d447f4786f1
- Parent:
- 4:b51ca6ee9136
- Child:
- 6:f0fb224c958b
diff -r b51ca6ee9136 -r 3d447f4786f1 main.cpp --- a/main.cpp Sat Oct 03 23:08:09 2015 +0000 +++ b/main.cpp Sun Oct 04 00:08:21 2015 +0000 @@ -6,11 +6,11 @@ void writereg(uint8_t reg,uint8_t val) { - cs = 0;__disable_irq();spi.write(reg | 0x80);spi.write(val);__enable_irq();cs = 1; + cs = 0;spi.write(reg | 0x80);spi.write(val);cs = 1; } uint8_t readreg(uint8_t reg) { - int val;cs = 0;__disable_irq();spi.write(reg & ~0x80);val = spi.write(0);__enable_irq();cs = 1;return val; + int val;cs = 0;spi.write(reg & ~0x80);val = spi.write(0);cs = 1;return val; } void clearTxBuf() {