Hilscher netX microcontroller driver  V0.0.5.0
Documentation of the netX driver package
netx_drv.h File Reference

This file contains all the functions prototypes for the peripheral module driver. More...

#include "netx_drv_def.h"
#include "netx_drv_conf.h"
Include dependency graph for netx_drv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DRV_MUTEX_T
 Defines the structure of the os free mutex implementation. More...
 
struct  DRV_TRACE_QUEUE_ELEMENT_T
 Trace structure used for debug tracing of the drivers. More...
 

Macros

#define DRV_MUTEX_INITIALIZER_VALUE   {DRV_MUTEX_STATE_UNLOCKED,0}
 The initializer value for the os free mutex implementation. More...
 
#define DRV_MUTEX_INITIALIZER_TYPE   DRV_MUTEX_T
 The initializer type for the os free mutex implementation. More...
 
#define DRV_MUTEX_INITIALIZER   (DRV_MUTEX_INITIALIZER_TYPE)DRV_MUTEX_INITIALIZER_VALUE
 The initializer for the os free mutex implementation. More...
 
#define DRV_DEF_CONCATENATE(a, ...)   DRV_DEF_CONCATENATE_VA(a, __VA_ARGS__)
 
#define DRV_DEF_CONCATENATE_VA(a, ...)   a ## __VA_ARGS__
 
#define DRV_DEF_IIF(c)   DRV_DEF_CONCATENATE_VA(DRV_DEF_IIF_, c)
 
#define DRV_DEF_IIF_0(t, ...)   __VA_ARGS__
 
#define DRV_DEF_IIF_1(t, ...)   t
 
#define DRV_DEF_COMPL(b)   DRV_DEF_CONCATENATE_VA(DRV_DEF_COMPL_, b)
 
#define DRV_DEF_COMPL_0   1
 
#define DRV_DEF_COMPL_1   0
 
#define DRV_DEF_DEC(x)   DRV_DEF_CONCATENATE_VA(DRV_DEF_DEC_, x)
 
#define DRV_DEF_DEC_0   0
 
#define DRV_DEF_DEC_1   0
 
#define DRV_DEF_DEC_2   1
 
#define DRV_DEF_DEC_3   2
 
#define DRV_DEF_DEC_4   3
 
#define DRV_DEF_DEC_5   4
 
#define DRV_DEF_DEC_6   5
 
#define DRV_DEF_DEC_7   6
 
#define DRV_DEF_DEC_8   7
 
#define DRV_DEF_DEC_9   8
 
#define DRV_DEF_CHECK_N(x, n, ...)   n
 
#define DRV_DEF_CHECK(...)   DRV_DEF_CHECK_N(__VA_ARGS__, 0,)
 
#define DRV_DEF_PROBE(x)   x, 1,
 
#define DRV_DEF_NOT(x)   DRV_DEF_CHECK(DRV_DEF_CONCATENATE_VA(DRV_DEF_NOT_, x))
 
#define DRV_DEF_NOT_0   DRV_DEF_PROBE(~)
 
#define DRV_DEF_BOOL(x)   DRV_DEF_COMPL(DRV_DEF_NOT(x))
 
#define DRV_DEF_IF(c)   DRV_DEF_IIF(DRV_DEF_BOOL(c))
 
#define DRV_DEF_EAT(...)
 
#define DRV_DEF_EXPAND(...)   __VA_ARGS__
 
#define DRV_DEF_WHEN(c)   DRV_DEF_IF(c)(DRV_DEF_EXPAND, DRV_DEF_EAT)
 
#define DRV_DEF_EMPTY()
 
#define DRV_DEF_DEFER(id)   id DRV_DEF_EMPTY()
 
#define DRV_DEF_OBSTRUCT(...)   __VA_ARGS__ DRV_DEF_DEFER(DRV_DEF_EMPTY)()
 
#define DRV_DEF_EXPAND(...)   __VA_ARGS__
 
#define DRV_DEF_EVAL(...)   DRV_DEF_EVAL1(DRV_DEF_EVAL1(DRV_DEF_EVAL1(__VA_ARGS__)))
 
#define DRV_DEF_EVAL1(...)   DRV_DEF_EVAL2(DRV_DEF_EVAL2(DRV_DEF_EVAL2(__VA_ARGS__)))
 
