blob: 962a1d5ef5789512fd0fd51920c386eb2ceda007 [file] [log] [blame]
Joachim Steigerb1a81c12019-07-26 22:13:51 +02001/* mcp23017 i2c gpio expander read and write utilities
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16 */
17#pragma once
18
19#define MCP23017_ADDRESS 0x20
20
21int mcp23017_init(uint8_t slave);
Joachim Steigerf7f1ea82019-10-24 18:09:05 +020022int mcp23017_test(uint8_t slave);
23int mcp23017_toggle(uint8_t slave);
Joachim Steigerb1a81c12019-07-26 22:13:51 +020024//int mcp23017_write_byte(uint8_t slave, uint8_t addr, uint8_t byte);
25//int mcp23017_read_byte(uint8_t slave, uint8_t addr);