-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathshit_mountain.h
56 lines (48 loc) · 1.85 KB
/
shit_mountain.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
******************************************************************************
* Copyright (c) 2019 - ~, SCUT-RobotLab Development Team
* @file shit_mountain.h
* @author M3chD09 m3chd09@protonmail.com
* @brief Library full of shit.
* @date 2021-04-05
* @version 1.0
*
******************************************************************************
* @attention
*
* if you had modified this file, please make sure your code does not have many
* bugs, update the version Number, write dowm your name and the date, the most
* important is make sure the users will have clear and definite understanding
* through your new brief.
*
* <h2><center>© Copyright (c) 2019 - ~, SCUT-RobotLab Development Team.
* All rights reserved.</center></h2>
******************************************************************************
*/
#ifndef _SHIT_MOUNTAIN_H_
#define _SHIT_MOUNTAIN_H_
#ifdef __cplusplus
/* Includes ------------------------------------------------------------------*/
#include <cstdint>
/* Private macros ------------------------------------------------------------*/
/* Private type --------------------------------------------------------------*/
/* Exported macros -----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
namespace shit
{
/* Exported variables --------------------------------------------------------*/
/* Exported function declarations --------------------------------------------*/
template<class T>
T constrain(T input,T min,T max)
{
if (input <= min)
return min;
else if(input >= max)
return max;
return input;
}
uint16_t get_gpio_pin_num(uint16_t GPIO_Pin);
}
#endif /* __cplusplus */
#endif /* _SHIT_MOUNTAIN_H_ */
/************************ COPYRIGHT(C) SCUT-ROBOTLAB **************************/