MCP4018 library

Dependents:   mbed_MCP4018

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MCP4018.h Source File

MCP4018.h

00001 //**********************
00002 // MCP4018.h for mbed
00003 //
00004 // (C)Copyright 2014 All rights reserved by Y.Onodera
00005 // http://einstlab.web.fc2.com
00006 //**********************
00007 
00008 #ifndef MCP4018_H_
00009 #define MCP4018_H_
00010 
00011 #define MCP4018_ADDR                0x5E
00012 
00013 #include "mbed.h"
00014 
00015 
00016 class MCP4018{
00017 public:
00018     MCP4018 (PinName sda, PinName scl);
00019     MCP4018 (I2C& p_i2c);
00020     void put(unsigned char a);
00021 
00022 protected:
00023     
00024     I2C _i2c;
00025 
00026     char buf[2];
00027 
00028 };
00029 
00030 #endif /* MCP4018_H_ */
00031