Change in osmo-ccid-firmware[master]: remove example code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Apr 17 09:08:37 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13676 )

Change subject: remove example code
......................................................................

remove example code

as the code will use alternative libraries, the examples will not
be able to compile anymore.
plus they are not required for the firmware and the example code
can be downloaded from Atmel start.

Change-Id: If53df47089de9eb8498734c19d6a0420c1e79031
---
D sysmoOCTSIM/examples/driver_examples.c
D sysmoOCTSIM/examples/driver_examples.h
M sysmoOCTSIM/gcc/Makefile
3 files changed, 3 insertions(+), 267 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sysmoOCTSIM/examples/driver_examples.c b/sysmoOCTSIM/examples/driver_examples.c
deleted file mode 100644
index 4ab0ef4..0000000
--- a/sysmoOCTSIM/examples/driver_examples.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Code generated from Atmel Start.
- *
- * This file will be overwritten when reconfiguring your Atmel Start project.
- * Please copy examples or other code you want to keep to a separate file
- * to avoid losing it when reconfiguring.
- */
-
-#include "driver_examples.h"
-#include "driver_init.h"
-#include "utils.h"
-
-/**
- * Example of using SIM0 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM0[12] = "Hello World!";
-
-static void tx_cb_SIM0(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM0_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM0, USART_ASYNC_TXC_CB, tx_cb_SIM0);
-	/*usart_async_register_callback(&SIM0, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM0, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM0, &io);
-	usart_async_enable(&SIM0);
-
-	io_write(io, example_SIM0, 12);
-}
-
-/**
- * Example of using SIM1 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM1[12] = "Hello World!";
-
-static void tx_cb_SIM1(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM1_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM1, USART_ASYNC_TXC_CB, tx_cb_SIM1);
-	/*usart_async_register_callback(&SIM1, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM1, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM1, &io);
-	usart_async_enable(&SIM1);
-
-	io_write(io, example_SIM1, 12);
-}
-
-/**
- * Example of using SIM2 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM2[12] = "Hello World!";
-
-static void tx_cb_SIM2(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM2_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM2, USART_ASYNC_TXC_CB, tx_cb_SIM2);
-	/*usart_async_register_callback(&SIM2, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM2, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM2, &io);
-	usart_async_enable(&SIM2);
-
-	io_write(io, example_SIM2, 12);
-}
-
-/**
- * Example of using SIM3 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM3[12] = "Hello World!";
-
-static void tx_cb_SIM3(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM3_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM3, USART_ASYNC_TXC_CB, tx_cb_SIM3);
-	/*usart_async_register_callback(&SIM3, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM3, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM3, &io);
-	usart_async_enable(&SIM3);
-
-	io_write(io, example_SIM3, 12);
-}
-
-/**
- * Example of using SIM4 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM4[12] = "Hello World!";
-
-static void tx_cb_SIM4(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM4_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM4, USART_ASYNC_TXC_CB, tx_cb_SIM4);
-	/*usart_async_register_callback(&SIM4, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM4, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM4, &io);
-	usart_async_enable(&SIM4);
-
-	io_write(io, example_SIM4, 12);
-}
-
-/**
- * Example of using SIM5 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM5[12] = "Hello World!";
-
-static void tx_cb_SIM5(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM5_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM5, USART_ASYNC_TXC_CB, tx_cb_SIM5);
-	/*usart_async_register_callback(&SIM5, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM5, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM5, &io);
-	usart_async_enable(&SIM5);
-
-	io_write(io, example_SIM5, 12);
-}
-
-/**
- * Example of using SIM6 to write "Hello World" using the IO abstraction.
- *
- * Since the driver is asynchronous we need to use statically allocated memory for string
- * because driver initiates transfer and then returns before the transmission is completed.
- *
- * Once transfer has been completed the tx_cb function will be called.
- */
-
-static uint8_t example_SIM6[12] = "Hello World!";
-
-static void tx_cb_SIM6(const struct usart_async_descriptor *const io_descr)
-{
-	/* Transfer completed */
-}
-
-void SIM6_example(void)
-{
-	struct io_descriptor *io;
-
-	usart_async_register_callback(&SIM6, USART_ASYNC_TXC_CB, tx_cb_SIM6);
-	/*usart_async_register_callback(&SIM6, USART_ASYNC_RXC_CB, rx_cb);
-	usart_async_register_callback(&SIM6, USART_ASYNC_ERROR_CB, err_cb);*/
-	usart_async_get_io_descriptor(&SIM6, &io);
-	usart_async_enable(&SIM6);
-
-	io_write(io, example_SIM6, 12);
-}
-
-/**
- * Example of using UART_debug to write "Hello World" using the IO abstraction.
- */
-void UART_debug_example(void)
-{
-	struct io_descriptor *io;
-	usart_sync_get_io_descriptor(&UART_debug, &io);
-	usart_sync_enable(&UART_debug);
-
-	io_write(io, (uint8_t *)"Hello World!", 12);
-}
diff --git a/sysmoOCTSIM/examples/driver_examples.h b/sysmoOCTSIM/examples/driver_examples.h
deleted file mode 100644
index 4f2ce98..0000000
--- a/sysmoOCTSIM/examples/driver_examples.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Code generated from Atmel Start.
- *
- * This file will be overwritten when reconfiguring your Atmel Start project.
- * Please copy examples or other code you want to keep to a separate file
- * to avoid losing it when reconfiguring.
- */
-#ifndef DRIVER_EXAMPLES_H_INCLUDED
-#define DRIVER_EXAMPLES_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void SIM0_example(void);
-
-void SIM1_example(void);
-
-void SIM2_example(void);
-
-void SIM3_example(void);
-
-void SIM4_example(void);
-
-void SIM5_example(void);
-
-void SIM6_example(void);
-
-void UART_debug_example(void);
-
-#ifdef __cplusplus
-}
-#endif
-#endif // DRIVER_EXAMPLES_H_INCLUDED
diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile
index 1a473b9..2b132f4 100644
--- a/sysmoOCTSIM/gcc/Makefile
+++ b/sysmoOCTSIM/gcc/Makefile
@@ -28,7 +28,6 @@
  \
 hal/src \
 hpl/ramecc \
