The math conversion API library module has the file name conv.c. This module performs math conversions. Any conversion that will uses floating-point numbers is coded to make use of the fixed-point math API.
Here is a list of functions in the math conversion API library module:
The following modules are required along with this module:
This module requires the header file:
Prototype : struct fxp *conv_fah_2_cel(struct fxp *s1) Parameters : Name : s1 Description: input fixed-point number Returns : a pointer to a newly allocated fxp structure
This function will convert the input fixed-point number in degrees fahrenheit to degrees celsius. It is the responsibility of the caller to de-allocate (using fxp_free only) the new fxp structure.
Prototype : struct fxp *conv_cel_2_fah(struct fxp *s1) Parameters : Name : s1 Description: input fixed-point number Returns : a pointer to a newly allocated fxp structure
This function will convert the input fixed-point number in degrees celsius to degrees fahrenheit. It is the responsibility of the caller to de-allocate (using fxp_free only) the new fxp structure.