Prusa MINI Firmware overview
dbg.c File Reference
#include "dbg.h"
#include <stdarg.h>
#include "stm32f4xx_hal.h"

Macros

#define DBG_MAXLINE   128
 
#define _dbg_lock()
 
#define _dbg_unlock()
 
#define _dbg_delay   HAL_Delay
 

Functions

uint32_t _microseconds (void)
 

Macro Definition Documentation

◆ DBG_MAXLINE

#define DBG_MAXLINE   128

◆ _dbg_lock

#define _dbg_lock ( )

◆ _dbg_unlock

#define _dbg_unlock ( )

◆ _dbg_delay

#define _dbg_delay   HAL_Delay

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