move all libosmocore heritage to pico-osmocore library / sub-directory

This commit is contained in:
Harald Welte 2023-07-28 17:08:39 +02:00
parent 1a2b38cfc0
commit ab81772fb3
19 changed files with 31 additions and 25 deletions

View File

@ -17,5 +17,6 @@ add_compile_options(-Wall
-Wno-maybe-uninitialized
)
add_subdirectory(pico-osmocore)
add_subdirectory(composite)
add_subdirectory(iso7816)

View File

@ -4,9 +4,6 @@ pico_generate_pio_header(iso7816_cardem ${CMAKE_CURRENT_LIST_DIR}/iso7816_rx.pio
pico_generate_pio_header(iso7816_cardem ${CMAKE_CURRENT_LIST_DIR}/iso7816_tx.pio)
target_sources(iso7816_cardem PRIVATE
utils.c
msgb.c
pseudo_talloc.c
iso7816_fidi.c
card_emu.c
iso7816_cardem.c
@ -14,6 +11,7 @@ target_sources(iso7816_cardem PRIVATE
)
target_link_libraries(iso7816_cardem PRIVATE
pico-osmocore
cmsis_core
pico_stdlib
pico_multicore

View File

@ -24,11 +24,11 @@
#include "iso7816_fidi.h"
#include "simtrace_prot.h"
#include "utils.h"
#include <osmocom/core/utils.h>
#include "card_emu.h"
#include "trace.h"
#include "linuxlist.h"
#include "msgb.h"
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>
#include "usb_buf.h"
#define NUM_SLOTS 1

View File

@ -17,7 +17,7 @@
#include <stdint.h>
#include "linuxlist.h"
#include <osmocom/core/linuxlist.h>
struct card_handle;

View File

@ -15,7 +15,7 @@
#include <stdint.h>
#include <errno.h>
#include "utils.h"
#include <osmocom/core/utils.h>
#include "iso7816_fidi.h"
/* Table 7 of ISO 7816-3:2006 */

View File

@ -14,8 +14,8 @@
#include "usb_buf.h"
//#include "simtrace_usb.h"
#include "linuxlist.h"
#include "msgb.h"
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>
#include <errno.h>
#define USB_ALLOC_SIZE 280

View File

@ -12,8 +12,8 @@
*/
#pragma once
#include "linuxlist.h"
#include "msgb.h"
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>
/* buffered USB endpoint (with queue of msgb) */
struct usb_buffered_ep {

View File

@ -0,0 +1 @@
add_subdirectory(src)

View File

@ -18,7 +18,7 @@
#pragma once
#include "utils.h"
#include <osmocom/core/utils.h>
/*! load unaligned n-byte integer (little-endian encoding) into uint16_t, into the least significant octets.
* \param[in] p Buffer where integer is stored

View File

@ -18,7 +18,7 @@
#pragma once
#include "utils.h"
#include <osmocom/core/utils.h>
/*! load unaligned n-byte integer (little-endian encoding) into uint32_t, into the least significant octets.
* \param[in] p Buffer where integer is stored

View File

@ -16,10 +16,10 @@
*/
#include <stdint.h>
#include "linuxlist.h"
#include "utils.h"
#include "bit16gen.h"
#include "bit32gen.h"
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/bit16gen.h>
#include <osmocom/core/bit32gen.h>
//#include <osmocom/core/defs.h>
/*! \defgroup msgb Message buffers

View File

@ -0,0 +1,8 @@
file(GLOB FILES *.c *.h)
add_library(pico-osmocore ${FILES})
target_link_libraries(pico-osmocore PRIVATE
pico_stdlib
cmsis_core)
target_include_directories(pico-osmocore PUBLIC ../include)

View File

@ -26,10 +26,8 @@
#include <stdlib.h>
#include <inttypes.h>
#include "msgb.h"
//#include <openbsc/gsm_data.h>
#include "talloc.h"
//#include <openbsc/debug.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
void *tall_msgb_ctx = NULL;

View File

@ -14,9 +14,9 @@
#include <stdio.h>
#include <string.h>
#include "talloc.h"
#include <osmocom/core/talloc.h>
#include <osmocom/core/utils.h>
#include "trace.h"
#include "utils.h"
/* TODO: this number should dynamically scale. We need at least one per IN/IRQ endpoint,
* as well as at least 3 for every OUT endpoint. Plus some more depending on the application */

View File

@ -28,7 +28,7 @@
#include <inttypes.h>
#include <limits.h>
#include "utils.h"
#include <osmocom/core/utils.h>
/*! \addtogroup utils