test code 123

Dependencies:   mbed

Fork of LinkNode-Test by Qi Yao

Committer:
youkee
Date:
Thu Sep 01 05:14:03 2016 +0000
Revision:
0:1ad0e04b1bc5
change internal time from 1s to 200ms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
youkee 0:1ad0e04b1bc5 1 /*
youkee 0:1ad0e04b1bc5 2 * Copyright 2016 Google Inc. All Rights Reserved.
youkee 0:1ad0e04b1bc5 3 *
youkee 0:1ad0e04b1bc5 4 * Licensed under the Apache License, Version 2.0 (the "License");
youkee 0:1ad0e04b1bc5 5 * you may not use this file except in compliance with the License.
youkee 0:1ad0e04b1bc5 6 * You may obtain a copy of the License at
youkee 0:1ad0e04b1bc5 7 *
youkee 0:1ad0e04b1bc5 8 * http://www.apache.org/licenses/LICENSE-2.0
youkee 0:1ad0e04b1bc5 9 *
youkee 0:1ad0e04b1bc5 10 * Unless required by applicable law or agreed to in writing, software
youkee 0:1ad0e04b1bc5 11 * distributed under the License is distributed on an "AS IS" BASIS,
youkee 0:1ad0e04b1bc5 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
youkee 0:1ad0e04b1bc5 13 * See the License for the specific language governing permissions and
youkee 0:1ad0e04b1bc5 14 * limitations under the License.
youkee 0:1ad0e04b1bc5 15 */
youkee 0:1ad0e04b1bc5 16 #ifndef _GOOSCI_UTILITY_H_
youkee 0:1ad0e04b1bc5 17 #define _GOOSCI_UTILITY_H_
youkee 0:1ad0e04b1bc5 18
youkee 0:1ad0e04b1bc5 19 #include <stdio.h>
youkee 0:1ad0e04b1bc5 20 #include "ble/BLE.h"
youkee 0:1ad0e04b1bc5 21 #include "goosci_utility.h"
youkee 0:1ad0e04b1bc5 22 #include "sensor.pb.h"
youkee 0:1ad0e04b1bc5 23 #include "pb.h"
youkee 0:1ad0e04b1bc5 24 #include "pb_decode.h"
youkee 0:1ad0e04b1bc5 25 #include "pb_common.h"
youkee 0:1ad0e04b1bc5 26 #include "mbed.h"
youkee 0:1ad0e04b1bc5 27 #include "pb_encode.h"
youkee 0:1ad0e04b1bc5 28
youkee 0:1ad0e04b1bc5 29
youkee 0:1ad0e04b1bc5 30 // The serial port on leonardo will hang (UART buffer full) if the
youkee 0:1ad0e04b1bc5 31 // serial port is not physically opened on the USB host. This
youkee 0:1ad0e04b1bc5 32 // function will block until the serial port is open.
youkee 0:1ad0e04b1bc5 33 //void wait_for_serial(void);
youkee 0:1ad0e04b1bc5 34 #ifdef __cplusplus
youkee 0:1ad0e04b1bc5 35 extern "C"
youkee 0:1ad0e04b1bc5 36 {
youkee 0:1ad0e04b1bc5 37 #endif
youkee 0:1ad0e04b1bc5 38
youkee 0:1ad0e04b1bc5 39 #define BTLE_BUFFER_SIZE 20
youkee 0:1ad0e04b1bc5 40
youkee 0:1ad0e04b1bc5 41
youkee 0:1ad0e04b1bc5 42 void send_int_data(GattCharacteristic & characteristic, unsigned long timestamp, int value);
youkee 0:1ad0e04b1bc5 43 void send_float_data(GattCharacteristic & characteristic, unsigned long timestamp, float value);
youkee 0:1ad0e04b1bc5 44
youkee 0:1ad0e04b1bc5 45 #ifdef __cplusplus
youkee 0:1ad0e04b1bc5 46 }
youkee 0:1ad0e04b1bc5 47 #endif
youkee 0:1ad0e04b1bc5 48 #endif
youkee 0:1ad0e04b1bc5 49