mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
audioutils/morsey: Add the Morsey library
This commit adds the Morsey library (Apache 2.0 licensed) to be downloaded from an external repository so it can be used in NuttX applications. This library parses ASCII text into Morse code marks to be played by a user-implemented 'transmit' function (i.e. over an LED, buzzer, audio sink, etc.). Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
parent
1e490d3fbe
commit
4d3bb6e7c9
5 changed files with 83 additions and 0 deletions
1
audioutils/morsey/.gitignore
vendored
Normal file
1
audioutils/morsey/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
morsey
|
||||
6
audioutils/morsey/Kconfig
Normal file
6
audioutils/morsey/Kconfig
Normal file
|
|
@ -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
audioutils/morsey/Make.defs
Normal file
25
audioutils/morsey/Make.defs
Normal file
|
|
@ -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
audioutils/morsey/Makefile
Normal file
50
audioutils/morsey/Makefile
Normal file
|
|
@ -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
|
||||
1
include/.gitignore
vendored
1
include/.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
/netutils/cJSON.h
|
||||
/netutils/cJSON_Utils.h
|
||||
/audioutils/rtttl.h
|
||||
/audioutils/morsey.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue