tds3p-rsvp-reader/include/Config.h

36 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <Arduino.h>
namespace config {
// Pins from LilyGO's T-Display-S3-Pro utilities.h.
constexpr uint8_t kSpiMiso = 8;
constexpr uint8_t kSpiMosi = 17;
constexpr uint8_t kSpiSck = 18;
constexpr uint8_t kTftCs = 39;
constexpr uint8_t kTftDc = 9;
constexpr uint8_t kTftReset = 47;
constexpr uint8_t kBacklight = 48;
constexpr uint8_t kSdCs = 14;
constexpr uint8_t kButtonPlayPause = 0; // BOOT; never hold while pressing RESET.
constexpr uint8_t kButtonPrevious = 12;
constexpr uint8_t kButtonNext = 16;
constexpr char kBooksDirectory[] = "/books";
constexpr size_t kMaxBookBytes = 1500 * 1024;
constexpr uint16_t kDefaultWpm = 300;
constexpr uint16_t kMinimumWpm = 100;
constexpr uint16_t kMaximumWpm = 800;
constexpr uint16_t kWpmStep = 25;
constexpr uint32_t kDimAfterMs = 20UL * 1000UL;
constexpr uint32_t kDisplayOffAfterMs = 60UL * 1000UL;
constexpr uint32_t kDeepSleepAfterMs = 10UL * 60UL * 1000UL;
constexpr uint8_t kNormalBrightness = 5; // 1–16 on v1.1 boards.
constexpr uint8_t kDimBrightness = 1;
} // namespace config