LCDGFX LCD display driver
2.0.1
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
lcd_hal
avr
io.h
1
/*
2
MIT License
3
4
Copyright (c) 2018-2019, Alexey Dynda
5
6
Permission is hereby granted, free of charge, to any person obtaining a copy
7
of this software and associated documentation files (the "Software"), to deal
8
in the Software without restriction, including without limitation the rights
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
copies of the Software, and to permit persons to whom the Software is
11
furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in all
14
copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
SOFTWARE.
23
*/
24
25
/*
26
* @file lcd_hal/avr/io.h AVR IO communication functions
27
*/
28
29
#pragma once
30
31
#include "../UserSettings.h"
32
#include "../interface.h"
33
34
#include <avr/io.h>
35
#include <avr/interrupt.h>
36
#include <avr/pgmspace.h>
37
#include <avr/sleep.h>
38
#include <avr/eeprom.h>
39
#include <util/delay.h>
40
#include <stdint.h>
41
#include <stdlib.h>
42
#include <string.h>
43
44
#if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || \
45
defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
46
47
#define CONFIG_SOFTWARE_I2C_AVAILABLE
48
49
#define CONFIG_USI_SPI_AVAILABLE
50
/* Define lcdint as smallest types to reduce memo usage on tiny controllers. *
51
* Remember, that this can cause issues with large lcd displays, i.e. 320x240*/
52
#define LCDINT_TYPES_DEFINED
53
typedef
int8_t
lcdint_t
;
54
typedef
uint8_t
lcduint_t
;
56
#define CONFIG_MULTIPLICATION_NOT_SUPPORTED
57
58
#elif defined(__AVR_ATmega328P__)
59
60
#define CONFIG_SOFTWARE_I2C_AVAILABLE
61
62
#define CONFIG_TWI_I2C_AVAILABLE
63
64
#define CONFIG_AVR_SPI_AVAILABLE
65
66
#define CONFIG_AVR_UART_AVAILABLE
67
68
#define CONFIG_VGA_AVAILABLE
69
70
#else
71
72
#define CONFIG_SOFTWARE_I2C_AVAILABLE
73
74
#define CONFIG_TWI_I2C_AVAILABLE
75
76
#define CONFIG_AVR_SPI_AVAILABLE
77
78
#endif
79
lcdint_t
int lcdint_t
Definition:
io.h:96
lcduint_t
unsigned int lcduint_t
Definition:
io.h:98
Generated by
1.8.13