replaced #pragma once with old style #include guards to allow use of older compilers

This commit is contained in:
matthias.ringwald@gmail.com 2014-01-19 16:30:17 +00:00
parent 63048403cc
commit f471afd896
48 changed files with 178 additions and 56 deletions

View File

@ -29,7 +29,8 @@
*
*/
#pragma once
#ifndef __BTSTACKMANAGER_H
#define __BTSTACKMANAGER_H
#import <Foundation/Foundation.h>
#import <stdint.h>
@ -186,3 +187,5 @@ typedef enum {
// TODO add l2cap and rfcomm incoming events
@end
#endif // __BTSTACKMANAGER_H

View File

@ -7,7 +7,8 @@
// mspgcc LTS doesn't support 20-bit pointer yet -> put const data into .fartext
#pragma once
#ifndef __HAL_COMPAT_H
#define __HAL_COMPAT_H
#include <stdint.h>
@ -21,3 +22,4 @@ void FlashReadBlock(uint8_t *buffer, uint32_t addr, uint16_t len);
#endif // __HAL_COMPAT_H

View File

@ -3,7 +3,8 @@
Copyright 2008 Texas Instruments, Inc.
***************************************************************************/
#pragma once
#ifndef __HAL_LCD_FONTS_H
#define __HAL_LCD_FONTS_H
#define FONT_HEIGHT 12 // Each character has 13 lines
@ -11,3 +12,5 @@
extern const uint8_t fonts_lookup[];
extern const uint16_t fonts[];
#endif // __HAL_LCD_FONTS_H

View File

@ -1,3 +1,5 @@
#pragma once
#ifndef __HAL_UTIL_H
#define __HAL_UTIL_H
#endif // __HAL_UTIL_H

View File

@ -37,6 +37,9 @@
* Created by Albis Technologies.
*/
#pragma once
#ifndef __RUN_LOOP_UCOS_H
#define __RUN_LOOP_UCOS_H
void run_loop_notify_incoming_transport_packet(void);
#endif // __RUN_LOOP_UCOS_H

View File

@ -41,7 +41,8 @@
* Created by Matthias Ringwald on 9/20/09.
*
*/
#pragma once
#ifndef __SPRINGBOARDACCESS_H
#define __SPRINGBOARDACCESS_H
#define SBA_MessagePortName "SpringBoardAccess"
@ -79,3 +80,5 @@ int SBA_setBluetoothEnabled(int on);
* Tests if SpringBoardAccess server is available
*/
int SBA_available();
#endif // __SPRINGBOARDACCESS_H

View File

@ -34,7 +34,8 @@
*
*/
#pragma once
#ifndef __ATT_H
#define __ATT_H
#include <stdint.h>
@ -226,3 +227,5 @@ uint16_t att_prepare_handle_value_indication(att_connection_t * att_connection,
#if defined __cplusplus
}
#endif
#endif // __ATT_H

View File

@ -33,7 +33,8 @@
* Please inquire about commercial licensing options at contact@bluekitchen-gmbh.com
*
*/
#pragma once
#ifndef __ATT_SERVER_H
#define __ATT_SERVER_H
#include <btstack/btstack.h>
#include <stdint.h>
@ -78,3 +79,5 @@ int att_server_indicate(uint16_t handle, uint8_t *value, uint16_t value_len);
#if defined __cplusplus
}
#endif
#endif // __ATT_SERVER_H

View File

@ -34,7 +34,8 @@
*
*/
#pragma once
#ifndef __CENTRAL_DEVICE_DB_H
#define __CENTRAL_DEVICE_DB_H
#include <btstack/utils.h>
@ -112,3 +113,5 @@ void central_device_db_counter_set(int index, uint32_t counter);
* @param index
*/
void central_device_db_remove(int index);
#endif // __CENTRAL_DEVICE_DB_H

View File

