WatchyWatchFace/src/config.h

48 lines
1.2 KiB
C
Raw Normal View History

2023-05-29 20:00:46 +03:00
#include <Wire.h>
2023-05-29 13:03:05 +03:00
#define MENU_BTN_PIN 26
#define BACK_BTN_PIN 25
#define DOWN_BTN_PIN 4
#define UP_BTN_PIN 35
#define BATT_ADC_PIN 34
#define DISPLAY_CS 5
#define DISPLAY_RES 9
#define DISPLAY_DC 10
#define DISPLAY_BUSY 19
#define ACC_INT_1_PIN 14
#define ACC_INT_2_PIN 12
#define VIB_MOTOR_PIN 13
#define RTC_INT_PIN 27
2023-06-01 03:07:52 +03:00
#define RTC_PCF_ADDR 0x51
#define YEAR_OFFSET_PCF 2000
2023-05-29 13:03:05 +03:00
#define MENU_BTN_MASK GPIO_SEL_26
#define BACK_BTN_MASK GPIO_SEL_25
#define DOWN_BTN_MASK GPIO_SEL_4
#define UP_BTN_MASK GPIO_SEL_35
#define ACC_INT_MASK GPIO_SEL_14
#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK
#define DISPLAY_WIDTH 200
#define DISPLAY_HEIGHT 200
2023-06-01 03:07:52 +03:00
#define EEPROM_LOCATION_MAGIC 0
#define EEPROM_LOCATION_VERSION 2
#define EEPROM_LOCATION_TZ_OFFSET 4
#define EEPROM_MAGIC1 0xf0
#define EEPROM_MAGIC2 0x0d
#define EEPROM_VERSION 1
#include "secrets.h"
#if !defined(WIFI_SSID) || !defined(WIFI_PASS)
#error "Please define WIFI_SSID and WIFI_PASS in secrets.h"
#endif
#define DEFAULT_TZ_OFFSET 3600 * 3
2023-05-29 20:00:46 +03:00
#define NTP_SERVER "pool.ntp.org"
2023-05-31 04:04:25 +03:00
#define UPDATE_INTERVAL 60 // seconds
2023-06-01 03:07:52 +03:00
#define WAKE_ON_ACCEL_EVENTS false // useful if saving battery by not updating every minute