aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/Utilities/Utils.h
blob: 779534182fb69d098812b411d6252bb274f1e0cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/************************************************************
 * Utils.h
 * general module of system utility functions
 **************************************************************/

#ifndef COMMON_UTILS_H_
#define COMMON_UTILS_H_

#include <stdbool.h>
#include <stdint.h>


//digital read of the potentiometer limits
#define DANSER_POS_MIN 1300
#define DANSER_POS_MAX 3500

typedef enum
{
	Winder = 0,
	Pooler
}Danser_t;


void utilsInit(uint32_t ui32SysClock);
void utilsUpdateDateTime(uint32_t StartTime);
void utilsStoreLocalTime(void);
uint32_t UsersysTickGet (void);
bool DanserCheckPosition(uint16_t position , Danser_t danser, bool test);
void InitWatchdog(uint32_t clock);
uint16_t ConvertSpeed2Pps(uint16_t milimeterPerSecond);
uint16_t ConvertPpsToSpeed(uint16_t Pps);
void UtilsSetCommunicationOk(void);
#endif /* COMMON_UTILS_H_ */