summaryrefslogtreecommitdiffstats
path: root/init.hpp
blob: c7d83dff5051464bea8b9d7b1cff19b7cce34f46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

// To modify the I2C port used, change the `#define I2C_PORT` in "oled/BitBang_I2C.c"
// Pin numbers are GPIO pins.
#define SDA_PIN 6
#define SCL_PIN 7
#define RESET_PIN -1
#define OLED_DEFAULT_CONTRAST 40

#define OLED_WIDTH 128
#define OLED_HEIGHT 64

// Initial date & time
// The idea is to have the compiler set the date at compile-time.
// DOTW: 0 is Sunday
#define INIT_DATETIME_YEAR 2021
#define INIT_DATETIME_MONTH 4
#define INIT_DATETIME_DAY 8
#define INIT_DATETIME_DOTW 4
#define INIT_DATETIME_HOUR 13
#define INIT_DATETIME_MIN 53
#define INIT_DATETIME_SEC 00

// Time (ms) before entering sleep
#define ENTER_SLEEP_DELAY 10000


// Init every componement
void init_all();
// Init onboard RTC
void init_rtc();