📄 guivalf.lst
字号:
C51 COMPILER V8.05a GUIVALF 04/11/2008 14:19:00 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE GUIVALF
OBJECT MODULE PLACED IN GUIValf.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUIValf.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND P
-RINT(.\GUIValf.lst) OBJECT(GUIValf.obj)
line level source
1 /*
2 *********************************************************************************************************
3 * uC/GUI
4 * Universal graphic software for embedded applications
5 *
6 * (c) Copyright 2002, Micrium Inc., Weston, FL
7 * (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
8 *
9 * 礐/GUI is protected by international copyright laws. Knowledge of the
10 * source code may not be used to write a similar product. This file may
11 * only be used in accordance with a license and should not be redistributed
12 * in any way. We appreciate your understanding and fairness.
13 *
14 ----------------------------------------------------------------------
15 File : GUIValF.C
16 Purpose : Displaying floating point values
17 ----------------------------------------------------------------------
18 Version-Date---Author-Explanation
19 ----------------------------------------------------------------------
20 1.00.00 990322 RS First release
21 ----------------------------------------------------------------------
22 Known problems or limitations with current version
23 ----------------------------------------------------------------------
24 None.
25 ---------------------------END-OF-HEADER------------------------------
26 */
27
28 #include "gui\Core\GUI_Protected.h"
29 #include "math.h"
30
31 /*
32 *******************************************
33 * *
34 * Helper functions *
35 * *
36 *******************************************
37 */
38
39 static void _DispFloatFix(float f, char Len, char Decs, int DrawPlusSign) {
40 1 f *= GUI_Pow10[Decs];
41 1 f += 0.5;
42 1 f = (float) floor (f);
43 1 if (DrawPlusSign)
44 1 GUI_DispSDecShift((long)f, Len, Decs);
45 1 else
46 1 GUI_DispDecShift((long)f, Len, Decs);
47 1 }
48
49 /*
50 *******************************************
51 * *
52 * optional sign display routines *
53 * *
54 *******************************************
C51 COMPILER V8.05a GUIVALF 04/11/2008 14:19:00 PAGE 2
55 */
56
57 void GUI_DispFloatFix(float f, char Len, char Decs) {
58 1 _DispFloatFix(f, Len, Decs, 0);
59 1 }
60
61 void GUI_DispFloatMin(float f, char Fract) {
62 1 char Len;
63 1 Len = GUI_Long2Len((long)f);
64 1 _DispFloatFix(f, (char)(Len+Fract+1), (char)Fract, 0);
65 1 }
66
67 void GUI_DispFloat(float f, char Len) {
68 1 int Decs;
69 1 Decs = Len - GUI_Long2Len((long)f)-1;
70 1 if (Decs<0)
71 1 Decs =0;
72 1 _DispFloatFix(f, Len, (char)Decs, 0);
73 1 }
74
75 /*
76 *******************************************
77 * *
78 * Signed display routines *
79 * *
80 *******************************************
81 */
82
83 void GUI_DispSFloatFix(float f, char Len, char Fract) {
84 1 _DispFloatFix (f, Len, Fract, 1);
85 1 }
86
87 void GUI_DispSFloatMin(float f, char Fract) {
88 1 char Len;
89 1 Len = GUI_Long2Len((long)f);
90 1 if (f>0)
91 1 Len++;
92 1 _DispFloatFix(f, (char)(Len+Fract+1), (char)Fract, 1);
93 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 540 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- 38
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -