BLE mbed Endpoint network stack for mbedConnectorInterface. The stack makes use of a special BLE Socket abstraction to create socket() semantics over BLE.
Dependencies: libnsdl_m0 BLE_API Base64 nRF51822 SplitterAssembler
UartRPCFunctions.h
00001 /** 00002 * @file UartRPCFunctions.h 00003 * @brief BLE UART RPC stubs header 00004 * @author Doug Anson 00005 * @version 1.0 00006 * @see 00007 * 00008 * Copyright (c) 2014 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #ifndef __UART_RPC_FUNCTIONS_H__ 00024 #define __UART_RPC_FUNCTIONS_H__ 00025 00026 #include "UartRPC.h" 00027 00028 typedef enum { 00029 SOCKET_OPEN_FN = 0x01, 00030 SOCKET_CLOSE_FN = 0x02, 00031 SEND_DATA_FN = 0x04, 00032 RECV_DATA_FN = 0x08, 00033 GET_LOCATION_FN = 0x16, 00034 NUM_FNs = 5 00035 } FunctionIDs; 00036 00037 extern "C" void ble_rpc_init(BLEDevice &ble); 00038 extern "C" bool ble_rpc_open_udp_socket(char *ip_address,int port,ble_dispatch_callback_fn cb); 00039 extern "C" bool ble_rpc_close_udp_socket(void); 00040 extern "C" int ble_rpc_send_data(uint8_t *data,int data_length); 00041 extern "C" int ble_rpc_recv_packet(uint8_t *buffer,int buffer_length); 00042 extern "C" int ble_rpc_recv_data(uint8_t *buffer,int buffer_length); 00043 extern "C" int ble_rpc_get_location(BLELocation *location); 00044 00045 #endif // __UART_RPC_FUNCTIONS_H__
Generated on Sun Jul 17 2022 05:11:06 by 1.7.2