ieee802154: Move non-radio files from libradio to libutils. Ad ieee802154_getpanid().
This commit is contained in:
parent
0098fec8e3
commit
eb8121b9f7
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/include/ieee802154/ieee802154.h
|
||||
*
|
||||
* Copyright (C) 2015 Sebastien Lorquet. All rights reserved.
|
||||
* Copyright(C) 2015 Sebastien Lorquet. All rights reserved.
|
||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -23,11 +23,11 @@
|
||||
* 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,
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
@ -36,26 +36,48 @@
|
||||
#ifndef __APPS_INCLUDE_IEEE802154_IEEE802154_H
|
||||
#define __APPS_INCLUDE_IEEE802154_IEEE802154_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <nuttx/wireless/ieee802154/ieee802154_radio.h>
|
||||
#include <nuttx/wireless/ieee802154/ieee802154_mac.h>
|
||||
|
||||
int ieee802154_setchan (int fd, uint8_t chan);
|
||||
int ieee802154_getchan (int fd, FAR uint8_t *chan);
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* libradio */
|
||||
|
||||
int ieee802154_setchan(int fd, uint8_t chan);
|
||||
int ieee802154_getchan(int fd, FAR uint8_t *chan);
|
||||
|
||||
int ieee802154_setpanid(int fd, uint16_t panid);
|
||||
int ieee802154_getpanid(int fd, FAR uint16_t *panid);
|
||||
|
||||
int ieee802154_setsaddr(int fd, uint16_t saddr);
|
||||
|
||||
int ieee802154_seteaddr(int fd, FAR uint8_t *chan);
|
||||
|
||||
int ieee802154_setpanid (int fd, uint16_t panid);
|
||||
int ieee802154_setsaddr (int fd, uint16_t saddr);
|
||||
int ieee802154_seteaddr (int fd, FAR uint8_t *chan);
|
||||
int ieee802154_setpromisc(int fd, bool promisc);
|
||||
|
||||
int ieee802154_setdevmode(int fd, uint8_t devmode);
|
||||
|
||||
int ieee802154_setcca(int fd, FAR struct ieee802154_cca_s *cca);
|
||||
int ieee802154_getcca(int fd, FAR struct ieee802154_cca_s *cca);
|
||||
|
||||
int ieee802154_addrparse(FAR struct ieee802154_packet_s *inPacket, FAR struct ieee802154_addr_s *dest, FAR struct ieee802154_addr_s *src);
|
||||
int ieee802154_addrstore(FAR struct ieee802154_packet_s *inPacket, FAR struct ieee802154_addr_s *dest, FAR struct ieee802154_addr_s *src);
|
||||
int ieee802154_addrtostr(FAR char *buf, int len, FAR struct ieee802154_addr_s *addr);
|
||||
/* libutils */
|
||||
|
||||
int ieee802154_addrparse(FAR struct ieee802154_packet_s *inPacket,
|
||||
FAR struct ieee802154_addr_s *dest,
|
||||
FAR struct ieee802154_addr_s *src);
|
||||
int ieee802154_addrstore(FAR struct ieee802154_packet_s *inPacket,
|
||||
FAR struct ieee802154_addr_s *dest,
|
||||
FAR struct ieee802154_addr_s *src);
|
||||
int ieee802154_addrtostr(FAR char *buf, int len,
|
||||
FAR struct ieee802154_addr_s *addr);
|
||||
|
||||
#endif /*__APPS_INCLUDE_IEEE802154_IEEE802154_H */
|
||||
|
@ -6,6 +6,7 @@
|
||||
menu "IEEE 802.15.4 applications"
|
||||
|
||||
source "$APPSDIR/wireless/ieee802154/libradio/Kconfig"
|
||||
source "$APPSDIR/wireless/ieee802154/libutils/Kconfig"
|
||||
source "$APPSDIR/wireless/ieee802154/coord/Kconfig"
|
||||
source "$APPSDIR/wireless/ieee802154/i8sak/Kconfig"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# apps/wireless/ieee802154/Make.defs
|
||||
# apps/wireless/ieee802154/libradio/Make.defs
|
||||
# Adds selected applications to apps/ build
|
||||
#
|
||||
# Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
|
||||
|
@ -6,7 +6,8 @@
|
||||
config IEEE802154_COORD
|
||||
bool "Generic IEEE 802.15.4 coordinator"
|
||||
default n
|
||||
select IEEE802154_COMMON
|
||||
select IEEE802154_LIBRADIO
|
||||
select IEEE802154_LIBUTILS
|
||||
---help---
|
||||
Enable the IEEE 802.15.4 generic coordinator
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
config IEEE802154_I8SAK
|
||||
bool "IEEE 802.15.4 Swiss Army Knife"
|
||||
default n
|
||||
select IEEE802154_COMMON
|
||||
select IEEE802154_LIBRADIO
|
||||
select IEEE802154_LIBUTILS
|
||||
---help---
|
||||
Enable the IEEE 802.15.4 Swiss Army Knife
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
config IEEE802154_COMMON
|
||||
bool "Common IEEE 802.15.4 library routines"
|
||||
config IEEE802154_LIBRADIO
|
||||
bool "IEEE 802.15.4 radio library routines"
|
||||
default n
|
||||
---help---
|
||||
Some common library routines for ieee 802.15.4 apps
|
||||
Some radio library routines for ieee 802.15.4 apps
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
############################################################################
|
||||
# apps/wireless/ieee802154/Make.defs
|
||||
# apps/wireless/ieee802154/libradio/Make.defs
|
||||
# Adds selected applications to apps/ build
|
||||
#
|
||||
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2016-17 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -34,7 +34,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_IEEE802154_COMMON),y)
|
||||
ifeq ($(CONFIG_IEEE802154_LIBRADIO),y)
|
||||
CONFIGURED_APPS += wireless/ieee802154/libradio
|
||||
endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# apps/wireless/ieee802154/Makefile
|
||||
# apps/wireless/ieee802154/libradio/Makefile
|
||||
#
|
||||
# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2016-17 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,7 @@
|
||||
-include $(TOPDIR)/Make.defs
|
||||
include $(APPDIR)/Make.defs
|
||||
|
||||
# NSH Library
|
||||
# libradio source files
|
||||
|
||||
ASRCS =
|
||||
CSRCS = ieee802154_setchan.c ieee802154_getchan.c
|
||||
@ -45,9 +45,6 @@ CSRCS += ieee802154_setpanid.c
|
||||
CSRCS += ieee802154_seteaddr.c ieee802154_setsaddr.c
|
||||
CSRCS += ieee802154_setpromisc.c ieee802154_setdevmode.c
|
||||
CSRCS += ieee802154_setcca.c ieee802154_getcca.c
|
||||
CSRCS += ieee802154_addrparse.c ieee802154_addrstore.c ieee802154_addrtostr.c
|
||||
|
||||
#
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
@ -56,12 +53,12 @@ SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
BIN = ..\..\..\libapps$(LIBEXT)
|
||||
BIN = ..\..\..\libapps$(LIBEXT)
|
||||
else
|
||||
ifeq ($(WINTOOL),y)
|
||||
BIN = ..\\..\\..\\libapps$(LIBEXT)
|
||||
BIN = ..\\..\\..\\libapps$(LIBEXT)
|
||||
else
|
||||
BIN = ../../../libapps$(LIBEXT)
|
||||
BIN = ../../../libapps$(LIBEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* apps/wireless/ieee802154/libradio/ieee802154_addrparse.c
|
||||
* apps/wireless/ieee802154/libutils/ieee802154_addrparse.c
|
||||
*
|
||||
* Copyright (C) 2015 Sebastien Lorquet. All rights reserved.
|
||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* apps/wireless/ieee802154/libradio/ieee802154_addrparse.c
|
||||
* apps/wireless/ieee802154/libutils/ieee802154_addrparse.c
|
||||
*
|
||||
* Copyright (C) 2015 Sebastien Lorquet. All rights reserved.
|
||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* apps/wireless/ieee802154/libradio/ieee802154_addrtostr.c
|
||||
* apps/wireless/ieee802154/libutils/ieee802154_addrtostr.c
|
||||
*
|
||||
* Copyright (C) 2015 Sebastien Lorquet. All rights reserved.
|
||||
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
|
Loading…
x
Reference in New Issue
Block a user