program for conv2

Dependencies:   mbed

Fork of I2C_HelloWorld_Mbed by mbed official

Committer:
marcus255
Date:
Sun Dec 06 21:24:46 2015 +0000
Revision:
5:759439e9e976
Parent:
4:35e714396141
Child:
7:04a1f5398882
still not complete write-read sequence

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 4:35e714396141 6 #define UART_CONFIRMATION_CHAR 0x33
marcus255 4:35e714396141 7 #define DATA_TO_WRITE_CHAR 0xCC
marcus255 4:35e714396141 8 #define DATA_TO_READ_CHAR 0x99
marcus255 4:35e714396141 9 #define UART_NON_CONFIRMATION_CHAR 0xAA
marcus255 4:35e714396141 10 #define UART_CHAR_INCOMING 0x44
marcus255 5:759439e9e976 11 #define END_OF_TRANSMISSION 0x66
marcus255 4:35e714396141 12
marcus255 4:35e714396141 13 I2C i2c(PTB4, PTB3);
marcus255 4:35e714396141 14 Serial conv2(USBTX, USBRX);
marcus255 4:35e714396141 15 int writeByte(char fromUART);
marcus255 4:35e714396141 16 void onUartChar(void);
marcus255 4:35e714396141 17 int transmission;
marcus255 4:35e714396141 18 void init(void);
marcus255 4:35e714396141 19
marcus255 4:35e714396141 20 #endif
marcus255 4:35e714396141 21
marcus255 4:35e714396141 22