#define DRV_DEF_EVAL2(...)   DRV_DEF_EVAL3(DRV_DEF_EVAL3(DRV_DEF_EVAL3(__VA_ARGS__)))
 
#define DRV_DEF_EVAL3(...)   DRV_DEF_EVAL4(DRV_DEF_EVAL4(DRV_DEF_EVAL4(__VA_ARGS__)))
 
#define DRV_DEF_EVAL4(...)   DRV_DEF_EVAL5(DRV_DEF_EVAL5(DRV_DEF_EVAL5(__VA_ARGS__)))
 
#define DRV_DEF_EVAL5(...)   __VA_ARGS__
 
#define DRV_DEF_REPEAT(count, macro, ...)
 
#define DRV_DEF_REPEAT_INDIRECT()   DRV_DEF_REPEAT
 
#define DRV_DEF_REPEAT_EVAL(...)   DRV_DEF_EVAL(DRV_DEF_REPEAT(__VA_ARGS__))
 
#define DRV_Default_IRQHandler_Function_Generator(function0, function1, device)   void function0(void) {function1(device);}
 
#define TRACE_MODULE_ACTIVE
 Defines if the trace module is used. More...
 
#define ulTraceQueueSize   ((uint32_t const) 512)
 Defines the queue for the trace functionality. More...
 

Enumerations

enum  DRV_MUTEX_STATE_E {
  DRV_MUTEX_STATE_UNLOCKED = 0xBEEFCACEul,
  DRV_MUTEX_STATE_LOCKED = 0xABAD1DEAul
}
 Enumerates the locking states of the os free mutex implementation. More...
 
enum  DRV_TRACE_KEY_E {
  DRV_TRACE_KEY_DEFAULT = 0x0ul,
  DRV_TRACE_KEY_DATA,
  DRV_TRACE_KEY_MODE,
  DRV_TRACE_KEY_BORDER,
  DRV_TRACE_KEY_COUNTER,
  DRV_TRACE_KEY_ITERATION,
  DRV_TRACE_KEY_LENGTH,
  DRV_TRACE_KEY_IRQ,
  DRV_TRACE_KEY_MSK,
  DRV_TRACE_KEY_STATE,
  DRV_TRACE_KEY_INFO,
  DRV_TRACE_KEY_11,
  DRV_TRACE_KEY_12,
  DRV_TRACE_KEY_13,
  DRV_TRACE_KEY_COUNT
}
 Enumerates the keys used for the trace function. More...
 

Functions

__STATIC_FORCEINLINE DRV_STATUS_E DRV_MUTEX_INIT (DRV_MUTEX_T *mutex)
 Inline function to initialize the os free mutex implementation. More...
 
void TRACE (uint32_t ulKey, uint32_t ulValue)
 The trace function stores the given key and the given value in a cyclic list. More...
 
__STATIC_FORCEINLINE void TRACE_PAUSE (void)
 Stop the trace. More...
 
__STATIC_FORCEINLINE void TRACE_RUN (void)
 Start the trace. More...
 
void TRACE_RESET (void)
 The trace reset is doing what its name tells. It resets the trace. More...
 

Variables

char const *const g_pabDrvTraceKeySrings []
 References the string array of the keys. More...
 
uint32_t volatile g_ulQueueCounter
 references the counter that points to the next queue element. More...
 
uint32_t volatile g_ulRunFlag
 references the running flag of the tracer. More...
 
uint32_t volatile g_ulQueueSize
 References the ques size. More...
 
volatile DRV_TRACE_QUEUE_ELEMENT_T g_atTraceQueue []
 References the queue used for the debug trace functionality. More...
 

Detailed Description

This file contains all the functions prototypes for the peripheral module driver.

Revision
6124
Date
2019-08-28 19:41:54 +0200 (Mi, 28 Aug 2019)
Note
Exclusion of Liability for this demo software: The following software is intended for and must only be used for reference and in an evaluation laboratory environment. It is provided without charge and is subject to alterations. There is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software "as is" without warranty of any kind, either expressed or implied. Please refer to the Agreement in README_DISCLAIMER.txt, provided together with this file! By installing or otherwise using the software, you accept the terms of this Agreement. If you do not agree to the terms of this Agreement, then do not install or use the Software!

Definition in file netx_drv.h.