FM-test

Dependencies:   MODSERIAL mbed-rtos mbed

Fork of Master by Ohnishi_Gundan

bluetooth.h

Committer:
9uS7
Date:
2014-09-12
Revision:
3:12e1f116ea42
Parent:
2:c610e1a7fbcd
Child:
4:aaaadb45cbd9

File content as of revision 3:12e1f116ea42:

#ifndef _INC_MY_BLUETOOTH
#define _INC_MY_BLUETOOTH

#include "mbed.h"

#define BT_MASTER 0
#define BT_SLAVE -1

#define SYNC_SENSOR 0x10
#define SYNC_MIC 0x11
#define SYNC_MOTOR 0x20
#define SYNC_FM 0x21



#define PACK_SIZE 20

typedef union _cvt{
    char byte[4];
    int in;
    float fl;
} Cvt;

void btSetup(int);          //setup(role) role:BT_MASTER or BT_SLAVE

void sync(char, char*, float*);     //SYN(option,char_data,float_data); only for MASTER

void slaveRecieve( void );
void receiveSensor(float*, float*);

//void btLoop(int);       //btLoop(role)  role:BT_MASTER or BT_SLAVE

#endif