program for conv2

Dependencies:   mbed

Fork of I2C_HelloWorld_Mbed by mbed official

Committer:
marcus255
Date:
Wed Dec 16 19:42:52 2015 +0000
Revision:
7:04a1f5398882
Parent:
5:759439e9e976
Reading/Writting EEPROM works fine, Reading/Writting works fine when temperature sensor connected to the i2c bus. Device addresses must be hardcoded for now.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marcus255 4:35e714396141 1 #ifndef MAIN_H
marcus255 4:35e714396141 2 #define MAIN_H
marcus255 4:35e714396141 3
marcus255 4:35e714396141 4 #include "mbed.h"
marcus255 4:35e714396141 5 #define SLAVE_ADDR 0xA0
marcus255 7:04a1f5398882 6 #define RTC_ADDR 0xD0
marcus255 4:35e714396141 7 #define UART_CONFIRMATION_CHAR 0x33
marcus255 4:35e714396141 8 #define DATA_TO_WRITE_CHAR 0xCC
marcus255 4:35e714396141 9 #define DATA_TO_READ_CHAR 0x99
marcus255 4:35e714396141 10 #define UART_NON_CONFIRMATION_CHAR 0xAA
marcus255 4:35e714396141 11 #define UART_CHAR_INCOMING 0x44
marcus255 5:759439e9e976 12 #define END_OF_TRANSMISSION 0x66
marcus255 4:35e714396141 13
marcus255 4:35e714396141 14 I2C i2c(PTB4, PTB3);
marcus255 4:35e714396141 15 Serial conv2(USBTX, USBRX);
marcus255 4:35e714396141 16 int writeByte(char fromUART);
marcus255 4:35e714396141 17 void onUartChar(void);
marcus255 4:35e714396141 18 int transmission;
marcus255 4:35e714396141 19 void init(void);
marcus255 4:35e714396141 20
marcus255 4:35e714396141 21 #endif
marcus255 4:35e714396141 22
marcus255 4:35e714396141 23