Er_sentry/User/bsp/calc_lib.h
2025-12-17 02:48:24 +08:00

14 lines
404 B
C

#ifndef _CALC_LIB_H_
#define _CALC_LIB_H_
#include <stdint.h>
#include "bsp/struct_typedef.h"
void user_delay_ms(uint16_t ms);
void abs_limit_fp(fp32 *num, fp32 Limit);
fp32 loop_fp32_constrain(fp32 Input, fp32 minValue, fp32 maxValue);
extern int map(int x, int in_min, int in_max, int out_min, int out_max);
extern fp32 map_fp32(fp32 x, fp32 in_min, fp32 in_max, fp32 out_min, fp32 out_max);
#endif