/*
 * utils.h
 *
 *  Created on: Feb 26, 2024
 *      Author: basov.g
 */

#ifndef _UTILS_H_
#define _UTILS_H_

#include <stdint.h>

#define MAIN_VERSION    0
#define MINOR_VERSION   0
#define FIX_VERSION     0

#ifdef __cplusplus
extern "C" {
#endif

void _TimeUpdate(void);//insert in systemTick to calculate time;

void delayUs(uint32_t n);
void delayMs(uint32_t n);
uint64_t getMillis(void);



uint32_t getVersion(void);
uint8_t getMainVersion(void);
uint8_t getMinorVersion(void);
uint8_t getFixVersion(void);

int32_t getWholeValueFromFloat(uint32_t value);

#ifdef __cplusplus
}
#endif

#endif /* _UTILS_H_ */
