summaryrefslogtreecommitdiff
path: root/gp2x
diff options
context:
space:
mode:
authornotaz2011-09-03 01:26:33 +0300
committernotaz2011-09-03 01:31:26 +0300
commit8b6232a675c7b49bd9651805fc92917cc7a92198 (patch)
tree8d9c7dd50673e51305537fbcb2742de073b0e297 /gp2x
parenteac69717338922e6bb55076e57d7674080291fe9 (diff)
downloadpicogpsp-8b6232a675c7b49bd9651805fc92917cc7a92198.tar.gz
picogpsp-8b6232a675c7b49bd9651805fc92917cc7a92198.tar.bz2
picogpsp-8b6232a675c7b49bd9651805fc92917cc7a92198.zip
fix some warnings
Diffstat (limited to 'gp2x')
-rw-r--r--gp2x/Makefile4
-rw-r--r--gp2x/gp2x.c15
2 files changed, 10 insertions, 9 deletions
diff --git a/gp2x/Makefile b/gp2x/Makefile
index 2096419..529fa37 100644
--- a/gp2x/Makefile
+++ b/gp2x/Makefile
@@ -4,7 +4,7 @@
# Global definitions
-PREFIX = /opt/open2x/gcc-4.1.1-glibc-2.3.6
+PREFIX ?= /opt/open2x/gcc-4.1.1-glibc-2.3.6
CC = $(PREFIX)/bin/arm-open2x-linux-gcc
STRIP = $(PREFIX)/bin/arm-open2x-linux-strip
@@ -18,6 +18,8 @@ else
BIN = gpsp_gp2x
endif
+-include Makefile.local
+
# Platform specific definitions
VPATH += .. ../arm
diff --git a/gp2x/gp2x.c b/gp2x/gp2x.c
index 41e3f8b..d36dd08 100644
--- a/gp2x/gp2x.c
+++ b/gp2x/gp2x.c
@@ -1,6 +1,6 @@
-/* Parts used from cpuctrl */
-/* cpuctrl for GP2X
- Copyright (C) 2005 Hermes/PS2Reality
+/*
+ Parts used from cpuctrl, Copyright (C) 2005 Hermes/PS2Reality
+ Portions Copyright (C) 2009 notaz
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,14 +19,14 @@
*/
-#define _BSD_SOURCE
#define _GNU_SOURCE
+#include "../common.h"
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include <sys/types.h>
#include <unistd.h>
-#include "../common.h"
+#include <ctype.h>
#include "gp2x.h"
#include "warm.h"
#include "pollux_dpc_set.h"
@@ -230,10 +230,9 @@ void gp2x_init()
gpsp_gp2x_dev = open("/dev/mem", O_RDWR);
gpsp_gp2x_dev_audio = open("/dev/mixer", O_RDWR);
- gpsp_gp2x_memregl =
- (unsigned long *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED,
+ gpsp_gp2x_memregl = (u32 *)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED,
gpsp_gp2x_dev, 0xc0000000);
- gpsp_gp2x_memregs = (unsigned short *)gpsp_gp2x_memregl;
+ gpsp_gp2x_memregs = (u16 *)gpsp_gp2x_memregl;
warm_init();
#ifdef WIZ_BUILD
gpsp_gp2x_gpiodev = open("/dev/GPIO", O_RDONLY);