Skip to content
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
1 change: 1 addition & 0 deletions audioutils/morsey/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
morsey
6 changes: 6 additions & 0 deletions audioutils/morsey/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config AUDIOUTILS_MORSEY
bool "Morse code playing library"
default n
---help---
Simple library for parsing ASCII text into playable Morse code. Not
necessarily restricted to audio.
25 changes: 25 additions & 0 deletions audioutils/morsey/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/audioutils/morsey/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_AUDIOUTILS_MORSEY),)
CONFIGURED_APPS += $(APPDIR)/audioutils/morsey
endif
50 changes: 50 additions & 0 deletions audioutils/morsey/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
############################################################################
# apps/audioutils/morsey/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

CSRCS = $(MORSEY_DIR)/morsey.c

MORSEY_DIR = morsey
MORSEY_VERSION = v1.0.0
MORSEY_MORSEY_H_SHA256 = 55f45e7b9a4d810f928ffe3ee9bea4cc318e28b1f49abf9512aee2638bd1dbfa
MORSEY_MORSEY_C_SHA256 = f946c9845a90a4c1a459490906ae071d0ac5b41326b7a5ce971efb97792ef56a

$(MORSEY_DIR):
$(Q) echo "Cloning Morsey repo..."
$(Q) git clone --depth=1 --branch=$(MORSEY_VERSION) https://github.com/linguini1/morsey.git
$(Q) touch $(MORSEY_DIR)
$(Q) echo "Checking Morsey hashes..."
$(Q) $(APPDIR)/tools/check-hash.sh sha256 $(MORSEY_MORSEY_H_SHA256) $@/morsey.h
$(Q) $(APPDIR)/tools/check-hash.sh sha256 $(MORSEY_MORSEY_C_SHA256) $@/morsey.c

create_includes: $(MORSEY_DIR)/morsey.h
$(Q) cp $< $(APPDIR)/include/audioutils

context:: $(MORSEY_DIR)
$(Q) $(MAKE) create_includes

distclean::
$(call DELFILE, $(APPDIR)/include/audioutils/morsey.h)
$(call DELDIR, morsey)

include $(APPDIR)/Application.mk
33 changes: 33 additions & 0 deletions examples/txmorse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ##############################################################################
# apps/examples/txmorse/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

if(CONFIG_EXAMPLES_TXMORSE)
nuttx_add_application(
NAME
${CONFIG_EXAMPLES_TXMORSE_PROGNAME}
SRCS
txmorse_main.c
STACKSIZE
${CONFIG_EXAMPLES_TXMORSE_STACKSIZE}
PRIORITY
${CONFIG_EXAMPLES_TXMORSE_PRIORITY})
endif()
30 changes: 30 additions & 0 deletions examples/txmorse/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config EXAMPLES_TXMORSE
tristate "txmorse (Morse code transmitter)"
default n
depends on AUDIOUTILS_MORSEY
---help---
Enable the Morse code transmission example.

if EXAMPLES_TXMORSE

config EXAMPLES_TXMORSE_PROGNAME
string "Program name"
default "txmorse"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

config EXAMPLES_TXMORSE_PRIORITY
int "txmorse task priority"
default 100

config EXAMPLES_TXMORSE_STACKSIZE
int "txmorse stack size"
default DEFAULT_TASK_STACKSIZE

endif
25 changes: 25 additions & 0 deletions examples/txmorse/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/examples/txmorse/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_EXAMPLES_TXMORSE),)
CONFIGURED_APPS += $(APPDIR)/examples/txmorse
endif
34 changes: 34 additions & 0 deletions examples/txmorse/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
############################################################################
# apps/examples/txmorse/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

# Application info

PROGNAME = $(CONFIG_EXAMPLES_TXMORSE_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_TXMORSE_PRIORITY)
STACKSIZE = $(CONFIG_EXAMPLES_TXMORSE_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_TXMORSE)

MAINSRC = txmorse_main.c

include $(APPDIR)/Application.mk
Loading
Loading