HW layer for the Nucleo board, it only work with old BLE_API
Dependents: Hello_BLE F446RE-BLE
Fork of X_NUCLEO_IDB0XA1 by
utils/inc/Utils.h@17:63059fcb8db2, 2014-08-07 (annotated)
- Committer:
- mridup
- Date:
- Thu Aug 07 13:41:25 2014 +0000
- Revision:
- 17:63059fcb8db2
- Parent:
- 16:8aeb0c44869b
- Child:
- 46:01f97cfcc109
Characteristic Notification and GattServer updateValue() implementation
Who changed what in which revision?
User | Revision | Line number | New 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 | |
hemddabral | 16:8aeb0c44869b | 36 | |
hemddabral | 12:a5d7db4a1e49 | 37 | |
hemddabral | 12:a5d7db4a1e49 | 38 | double getHighPowerAndPALevelValue(int8_t dBMLevel, int8_t& EN_HIGH_POWER, int8_t& PA_LEVEL); |
hemddabral | 12:a5d7db4a1e49 | 39 | |
hemddabral | 12:a5d7db4a1e49 | 40 | #endif // __UTIL_H__ |