TYBLE16 on os5 sample programs

Dependencies:   BME280 TextLCD nRF51_Vdd

Fork of TYBLE16_mbedlized_os5_BASE by Kenji Arai

Please refer following notebook.
/users/kenjiArai/notebook/tyble16-module-as-mbed-os-5-board-mbedlization/

Committer:
kenjiArai
Date:
Sun Apr 15 04:15:18 2018 +0000
Revision:
3:c0010c8ad17f
Parent:
1:9011c83e4178
Separated Uart_Clinent & Uart_Server due to memory overflow

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kenjiArai 1:9011c83e4178 1 /* mbed Microcontroller Library
kenjiArai 1:9011c83e4178 2 * Copyright (c) 2006-2015 ARM Limited
kenjiArai 1:9011c83e4178 3 *
kenjiArai 1:9011c83e4178 4 * Licensed under the Apache License, Version 2.0 (the "License");
kenjiArai 1:9011c83e4178 5 * you may not use this file except in compliance with the License.
kenjiArai 1:9011c83e4178 6 * You may obtain a copy of the License at
kenjiArai 1:9011c83e4178 7 *
kenjiArai 1:9011c83e4178 8 * http://www.apache.org/licenses/LICENSE-2.0
kenjiArai 1:9011c83e4178 9 *
kenjiArai 1:9011c83e4178 10 * Unless required by applicable law or agreed to in writing, software
kenjiArai 1:9011c83e4178 11 * distributed under the License is distributed on an "AS IS" BASIS,
kenjiArai 1:9011c83e4178 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
kenjiArai 1:9011c83e4178 13 * See the License for the specific language governing permissions and
kenjiArai 1:9011c83e4178 14 * limitations under the License.
kenjiArai 1:9011c83e4178 15 */
kenjiArai 1:9011c83e4178 16
kenjiArai 1:9011c83e4178 17 #ifndef __URLFRAME_H__
kenjiArai 1:9011c83e4178 18 #define __URLFRAME_H__
kenjiArai 1:9011c83e4178 19
kenjiArai 1:9011c83e4178 20 #include "EddystoneTypes.h"
kenjiArai 1:9011c83e4178 21 #include <string.h>
kenjiArai 1:9011c83e4178 22
kenjiArai 1:9011c83e4178 23 class URLFrame
kenjiArai 1:9011c83e4178 24 {
kenjiArai 1:9011c83e4178 25 public:
kenjiArai 1:9011c83e4178 26 URLFrame(void);
kenjiArai 1:9011c83e4178 27
kenjiArai 1:9011c83e4178 28 URLFrame(const char *urlDataIn);
kenjiArai 1:9011c83e4178 29
kenjiArai 1:9011c83e4178 30 URLFrame(UrlData_t urlDataIn, uint8_t urlDataLength);
kenjiArai 1:9011c83e4178 31
kenjiArai 1:9011c83e4178 32 void constructURLFrame(uint8_t* rawFrame, int8_t advPowerLevel);
kenjiArai 1:9011c83e4178 33
kenjiArai 1:9011c83e4178 34 size_t getRawFrameSize(void) const;
kenjiArai 1:9011c83e4178 35
kenjiArai 1:9011c83e4178 36 uint8_t* getEncodedURLData(void);
kenjiArai 1:9011c83e4178 37
kenjiArai 1:9011c83e4178 38 uint8_t getEncodedURLDataLength(void) const;
kenjiArai 1:9011c83e4178 39
kenjiArai 1:9011c83e4178 40 void setURLData(const char *urlDataIn);
kenjiArai 1:9011c83e4178 41
kenjiArai 1:9011c83e4178 42 void setEncodedURLData(const uint8_t* urlEncodedDataIn, const uint8_t urlEncodedDataLengthIn);
kenjiArai 1:9011c83e4178 43
kenjiArai 1:9011c83e4178 44 private:
kenjiArai 1:9011c83e4178 45 void encodeURL(const char *urlDataIn);
kenjiArai 1:9011c83e4178 46
kenjiArai 1:9011c83e4178 47 static const uint8_t FRAME_TYPE_URL = 0x10;
kenjiArai 1:9011c83e4178 48 /* Even if the URL is 0 bytes we still need to include the type and txPower i.e. 2 bytes */
kenjiArai 1:9011c83e4178 49 static const uint8_t FRAME_MIN_SIZE_URL = 2;
kenjiArai 1:9011c83e4178 50
kenjiArai 1:9011c83e4178 51 uint8_t urlDataLength;
kenjiArai 1:9011c83e4178 52 UrlData_t urlData;
kenjiArai 1:9011c83e4178 53
kenjiArai 1:9011c83e4178 54 };
kenjiArai 1:9011c83e4178 55
kenjiArai 1:9011c83e4178 56 #endif /* __URLFRAME_H__ */