nxsem_timedwait_uninterruptible() must return -ECANCELED if the thread is canceled:
include/nuttx/semaphore.h: Return if nxsem_wait() returns ECANCELED meaning that the thread waiting for the semaphore has been canceled.
sched/semaphore/sem_timedwait.c: Same change (the inline version is in semaphore.h, the non-inlined version is in sem_tickwait.c).
drivers/sensors/lps25h.c and drivers/wireless/bluetooth/bt_uart_bcm4343x.c: Make sure that the caller deals correctly with the -ECANCELED return value.
Refer to issue 619.
This reverts commit b9ace36fcc.
This change was added by PR 625 but has a serious logic flaw. It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:
else ifeq ($(WINTOOL),y)
DEFINE = "$(TOPDIR)/tools/define.sh"
INCDIR = "$(TOPDIR)/tools/incdir.sh" -w
This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined. As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]
return bt_driver_register(&g_bt_null);
sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'
ret = bt_netdev_register();
found during testing.
drivers/wireless/bluetooth/bt_uart_shim.c: Change the task tname for
the HCI receiver task to bring it into line with the transmitter task.
Most of the bluetooth and wifi chips appear to need external firmware, and the 43438 is no exception. Fortunately, since Cypress got involved, these are much more straightforward to obtain and are shipped as part of their SDK, which is downloadable from their website. Those firmwares are already provided as C arrays, so their names just need updating to;
const unsigned char bt_firmware_hcd -> The bt firmware array.
const int bt_firmware_len = sizeof(bt_firmware_hcd);
Fixed coding standard error in several files. Use of while( is incorrect; a space is required between while and (. Also ran tools/nxstyle and fix thoses complaints as well in most files.
Changes to comply with coding standard. Mostly focused on files with missing space after keyword in if(, switch(, and for(. Offending files also got changes to comply with tools nxstyle. If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh. Still need to fix occurrences of while( with missing space. There are a lot of them.
Squashed commit of the following:
arch/arm/src/stm32: Add Kconfig options needed by the HCI UART. Various fixes to finally get a clean error free compile with no unexpected warnings.
arch/arm/src/stm32: In HCI UART, use spin_lock_irqsave() instead of enter_critical_section() whenever possible.
arch/arm/src/stm32: In HCI UART, fix up naming of configurations so that they are unique. Still needs Kconfig settings. Modify logic so that there can be multiple HCI UARTs, some supporting DMA and some not.
arch/arm/src/stm32: Integrate watermarks and software Rx flow control into the HCI UART driver.
arch/arm/src/stm32: Eliminate some HCI UART UART configuration options. Per the HCI UART spec, the link will b 8 data bits, no parity, 1 stop bit... Always.
arch/arm/src/stm32: Trivial cleanup
arch/arm/src/stm32: Fixes most initial compilation issues STM32 HCI UART driver. Still need to set up USART configuration parmeters for HCI UART
arch/arm/src/stm32: Completes first cut at STM32 HCI UART driver.
arch/arm/src/stm32: Completes most of read logic for HCI UART. Still needs to be able to block if no read data is available. Still missing write and flush logic.
drivers/wireless: Remove txenable from HCI UART methods. arch/arm/src/stm32: Reorganize some structures in HCI UART.
arch/arm/src/stm32: Still messaging the HCI uart driver.
arch/arm/src/stm32: Some trivial renaming.
arch/arm/src/stm32: A little more HCI-UART logic.
arch/arm/src/stm32: Initial setup to support HCI-UART. Little more than the serial driver with some name changes and a few things removed.
wireless/bluetooth: This completes the basic logic path that gets frames from the Bluetooth stack and into the network layer.
wireless/bluetooth: Fleshes out some of the network packet receive logic.
wireless/bluetooth: Replace buffer allocated with primitive allocator from ieee 802.15.4.
wireless/ieee802154: Fix a few typos.
wireless/bluetooth: More renaming in preparation for some real work.
wireless/bluetooth: Some trivial renaming; update comments
Squashed commit of the following:
wireless/bluetooth: Some small changes that gets to a clean compile by just eliminating some incorrect implementations (still with a lot of warnings. The logic is still incomplete but now not so lethal.
wireless/bluetooth: Restructuring: Connection interfaces should internal to wireless/bluetooth. include/nuttx/wireless/bt_conn.h removed and merged with wireless/bluetooth/bt_conn.h. Several fix to get closer to bt_netdev.c compiling. Need to design some not interfaces and use some existing interfaces to send and receiv packets.
wireless/bluetooth: Some organization with some network device compile errors fixed. Still not even close to compiling.
net/bluetooth: Fix numerous compile issues; Still open design issues with regard to the interface with the Bluetooth stack.
wireless/bluetooth: Create bt_netdev.c with a crude copy of mac802154_netdev.c. Does not not even compile yet.
include/nuttx/net: Add bluetooth.h. Content is not yet correct.
net/netpackets: Add bluetooth.h. Update net/bluetooth to use new socket address definition.
net/bluetooth: Some fixes for initial build.
net/bluetooth: Add initial support for Bluetooth sockets. The initial cut is just the a clone of the IEEE 802.15.4 socket support with name changes.
net/ieee802154: Fix some typos noted when cloning to create net/bluetooth.
Squashed commit of the following:
drivers/bluetooth: Re-architect Bluetooth UART driver to follow upper/lower half model. Completely untested.
drivers/bluetooth: Grr.. Another band-aid commit to stay in sync with master. Why is this so difficult
drivers/bluetooth: Band-aid commit to stay in sync with master. Lost it somehow.
drivers/wireless/bluetooth: A few changes, mostly thought experiments.
drivers/wireless/bluetooth: UART-based Bluetooth driver ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package. This initial commit is the original files in the NuttX build environment with changes to conform with the coding standard. It should not even build.