-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump simpleble and start adding syncroni devices
Signed-off-by: Andrey Parfenov <[email protected]>
- Loading branch information
1 parent
6118510
commit 3b2c756
Showing
265 changed files
with
15,011 additions
and
1,403 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
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include <condition_variable> | ||
#include <mutex> | ||
#include <thread> | ||
|
||
#include "ble_lib_board.h" | ||
#include "board.h" | ||
#include "board_controller.h" | ||
|
||
class SynchroniBoard : public BLELibBoard | ||
{ | ||
|
||
public: | ||
SynchroniBoard (int board_id, struct BrainFlowInputParams params); | ||
~SynchroniBoard (); | ||
|
||
int prepare_session (); | ||
int start_stream (int buffer_size, const char *streamer_params); | ||
int stop_stream (); | ||
int release_session (); | ||
int config_board (std::string config, std::string &response); | ||
int config_board (std::string config); | ||
|
||
void adapter_1_on_scan_found (simpleble_adapter_t adapter, simpleble_peripheral_t peripheral); | ||
void read_data ( | ||
simpleble_uuid_t service, simpleble_uuid_t characteristic, uint8_t *data, size_t size); | ||
|
||
protected: | ||
volatile simpleble_adapter_t synchroni_board_adapter; | ||
volatile simpleble_peripheral_t synchroni_board_peripheral; | ||
bool initialized; | ||
bool is_streaming; | ||
std::mutex m; | ||
std::condition_variable cv; | ||
std::pair<simpleble_uuid_t, simpleble_uuid_t> notified_characteristics; | ||
std::pair<simpleble_uuid_t, simpleble_uuid_t> write_characteristics; | ||
}; |
Oops, something went wrong.