risc-v/esp32c3: Make BLE adapter code compliant to nxstyle

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2021-10-01 15:53:48 -03:00 committed by Alan Carvalho de Assis
parent 867c6d0636
commit 47e804b167
4 changed files with 38 additions and 7 deletions

View File

@ -330,9 +330,9 @@ extern int btdm_hci_tl_io_event_post(int event);
/* VHCI */
extern bool API_vhci_host_check_send_available(void); /* Functions in bt lib */
extern void API_vhci_host_send_packet(uint8_t * data, uint16_t len);
extern int API_vhci_host_register_callback(const vhci_host_callback_t
extern bool api_vhci_host_check_send_available(void); /* Functions in bt lib */
extern void api_vhci_host_send_packet(uint8_t * data, uint16_t len);
extern int api_vhci_host_register_callback(const vhci_host_callback_t
*callback);
/* TX power */
@ -2404,7 +2404,7 @@ bool esp32c3_vhci_host_check_send_available(void)
return false;
}
return API_vhci_host_check_send_available();
return api_vhci_host_check_send_available();
}
/****************************************************************************
@ -2428,7 +2428,7 @@ void esp32c3_vhci_host_send_packet(uint8_t *data, uint16_t len)
return;
}
API_vhci_host_send_packet(data, len);
api_vhci_host_send_packet(data, len);
}
/****************************************************************************
@ -2452,7 +2452,7 @@ int esp32c3_vhci_register_callback(const esp_vhci_host_callback_t *callback)
return ret;
}
ret = API_vhci_host_register_callback(
ret = api_vhci_host_register_callback(
(const vhci_host_callback_t *)callback) == 0 ? 0 : -1;
return ret;
}

View File

@ -30,6 +30,8 @@
#include <nuttx/config.h>
#include "esp32c3_aliases.ld"
#define SRAM_IRAM_START 0x4037c000
#define SRAM_DRAM_START 0x3fc7c000

View File

@ -0,0 +1,29 @@
/****************************************************************************
* boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifdef CONFIG_ESP32C3_BLE
/* Lower-case aliases for BLE library symbols not compliant to nxstyle */
api_vhci_host_check_send_available = API_vhci_host_check_send_available;
api_vhci_host_send_packet = API_vhci_host_send_packet;
api_vhci_host_register_callback = API_vhci_host_register_callback;
#endif

View File

@ -115,7 +115,7 @@ SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32c3_out.ld
.PHONY = context distclean
$(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE)
$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@
$(Q) $(CC) -isystem $(TOPDIR)/include -I $(BOARD_DIR)/scripts -C -P -x c -E $(SCRIPTIN) -o $@
context:: $(SCRIPTOUT)