program for I2C master device

Dependencies:   mbed

Fork of I2C_HelloWorld_Mbed by mbed official

main.h

Committer:
marcus255
Date:
2015-12-15
Revision:
7:b07706b16279
Parent:
5:8dc6d7d81250
Child:
8:3e6945d5d9a1

File content as of revision 7:b07706b16279:

#ifndef MAIN_H
#define MAIN_H

#include "mbed.h"
#define SLAVE_ADDR 0xA0
#define DATA_SIZE 16

I2C i2c(PTE0, PTE1);
Serial pc(USBTX, USBRX);
DigitalOut led(LED_GREEN);
Ticker i2c_ticker;
void write_data(void);
void read_data(char*);
void write_and_read(void);
void init(void);
char data[DATA_SIZE];
   

#endif