Skip to content

Commit

Permalink
Merge pull request #2 from xcore/master
Browse files Browse the repository at this point in the history
Getting up to date with xcore
  • Loading branch information
samchesney committed Dec 13, 2013
2 parents ba15ee1 + 55fbc6f commit d92b378
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module_i2c_simple/src/i2c.xc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ static void stopBit(port i2c_scl, port i2c_sda) {
static int tx8(port i2c_scl, port i2c_sda, unsigned data) {
unsigned CtlAdrsData = ((unsigned) bitrev(data)) >> 24;
for (int i = 8; i != 0; i--) {
i2c_sda <: >> CtlAdrsData;
//i2c_sda <: >> CtlAdrsData;
i2c_sda <: CtlAdrsData & 1;
CtlAdrsData >>= 1;
highPulse(i2c_scl);
}
return highPulseSample(i2c_scl, i2c_sda);
Expand Down

0 comments on commit d92b378

Please sign in to comment.