@ -34,7 +34,8 @@
*
*/
#pragma once
#ifndef __GAP_LE_H
#define __GAP_LE_H
#if defined __cplusplus
extern "C" {
@ -62,3 +63,4 @@ void gap_random_address_set_mode(gap_random_address_type_t random_address_type);
}
#endif
#endif // __GAP_LE_H

View File

@ -34,7 +34,8 @@
*
*/
#pragma once
#ifndef __SM_H
#define __SM_H
#include <btstack/utils.h>
#include <btstack/btstack.h>
@ -256,3 +257,5 @@ void sm_cmac_start(sm_key_t k, uint16_t message_len, uint8_t * message, void (*d
#if defined __cplusplus
}
#endif
#endif // __SM_H

View File

@ -40,7 +40,8 @@
* Adapter to use cc256x-based chipsets with BTstack
*/
#pragma once
#ifndef __BT_CONTROL_CC256X_H
#define __BT_CONTROL_CC256X_H
#include <stdint.h>
#include "bt_control.h"
@ -52,4 +53,5 @@ void bt_control_cc256x_set_power(int16_t power_in_dB);
void bt_control_cc256x_enable_ehcill(int on);
int bt_control_cc256x_ehcill_enabled(void);
hci_uart_config_t *hci_uart_config_cc256x_instance(void);
hci_uart_config_t *hci_uart_config_cc256x_instance(void);
#endif // __BT_CONTROL_CC256X_H

View File

@ -7,7 +7,8 @@
// mspgcc LTS doesn't support 20-bit pointer yet -> put const data into .fartext
#pragma once
#ifndef __HAL_COMPAT_H
#define __HAL_COMPAT_H
#include <stdint.h>
@ -21,3 +22,4 @@ void FlashReadBlock(uint8_t *buffer, uint32_t addr, uint16_t len);
#endif // __HAL_COMPAT_H

View File

@ -1,3 +1,5 @@
#pragma once
#ifndef __HAL_UTIL_H
#define __HAL_UTIL_H
#endif // __HAL_UTIL_H

View File

@ -37,7 +37,8 @@
//
//*****************************************************************************
#pragma once
#ifndef __AD_PARSER_H
#define __AD_PARSER_H
#include "config.h"
@ -68,4 +69,5 @@ int ad_data_contains_uuid128(uint8_t ad_len, uint8_t * ad_data, uint8_t * uuid12
#if defined __cplusplus
}
#endif
#endif
#endif // __AD_PARSER_H

View File

@ -40,7 +40,8 @@
// NOTE: Supports only a single connection
#pragma once
#ifndef __BLE_CLIENT_H
#define __BLE_CLIENT_H
#include "config.h"
@ -190,4 +191,5 @@ le_command_status_t le_central_get_characteristics_for_service_with_uuid128(le_p
#if defined __cplusplus
}
#endif
#endif
#endif // __BLE_CLIENT_H

View File

@ -35,7 +35,8 @@
*
*/
#pragma once
#ifndef __ANT_CMDS_H
#define __ANT_CMDS_H
#include <stdint.h>
#include <btstack/hci_cmds.h>
@ -178,3 +179,5 @@ const ant_cmd_t ant_request_message;
#if defined __cplusplus
}
#endif
#endif // __ANT_CMDS_H

View File

@ -38,7 +38,8 @@
*
*/
#pragma once
#ifndef __BTSTACK_H
#define __BTSTACK_H
#include <btstack/hci_cmds.h>
#include <btstack/run_loop.h>
@ -84,3 +85,5 @@ void bt_send_rfcomm(uint16_t rfcom_cid, uint8_t *data, uint16_t len);
#if defined __cplusplus
}
#endif
#endif // __BTSTACK_H

View File

@ -36,7 +36,8 @@
* and then unblocked while entering low power mode atomically
*/
#pragma once
#ifndef __HAL_CPU_H
#define __HAL_CPU_H
#if defined __cplusplus
extern "C" {
@ -49,4 +50,4 @@ void hal_cpu_enable_irqs_and_sleep(void);
#if defined __cplusplus
}
#endif
#endif // __HAL_CPU_H

View File

@ -36,7 +36,8 @@
*
*/
#pragma once
#ifndef __HAL_TICK_H
#define __HAL_TICK_H
#include <stdint.h>
@ -50,4 +51,5 @@ int hal_tick_get_tick_period_in_ms(void);
#if defined __cplusplus
}
#endif
#endif
#endif // __HAL_TICK_H

View File

@ -38,7 +38,8 @@
*
*/
#pragma once
#ifndef __HAL_UART_DMA_H
#define __HAL_UART_DMA_H
#include <stdint.h>
@ -57,4 +58,5 @@ void hal_uart_dma_set_sleep(uint8_t sleep);
#if defined __cplusplus
}
#endif
#endif
#endif // __HAL_UART_DMA_H

View File

@ -35,7 +35,8 @@
* Created by Matthias Ringwald on 7/23/09.
*/
#pragma once
#ifndef __HCI_CMDS_H
#define __HCI_CMDS_H
#include <stdint.h>
@ -492,3 +493,5 @@ extern const hci_cmd_t rfcomm_persistent_channel_for_service;
#if defined __cplusplus
}
#endif
#endif // __HCI_CMDS_H

View File

@ -35,7 +35,8 @@
* Created by Matthias Ringwald on 7/13/09.
*/
#pragma once
#ifndef __LINKED_LIST_H
#define __LINKED_LIST_H
#if defined __cplusplus
extern "C" {
@ -61,3 +62,5 @@ void test_linked_list(void);
#if defined __cplusplus
}
#endif
#endif // __LINKED_LIST_H

View File

@ -40,7 +40,8 @@
* @Note minimal implementation, no error checking/handling
*/
#pragma once
#ifndef __MEMORY_POOL_H
#define __MEMORY_POOL_H
#if defined __cplusplus
extern "C" {
@ -60,3 +61,5 @@ void memory_pool_free(memory_pool_t *pool, void * block);
#if defined __cplusplus
}
#endif
#endif // __MEMORY_POOL_H

View File

@ -35,7 +35,8 @@
* Created by Matthias Ringwald on 6/6/09.
*/
#pragma once
#ifndef __RUN_LOOP_H
#define __RUN_LOOP_H
#include "config.h"
@ -119,3 +120,4 @@ void embedded_trigger(void);
}
#endif
#endif // __RUN_LOOP_H

View File

@ -33,7 +33,8 @@
* sdp_util.h
*/
#pragma once
#ifndef __SDP_UTIL_H
#define __SDP_UTIL_H
#include <stdint.h>
@ -137,3 +138,5 @@ void sdp_normalize_uuid(uint8_t *uuid, uint32_t shortUUID);
#if defined __cplusplus
}
#endif
#endif // __SDP_UTIL_H

View File

@ -37,7 +37,8 @@
* Created by Matthias Ringwald on 7/23/09.
*/
#pragma once
#ifndef __UTILS_H
#define __UTILS_H
#if defined __cplusplus
@ -145,3 +146,4 @@ int is_authenticated_link_key(link_key_type_t link_key_type);
}
#endif
#endif // __UTILS_H

View File

@ -43,7 +43,8 @@
*
*/
#pragma once
#ifndef __BT_CONTROL_H
#define __BT_CONTROL_H
#include <stdint.h>
@ -82,3 +83,5 @@ typedef struct {
#if defined __cplusplus
}
#endif
#endif // __BT_CONTROL_H

View File

@ -41,7 +41,8 @@
*
* Created by Matthias Ringwald on 5/19/09.
*/
#pragma once
#ifndef __BT_CONTROL_IPHONE_H
#define __BT_CONTROL_IPHONE_H
#include "bt_control.h"
@ -63,3 +64,4 @@ int iphone_system_has_csr(void);
}
#endif
#endif // __BT_CONTROL_IPHONE_H

View File

