Marek Trojan
/
_8_CONV_2_MASTER
program for conv2
Fork of I2C_HelloWorld_Mbed by
main.h@4:35e714396141, 2015-12-01 (annotated)
- Committer:
- marcus255
- Date:
- Tue Dec 01 22:15:31 2015 +0000
- Revision:
- 4:35e714396141
- Child:
- 5:759439e9e976
writing ok, reading in progress
Who changed what in which revision?
User | Revision | Line number | New 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 | 4:35e714396141 | 11 | |
marcus255 | 4:35e714396141 | 12 | I2C i2c(PTB4, PTB3); |
marcus255 | 4:35e714396141 | 13 | Serial conv2(USBTX, USBRX); |
marcus255 | 4:35e714396141 | 14 | int writeByte(char fromUART); |
marcus255 | 4:35e714396141 | 15 | void onUartChar(void); |
marcus255 | 4:35e714396141 | 16 | int transmission; |
marcus255 | 4:35e714396141 | 17 | void init(void); |
marcus255 | 4:35e714396141 | 18 | |
marcus255 | 4:35e714396141 | 19 | #endif |
marcus255 | 4:35e714396141 | 20 | |
marcus255 | 4:35e714396141 | 21 |