00001 /*************************************************************************** 00002 * plat_gps.h 00003 * (C) 2011 Ivan Meleca 00004 * Based on original code written by Ruben Meleca 00005 * www.milos.it 00006 00007 # This program is free software; you can redistribute it and/or modify 00008 # it under the terms of the GNU General Public License as published by 00009 # the Free Software Foundation; either version 2 of the License, or 00010 # (at your option) any later version. 00011 # 00012 # This program is distributed in the hope that it will be useful, 00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 # GNU General Public License for more details. 00016 # 00017 # You should have received a copy of the GNU General Public License 00018 # along with this program; if not, write to the Free Software 00019 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 00021 ***************************************************************************/ 00022 00023 #ifndef __PLAT_GPS_H__ 00024 #define __PLAT_GPS_H__ 00025 00026 #include <core/device.h> 00027 00028 #if __CONFIG_COMPILE_GPS 00029 00054 #ifdef BOARD_GPS_DEVICE 00055 00056 #define __PLATGPS_DEFAULT_DEVICE BOARD_GPS_DEVICE 00057 #define __PLATGPS_DEFAULT_SPEED BOARD_GPS_DEVICE_SPEED 00058 #define __PLATGPS_DEVICE_INITFLAGS (__DEV_RD_CRLF | __DEV_WR_CRLF | __DEV_AUTOFLUSH) 00059 #define __PLATGPS_DEVICE_OPENMODE BOARD_GPS_DEVICE_SPEED 00061 #else 00062 00063 #define __PLATGPS_DEFAULT_DEVICE __NULL 00064 00065 #endif /* BOARD_GPS_DEVICE */ 00066 00084 typedef struct { 00085 u8 power_present; 00086 u32 power_pin; 00087 GPIO_TypeDef* power_port; 00088 u8 power_bus_num; 00089 u32 power_bus_addr; 00090 u8 fix_present; 00091 u32 fix_pin; 00092 GPIO_TypeDef* fix_port; 00093 u8 fix_bus_num; 00094 u32 fix_bus_addr; 00095 } GPS_PARAMS, *PGPS_PARAMS; 00096 00101 i32 __gpsPlatIoCtl(__PDEVICE dv, u32 code, u32 param, __PVOID in, u32 in_len, __PVOID out, u32 out_len); 00102 00115 #endif /* __CONFIG_COMPILE_GPS */ 00116 00117 #endif /* __PLAT_GPS_H__ */