Commit Graph

116 Commits

Author SHA1 Message Date
Alin Jerpelea 29bfbf8769 License: add Bluetooth LE support to the license guard
If ALLOW_BSD_COMPONENTS is not enabled in the license setup,
Bluetooth LE support will be disabled

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-27 02:56:22 +08:00
Xiang Xiao 2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Xiang Xiao d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
chao.an 6c69b12000 wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 09:50:54 -03:00
Nathan Hartman f61214cc0d mqueue, btqueue: Fix some typos (e.g., essage -> message)
include/nuttx/mqueue.h:
sched/mqueue/mq_msgqfree.c:
wireless/bluetooth/bt_queue.c:

    * Fix typos in comments only. No functional changes.
2021-05-25 07:39:24 +09:00
Xiang Xiao 001e7c3e76 sched: Don't include nuttx/sched.h inside sched.h
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:11:53 +09:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei 76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
Alin Jerpelea f59814e7d7 wireless: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-19 08:07:47 -08:00
Masayuki Ishikawa d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Matias N 45b392be7e nRF52: add support for building SoftDevice BLE controller 2021-02-02 14:40:26 -08:00
ligd f63db66382 mqueue: add file_mq_xx for kernel use
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-05 02:40:43 -06:00
Xiang Xiao d75895586a bluetooth: Don't call BT_LE162HOST in bt_buf_get_le16
since BT_GETUINT16 alredy convert the value to the little endian

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao 5c0d430b99 bluetooth: replace leave_critical_section with spin_unlock_irqrestore
since the resouce in bt_buf is protected by spin_lock_irqresave

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao d1dc0bf848 bluetooth: Fix typos in comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Brennan Ashton c6947199b2 Bluetooth: Fix bt_buff lifecycle
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-12-21 23:36:57 -06:00
chao.an 6ecf9dc5ef wireless/bluetooth: change the tx thread stack size to DEFAULT_TASK_STACKSIZE
simulate will demands more stack in different platform

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 06:34:09 -06:00
YAMAMOTO Takashi 2a2679e11a wireless/bluetooth/bt_smp.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi 14b7ea01ba wireless/bluetooth/bt_conn.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi af4f81a7e1 wireless/bluetooth/bt_hcicore.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi 0dadd03dbb wireless/bluetooth/bt_smp.c: Fix a syslog format 2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi 05127a2a33 wireless/bluetooth/bt_ioctl.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi e8ae56d9ea wireless/bluetooth/bt_att.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 46c52132c4 wireless/bluetooth/bt_buf.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
Matias N 52c3037b00 bt_conn.c: use definition names instead of hardcoded numbers 2020-10-28 22:02:09 -07:00
Matias N e560eeae01 bt_hcicore.c: fix handling of advertising report; use correct advertising interval 2020-10-28 22:02:09 -07:00
Matias N db37d825ba bt_netdev.c: wrong placement of DEBUGASSERT (checks pointer before being set) 2020-10-28 22:02:09 -07:00
Matias N 5386f972fa bluetooth: Add support for HCI RAW channel; make host layer optional 2020-10-25 17:04:25 -07:00
Brennan Ashton 1080d3f411 Bluetooth: Start implementing BTPROTO_HCI socket support
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-25 17:04:25 -07:00
Matias N d087d912ee bt_hcicore.c: Fix wrong order of bt_send() and setting last command sent 2020-10-25 09:13:20 -07:00
Matias N 4286d588f7 bt_netdev: remove invalid assert breaking build when debugging is enabled 2020-10-25 07:31:44 -07:00
Matias N 5888318736 bt_ioctl.c: fix copy paste error (incorrect parameter passed to function) 2020-08-26 01:09:01 +08:00
Xiang Xiao acca9fcc3b sched/wdog: Remove MAX_WDOGPARMS and related stuff
since the variable arguments are error prone and seldom used.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:19:50 -06:00
Xiang Xiao a0ce81d659 sched/wdog: Don't dynamically allocate wdog_s
to save the preserved space(1KB) and also avoid the heap overhead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
2020-08-11 12:28:55 -06:00
Xiang Xiao 4c706771c3 sched/wdog: Replace all callback argument from uint32_t to wdparm_t
and alwasy cast the argument of wd_start to wdparm_t

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-08 17:30:26 -03:00
Xiang Xiao 60fe0a0f96 libc: Refine the inline handling
1.Remove CONFIG_HAVE_INLINE macro
2.Change the ANSI C function to normal function
3.Other simple non ANSI function to macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-04 11:10:29 +09:00
Xiang Xiao 5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Gregory Nutt a569006fd8 sched/: Make more naming consistent
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions

    nxsem_setprotocol -> nxsem_set_protocol
    nxsem_getprotocol -> nxsem_get_protocol
    nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Alin Jerpelea e36d93f600 wireless: bluetooth: nxstyle fixes
various nxstyle fixes to fix the CI complains.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-23 19:44:08 +08:00
ligd cbf31bca5c global change: fix tools/checkpatch.sh warnnings
Change-Id: I88cfa979c44bcaf3a8f6e036c6bfccd3402ca85a
Signed-off-by: ligd <liguiding@fishsemi.com>
2020-04-09 10:29:28 -06:00
ligd 231ad202ee global change: repace sched_xfree() to kxmm_free()
Changes:
sched_xfree() => kxmm_free()
remove garbage related APIs
remove ARCH_HAVE_GARBAGE

Cause garbage feature move to mm_heap, then don't need
garbage anymore.

Change-Id: If310790a3208155ca8ab319e8d038cb6ff92c518
Signed-off-by: ligd <liguiding@fishsemi.com>
2020-04-09 10:29:28 -06:00
Gregory Nutt 97339e47f1 Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under graphics/, mm/, net/, sched/, wireless/bluetooth.

Still to do:  Files under fs/, drivers/, and arch.  The last is 116 files and will take some effort.
2020-03-29 20:11:10 +01:00
Gregory Nutt 5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
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.
2020-03-26 08:50:29 -07:00
Xiang Xiao b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
patacongo f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00