From 19084a7ddaf2f0337e1a0568dccd06f2a2f75ab6 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald <matthias@ringwald.ch> Date: Fri, 22 Jan 2016 17:52:43 +0100 Subject: [PATCH] add missing const specifiers --- platform/embedded/hci_transport_h4_ehcill_embedded.c | 4 ++-- platform/embedded/hci_transport_h4_embedded.c | 4 ++-- platform/posix/hci_transport_h4_posix.c | 4 ++-- platform/posix/hci_transport_h5_posix.c | 4 ++-- port/Makefile | 12 ++++++------ port/mtk/hci_transport_h4_mtk.c | 4 ++-- port/wiced/hci_transport_h4_wiced.c | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/platform/embedded/hci_transport_h4_ehcill_embedded.c b/platform/embedded/hci_transport_h4_ehcill_embedded.c index 3ce207ff8..17e157231 100644 --- a/platform/embedded/hci_transport_h4_ehcill_embedded.c +++ b/platform/embedded/hci_transport_h4_ehcill_embedded.c @@ -190,7 +190,7 @@ static void h4_register_packet_handler(void (*handler)(uint8_t packet_type, uint packet_handler = handler; } -static int h4_open(void *transport_config){ +static int h4_open(const void *transport_config){ // open uart hal_uart_dma_init(); @@ -214,7 +214,7 @@ static int h4_set_baudrate(uint32_t baudrate){ return hal_uart_dma_set_baud(baudrate); } -static int h4_close(void *transport_config){ +static int h4_close(const void *transport_config){ // first remove run loop handler btstack_run_loop_remove_data_source(&hci_transport_h4_dma_ds); diff --git a/platform/embedded/hci_transport_h4_embedded.c b/platform/embedded/hci_transport_h4_embedded.c index abead230a..9d757d359 100644 --- a/platform/embedded/hci_transport_h4_embedded.c +++ b/platform/embedded/hci_transport_h4_embedded.c @@ -133,7 +133,7 @@ static void h4_init_sm(void){ } -static int h4_open(void *transport_config){ +static int h4_open(const void *transport_config){ // open uart hal_uart_dma_init(); @@ -150,7 +150,7 @@ static int h4_open(void *transport_config){ return 0; } -static int h4_close(void *transport_config){ +static int h4_close(const void *transport_config){ // first remove run loop handler btstack_run_loop_remove_data_source(&hci_transport_h4_dma_ds); diff --git a/platform/posix/hci_transport_h4_posix.c b/platform/posix/hci_transport_h4_posix.c index b303e62ba..be862c565 100644 --- a/platform/posix/hci_transport_h4_posix.c +++ b/platform/posix/hci_transport_h4_posix.c @@ -131,7 +131,7 @@ static int h4_set_baudrate(uint32_t baudrate){ return 0; } -static int h4_open(void *transport_config){ +static int h4_open(const void *transport_config){ // check for hci_transport_config_uart_t if (!transport_config) { @@ -205,7 +205,7 @@ static int h4_open(void *transport_config){ return 0; } -static int h4_close(void *transport_config){ +static int h4_close(const void *transport_config){ // first remove run loop handler btstack_run_loop_remove_data_source(hci_transport_h4->ds); diff --git a/platform/posix/hci_transport_h5_posix.c b/platform/posix/hci_transport_h5_posix.c index ce9e6e3a0..8d46b1664 100644 --- a/platform/posix/hci_transport_h5_posix.c +++ b/platform/posix/hci_transport_h5_posix.c @@ -85,7 +85,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, int size); static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, int size) = dummy_handler; // prototypes -static int h5_open(void *transport_config){ +static int h5_open(const void *transport_config){ // check for hci_transport_config_uart_t if (!transport_config) { log_error("hci_transport_h5_posix: no config!"); @@ -168,7 +168,7 @@ static int h5_open(void *transport_config){ return 0; } -static int h5_close(void *transport_config){ +static int h5_close(const void *transport_config){ // first remove run loop handler btstack_run_loop_remove_data_source(hci_transport_h5->ds); diff --git a/port/Makefile b/port/Makefile index 3846fb021..51cc6309a 100644 --- a/port/Makefile +++ b/port/Makefile @@ -11,18 +11,18 @@ # - Microchip XC32 SUBDIRS = \ - arduino \ - ez430-rf2560 \ - libusb \ - msp-exp430f5438-cc2564b \ - msp430f5229lp-cc2564b \ - mtk \ posix-cc2564b \ posix-csr \ posix-h4 \ posix-stlc2500d \ posix-tc35661 \ posix-wl183x \ + libusb \ + arduino \ + ez430-rf2560 \ + msp-exp430f5438-cc2564b \ + msp430f5229lp-cc2564b \ + mtk \ stm32-f103rb-nucleo \ EXCLUDED = \ diff --git a/port/mtk/hci_transport_h4_mtk.c b/port/mtk/hci_transport_h4_mtk.c index be175fe71..5680ebba6 100644 --- a/port/mtk/hci_transport_h4_mtk.c +++ b/port/mtk/hci_transport_h4_mtk.c @@ -73,7 +73,7 @@ static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t si static uint8_t hci_packet_out[1+HCI_PACKET_BUFFER_SIZE]; // packet type + max(acl header + acl payload, event header + event data) static uint8_t hci_packet_in[1+HCI_PACKET_BUFFER_SIZE]; // packet type + max(acl header + acl payload, event header + event data) -static int h4_open(void *transport_config){ +static int h4_open(const void *transport_config){ int fd = mtk_bt_enable(); if (fd < 0) { @@ -90,7 +90,7 @@ static int h4_open(void *transport_config){ return 0; } -static int h4_close(void *transport_config){ +static int h4_close(const void *transport_config){ mtk_bt_disable(hci_transport_h4->ds->fd); diff --git a/port/wiced/hci_transport_h4_wiced.c b/port/wiced/hci_transport_h4_wiced.c index c6948261f..a4be661b3 100644 --- a/port/wiced/hci_transport_h4_wiced.c +++ b/port/wiced/hci_transport_h4_wiced.c @@ -1,4 +1,4 @@ -/* +const /* * Copyright (C) 2015 BlueKitchen GmbH * * Redistribution and use in source and binary forms, with or without @@ -227,7 +227,7 @@ static int h4_set_baudrate(uint32_t baudrate){ return 0; } -static int h4_open(void *transport_config){ +static int h4_open(const void *transport_config){ // UART config wiced_uart_config_t uart_config = @@ -285,7 +285,7 @@ static int h4_open(void *transport_config){ return 0; } -static int h4_close(void *transport_config){ +static int h4_close(const void *transport_config){ // not implementd return 0; }