-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from geeksville/usb
Changes to support USB
- Loading branch information
Showing
13 changed files
with
84 additions
and
166 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
|
||
export VERSION=0.6.8 | ||
export VERSION=0.7.4 |
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
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
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 |
---|---|---|
@@ -1,33 +1,12 @@ | ||
#pragma once | ||
#include "PowerFSM.h" // FIXME - someday I want to make this OTA thing a separate lb at at that point it can't touch this | ||
#include "BLECharacteristic.h" | ||
|
||
/** | ||
* This mixin just lets the power management state machine know the phone is still talking to us | ||
*/ | ||
class BLEKeepAliveCallbacks : public BLECharacteristicCallbacks | ||
{ | ||
public: | ||
void onRead(BLECharacteristic *c) | ||
{ | ||
powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); | ||
} | ||
|
||
void onWrite(BLECharacteristic *c) | ||
{ | ||
powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); | ||
} | ||
}; | ||
#include "PowerFSM.h" // FIXME - someday I want to make this OTA thing a separate lb at at that point it can't touch this | ||
|
||
/** | ||
* A characterstic with a set of overridable callbacks | ||
*/ | ||
class CallbackCharacteristic : public BLECharacteristic, public BLEKeepAliveCallbacks | ||
class CallbackCharacteristic : public BLECharacteristic, public BLECharacteristicCallbacks | ||
{ | ||
public: | ||
CallbackCharacteristic(const char *uuid, uint32_t btprops) | ||
: BLECharacteristic(uuid, btprops) | ||
{ | ||
setCallbacks(this); | ||
} | ||
public: | ||
CallbackCharacteristic(const char *uuid, uint32_t btprops) : BLECharacteristic(uuid, btprops) { setCallbacks(this); } | ||
}; |
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.