@ -41,7 +41,8 @@
*
*/
#pragma once
#ifndef __BTSTACK_MEMORY_H
#define __BTSTACK_MEMORY_H
#if defined __cplusplus
extern "C" {
@ -71,3 +72,5 @@ void btstack_memory_db_mem_service_free(void *db_mem_service);
#if defined __cplusplus
}
#endif
#endif // __BTSTACK_MEMORY_H

View File

@ -40,7 +40,8 @@
* allow to funnel debug & error messages
*/
#pragma once
#ifndef __DEBUG_H
#define __DEBUG_H
#include "config.h"
#include "hci_dump.h"
@ -76,3 +77,5 @@
#else
#define log_error(...)
#endif
#endif // __DEBUG_H

View File

@ -34,7 +34,8 @@
*
*/
#pragma once
#ifndef __GAP_H
#define __GAP_H
#if defined __cplusplus
extern "C" {
@ -100,3 +101,4 @@ int gap_mitm_protection_required_for_security_level(gap_security_level_t level)
}
#endif
#endif // __GAP_H

View File

@ -41,7 +41,8 @@
*
*/
#pragma once
#ifndef __HCI_H
#define __HCI_H
#include "config.h"
@ -457,3 +458,5 @@ void hci_le_advertisement_address(uint8_t * addr_type, bd_addr_t * addr);
#if defined __cplusplus
}
#endif
#endif // __HCI_H

View File

@ -42,7 +42,8 @@
* Created by Matthias Ringwald on 5/26/09.
*/
#pragma once
#ifndef __HCI_DUMP_H
#define __HCI_DUMP_H
#include <stdint.h>
@ -64,4 +65,5 @@ void hci_dump_close(void);
#if defined __cplusplus
}
#endif
#endif
#endif // __HCI_DUMP_H

View File

@ -42,7 +42,8 @@
* Created by Matthias Ringwald on 4/29/09.
*
*/
#pragma once
#ifndef __HCI_TRANSPORT_H
#define __HCI_TRANSPORT_H
#include <stdint.h>
#include <btstack/run_loop.h>
@ -86,3 +87,4 @@ extern void hci_transport_h4_iphone_set_enforce_wake_device(char *path);
}
#endif
#endif // __HCI_TRANSPORT_H

View File

@ -42,7 +42,8 @@
* Created by Matthias Ringwald on 5/16/09.
*/
#pragma once
#ifndef __L2CAP_H
#define __L2CAP_H
#include "hci.h"
#include "l2cap_signaling.h"
@ -250,3 +251,5 @@ int l2cap_le_request_connection_parameter_update(uint16_t handle, uint16_t inter
#if defined __cplusplus
}
#endif
#endif // __L2CAP_H

View File

@ -40,7 +40,8 @@
* Created by Matthias Ringwald on 7/23/09.
*/
#pragma once
#ifndef __L2CAP_SIGNALING_H
#define __L2CAP_SIGNALING_H
#include <stdint.h>
#include <stdarg.h>
@ -76,3 +77,4 @@ uint16_t l2cap_next_local_cid(void);
}
#endif
#endif // __L2CAP_SIGNALING_H

View File

@ -42,7 +42,8 @@
// Created by Matthias Ringwald on 8/15/09.
//
#pragma once
#ifndef __PLATFORM_IPHONE_H
#define __PLATFORM_IPHONE_H
#include "hci.h"
@ -58,3 +59,5 @@ int platform_iphone_logging_enabled(void);
#if defined __cplusplus
}
#endif
#endif // __PLATFORM_IPHONE_H

View File

@ -38,7 +38,8 @@
* interface to provide link key and remote name storage
*/
#pragma once
#ifndef __REMOTE_DEVICE_DB_H
#define __REMOTE_DEVICE_DB_H
#include <btstack/utils.h>
#include "gap.h"
@ -103,3 +104,5 @@ typedef struct {
#if defined __cplusplus
}
#endif
#endif // __REMOTE_DEVICE_DB_H

View File

