Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE: fix conflicting include by qualifying cordio pal includes #10042

Merged
merged 1 commit into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "hci_api.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity - hci_ is not using relative paths like util or pal, why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's not part of pal. This is an external codebase. This is not a valid long term solution and is a stopgap until we fix our build system.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem has been solved many times and we don't have to develop any cutting edge technology, mbed_lib.json can have a list of include dirs it exports and other libs that require them can import them:
so for cordio host stack it would be "export_include": ["stack/include/wsf/"]
and each library that needed it like cordio controller "depends": ["CORDIO"] which will import the includes that were exported.

#include "util/calc128.h"
#include "util/wstr.h"
#include "pal_crypto.h"
#include "stack/platform/include/pal_crypto.h"

/**************************************************************************************************
Global Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define SEC_MAIN_H

#include "hci_api.h"
#include "pal_crypto.h"
#include "stack/platform/include/pal_crypto.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_AUDIO_AMP_H
#define PAL_AUDIO_AMP_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_BB_H
#define PAL_BB_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#ifndef PAL_BB_BLE_H
#define PAL_BB_BLE_H

#include "pal_bb.h"
#include "pal_crypto.h"
#include "pal_types.h"
#include "stack/platform/include/pal_bb.h"
#include "stack/platform/include/pal_crypto.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_BB_BLE_TESTER_H
#define PAL_BB_BLE_TESTER_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

/**************************************************************************************************
Function Declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_BTN_H
#define PAL_BTN_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_CFG_H
#define PAL_CFG_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_CRYPTO_H
#define PAL_CRYPTO_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_IO_EXP_H
#define PAL_IO_EXP_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_LED_H
#define PAL_LED_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_NVM_H
#define PAL_NVM_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_RADIO_H
#define PAL_RADIO_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_RTC_H
#define PAL_RTC_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_SYS_H
#define PAL_SYS_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_TIMER_H
#define PAL_TIMER_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_TWI_H
#define PAL_TWI_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef PAL_UART_H
#define PAL_UART_H

#include "pal_types.h"
#include "stack/platform/include/pal_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "wsf_types.h"
#include "wsf_assert.h"
#include "wsf_trace.h"
#include "pal_sys.h"
#include "stack/platform/include/pal_sys.h"

/**************************************************************************************************
Global Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "wsf_cs.h"
#include "wsf_os.h"

#include "pal_uart.h"
#include "stack/platform/include/pal_uart.h"

/**************************************************************************************************
Data Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "wsf_os.h"
#include "wsf_trace.h"
#include "wsf_cs.h"
#include "pal_sys.h"
#include "stack/platform/include/pal_sys.h"

/**************************************************************************************************
Global Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "wsf_types.h"
#include "wsf_assert.h"
#include "wsf_nvm.h"
#include "pal_nvm.h"
#include "stack/platform/include/pal_nvm.h"
#include "util/crc32.h"

/**************************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include "wsf_assert.h"
#include "wsf_cs.h"
#include "wsf_trace.h"
#include "pal_rtc.h"
#include "pal_led.h"
#include "pal_sys.h"
#include "stack/platform/include/pal_rtc.h"
#include "stack/platform/include/pal_led.h"
#include "stack/platform/include/pal_sys.h"

/**************************************************************************************************
Macros
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "wsf_buf.h"
#include "wsf_cs.h"
#include "util/print.h"
#include "pal_sys.h"
#include "stack/platform/include/pal_sys.h"
#include <stdarg.h>

/**************************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

#include "mbed.h"
#include "pal_types.h"
#include "pal_uart.h"
#include "pal_nvm.h"
#include "stack/platform/include/pal_types.h"
#include "stack/platform/include/pal_uart.h"
#include "stack/platform/include/pal_nvm.h"
#include "hal/ticker_api.h"

#ifdef __cplusplus
Expand Down