Qi Yao / LinkNode---test123

Dependencies:   mbed

Fork of LinkNode-Test by Qi Yao

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers goosci_utility.h Source File

goosci_utility.h

00001 /*
00002  *  Copyright 2016 Google Inc. All Rights Reserved.
00003  *
00004  *  Licensed under the Apache License, Version 2.0 (the "License");
00005  *  you may not use this file except in compliance with the License.
00006  *  You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *  Unless required by applicable law or agreed to in writing, software
00011  *  distributed under the License is distributed on an "AS IS" BASIS,
00012  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *  See the License for the specific language governing permissions and
00014  *  limitations under the License.
00015  */
00016 #ifndef _GOOSCI_UTILITY_H_
00017 #define _GOOSCI_UTILITY_H_
00018 
00019 #include <stdio.h>
00020 #include "ble/BLE.h"
00021 #include "goosci_utility.h"
00022 #include "sensor.pb.h"
00023 #include "pb.h"
00024 #include "pb_decode.h"
00025 #include "pb_common.h"
00026 #include "mbed.h"
00027 #include "pb_encode.h"
00028 
00029 
00030 // The serial port on leonardo will hang (UART buffer full) if the
00031 // serial port is not physically opened on the USB host.  This
00032 // function will block until the serial port is open.
00033 //void wait_for_serial(void);
00034 #ifdef __cplusplus
00035 extern "C" 
00036 {
00037 #endif
00038 
00039 #define BTLE_BUFFER_SIZE 20
00040 
00041 
00042 void send_int_data(GattCharacteristic & characteristic, unsigned long timestamp, int value);
00043 void send_float_data(GattCharacteristic & characteristic, unsigned long timestamp, float value);
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 #endif
00049