-examples \
 hpl/oscctrl \
 stdio_redirect/gcc \
 gcc \
@@ -85,7 +84,6 @@
 ncn8025.o \
 command.o \
 hpl/osc32kctrl/hpl_osc32kctrl.o \
-examples/driver_examples.o \
 driver_init.o \
 hal/src/hal_usart_async.o \
 hpl/sercom/hpl_sercom.o \
@@ -134,7 +132,6 @@
 "ncn8025.o" \
 "command.o" \
 "hpl/osc32kctrl/hpl_osc32kctrl.o" \
-"examples/driver_examples.o" \
 "driver_init.o" \
 "hal/src/hal_usart_async.o" \
 "hpl/sercom/hpl_sercom.o" \
@@ -188,7 +185,6 @@
 "octsim_i2c.d" \
 "ncn8025.d" \
 "command.d" \
-"examples/driver_examples.d" \
 "hal/src/hal_cache.d" \
 "hal/src/hal_sleep.d" \
 "hal/utils/src/utils_ringbuffer.d" \
@@ -245,7 +241,7 @@
 	@echo ARM/GNU C Compiler
 	$(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \
 -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \
--I"../" -I"../config" -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
+-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"  -o "$@" "$<"
 	@echo Finished building: $<
 
@@ -254,7 +250,7 @@
 	@echo ARM/GNU Assembler
 	$(QUOTE)arm-none-eabi-as$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \
 -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \
--I"../" -I"../config" -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
+-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"  -o "$@" "$<"
 	@echo Finished building: $<
 
@@ -263,7 +259,7 @@
 	@echo ARM/GNU Preprocessing Assembler
 	$(QUOTE)arm-none-eabi-gcc$(QUOTE) -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \
 -D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \
--I"../" -I"../config" -I"../examples" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
+-I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/sercom" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/cdc" -I"../usb/class/cdc/device" -I"../usb/device" -I"../" -I"../config" -I"../stdio_redirect" -I"../" -I"../dma_m2m" -I"../" -I"../CMSIS/Include" -I"../include"  \
 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"  -o "$@" "$<"
 	@echo Finished building: $<
 

-- 
To view, visit https://gerrit.osmocom.org/13676
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If53df47089de9eb8498734c19d6a0420c1e79031
Gerrit-Change-Number: 13676
Gerrit-PatchSet: 4
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190417/48781979/attachment.htm>


More information about the gerrit-log mailing list