OMOTE/Platformio/include/omoteconfig.h
Matthew Colvin f1ff9ed3d2
Lay the ground work for a hardware abstraction layer (#15)
* Pull out OmoteUI into its own hpp/cpp that
only controls UI/UX
Added HardwareAbstractionInterface to allow UI to be decoupled

Add OmoteUI class/Header to visual studio solution
Bump the compiler to c++17 for std::clamp

* code format
update visual studio solution to build all versions properly

Pull pin defs into config file
use config file to allow USE_SIMULATOR checks in OmoteUI
this will allow the sim to compile in specific code within the UI

* put pin mode config into hardwarerevX class along with some other hardware things. Still lots of work to pull everything into the HAL.

Change-Id: If3cacc43d43670b0ff2233140b1cff66a4aeb48d

* pull Prefrences, IMU interrupt and sleep into the hardware class

Change-Id: I082ae086ed70306789df80eafce8870a5cdfd125

* pull in touch screen, IMU and slow screen wake into hardware

Change-Id: I61b49a6d0551463becbc3bdf1418ac9fde9d9376

* Pull wifi and IR into Hardware RevX
pull last bit of global variables into hardware rev

* un public everything

* clean up simulator build

* rename loop handler
reorder setup to better match the origional main

* Add Loop Handler that updates UI

* Add images to their own file to shrink OmoteUI

* Allow Wifi to be turned off with the macro

* Update Battery Update Task instead of a time based check and update

* Clean up abstract interface
move defenitions out of hardwareRevX.hpp into cpp

* reorder HardwareRevX functions

* Add comment blocks to top of headers

---------

Co-authored-by: Matthew Colvin <35540398+Mc067415@users.noreply.github.com>
Co-authored-by: Matthew Colvin <Matthew.Colvin@garmin.com>
2023-07-31 20:28:10 +02:00

55 lines
No EOL
1.3 KiB
C

#pragma once
#define IS_SIMULATOR false
// Comment out to disable connected features
#define ENABLE_WIFI
#define WIFI_SSID "YOUR_WIFI_SSID"
#define WIFI_PASSWORD "YOUR_WIFI_PASSWORD"
#define MQTT_SERVER "YOUR_MQTT_SERVER_IP"
// time until device enters sleep mode in milliseconds
#define SLEEP_TIMEOUT 20000
// motion above threshold keeps device awake
#define MOTION_THRESHOLD 50
// IO34+IO35+IO37+IO38+IO39(+IO13)
#define BUTTON_PIN_BITMASK 0b1110110000000000000000000010000000000000
#define SCREEN_WIDTH 240
#define SCREEN_HEIGHT 360
// Pin assignment
// -----------------------------------------------------------------------------------------------------------------------
#define LCD_DC 9 // defined in TFT_eSPI User_Setup.h
#define LCD_CS 5
#define LCD_MOSI 23
#define LCD_SCK 18
#define LCD_BL 4
#define LCD_EN 10
#define USER_LED 2
#define SW_1 32 // 1...5: Output
#define SW_2 26
#define SW_3 27
#define SW_4 14
#define SW_5 12
#define SW_A 37 // A...E: Input
#define SW_B 38
#define SW_C 39
#define SW_D 34
#define SW_E 35
#define IR_RX 15 // IR receiver input
#define ADC_BAT 36 // Battery voltage sense input (1/2 divider)
#define IR_VCC 25 // IR receiver power
#define IR_LED 33 // IR LED output
#define SCL 22
#define SDA 19
#define ACC_INT 20
#define CRG_STAT 21 // battery charger feedback