AberLED shield library
Library for the bicolor LED (and TFT screen) shield used in CS12020
Main Page
Classes
Files
File List
File Members
src
User_Setup.h
Go to the documentation of this file.
1
// USER DEFINED SETTINGS V16
2
// Set fonts to be loaded, pins used and SPI control method
3
4
// Define the type of display from the colour of the tab on the screen protector
5
// Comment out all but one of these options
6
7
//#define TAB_COLOUR INITB
8
//#define TAB_COLOUR INITR_GREENTAB
9
//#define TAB_COLOUR INITR_REDTAB
10
#define TAB_COLOUR INITR_BLACKTAB
11
//#define TAB_COLOUR INITR_GREENTAB2
12
13
// ##################################################################################
14
//
15
// Define the pins that are used to interface with the display here
16
//
17
// ##################################################################################
18
19
// We must use hardware SPI
20
// FYI Mega SCK is pin 52, MOSI is 51, UNO/NanoPro micro etc SCK is pin 13 and MOSI is 11
21
// Leonardo Pro micro SCK is pin 15 and MOSI is 16
22
23
// ###### EDIT THE PIN NUMBERS IN THE 3 LINES FOLLOWING TO SUIT YOUR SETUP ######
24
25
#define TFT_CS 6 // Chip select control pin
26
#define TFT_DC 5 // Data Command control pin
27
#define TFT_RST 3 // Reset pin (could connect to Arduino RESET pin)
28
29
30
// ##################################################################################
31
//
32
// Define the fonts that are to be used here
33
//
34
// ##################################################################################
35
36
// Comment out the #defines below with // to stop that font being loaded
37
// As supplied font 8 is disabled by commenting out
38
//
39
// If all fonts are loaded the extra FLASH space required is about 17000 bytes...
40
// To save FLASH space only enable the fonts you need!
41
42
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
43
//#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
44
//#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
45
//#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
46
//#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
47
//#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
48
49
50
// ##################################################################################
51
//
52
// Define whether we want to use delays or SPIF flag to control SPI transactions
53
//
54
// ##################################################################################
55
56
// If we define F_AS_T here then delays are used between SPI transactions
57
// to speed up rendering, comment out to "wait" for the SPIF flag instead
58
// Commenting out the line stops use of FastPin for control lines
59
60
// BUG AWAITING FIX - DO NOT COMMENT OUT IN THIS VERSION
61
#define F_AS_T
62
63
64
// ##################################################################################
65
//
66
// Other speed up options
67
//
68
// ##################################################################################
69
70
// Uncomment the following #define to invoke a 20% faster drawLine() function
71
// This speeds up other funtions such as triangle outline drawing too
72
// Code size penalty is about 72 bytes
73
74
#define FAST_LINE
75
76
// Comment out the following #define to stop boundary checking and clipping
77
// for fillRectangle()and fastH/V lines. This speeds up other funtions such as text
78
// rendering where size>1. Sketch then must not draw graphics/text outside screen
79
// boundary. Code saving for no bounds check (i.e. commented out) is 316 bytes
80
81
//#define CLIP_CHECK
82
83
// Comment out the following #define if "SPI Transactions" do not need to be
84
// supported. Tranaction support is required if other SPI devices use interrupts.
85
// When commented out the code size will be ~700 bytes smaller and sketches will
86
// run slightly faster, so leave it commented out unless you need it!
87
// Transaction support is needed to work with SD libraru but not needed with TFT_SdFat
88
89
// #define SUPPORT_TRANSACTIONS
90
Generated on Tue Sep 24 2024 11:59:01 for AberLED shield library by
1.8.11