2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 /*****************************************************************************************
19 * System name :PastModel002
20 * Process name :Vehicle
21 * Overview :GPS interrupt thread header
22 ******************************************************************************************/
23 #ifndef POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_
24 #define POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_
26 /*******************************************************************************
28 *******************************************************************************/
30 /*******************************************************************************
32 *******************************************************************************/
33 #define GPS_IRQ_ADR 0x00000306UL /* GPS IRQ addresses */
34 #define GPS_MASK_6BIT 0x00000040UL /* GPS IRQ bit-mask position */
36 #define GPS_GPIO0_IRQSTATUS_0_OFFSET 0x0000002CUL /* IRQSTATUS_0 offset */
37 #define GPS_GPIO0_IRQSTATUS_SET_0_OFFSET 0x00000034UL /* IRQSTATUS_SET_0 offset */
38 #define GPS_GPIO0_RISINGDETECT_OFFSET 0x00000148UL /* RISINGDETECT offsets */
40 /* IRQSTATUS_0 address */
41 #define GPS_GPIO0_IRQSTATUS_0_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_IRQSTATUS_0_OFFSET)
43 /* IRQSTATUS_SET_0 address */
44 #define GPS_GPIO0_IRQSTATUS_SET_0_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_IRQSTATUS_SET_0_OFFSET)
46 /* RISINGDETECT addresses */
47 #define GPS_GPIO0_RISINGDETECT_ADDR (DM816X_GPIO0_BASE + GPS_GPIO0_RISINGDETECT_OFFSET)
49 /*******************************************************************************
51 *******************************************************************************/
53 DWORD irq_status_reg; /* Interrupt Source Clear Register */
54 DWORD irq_status_set_reg; /* Interrupt enable register */
55 DWORD rising_detect_reg; /* Rising edge detection setting register */
58 /***************************
59 * Function prototype declaration
60 ***************************/
61 RET_API DEVGpsIntInitial(void);
62 BOOL DEVGpsIntMapDevice(void);
63 void DEVGpsIntUnMapDevice(void);
64 void DEVGpsIntSetInterupt(void);
65 void DEVGpsIntIntRegClear(void);
66 RET_API DEVGpsIntSndMsg(void);
68 #endif // POSITIONING_SERVER_INCLUDE_SENSOR_GPSINT_H_