Outher...Miura Souta

Dependencies:   mbed MCP23017

MCP/MCP.cpp

Committer:
M_souta
Date:
2020-01-20
Revision:
0:db8d4af513c0
Child:
1:5b0303768126

File content as of revision 0:db8d4af513c0:

#include "MCP.h"
#include "mbed.h"

MCP::MCP(PinName sda, PinName scl, uint8_t device_address)
    :i2c(sda, scl)
{
    _write_opcode = device_address & 0xFE; // low order bit = 0 for write
    _read_opcode  = device_address | 0x01; // low order bit = 1 for read;
}

void MCP::PinMode(uint8_t pin, uint8_t mode)
{
    //_pull_data
}