-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interrupts changed, but touch interrupt doesn't do correct thing like…
… 10 percent of the time
- Loading branch information
1 parent
0236bf5
commit 5da0f94
Showing
20 changed files
with
116 additions
and
196 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
#include "pinoutP8.h" | ||
#include "Arduino.h" | ||
|
||
#define I2C_LOCKED true | ||
#define I2C_UNLOCKED false | ||
|
||
void initI2C(); | ||
bool getI2CState(); | ||
void lockI2C(); | ||
void unlockI2C(); |
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "headers/i2cLock.h" | ||
|
||
#include <Wire.h> | ||
|
||
//We have a mutex lock on the i2c object so we dont have any overlaps of accessing i2c | ||
bool i2cLock = false; | ||
|
||
void initI2C() { | ||
Wire.begin(); | ||
Wire.setClock(250000); | ||
} | ||
|
||
bool getI2CState(){ | ||
return i2cLock; | ||
} | ||
|
||
void lockI2C(){ | ||
i2cLock = I2C_LOCKED; | ||
} | ||
|
||
void unlockI2C(){ | ||
i2cLock = I2C_UNLOCKED; | ||
} |
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
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
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
Oops, something went wrong.