How to use EEPROM in TG-LPC11U35-501

Dependencies:   AQM0802 EEPROM mbed

AQM0802.h

Committer:
yasuyuki
Date:
2014-06-22
Revision:
0:8dfee9f6df54

File content as of revision 0:8dfee9f6df54:

//**********************
// AQM0802.h for mbed
//
// (C)Copyright 2014 All rights reserved by Y.Onodera
// http://einstlab.web.fc2.com
//**********************

#ifndef AQM0802_H_
#define AQM0802_H_

#define AQM0802_ADDR    0x7c
#define CMD 0x00
#define DAT 0x40

#include "mbed.h"

//class AQM0802: public Stream{
class AQM0802{
public:
    AQM0802 (PinName sda, PinName scl);
    AQM0802 (I2C& p_i2c);
    void init();

    void put(unsigned char a, unsigned char b);
    void get(unsigned char a);
    void cls();
    void locate (int x, int y);
    void print (const char* a);

protected:
    
    I2C _i2c;
//    virtual int _putc(int value);
//    virtual int _getc();

    char buf[2];

};


#endif /* AQM0802_H_ */