Prusa MINI Firmware overview
dbg.h File Reference
#include <inttypes.h>
#include "config.h"

Go to the source code of this file.

Macros

#define DBG_LEVEL   0
 
#define _dbg3(...)
 
#define _dbg2(...)
 
#define _dbg1(...)
 
#define _dbg0   _dbg
 
#define _dbg(...)
 

Functions

uint32_t _microseconds (void)
 

Macro Definition Documentation

◆ DBG_LEVEL

#define DBG_LEVEL   0

◆ _dbg3

#define _dbg3 (   ...)

◆ _dbg2

#define _dbg2 (   ...)

◆ _dbg1

#define _dbg1 (   ...)

◆ _dbg0

#define _dbg0   _dbg

◆ _dbg

#define _dbg (   ...)

Function Documentation

◆ _microseconds()

uint32_t _microseconds ( void  )
113  {
114  int irq = __get_PRIMASK() & 1;
115  if (irq)
116  __disable_irq();
117  uint32_t u = TIM6->CNT;
118  uint32_t m = HAL_GetTick();
119  if (irq)
120  __enable_irq();
121  return (m * 1000 + u);
122 }
Here is the call graph for this function:
Here is the caller graph for this function:
HAL_GetTick
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339