2020-08-14 15:50:26 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Inria
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup pkg_uwb_core
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* @author Francisco Molina <francois-xavier.molina@inria.fr>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UWB_CORE_H
|
|
|
|
#define UWB_CORE_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "event.h"
|
2021-09-06 11:00:54 +02:00
|
|
|
#if IS_USED(MODULE_UWB_CORE_EVENT_THREAD)
|
2021-12-06 17:20:43 +01:00
|
|
|
#include "event/thread.h"
|
2021-09-06 11:00:54 +02:00
|
|
|
#endif
|
2020-08-14 15:50:26 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2021-09-06 11:00:54 +02:00
|
|
|
* @brief The event queue if uwb_core_event_thread is used
|
|
|
|
*/
|
|
|
|
#ifndef UWB_CORE_EVENT_THREAD_QUEUE
|
|
|
|
#define UWB_CORE_EVENT_THREAD_QUEUE EVENT_PRIO_MEDIUM
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Priority used for uwb-core event queue
|
2020-08-14 15:50:26 +02:00
|
|
|
*/
|
2021-09-06 11:00:54 +02:00
|
|
|
#ifndef UWB_CORE_PRIO
|
|
|
|
#define UWB_CORE_PRIO (THREAD_PRIORITY_MAIN - 2)
|
2020-08-14 15:50:26 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2021-09-06 11:00:54 +02:00
|
|
|
* @brief Stacksize used for uwb-core event queue
|
2020-08-14 15:50:26 +02:00
|
|
|
*/
|
2021-09-06 11:00:54 +02:00
|
|
|
#ifndef UWB_CORE_STACKSIZE
|
2022-04-27 10:15:35 +02:00
|
|
|
#define UWB_CORE_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
|
2020-08-14 15:50:26 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Setup and run uwb-core thread
|
|
|
|
*/
|
|
|
|
void uwb_core_riot_init(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Retrieves the default event queue.
|
|
|
|
*
|
2021-09-06 11:00:54 +02:00
|
|
|
* if uwb_core_event_thread is used then the event_thread module queue will be
|
|
|
|
* used. Otherwise uwb-core will start and handle its own event queue.
|
2020-08-14 15:50:26 +02:00
|
|
|
*
|
|
|
|
* @return the default event queue.
|
|
|
|
*/
|
|
|
|
event_queue_t *uwb_core_get_eventq(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* UWB_CORE_H */
|
|
|
|
/** @} */
|