Loading...
Searching...
No Matches
mcp23x17_regs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Gunar Schorcht
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
18
19#ifdef __cplusplus
20 extern "C" {
21#endif
22
27#define MCP23X17_REG_IODIR (0x00)
28#define MCP23X17_REG_IODIRA (0x00)
29#define MCP23X17_REG_IODIRB (0x01)
30#define MCP23X17_REG_IPOL (0x02)
31#define MCP23X17_REG_IPOLA (0x02)
32#define MCP23X17_REG_IPOLB (0x03)
33#define MCP23X17_REG_GPINTEN (0x04)
34#define MCP23X17_REG_GPINTENA (0x04)
35#define MCP23X17_REG_GPINTENB (0x05)
36#define MCP23X17_REG_DEFVAL (0x06)
37#define MCP23X17_REG_DEFVALA (0x06)
38#define MCP23X17_REG_DEFVALB (0x07)
39#define MCP23X17_REG_INTCON (0x08)
40#define MCP23X17_REG_INTCONA (0x08)
41#define MCP23X17_REG_INTCONB (0x09)
42#define MCP23X17_REG_IOCON (0x0A)
43#define MCP23X17_REG_IOCONA (0x0A)
44#define MCP23X17_REG_IOCONB (0x0B)
45#define MCP23X17_REG_GPPU (0x0C)
46#define MCP23X17_REG_GPPUA (0x0C)
47#define MCP23X17_REG_GPPUB (0x0D)
48#define MCP23X17_REG_INTF (0x0E)
49#define MCP23X17_REG_INTFA (0x0E)
50#define MCP23X17_REG_INTFB (0x0F)
51#define MCP23X17_REG_INTCAP (0x10)
52#define MCP23X17_REG_INTCAPA (0x10)
53#define MCP23X17_REG_INTCAPB (0x11)
54#define MCP23X17_REG_GPIO (0x12)
55#define MCP23X17_REG_GPIOA (0x12)
56#define MCP23X17_REG_GPIOB (0x13)
57#define MCP23X17_REG_OLAT (0x14)
58#define MCP23X17_REG_OLATA (0x14)
59#define MCP23X17_REG_OLATB (0x15)
61
66/* IOCONA/IOCONB registers */
67#define MCP23X17_IOCON_BANK (0x80)
68#define MCP23X17_IOCON_MIRROR (0x40)
69#define MCP23X17_IOCON_SEQOP (0x20)
70#define MCP23X17_IOCON_DISSLW (0x10)
71#define MCP23X17_IOCON_HAEN (0x08)
72#define MCP23X17_IOCON_ODR (0x04)
73#define MCP23X17_IOCON_INTPOL (0x02)
75
76#ifdef __cplusplus
77}
78#endif
79