PHiLIP
app_common.c File Reference

For common application functions. More...

#include <string.h>
#include <stdint.h>
#include "stm32f1xx_hal.h"
#include "app_common.h"

Functions

void delay_us (uint16_t micros)
 Imprecise blocking delay in microseconds. More...
 
uint64_t get_tick ()
 Gets tick value in amount to system tick (72 MHz).
 
uint32_t get_tick32 ()
 Gets tick value in amount to system tick (72 MHz) in 32bit.
 
uint32_t get_tick32_div (uint8_t div)
 Gets 32 bit tick shifted down by an amount. More...
 
void copy_until_same (void *dest, void *src, size_t size)
 Copies and compares data until copied data matches. More...
 
void soft_reset ()
 Wrapper function to provide software reset.
 

Detailed Description

For common application functions.

Author
Kevin Weiss
Date
13.02.2019

Deals with simple delays and interrupt control, mostly wrappers around hardware specific functions.