program for conv1, universal converter before including conv2 code

Dependencies:   mbed-src

Fork of _8_CONV_1_SLAVE by Marek Trojan

main.h

Committer:
marcus255
Date:
2015-12-01
Revision:
0:ab0f6f4ef7ac
Child:
1:455088a984b0

File content as of revision 0:ab0f6f4ef7ac:

#ifndef MAIN_H
#define MAIN_H

#include <mbed.h>
#define SLAVE_ADDR 0xA0
#define RECBUFSIZE 64
#define UART_CONFIRMATION_CHAR 0x33
#define DATA_TO_WRITE_CHAR 0xCC
#define DATA_TO_READ_CHAR 0x99
#define UART_NON_CONFIRMATION_CHAR 0xAA
#define END_OF_TRANSMISSION 0x66
#define UART_CHAR_INCOMING 0x44

I2CSlave slave(PTB4, PTB3);
Serial device(USBTX, USBRX);
InterruptIn SDA_interrupt(PTB7);
DigitalIn SDA_state(PTB6);

char msg[] = "qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm";
char buffer;
int count;

void i2cStart(void);
void init(void);

#endif