-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for CDC enabled ESP32 chips like the S3 as well as support different type of RGB led (e.g. where color order differs from GBR) by adding a setting option for EOrder.
- Loading branch information
Abász
committed
Jun 22, 2024
1 parent
e6c0c20
commit 5d8c166
Showing
8 changed files
with
64 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include "../utils/enums.h" | ||
|
||
// NOLINTBEGIN(cppcoreguidelines-macro-usage) | ||
|
||
// General settings | ||
#define BAUD_RATE BaudRates::Baud1500000 | ||
#define BLE_SIGNAL_STRENGTH BleSignalStrength::MaxPower | ||
#define SUPPORT_SD_CARD_LOGGING false | ||
|
||
// LED settings | ||
#define LED_BLINK_FREQUENCY 1'000 | ||
#define LED_PIN GPIO_NUM_47 // Use GPIO_NUM_NC if no led is available | ||
#define IS_RGB true | ||
|
||
// Hardware settings | ||
#define SENSOR_PIN_NUMBER GPIO_NUM_16 | ||
#define SENSOR_ON_SWITCH_PIN_NUMBER GPIO_NUM_NC // Use GPIO_NUM_NC if no sensor switch is available | ||
#define WAKEUP_SENSOR_PIN_NUMBER GPIO_NUM_NC // Use GPIO_NUM_NC if no separate wakeup pin is available | ||
#define SD_CARD_CHIP_SELECT_PIN GPIO_NUM_NC | ||
|
||
// Device power management settings | ||
#define BATTERY_PIN_NUMBER GPIO_NUM_NC | ||
#define VOLTAGE_DIVIDER_RATIO 2 | ||
#define BATTERY_VOLTAGE_MIN 3.3 | ||
#define BATTERY_VOLTAGE_MAX 4.00 | ||
#define BATTERY_LEVEL_ARRAY_LENGTH 5 | ||
#define INITIAL_BATTERY_LEVEL_MEASUREMENT_COUNT 10 | ||
#define BATTERY_MEASUREMENT_FREQUENCY 10 | ||
#define DEEP_SLEEP_TIMEOUT 4 | ||
|
||
// NOLINTEND(cppcoreguidelines-macro-usage) |
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,15 @@ | ||
|
||
/// RGB color channel orderings, used when instantiating controllers to determine | ||
/// what order the controller should send data out in. The default ordering | ||
/// is RGB. | ||
/// Within this enum, the red channel is 0, the green channel is 1, and the | ||
/// blue chanel is 2. | ||
enum EOrder | ||
{ | ||
RGB = 0012, ///< Red, Green, Blue (0012) | ||
RBG = 0021, ///< Red, Blue, Green (0021) | ||
GRB = 0102, ///< Green, Red, Blue (0102) | ||
GBR = 0120, ///< Green, Blue, Red (0120) | ||
BRG = 0201, ///< Blue, Red, Green (0201) | ||
BGR = 0210 ///< Blue, Green, Red (0210) | ||
}; |