forked from collin80/GEVCU
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial pass at adding support for AdaFruit BLE. Most config is done but
no parameter updating actually happens yet.
- Loading branch information
Showing
9 changed files
with
1,129 additions
and
46 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// COMMON SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// These settings are used in both SW UART, HW UART and SPI mode | ||
// ---------------------------------------------------------------------------------------------- | ||
#define BUFSIZE 128 // Size of the read buffer for incoming data | ||
#define VERBOSE_MODE false // If set to 'true' enables debug output | ||
|
||
|
||
// SOFTWARE UART SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// The following macros declare the pins that will be used for 'SW' serial. | ||
// You should use this option if you are connecting the UART Friend to an UNO | ||
// ---------------------------------------------------------------------------------------------- | ||
#define BLUEFRUIT_SWUART_RXD_PIN 9 // Required for software serial! | ||
#define BLUEFRUIT_SWUART_TXD_PIN 10 // Required for software serial! | ||
#define BLUEFRUIT_UART_CTS_PIN 11 // Required for software serial! | ||
#define BLUEFRUIT_UART_RTS_PIN -1 // Optional, set to -1 if unused | ||
|
||
|
||
// HARDWARE UART SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// The following macros declare the HW serial port you are using. Uncomment | ||
// this line if you are connecting the BLE to Leonardo/Micro or Flora | ||
// ---------------------------------------------------------------------------------------------- | ||
#ifdef Serial1 // this makes it not complain on compilation if there's no Serial1 | ||
#define BLUEFRUIT_HWSERIAL_NAME Serial | ||
#endif | ||
|
||
|
||
// SHARED UART SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// The following sets the optional Mode pin, its recommended but not required | ||
// ---------------------------------------------------------------------------------------------- | ||
#define BLUEFRUIT_UART_MODE_PIN -1 // Set to -1 if unused | ||
|
||
|
||
// SHARED SPI SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// The following macros declare the pins to use for HW and SW SPI communication. | ||
// SCK, MISO and MOSI should be connected to the HW SPI pins on the Uno when | ||
// using HW SPI. These standard pins are MISO-74, MOSI-75, and SCK-76 | ||
//This should be used with nRF51822 based Bluefruit LE modules | ||
// that use SPI (Bluefruit LE SPI Friend). | ||
// ---------------------------------------------------------------------------------------------- | ||
#define BLUEFRUIT_SPI_CS 63 | ||
#define BLUEFRUIT_SPI_IRQ 27 | ||
#define BLUEFRUIT_SPI_RST 65 // Optional but recommended, set to -1 if unused | ||
|
||
// SOFTWARE SPI SETTINGS | ||
// ---------------------------------------------------------------------------------------------- | ||
// The following macros declare the pins to use for SW SPI communication. | ||
// This should be used with nRF51822 based Bluefruit LE modules that use SPI | ||
// (Bluefruit LE SPI Friend). | ||
// ---------------------------------------------------------------------------------------------- | ||
#define BLUEFRUIT_SPI_SCK 13 | ||
#define BLUEFRUIT_SPI_MISO 12 | ||
#define BLUEFRUIT_SPI_MOSI 11 |
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
Oops, something went wrong.