Previous version which works for my stm32f401 Nucleo board
Fork of X_NUCLEO_IDB0XA1 by
platform/inc/btle.h@64:6d7b775c3f6d, 2014-11-19 (annotated)
- Committer:
- mridup
- Date:
- Wed Nov 19 11:24:37 2014 +0000
- Revision:
- 64:6d7b775c3f6d
Changed directory structure to support STM32Cube BlueNRG module, platform module and BLE_API adaptation module as separate entities. Added Doxygen support to Adaptation and used HCI components.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mridup | 64:6d7b775c3f6d | 1 | /* mbed Microcontroller Library |
mridup | 64:6d7b775c3f6d | 2 | * Copyright (c) 2006-2013 ARM Limited |
mridup | 64:6d7b775c3f6d | 3 | * |
mridup | 64:6d7b775c3f6d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mridup | 64:6d7b775c3f6d | 5 | * you may not use this file except in compliance with the License. |
mridup | 64:6d7b775c3f6d | 6 | * You may obtain a copy of the License at |
mridup | 64:6d7b775c3f6d | 7 | * |
mridup | 64:6d7b775c3f6d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mridup | 64:6d7b775c3f6d | 9 | * |
mridup | 64:6d7b775c3f6d | 10 | * Unless required by applicable law or agreed to in writing, software |
mridup | 64:6d7b775c3f6d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mridup | 64:6d7b775c3f6d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mridup | 64:6d7b775c3f6d | 13 | * See the License for the specific language governing permissions and |
mridup | 64:6d7b775c3f6d | 14 | * limitations under the License. |
mridup | 64:6d7b775c3f6d | 15 | */ |
mridup | 64:6d7b775c3f6d | 16 | |
mridup | 64:6d7b775c3f6d | 17 | |
mridup | 64:6d7b775c3f6d | 18 | #ifndef _BTLE_H_ |
mridup | 64:6d7b775c3f6d | 19 | #define _BTLE_H_ |
mridup | 64:6d7b775c3f6d | 20 | |
mridup | 64:6d7b775c3f6d | 21 | |
mridup | 64:6d7b775c3f6d | 22 | #ifdef __cplusplus |
mridup | 64:6d7b775c3f6d | 23 | extern "C" { |
mridup | 64:6d7b775c3f6d | 24 | #endif |
mridup | 64:6d7b775c3f6d | 25 | |
mridup | 64:6d7b775c3f6d | 26 | #include "hci.h" |
mridup | 64:6d7b775c3f6d | 27 | #include "bluenrg_hci.h" |
mridup | 64:6d7b775c3f6d | 28 | #include "hci_internal.h" |
mridup | 64:6d7b775c3f6d | 29 | #include "bluenrg_hci_internal.h" |
mridup | 64:6d7b775c3f6d | 30 | #include "bluenrg_shield_bsp.h" |
mridup | 64:6d7b775c3f6d | 31 | #include "bluenrg_gap.h" |
mridup | 64:6d7b775c3f6d | 32 | #include "gatt_service.h" |
mridup | 64:6d7b775c3f6d | 33 | #include <stdio.h> |
mridup | 64:6d7b775c3f6d | 34 | #include <string.h> |
mridup | 64:6d7b775c3f6d | 35 | |
mridup | 64:6d7b775c3f6d | 36 | void btle_init(bool isSetAddress, PinName mosi, PinName miso, PinName sclk); |
mridup | 64:6d7b775c3f6d | 37 | void SPI_Poll(void); |
mridup | 64:6d7b775c3f6d | 38 | void User_Process(void); |
mridup | 64:6d7b775c3f6d | 39 | void setConnectable(void); |
mridup | 64:6d7b775c3f6d | 40 | |
mridup | 64:6d7b775c3f6d | 41 | extern uint16_t g_gap_service_handle; |
mridup | 64:6d7b775c3f6d | 42 | extern uint16_t g_appearance_char_handle; |
mridup | 64:6d7b775c3f6d | 43 | extern uint16_t g_device_name_char_handle; |
mridup | 64:6d7b775c3f6d | 44 | |
mridup | 64:6d7b775c3f6d | 45 | #ifdef __cplusplus |
mridup | 64:6d7b775c3f6d | 46 | } |
mridup | 64:6d7b775c3f6d | 47 | #endif |
mridup | 64:6d7b775c3f6d | 48 | |
mridup | 64:6d7b775c3f6d | 49 | #endif |