comparison src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_board_bw_dsample_ia.s @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1
2
3
4
5
6 .state32
7
8 .sect ".r2dlcd"
9
10
11 .include "r2d_asm_configs.inc"
12 .include "r2d_asm_utils.inc"
13 .include "r2d_asm_patch_utils.inc"
14
15
16 .if (R2D_ASM = R2D_ON)
17
18
19 .ref _r2d_lcd_alpha_operator
20 .ref _r2d_lcd_foreground_pixel
21 .ref _r2d_lcd_to_color
22 .ref _r2d_color_to_lcd
23
24 .def _r2d_ialpha_op
25 .def _r2d_iforeground_pixel_test
26
27 .def _r2d_icolor_to_lcd
28 .def _r2d_ilcd_to_color
29
30
31 .global _r2d_lcd_start_copy
32 .global _r2d_lcd_start_or
33 .global _r2d_lcd_start_and
34 .global _r2d_lcd_start_xor
35 .global _r2d_lcd_start_notcopy
36 .global _r2d_lcd_start_notor
37 .global _r2d_lcd_start_notand
38 .global _r2d_lcd_start_notxor
39 .global _r2d_lcd_start_alpha
40 .global _r2d_lcd_start_foreground_pixel
41 .global _r2d_start_get_color
42 .global _r2d_start_color_to_lcd
43 .global _r2d_start_lcd_to_color
44
45 _r2d_lcd_start_copy:
46 MOV calca,calca
47 MOV calcb,calca
48 MOV calcb,calcb
49 _r2d_lcd_end_copy
50
51 _r2d_lcd_start_or:
52 MOV calca,calca
53 ORR calcb,calcb,calca
54 MOV calcb,calcb
55 _r2d_lcd_end_or
56
57 _r2d_lcd_start_and:
58 MOV calca,calca
59 AND calcb,calcb,calca
60 MOV calcb,calcb
61 _r2d_lcd_end_and
62
63 _r2d_lcd_start_xor:
64 MOV calca,calca
65 EOR calcb,calcb,calca
66 MOV calcb,calcb
67 _r2d_lcd_end_xor
68
69 _r2d_lcd_start_notcopy:
70 MOV calca,calca
71 MVN calcb,calca
72 MOV calcb,calcb
73 _r2d_lcd_end_notcopy
74
75 _r2d_lcd_start_notor:
76 MOV calca,calca
77 ORR calcb,calcb,calca
78 MVN calcb,calcb
79 _r2d_lcd_end_notor
80
81 _r2d_lcd_start_notand:
82 MOV calca,calca
83 AND calcb,calcb,calca
84 MVN calcb,calcb
85 _r2d_lcd_end_notand
86
87 _r2d_lcd_start_notxor:
88 MOV calca,calca
89 EOR calcb,calcb,calca
90 MVN calcb,calcb
91 _r2d_lcd_end_notxor
92
93 _r2d_lcd_start_alpha
94 ; Identifying code telling the patcher that a special
95 ; construct required to branch to a C function is used
96 .long BRANCH_ID
97 ; The absolute address of the C function which is going to be
98 ; converted to a PC relative offset by the patcher
99 .long _r2d_ialpha_op
100 _r2d_lcd_stop_alpha
101
102 _r2d_lcd_start_foreground_pixel
103 ; Identifying code telling the patcher that a special
104 ; construct required to branch to a C function is used
105 .long BRANCH_ID
106 ; The absolute address of the C function which is going to be
107 ; converted to a PC relative offset by the patcher
108 .long _r2d_iforeground_pixel_test
109 _r2d_lcd_stop_foreground_pixel
110
111
112 _r2d_start_lcd_to_color
113 ; Identifying code telling the patcher that a special
114 ; construct required to branch to a C function is used
115 .long BRANCH_ID
116 ; The absolute address of the C function which is going to be
117 ; converted to a PC relative offset by the patcher
118 .long _r2d_ilcd_to_color
119 _r2d_stop_lcd_to_color
120
121 _r2d_start_color_to_lcd
122 ; Identifying code telling the patcher that a special
123 ; construct required to branch to a C function is used
124 .long BRANCH_ID
125 ; The absolute address of the C function which is going to be
126 ; converted to a PC relative offset by the patcher
127 .long _r2d_icolor_to_lcd
128 _r2d_stop_color_to_lcd
129
130
131
132 ; Stub function allowing to branch to a C one whose interface
133 ; is UINT32 r2d_lcd_some_operator(UINT32 old,UINT32 value)
134 _r2d_ialpha_op:
135 R2D_OP_SAVE_CONTEXT
136 NOP
137 R2D_OP_RESTORE_CONTEXT
138
139 ; Check kind of pixel
140 _r2d_iforeground_pixel_test:
141 R2D_COL_SAVE_CONTEXT
142 BL _r2d_lcd_foreground_pixel
143 R2D_COL_RESTORE_CONTEXT
144
145 ; All color conversion subroutines
146 _r2d_icolor_to_lcd:
147 R2D_COLCONV_SAVE_CONTEXT
148 BL _r2d_color_to_lcd
149 R2D_COLCONV_RESTORE_CONTEXT
150
151 _r2d_ilcd_to_color:
152 R2D_COLCONV_SAVE_CONTEXT
153 BL _r2d_lcd_to_color
154 R2D_COLCONV_RESTORE_CONTEXT
155
156 .endif
157 .end