@ -38,7 +38,8 @@
* RFCOMM.h
*/
#pragma once
#ifndef __RFCOMM_H
#define __RFCOMM_H
#include <btstack/btstack.h>
#include <btstack/utils.h>
@ -419,3 +420,5 @@ int rfcomm_send_port_configuration(uint16_t rfcomm_cid, rpn_baud_t baud_rate, rp
#if defined __cplusplus
}
#endif
#endif // __RFCOMM_H

View File

@ -40,7 +40,8 @@
* Created by Matthias Ringwald on 6/6/09.
*/
#pragma once
#ifndef __RUN_LOOP_PRIVATE_H
#define __RUN_LOOP_PRIVATE_H
#include <btstack/run_loop.h>
@ -71,3 +72,4 @@ typedef struct {
}
#endif
#endif // __RUN_LOOP_PRIVATE_H

View File

@ -33,7 +33,8 @@
* Please inquire about commercial licensing options at btstack@ringwald.ch
*
*/
#pragma once
#ifndef __SDP_H
#define __SDP_H
#include <stdint.h>
#include <btstack/linked_list.h>
@ -108,4 +109,5 @@ void sdp_unregister_service_internal(void *connection, uint32_t service_record_h
#if defined __cplusplus
}
#endif
#endif
#endif // __SDP_H

View File

@ -38,7 +38,8 @@
* sdp_client.h
*/
#pragma once
#ifndef __SDP_CLIENT_H
#define __SDP_CLIENT_H
#include "config.h"
@ -64,3 +65,5 @@ void sdp_client_service_search(bd_addr_t remote, uint8_t * des_serviceSearchPatt
#if defined __cplusplus
}
#endif
#endif // __SDP_CLIENT_H

View File

@ -38,7 +38,8 @@
* sdp_parser.h
*/
#pragma once
#ifndef __SDP_PARSER_H
#define __SDP_PARSER_H
#include "config.h"
@ -117,3 +118,4 @@ void sdp_parser_register_callback(void (*sdp_callback)(sdp_query_event_t * event
}
#endif
#endif // __SDP_PARSER_H

View File

@ -38,7 +38,8 @@
* sdp_rfcomm_query.h
*/
#pragma once
#ifndef __SDP_QUERY_RFCOMM_H
#define __SDP_QUERY_RFCOMM_H
#include <btstack/utils.h>
#include "sdp_parser.h"
@ -79,3 +80,5 @@ void sdp_query_rfcomm_register_callback(void(*sdp_app_callback)(sdp_query_event_
#if defined __cplusplus
}
#endif
#endif // __SDP_QUERY_RFCOMM_H

View File

@ -38,7 +38,8 @@
* sdp_query_util.h
*/
#pragma once
#ifndef __SDP_QUERY_UTIL_H
#define __SDP_QUERY_UTIL_H
#if defined __cplusplus
@ -56,3 +57,5 @@ void sdp_general_query_for_uuid(bd_addr_t remote, uint16_t uuid);
#if defined __cplusplus
}
#endif
#endif // __SDP_QUERY_UTIL_H

View File

@ -41,7 +41,8 @@
* Created by Matthias Ringwald on 6/6/09.
*/
#pragma once
#ifndef __SOCKET_CONNECTION_H
#define __SOCKET_CONNECTION_H
#include <btstack/run_loop.h>
@ -125,3 +126,5 @@ int socket_connection_has_parked_connections(void);
#if defined __cplusplus
}
#endif
#endif // __SOCKET_CONNECTION_H

View File

@ -1,5 +1,6 @@
// config.h created by configure for BTstack Sun Sep 25 16:06:59 CEST 2011
#pragma once
#ifndef __CONFIG_H
#define __CONFIG_H
#define HAVE_TRANSPORT_H4
#define UART_DEVICE "/dev/tty.usbserial-A600eIDu"
#define UART_SPEED 115200
@ -12,3 +13,5 @@
#define HAVE_SDP_EXTRA_QUERIES
#define HCI_ACL_PAYLOAD_SIZE 1021
// #define HCI_ACL_PAYLOAD_SIZE 52
#endif // __CONFIG_H