Skip to content

Commit

Permalink
projects/adin1110: use the new example infrastructure
Browse files Browse the repository at this point in the history
Make the necessary changes to use the new example infrastructure.

Signed-off-by: Darius Berghe <[email protected]>
  • Loading branch information
buha committed Jan 23, 2025
1 parent 0718deb commit cd20344
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 112 deletions.
5 changes: 3 additions & 2 deletions projects/adin1110/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Select the example you want to enable by choosing y for enabling and n for disabling
FRAME_RX_TX = y
EXAMPLE ?= frame_rx_tx

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

include ../../tools/scripts/examples.mk

include src.mk

include ../../tools/scripts/generic.mk
2 changes: 1 addition & 1 deletion projects/adin1110/builds.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"maxim": {
"frame_rx_tx": {
"flags" : "FRAME_RX_TX=y TARGET=max32650"
"flags" : "EXAMPLE=frame_rx_tx TARGET=max32650"
}
}
}
13 changes: 0 additions & 13 deletions projects/adin1110/src.mk
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
include $(PROJECT)/src/platform/$(PLATFORM)/platform_src.mk
include $(PROJECT)/src/examples/examples_src.mk

SRCS += $(PROJECT)/src/platform/$(PLATFORM)/main.c

INCS += $(PROJECT)/src/common/common_data.h
SRCS += $(PROJECT)/src/common/common_data.c

INCS += $(PROJECT)/src/platform/platform_includes.h

INCS += $(PROJECT)/src/platform/$(PLATFORM)/parameters.h
SRCS += $(PROJECT)/src/platform/$(PLATFORM)/parameters.c

INCS += $(INCLUDE)/no_os_delay.h \
$(INCLUDE)/no_os_error.h \
$(INCLUDE)/no_os_gpio.h \
Expand Down
2 changes: 1 addition & 1 deletion projects/adin1110/src/common/common_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef __COMMON_DATA_H__
#define __COMMON_DATA_H__

#include "platform_includes.h"
#include "parameters.h"
#include "no_os_spi.h"
#include "no_os_uart.h"
#include "no_os_gpio.h"
Expand Down
8 changes: 0 additions & 8 deletions projects/adin1110/src/examples/examples_src.mk

This file was deleted.

2 changes: 2 additions & 0 deletions projects/adin1110/src/examples/frame_rx_tx/frame_rx_tx.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SRCS += $(PROJECT)/src/examples/frame_rx_tx/frame_rx_tx_example.c
INCS += $(PROJECT)/src/examples/frame_rx_tx/frame_rx_tx_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#include <string.h>
#include "frame_rx_tx_example.h"
#include "common_data.h"
#include "no_os_delay.h"
#include "no_os_print_log.h"
Expand Down Expand Up @@ -119,7 +118,7 @@ uint8_t eth_rx_buff[ADIN1110_BUFF_LEN];
* @return ret - Result of the example execution. If working correctly, will
* execute continuously the while(1) loop and will not return.
*******************************************************************************/
int frame_rx_tx_example_main()
int example_main()
{
uint32_t ucast_frame_rx_cnt;
uint32_t bcast_frame_rx_cnt;
Expand Down
38 changes: 0 additions & 38 deletions projects/adin1110/src/examples/frame_rx_tx/frame_rx_tx_example.h

This file was deleted.

10 changes: 3 additions & 7 deletions projects/adin1110/src/platform/maxim/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

#include "platform_includes.h"
#include "parameters.h"
#include "common_data.h"
#include "no_os_error.h"

#include "frame_rx_tx_example.h"
extern int example_main();

/***************************************************************************//**
* @brief Main function execution for Maxim platform.
Expand All @@ -53,9 +53,5 @@ int main()
return ret;

no_os_uart_stdio(uart_desc);
return frame_rx_tx_example_main();

#ifndef FRAME_RX_TX
#error No example was selected.
#endif
return example_main();
}
40 changes: 0 additions & 40 deletions projects/adin1110/src/platform/platform_includes.h

This file was deleted.

0 comments on commit cd20344

Please sign in to comment.