kopia lustrzana https://github.com/micropython/micropython
ports/unix: Fix "‘signal_sco_can_send_now’ defined but not used".
Added a "ports/unix/btstack_config.h" for a workaround: If "MICROPY_BLUETOOTH_BTSTACK_USB" is set and "ENABLE_SCO_OVER_HCI" is not defined there is a compiler error: ../../lib/btstack/platform/libusb/hci_transport_h2_libusb.c:1354:13: error: ‘signal_sco_can_send_now’ defined but not used Because the problem is in an external code a workaround is done by defining MICROPY_BLUETOOTH_BTSTACK_USB in the added "btstack_config.h". The "ports/unix/Makefile" has been changed so that the "btstack_config.h" will be included. Signed-off-by: Yasmin Bosch <development@yasmin-bosch.de>pull/14006/head
rodzic
29f6e663e0
commit
7acadbd5fc
|
@ -52,6 +52,12 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
# Set the file that will be included by "extmod/btstack/btstack_config.h"
|
||||
#
|
||||
# The original file "extmod/btstack/btstack_config_common.h"
|
||||
# will be included by it.
|
||||
MICROPY_BLUETOOTH_BTSTACK_CONFIG_FILE ?= '"ports/unix/btstack_config.h"'
|
||||
|
||||
# include py core make definitions
|
||||
include $(TOP)/py/py.mk
|
||||
include $(TOP)/extmod/extmod.mk
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef MICROPY_INCLUDED_PORTS_UNIX_BTSTACK_CONFIG_H
|
||||
#define MICROPY_INCLUDED_PORTS_UNIX_BTSTACK_CONFIG_H
|
||||
|
||||
|
||||
#include "extmod/btstack/btstack_config_common.h"
|
||||
|
||||
#ifdef MICROPY_BLUETOOTH_BTSTACK_USB
|
||||
#if MICROPY_BLUETOOTH_BTSTACK_USB
|
||||
|
||||
// Workaround:
|
||||
//
|
||||
// If ENABLE_SCO_OVER_HCI is not defined there is a compiler error:
|
||||
//
|
||||
// ../../lib/btstack/platform/libusb/hci_transport_h2_libusb.c:1354:13:
|
||||
// error: ‘signal_sco_can_send_now’ defined but not used
|
||||
//
|
||||
// Because the problem is in an external code this workaround is done.
|
||||
#define ENABLE_SCO_OVER_HCI
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_PORTS_UNIX_BTSTACK_CONFIG_H
|
Ładowanie…
Reference in New Issue