Chaitanya Viswa
/
xmasterv2
v2i2c master receiving 4 bit data from slave
Fork of xmaster by
Diff: master.h
- Revision:
- 1:35dee3eff0ab
- Parent:
- 0:e96ddb4b964e
diff -r e96ddb4b964e -r 35dee3eff0ab master.h --- a/master.h Sat Jul 05 06:40:06 2014 +0000 +++ b/master.h Mon Jul 07 07:31:25 2014 +0000 @@ -1,18 +1,17 @@ #include "mbed.h" //library // -#define get_hk_data 1 //sample telecommands -#define telecommand2 2 -#define telecommand3 3 -#define telecommand4 4 -#define telecommand5 5 -#define telecommand6 6 -#define telecommand7 7 -#define telecommand8 8 -#define telecommand9 9 -#define telecommand10 10 +#define get_hk_data '1' //sample telecommands +#define telecommand2 '2' +#define telecommand3 '3' +#define telecommand4 '4' +#define telecommand5 '5' +#define telecommand6 '6' +#define telecommand7 '7' +#define telecommand8 '8' +#define telecommand9 '9' +#define telecommand10 '10' I2C master (p28,p27); //configure pins p27,p28 as I2C master Serial pc (USBTX,USBRX); -//const int addr = 0x20; //slave address char receive_byte(); //funtion to receive float data