HW layer for the Nucleo board, it only work with old BLE_API

Dependents:   Hello_BLE F446RE-BLE

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
mridup
Date:
Fri Sep 05 08:42:35 2014 +0000
Revision:
46:01f97cfcc109
Parent:
17:63059fcb8db2
Child:
50:898acb5227fc
BLEDevice setAppearance()

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hemddabral 12:a5d7db4a1e49 1 /* mbed Microcontroller Library
hemddabral 12:a5d7db4a1e49 2 * Copyright (c) 2006-2013 ARM Limited
hemddabral 12:a5d7db4a1e49 3 *
hemddabral 12:a5d7db4a1e49 4 * Licensed under the Apache License, Version 2.0 (the "License");
hemddabral 12:a5d7db4a1e49 5 * you may not use this file except in compliance with the License.
hemddabral 12:a5d7db4a1e49 6 * You may obtain a copy of the License at
hemddabral 12:a5d7db4a1e49 7 *
hemddabral 12:a5d7db4a1e49 8 * http://www.apache.org/licenses/LICENSE-2.0
hemddabral 12:a5d7db4a1e49 9 *
hemddabral 12:a5d7db4a1e49 10 * Unless required by applicable law or agreed to in writing, software
hemddabral 12:a5d7db4a1e49 11 * distributed under the License is distributed on an "AS IS" BASIS,
hemddabral 12:a5d7db4a1e49 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
hemddabral 12:a5d7db4a1e49 13 * See the License for the specific language governing permissions and
hemddabral 12:a5d7db4a1e49 14 * limitations under the License.
hemddabral 12:a5d7db4a1e49 15 */
hemddabral 12:a5d7db4a1e49 16
hemddabral 12:a5d7db4a1e49 17 #include "hal_types.h"
hemddabral 16:8aeb0c44869b 18 #include "mbed.h"
hemddabral 12:a5d7db4a1e49 19
hemddabral 12:a5d7db4a1e49 20 // utility functions
hemddabral 12:a5d7db4a1e49 21
hemddabral 12:a5d7db4a1e49 22 #ifndef __UTIL_H__
hemddabral 12:a5d7db4a1e49 23 #define __UTIL_H__
hemddabral 12:a5d7db4a1e49 24
hemddabral 16:8aeb0c44869b 25 #define NEED_CONSOLE_OUTPUT 1 /* Set this if you need debug messages on the console;
hemddabral 16:8aeb0c44869b 26 * it will have an impact on code-size and power consumption. */
hemddabral 16:8aeb0c44869b 27
hemddabral 16:8aeb0c44869b 28 #if NEED_CONSOLE_OUTPUT
mridup 17:63059fcb8db2 29 //Serial usb(USBTX, USBRX); // tx, rx
hemddabral 16:8aeb0c44869b 30 extern Serial pc;
hemddabral 16:8aeb0c44869b 31 #define DEBUG(...) { pc.printf(__VA_ARGS__); }
hemddabral 16:8aeb0c44869b 32 #else
hemddabral 16:8aeb0c44869b 33 #define DEBUG(...) /* nothing */
hemddabral 16:8aeb0c44869b 34 #endif /* #if NEED_CONSOLE_OUTPUT */
hemddabral 16:8aeb0c44869b 35
mridup 46:01f97cfcc109 36 #define STORE_LE_16(buf, val) ( ((buf)[0] = (tHalUint8) (val) ) , \
mridup 46:01f97cfcc109 37 ((buf)[1] = (tHalUint8) (val>>8) ) )
mridup 46:01f97cfcc109 38
mridup 46:01f97cfcc109 39 #define STORE_LE_32(buf, val) ( ((buf)[0] = (tHalUint8) (val) ) , \
mridup 46:01f97cfcc109 40 ((buf)[1] = (tHalUint8) (val>>8) ) , \
mridup 46:01f97cfcc109 41 ((buf)[2] = (tHalUint8) (val>>16) ) , \
mridup 46:01f97cfcc109 42 ((buf)[3] = (tHalUint8) (val>>24) ) )
hemddabral 16:8aeb0c44869b 43
hemddabral 12:a5d7db4a1e49 44
hemddabral 12:a5d7db4a1e49 45 double getHighPowerAndPALevelValue(int8_t dBMLevel, int8_t& EN_HIGH_POWER, int8_t& PA_LEVEL);
hemddabral 12:a5d7db4a1e49 46
hemddabral 12:a5d7db4a1e49 47 #endif // __UTIL_H__