Skip to content

Commit

Permalink
examples/ble_toio_central: Add an example to control toio
Browse files Browse the repository at this point in the history
Add a BLE central example to connect with toio device.
  • Loading branch information
SPRESENSE committed Nov 27, 2024
1 parent 27eaffe commit 08b860c
Show file tree
Hide file tree
Showing 7 changed files with 2,026 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/ble_toio_central/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config EXAMPLES_BLE_TOIO_CENTRAL
tristate "BLE toio Central example"
default n
---help---
Enable the ble_toio_central app

if EXAMPLES_BLE_TOIO_CENTRAL

config EXAMPLES_BLE_TOIO_CENTRAL_PROGNAME
string "Program name"
default "ble_toio_central"
---help---
This is the name of the program that will be use when the NSH ELF
program is installed.

config EXAMPLES_BLE_TOIO_CENTRAL_PRIORITY
int "ble_toio_central task priority"
default 100

config EXAMPLES_BLE_TOIO_CENTRAL_STACKSIZE
int "ble_toio_central stack size"
default DEFAULT_TASK_STACKSIZE

endif # EXAMPLES_BLE_TOIO_CENTRAL
38 changes: 38 additions & 0 deletions examples/ble_toio_central/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
############################################################################
# examples/ble_toio_central/Make.defs
#
# Copyright 2024 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of Sony Semiconductor Solutions Corporation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################

ifneq ($(CONFIG_EXAMPLES_BLE_TOIO_CENTRAL),)
CONFIGURED_APPS += ble_toio_central
endif
47 changes: 47 additions & 0 deletions examples/ble_toio_central/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
############################################################################
# examples/ble_toio_central/Makefile
#
# Copyright 2024 Sony Semiconductor Solutions Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of Sony Semiconductor Solutions Corporation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################

include $(APPDIR)/Make.defs
-include $(SDKDIR)/Make.defs

PROGNAME = $(CONFIG_EXAMPLES_BLE_TOIO_CENTRAL_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_BLE_TOIO_CENTRAL_PRIORITY)
STACKSIZE = $(CONFIG_EXAMPLES_BLE_TOIO_CENTRAL_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_BLE_TOIO_CENTRAL)

CSRCS = ble_central_app.c
MAINSRC = ble_toio_central_main.cxx

include $(APPDIR)/Application.mk
Loading

0 comments on commit 08b860c

Please sign in to comment.