Skip to content

Commit

Permalink
libraries: remove libtinyiiod deps
Browse files Browse the repository at this point in the history
Remove submodule since it is no longer used.

Remove all tinyiiod dependencies.

Signed-off-by: Antoniu Miclaus <[email protected]>
  • Loading branch information
amiclaus authored and buha committed Nov 14, 2023
1 parent 66a5e9b commit 4d10221
Show file tree
Hide file tree
Showing 128 changed files with 202 additions and 229 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "libraries/mqtt/paho.mqtt.embedded-c"]
path = libraries/mqtt/paho.mqtt.embedded-c
url = https://github.com/eclipse/paho.mqtt.embedded-c
[submodule "libraries/iio/libtinyiiod"]
path = libraries/iio/libtinyiiod
url = https://github.com/analogdevicesinc/libtinyiiod
[submodule "libraries/azure-sdk-for-c"]
path = libraries/azure/azure-sdk-for-c
url = https://github.com/Azure/azure-sdk-for-c.git
Expand Down
1 change: 0 additions & 1 deletion ci/run_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ build_cppcheck() {

build_drivers() {
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi
git submodule update --init libraries/iio/libtinyiiod
make -j${NUM_JOBS} -C ./drivers -f Makefile
}

Expand Down
6 changes: 0 additions & 6 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ INCLUDES = -I../include/ \
-I./platform/xilinx \
-I../projects/adrv9009/src/devices/adi_hal \
-I../iio \
-I../libraries/iio/libtinyiiod \
-I./display

IIOD_FLAGS += -DTINYIIOD_VERSION_MAJOR=0 \
-DTINYIIOD_VERSION_MINOR=1 \
-DTINYIIOD_VERSION_GIT=0x1234567 \
-DIIOD_BUFFER_SIZE=0x1000 \
-D_USE_STD_INT_TYPES
IIOD_FLAGS += -DIIO_SUPPORT

CFLAGS = -c -Wall -Wformat=0 $(IIOD_FLAGS) $(INCLUDES)
Expand Down
10 changes: 1 addition & 9 deletions iio/iio.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/***************************************************************************//**
* @file iio.c
* @brief Implementation of iio.
* This module implements read/write ops, required by libtinyiiod and further
* calls show/store functions, corresponding to device/channel/attribute.
* @author Cristian Pop ([email protected])
* @author Mihail Chindris ([email protected])
********************************************************************************
Expand Down Expand Up @@ -1299,8 +1297,6 @@ static int iio_refill_buffer(struct iiod_ctx *ctx, const char *device)
/**
* @brief Read chunk of data from RAM to pbuf. Call
* "iio_transfer_dev_to_mem()" first.
* This function is probably called multiple times by libtinyiiod after a
* "iio_transfer_dev_to_mem" call, since we can only read "bytes_count" bytes.
* @param device - String containing device name.
* @param pbuf - Buffer where value is stored.
* @param offset - Offset to the remaining data after reading n chunks.
Expand Down Expand Up @@ -1344,9 +1340,6 @@ static int iio_read_buffer(struct iiod_ctx *ctx, const char *device, char *buf,

/**
* @brief Write chunk of data into RAM.
* This function is probably called multiple times by libtinyiiod before a
* "iio_transfer_mem_to_dev" call, since we can only write "bytes_count" bytes
* at a time.
* @param device - String containing device name.
* @param buf - Values to write.
* @param offset - Offset in memory after the nth chunk of data.
Expand Down Expand Up @@ -1841,8 +1834,7 @@ static int32_t iio_init_trigs(struct iio_desc *desc,
}

/**
* @brief Set communication ops and read/write ops that will be called
* from "libtinyiiod".
* @brief Set communication ops and read/write ops
* @param desc - iio descriptor.
* @param init_param - appropriate init param.
* @return 0 in case of success or negative value otherwise.
Expand Down
3 changes: 1 addition & 2 deletions iio/iio.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ struct iio_init_param {
/************************ Functions Declarations ******************************/
/******************************************************************************/

/* Set communication ops and read/write ops that will be called from
* "libtinyiiod". */
/* Set communication ops and read/write ops. */
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param);
/* Free the resources allocated by iio_init(). */
int iio_remove(struct iio_desc *desc);
Expand Down
6 changes: 3 additions & 3 deletions iio/iio_app/iio_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static int32_t print_uart_hello_message(struct no_os_uart_desc **uart_desc,
const char *uart_stop[] = { "1", "2" };
char message[512];
uint32_t msglen = sprintf(message,
"Running TinyIIOD server...\n"
"Running IIOD server...\n"
"If successful, you may connect an IIO client application by:\n"
"1. Disconnecting the serial terminal you use to view this message.\n"
"2. Connecting the IIO client application using the serial backend configured as shown:\n"
Expand All @@ -148,7 +148,7 @@ static int32_t print_uart_error_message(struct no_os_uart_desc **uart_desc,
{
char message[512];
uint32_t msglen = sprintf(message,
"TinyIIOD server failed with code %d.\n",
"IIOD server failed with code %d.\n",
(int)status);
#if defined(LINUX_PLATFORM) || defined(NO_OS_NETWORKING) || defined(NO_OS_LWIP_NETWORKING)
(void)msglen;
Expand Down Expand Up @@ -221,7 +221,7 @@ static int32_t network_setup(struct iio_init_param *iio_init_param,

char buff[100];
wifi_get_ip(wifi, buff, 100);
printf("Tinyiiod ip is: %s\n", buff);
printf("iiod ip is: %s\n", buff);

wifi_get_network_interface(wifi, &socket_param.net);
#endif
Expand Down
3 changes: 1 addition & 2 deletions iio/iiod.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/***************************************************************************//**
* @file iiod.c
* @brief Nonblockin implementation of libtinyiiod.
* Based on https://github.com/analogdevicesinc/libtinyiiod
* @brief Nonblockin implementation of iiod.
* @author Mihail Chindris ([email protected])
********************************************************************************
* Copyright 2022(c) Analog Devices, Inc.
Expand Down
1 change: 0 additions & 1 deletion libraries/iio/libtinyiiod
Submodule libtinyiiod deleted from 440e42
2 changes: 1 addition & 1 deletion projects/ad3552r_fmcz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SRC_DIRS += $(PROJECT)/srcs \
SRCS += $(NO-OS)/drivers/dac/ad3552r/ad3552r.c
INCS += $(NO-OS)/drivers/dac/ad3552r/ad3552r.h

ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
SRC_DIRS += $(NO-OS)/iio/iio_app
SRCS += $(NO-OS)/drivers/dac/ad3552r/iio_ad3552r.c
INCS += $(NO-OS)/drivers/dac/ad3552r/iio_ad3552r.h
Expand Down
2 changes: 1 addition & 1 deletion projects/ad400x-fmcz/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TINYIIOD ?= n
IIOD ?= n
include ../../tools/scripts/generic_variables.mk

include src.mk
Expand Down
2 changes: 1 addition & 1 deletion projects/ad413x/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Uncomment to use the desired platform
#PLATFORM = xilinx
TINYIIOD ?= n
IIOD ?= n

include ../../tools/scripts/generic_variables.mk

Expand Down
2 changes: 1 addition & 1 deletion projects/ad413x/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hardware": ["ad4110_zed"]
},
"iio": {
"flags": "TINYIIOD=y",
"flags": "IIOD=y",
"hardware": ["ad4110_zed"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ad413x/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ INCS += $(INCLUDE)/no_os_spi.h \
$(INCLUDE)/no_os_alloc.h \
$(INCLUDE)/no_os_mutex.h

ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRCS += $(DRIVERS)/afe/ad413x/iio_ad413x.c \
$(PLATFORM_DRIVERS)/$(PLATFORM)_uart.c \
Expand Down
2 changes: 1 addition & 1 deletion projects/ad463x_fmcz/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hardware" : ["ad4630_fmc_zed"]
},
"iio": {
"flags" : "TINYIIOD=y",
"flags" : "IIOD=y",
"hardware" : ["ad4630_fmc_zed"]
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/ad463x_fmcz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SRCS += $(PLATFORM_DRIVERS)/xilinx_axi_io.c \
$(PLATFORM_DRIVERS)/xilinx_gpio.c \
$(PLATFORM_DRIVERS)/xilinx_spi.c \
$(PLATFORM_DRIVERS)/xilinx_delay.c
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRC_DIRS += $(NO-OS)/iio/iio_app
SRCS += $(PLATFORM_DRIVERS)/$(PLATFORM)_uart.c \
Expand Down Expand Up @@ -62,7 +62,7 @@ INCS += $(INCLUDE)/no_os_axi_io.h \
$(INCLUDE)/no_os_print_log.h \
$(INCLUDE)/no_os_alloc.h \
$(INCLUDE)/no_os_mutex.h
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
INCS += $(DRIVERS)/adc/ad463x/iio_ad463x.h \
$(INCLUDE)/no_os_fifo.h \
$(INCLUDE)/no_os_list.h
Expand Down
2 changes: 1 addition & 1 deletion projects/ad469x_fmcz/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TINYIIOD ?= n
IIOD ?= n
include ../../tools/scripts/generic_variables.mk

include src.mk
Expand Down
2 changes: 1 addition & 1 deletion projects/ad469x_fmcz/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hardware" : ["ad469x_fmc_zed"]
},
"iio": {
"flags" : "TINYIIOD=y",
"flags" : "IIOD=y",
"hardware" : ["ad469x_fmc_zed"]
},
"standard_seq": {
Expand Down
4 changes: 2 additions & 2 deletions projects/ad469x_fmcz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SRCS += $(PLATFORM_DRIVERS)/xilinx_axi_io.c \
$(PLATFORM_DRIVERS)/xilinx_gpio.c \
$(PLATFORM_DRIVERS)/xilinx_spi.c \
$(PLATFORM_DRIVERS)/xilinx_delay.c
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRC_DIRS += $(NO-OS)/iio/iio_app
SRCS += $(PLATFORM_DRIVERS)/$(PLATFORM)_uart.c \
Expand Down Expand Up @@ -59,7 +59,7 @@ INCS += $(INCLUDE)/no_os_axi_io.h \
$(INCLUDE)/no_os_util.h \
$(INCLUDE)/no_os_alloc.h \
$(INCLUDE)/no_os_mutex.h
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
INCS += $(INCLUDE)/no_os_fifo.h \
$(INCLUDE)/no_os_irq.h \
$(INCLUDE)/no_os_uart.h \
Expand Down
2 changes: 1 addition & 1 deletion projects/ad6676-ebz/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hardware" : ["ad6676evb_vc707", "ad6676evb_zc706"]
},
"iio": {
"flags" : "TINYIIOD=y",
"flags" : "IIOD=y",
"hardware" : ["ad6676evb_vc707", "ad6676evb_zc706"]
}
}
Expand Down
6 changes: 3 additions & 3 deletions projects/ad6676-ebz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Uncomment to select the profile

SRCS += $(PROJECT)/src/ad6676_ebz.c
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
SRC_DIRS += $(NO-OS)/iio/iio_app
endif
SRCS += $(DRIVERS)/axi_core/axi_adc_core/axi_adc_core.c \
Expand All @@ -36,7 +36,7 @@ SRCS += $(PLATFORM_DRIVERS)/xilinx_axi_io.c \
$(PLATFORM_DRIVERS)/xilinx_spi.c \
$(PLATFORM_DRIVERS)/xilinx_gpio.c \
$(PLATFORM_DRIVERS)/xilinx_delay.c
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRCS += $(NO-OS)/util/no_os_fifo.c \
$(NO-OS)/util/no_os_list.c \
Expand Down Expand Up @@ -73,7 +73,7 @@ INCS += $(INCLUDE)/no_os_axi_io.h \
$(INCLUDE)/no_os_mutex.h \
$(INCLUDE)/jesd204.h \
$(NO-OS)/jesd204/jesd204-priv.h
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
INCS += $(INCLUDE)/no_os_fifo.h \
$(INCLUDE)/no_os_irq.h \
$(INCLUDE)/no_os_uart.h \
Expand Down
2 changes: 1 addition & 1 deletion projects/ad7124-4sdz/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TINYIIOD ?= n
IIOD ?= n
include ../../tools/scripts/generic_variables.mk

include src.mk
Expand Down
4 changes: 2 additions & 2 deletions projects/ad7124-8pmdz/builds.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"aducm3029": {
"iio_uart": {
"flags" : "TINYIIOD=y"
"flags" : "IIOD=y"
},
"iio_wifi": {
"flags" : "TINYIIOD=y NETWORKING=y"
"flags" : "IIOD=y NETWORKING=y"
}
}
}
2 changes: 1 addition & 1 deletion projects/ad7124-8pmdz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ SRC_DIRS += $(PLATFORM_DRIVERS)
SRC_DIRS += $(NO-OS)/util
SRC_DIRS += $(INCLUDE)

TINYIIOD=y
IIOD=y

2 changes: 1 addition & 1 deletion projects/ad713x_fmcz/builds.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"xilinx": {
"iio": {
"flags" : "TINYIIOD=y",
"flags" : "IIOD=y",
"hardware" : ["ad7134_fmc_zed"]
},
"uart": {
Expand Down
4 changes: 2 additions & 2 deletions projects/ad713x_fmcz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SRCS += $(PLATFORM_DRIVERS)/xilinx_axi_io.c \
$(PLATFORM_DRIVERS)/xilinx_gpio.c \
$(PLATFORM_DRIVERS)/xilinx_spi.c \
$(PLATFORM_DRIVERS)/xilinx_delay.c
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRC_DIRS += $(NO-OS)/iio/iio_app
SRCS += $(PLATFORM_DRIVERS)/$(PLATFORM)_uart.c \
Expand Down Expand Up @@ -58,7 +58,7 @@ INCS += $(INCLUDE)/no_os_axi_io.h \
$(INCLUDE)/no_os_util.h \
$(INCLUDE)/no_os_alloc.h \
$(INCLUDE)/no_os_mutex.h
ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
INCS += $(INCLUDE)/no_os_fifo.h \
$(INCLUDE)/no_os_list.h
endif
6 changes: 3 additions & 3 deletions projects/ad74413r/src/examples/examples_src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ INCS += $(PROJECT)/src/examples/dummy/dummy_example.h
endif

ifeq (y,$(strip $(IIO_EXAMPLE)))
TINYIIOD=y
IIOD=y
CFLAGS += -DIIO_EXAMPLE=1
SRCS += $(PROJECT)/src/examples/iio_example/iio_example.c
INCS += $(PROJECT)/src/examples/iio_example/iio_example.h
endif

ifeq (y,$(strip $(IIO_TRIGGER_EXAMPLE)))
TINYIIOD=y
IIOD=y
CFLAGS += -DIIO_TRIGGER_EXAMPLE=1
SRCS += $(PROJECT)/src/examples/iio_trigger_example/iio_trigger_example.c
INCS += $(PROJECT)/src/examples/iio_trigger_example/iio_trigger_example.h
endif

ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
SRC_DIRS += $(NO-OS)/iio/iio_app

INCS += $(DRIVERS)/adc-dac/ad74413r/iio_ad74413r.h
Expand Down
2 changes: 1 addition & 1 deletion projects/ad7746-ebz/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"flags" : ""
},
"iio_capacitive_length_demo": {
"flags" : "TINYIIOD=y"
"flags" : "IIOD=y"
}
}
}
2 changes: 1 addition & 1 deletion projects/ad7746-ebz/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ INCS += $(INCLUDE)/no_os_uart.h \
$(DRIVERS)/cdc/ad7746/ad7746.h \
$(PROJECT)/src/app/parameters.h

ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRCS += $(DRIVERS)/cdc/ad7746/iio_ad7746.c \
$(NO-OS)/iio/iio_app/iio_app.c \
Expand Down
2 changes: 1 addition & 1 deletion projects/ad7768-1fmcz/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TINYIIOD ?= n
IIOD ?= n
include ../../tools/scripts/generic_variables.mk

include src.mk
Expand Down
2 changes: 1 addition & 1 deletion projects/ad7768-evb/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"hardware" : ["ad7768evb_zed"]
},
"iio": {
"flags" : "TINYIIOD=y",
"flags" : "IIOD=y",
"hardware" : ["ad7768evb_zed"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ad7768-evb/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ SRCS += $(DRIVERS)/api/no_os_gpio.c \
$(DRIVERS)/api/no_os_timer.c \
$(DRIVERS)/api/no_os_spi.c

ifeq (y,$(strip $(TINYIIOD)))
ifeq (y,$(strip $(IIOD)))
LIBRARIES += iio
SRC_DIRS += $(NO-OS)/iio/iio_app

Expand Down
2 changes: 1 addition & 1 deletion projects/ad9081/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TINYIIOD = y
IIOD = y
QUAD_MXFE = n

include ../../tools/scripts/generic_variables.mk
Expand Down
2 changes: 1 addition & 1 deletion projects/ad9081/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
]
},
"iio": {
"flags": "TINYIIOD=y",
"flags": "IIOD=y",
"hardware": [
"ad9081_fmca_ebz_vcu118",
"ad9081_fmca_ebz_zcu102"
Expand Down
Loading

0 comments on commit 4d10221

Please sign in to comment.