nanoI2CSlaveExpander
ARDUINO Nano v3 used as I2C slace digital and analog io expander for ESP8266 and others...
config.h
Go to the documentation of this file.
1
/**
2
* @file config.h
3
* @author J.SORANZO
4
* @date 03/12/2018
5
* @copyright 2018 CC0
6
* @version git versionning
7
* @brief nanoI2CIOexpander porject configuration file
8
*/
9
10
/**
11
* @def MA_VERSION
12
* @brief project version not file version
13
14
This version is manualy udated
15
16
* @def MI_VERSION
17
* @brief Minor version
18
19
*/
20
#define MA_VERSION 2
/**< The major part of version number*/
21
#define MI_VERSION 1
/**< The minor Part of the version*/
22
23
/**
24
* @def MAXREG
25
* @brief Maximum number of register
26
27
- 0x00 : Major version (RO)
28
- 0x01 : R/W test reg 1
29
- 0x02 : R/W test reg 2
30
- 0x03 : 0x55 (RO)
31
- 0x04 : DDR (R/W) 1 for output, default 0
32
- 0x05 : digital DATA (R/W) a write on input bit has no effect
33
- 0x06 : Minor version (RO)
34
- 0x07 : pullup reg (R/W) : 1 pullup is enable, default = 0
35
//v2 change
36
- 0x08 : DDR2
37
- 0x09 : DATA2
38
- 0x0A : PULLUP2
39
- 0x0B to 0x0F : reserved (read data 0xA5)
40
41
- 0x10, 0x11 : A0 low, high (RO)
42
- 0x12, 0x13 : A1 low, high (RO)
43
- 0x14, 0x15 : A2 low, high (RO)
44
- 0x16, 0x17 : A3 low, high (RO)
45
- 0x18, 0x19 : 0xCA low, 0xFE high (RO)
46
- 0x1A, 0x1B : 0xFE low, 0xCA high (RO)
47
- 0x1C, 0x1D : A6 low, high (RO)
48
- 0x1E, 0x1F : A7 low, high (RO)
49
50
RO : Read Only
51
R/W : Read and Write enabled registers
52
53
v2 change
54
Writable registers are : 1,2,4,5 and 7 8, 9 and A
55
*/
56
#define MAXREG 32
57
58
59
60
/**
61
* @def I2CADD
62
* @brief I2C base address to be completed by D12..D10 pin states
63
64
This number is ored with D12..D10 state to obtain full I2C address
65
66
Warning D12 to D10 are internaly pulluped
67
68
*/
69
#define I2CADD 0x58
70
//v2 change
71
// #define I2CHIGHADD 12
72
// #define I2CMIDADD 11
73
#define I2CLOWADD 13
74
75
76
/**
77
* @def ARDUINO_TYPE
78
* @brief Only for debug display
79
*/
80
#define ARDUINO_TYPE "NANO"
nanoI2CIOExpander
config.h
Generated by
1.8.14