iTOP4412GPS
2014-05-08
GPSӲͨͨŵģֻҪGPSģTXDRXDcpuĴϣȻGPSҪһλŵCPUһGPIOɣiTOP-4412ӵcpuGPB_4ϣ
׼һ640x480ֱʵbmpʽͼƬʹתߣImg2LcdͼƬתļʹɵ滻ںԴ drivers/video/samsung/iTop-4412.hiBitmapData_qݣȻʹmake±ںˣȻд壬 ϵ弴
GPSϷΪֱ֣ںAndroidϵHALں֣Ϊں˱ִ֧ˣҪľһַַþǿGPSģĸλţԴںĿ¼driver/cha/gps.cļgps.cһ򵥵ַҪṩgps_open,gps_open豸£
int gps_open(struct inode *inode,struct file *filp)
{
DPRINTK("Device Opened Success!\n");
return nonseekable_open(inode,filp);
}
gps_releaseر豸£
int gps_release(struct inode *inode,struct file *filp)
{
DPRINTK("Device Closed Success!\n");
return 0;
}
gps_ioctlϲӦúںͨŵĽӿڣԸGPSͿϢøλGPB_4ĵƽߵͣøλŵĴ£
case RST_HIGH:
//gpio_direction_output(S5PV310_GPB(4),0);
//mdelay(500);
if(gpio_request(EXYNOS4_GPB(4) ,"GPS_power"))
DPRINTK("GPS GPIO err!\r\n");
else{
gpio_direction_output(EXYNOS4_GPB(4),0);
mdelay(500);
gpio_direction_output(EXYNOS4_GPB(4),1);
DPRINTK("GPS_RSTn Set High!\n");
gpio_free(EXYNOS4_GPB(4));}
break;
case RST_LOW:
if(gpio_request(EXYNOS4_GPB(4) ,"GPS_power"))
DPRINTK("GPS GPIO err!\r\n");
else{
gpio_direction_output(EXYNOS4_GPB(4),0);
DPRINTK("GPS_RSTn Set Low!\n");
gpio_free(EXYNOS4_GPB(4));}
break;
ںgpsþϲӦʹgpsʱgpsһλʱGPSģ鿪ʼҲܼ򵥡
  • ѯ
  • ҷϢ
  • 绰ѯ

  • 01085270716
XML 地图