FM-test

Dependencies:   MODSERIAL mbed-rtos mbed

Fork of Master by Ohnishi_Gundan

Committer:
9uS7
Date:
Fri Sep 12 12:12:01 2014 +0000
Revision:
6:df6d8ba1907a
Parent:
4:aaaadb45cbd9
Child:
9:6057314dc8ec
repair spell

Who changed what in which revision?

UserRevisionLine numberNew contents of line
9uS7 0:4f07ba929908 1 #ifndef _INC_MY_BLUETOOTH
9uS7 0:4f07ba929908 2 #define _INC_MY_BLUETOOTH
9uS7 0:4f07ba929908 3
9uS7 0:4f07ba929908 4 #include "mbed.h"
9uS7 0:4f07ba929908 5
9uS7 1:e1cfb5850088 6 #define BT_MASTER 0
9uS7 1:e1cfb5850088 7 #define BT_SLAVE -1
9uS7 1:e1cfb5850088 8
9uS7 3:12e1f116ea42 9 #define SYNC_SENSOR 0x10
9uS7 3:12e1f116ea42 10 #define SYNC_MIC 0x11
9uS7 3:12e1f116ea42 11 #define SYNC_MOTOR 0x20
9uS7 3:12e1f116ea42 12 #define SYNC_FM 0x21
9uS7 3:12e1f116ea42 13
9uS7 4:aaaadb45cbd9 14 #define PACK_SIZE 15
9uS7 3:12e1f116ea42 15
9uS7 0:4f07ba929908 16 typedef union _cvt{
9uS7 3:12e1f116ea42 17 char byte[4];
9uS7 3:12e1f116ea42 18 int in;
9uS7 3:12e1f116ea42 19 float fl;
9uS7 0:4f07ba929908 20 } Cvt;
9uS7 0:4f07ba929908 21
9uS7 1:e1cfb5850088 22 void btSetup(int); //setup(role) role:BT_MASTER or BT_SLAVE
9uS7 0:4f07ba929908 23
9uS7 3:12e1f116ea42 24 void sync(char, char*, float*); //SYN(option,char_data,float_data); only for MASTER
9uS7 3:12e1f116ea42 25
9uS7 3:12e1f116ea42 26 void slaveRecieve( void );
9uS7 6:df6d8ba1907a 27 void recieveSensor(float*, float*);
9uS7 3:12e1f116ea42 28
9uS7 2:c610e1a7fbcd 29 //void btLoop(int); //btLoop(role) role:BT_MASTER or BT_SLAVE
9uS7 2:c610e1a7fbcd 30
9uS7 0:4f07ba929908 31 #endif