Digigurdy-baz
Loading...
Searching...
No Matches
display.h
Go to the documentation of this file.
1#ifndef DISPLAY_H
2#define DISPLAY_H
3
4#include <Arduino.h>
5#include <SPI.h>
6#include <U8g2lib.h>
7#include "config.h"
8#include "notes.h"
9
12
13#ifdef REV4_MODE
14// These are the Teensy pins wired up for the OLED.
15// 2.2.1 - changes for HW SPI
17#define OLED_MOSI 43
19#define OLED_CLK 45
21#define OLED_DC 46
23#define OLED_CS 44
25#define OLED_RESET 47
26
27#else
28#define OLED_MOSI 11
29#define OLED_CLK 13
30#define OLED_DC 9
31#define OLED_CS 10
32#define OLED_RESET 38
33
34#endif
35
37
38#ifdef WHITE_OLED
39 extern U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2;
40
41 // This is just here for my reference/testing
42 // when I want to see how bad SW SPI speed is.
43 // extern U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2;
44#endif
45#ifdef BLUE_OLED
46 #ifdef REV4_MODE
47 extern U8G2_SH1106_128X64_NONAME_F_3RD_4W_HW_SPI u8g2;
48 #else
49 extern U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2;
50 #endif
51 //extern U8G2_SH1106_128X64_NONAME_F_4W_SW_SPI u8g2;
52#endif
53
54
55void start_display();
56void print_menu_6(String title, String opt1, String opt2, String opt3, String opt4, String opt5, String opt6);
57void print_menu_5(String title, String opt1, String opt2, String opt3, String opt4, String opt5);
58void print_menu_4(String title, String opt1, String opt2, String opt3, String opt4);
59void print_menu_3(String title, String opt1, String opt2, String opt3);
60void print_menu_2(String title, String opt1, String opt2);
61void print_message_2(String title, String opt1, String opt2);
62void print_message_3(String title, String opt1, String opt2, String opt3);
63void print_menu_4_nobk(String title, String opt1, String opt2, String opt3, String opt4);
64void print_pause_screen(String d_string, String t_string, String h_string, String l_string);
65void print_confirm_screen(String title, String msg1, String msg2, String opt1);
66void print_tuning(String title, String hi_note, String low_note, String drone_note, String tromp_note, String tpose_str, String capo_str);
67void print_tuning_summary(int hi, int lo, int tromp, int drone);
68void print_tuning_choice_3(String title, int opt1, int opt2, int opt3);
69void print_value_selection(String title, String value);
70
71#endif
U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2
Definition: display.h:47
void print_menu_4(String title, String opt1, String opt2, String opt3, String opt4)
Prints a formatted menu screen with a numbered 4-option list.
Definition: display.cpp:124
void print_confirm_screen(String title, String msg1, String msg2, String opt1)
Prints a confirmation screen.
Definition: display.cpp:387
void print_tuning_summary(int hi, int lo, int tromp, int drone)
Print a string-only list of a given tuning with a confirmation option.
Definition: display.cpp:472
void start_display()
Begins SPI communication with the display.
Definition: display.cpp:20
void print_menu_6(String title, String opt1, String opt2, String opt3, String opt4, String opt5, String opt6)
Prints a formatted menu screen with a numbered 6-option list.
Definition: display.cpp:33
void print_menu_5(String title, String opt1, String opt2, String opt3, String opt4, String opt5)
Prints a formatted menu screen with a numbered 5-option list.
Definition: display.cpp:80
void print_message_3(String title, String opt1, String opt2, String opt3)
Print a titled screen with three lines of centered text.
Definition: display.cpp:268
void print_value_selection(String title, String value)
Print a numerical value selection.
Definition: display.cpp:551
void print_tuning_choice_3(String title, int opt1, int opt2, int opt3)
Print a 3-option tuning choice screen.
Definition: display.cpp:514
void print_message_2(String title, String opt1, String opt2)
Print a titled screen with two lines of centered text.
Definition: display.cpp:238
void print_menu_2(String title, String opt1, String opt2)
Prints a formatted menu screen with a numbered 2-option list.
Definition: display.cpp:203
void print_pause_screen(String d_string, String t_string, String h_string, String l_string)
Print the standard pause screen.
Definition: display.cpp:341
void print_menu_4_nobk(String title, String opt1, String opt2, String opt3, String opt4)
Prints a formatted menu screen, numbered 4-option list, NO back option.
Definition: display.cpp:300
void print_tuning(String title, String hi_note, String low_note, String drone_note, String tromp_note, String tpose_str, String capo_str)
Print a full list of the given tuning with a confirmation option.
Definition: display.cpp:427
void print_menu_3(String title, String opt1, String opt2, String opt3)
Prints a formatted menu screen with a numbered 3-option list.
Definition: display.cpp:165