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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*
****************************************************************************
PROJECT : Sprite engine
FILE : $Id: r_spea_sys.h 15442 2017-12-19 11:33:55Z florian.zimmermann $
============================================================================
DESCRIPTION
SPEA support functions
============================================================================
C O P Y R I G H T
============================================================================
Copyright (c) 2013 - 2017
by
Renesas Electronics (Europe) GmbH.
Arcadiastrasse 10
D-40472 Duesseldorf
Germany
All rights reserved.
============================================================================
Purpose: only for testing, not for mass production
DISCLAIMER
LICENSEE has read, understood and accepted the terms and conditions defined in
the license agreement, especially the usage rights. In any case, it is
LICENSEE's responsibility to make sure that any user of the software complies
with the terms and conditions of the signed license agreement.
SAMPLE CODE is not part of the licensed software, as such it must not be used in
mass-production applications. It can only be used for evaluation and
demonstration purposes at customer's premises listed in the signed license
agreement.
****************************************************************************
*/
/*******************************************************************************
Title: SPEA Driver support functions
SPEA (Sprite Engine A) driver support functions
The generic SPEA driver uses these functions. They have to be implemented
within the driver library for a concrete device. (e.g. D1L, D1M)
Support functions are functions that are not part of the driver itself
but they must be provided to integrate the driver on a particular board.
*/
#ifndef R_SPEA_SYS_H_
#define R_SPEA_SYS_H_
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************************
Section: Global Defines
*/
/*******************************************************************************
Section: Global Functions
*/
/***************************************************************************
Group: SPEA driver Basic interface functions
*/
/*******************************************************************************
Function: R_SPEA_SYS_HardwareInit
Description:
Setup the H/W for the generic SPEA.
This function is called from <R_SPEA_Init>.
This function executes the following processing.
* Initialize the sprite engine update timing control register (SPEAUPDEN).
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
Unit - Instance number
Return Value:
R_SPEA_ERR_OK - No error has occurred.
R_SPEA_ERR_NG - Unspecified error
see: <r_spea_Error_t>
*/
r_spea_Error_t R_SPEA_SYS_HardwareInit(uint32_t Unit);
/*******************************************************************************
Function: R_SPEA_SYS_HardwareDeInit
Description:
Deinit of the HW for the generic SPEA.
This function is called from <R_SPEA_DeInit>.
This function executes the following processing.
* Deinitialize the variables.
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
Unit - Instance number
Return Value:
R_SPEA_ERR_OK - No error has occurred.
R_SPEA_ERR_NG - Unspecified error
see: <r_spea_Error_t>
*/
r_spea_Error_t R_SPEA_SYS_HardwareDeInit(uint32_t Unit);
/*******************************************************************************
Function: R_SPEA_SYS_BaseAddr
Description:
This function gives back the base address of SPEA H/W macro's register.
This function is called from several SPEA APIs.
This function executes the following processing.
* Returns the base address of SPEA H/W macro's register.
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
Unit - Instance number
Return Value:
Macro base address
*/
uint32_t R_SPEA_SYS_BaseAddr(uint32_t Unit);
/*******************************************************************************
Function: R_SPEA_SYS_ErrorHandler
Description:
Low level error handler, called in case there was no user error handle
assigned for this macro.
This function is called from callback function.
This function executes the following processing.
* This function will just call R_DEV_ErrrorHandler (avoid having to assign
a dedicated low level error handler for all the macros).
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
Unit - Instance number
Error - detected error
Return Value:
void
*/
void R_SPEA_SYS_ErrorHandler(uint32_t Unit, r_spea_Error_t Error);
/*******************************************************************************
Function: R_SPEA_SYS_IsD1M1A
Description:
This function returns the flag of RH850/D1M1A or otherwise.
This function is called from several SPEA APIs.
This function executes the following processing.
* If LSI is RH850/D1M1A this function should return 1.
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
None
Return Value:
1 if D1M1A, 0 otherwise
*/
int8_t R_SPEA_SYS_IsD1M1A(void);
/*******************************************************************************
Function: R_SPEA_SYS_IsD1M1v2
Description:
This function returns the flag of RH850/D1M1-V2 or otherwise.
This function is called from several SPEA APIs.
This function executes the following processing.
* If LSI is RH850/D1M1-V2, this function should return 1.
Customizing Points:
It is NOT necessary to modify this function in general use-case.
Parameter:
None
Return Value:
1 if D1M1-V2, 0 otherwise
*/
int8_t R_SPEA_SYS_IsD1M1v2(void);
#ifdef __cplusplus
}
#endif
#endif /* R_SPEA_SYS_H_ */