Latest changes

This commit is contained in:
mlt
2010-07-26 13:16:12 +00:00
committed by Godzil
parent e3c7c1b8b5
commit db805e563c
15 changed files with 1561 additions and 1648 deletions

View File

@@ -22,10 +22,10 @@
#include <cybook.h>
#include <linux/cyio.h>
#include <linux/cyevent.h>
#define DEBUG_MESSAGES
#define DEBUG_TRACEFUNC
//#define DEBUG_MESSAGES
//#define DEBUG_TRACEFUNC
//#define DBG_IRQ
#define MODULE_NAME "CYB_TILT"
@@ -209,7 +209,7 @@ static irqreturn_t orizontilt_interrupt(int irq, void *dev_id)
irqreturn_t ret = IRQ_HANDLED;
unsigned long tmpReg;
unsigned long calcTilt;
CyEvent_t event = NEW_CYEVENT(CYEVENT_TYPE_ORIENTATION);
FUNC_IN();
spin_lock(&suspendLock);
@@ -245,7 +245,8 @@ static irqreturn_t orizontilt_interrupt(int irq, void *dev_id)
{
MSG("Different from old one, push new event!");
OrizonTilt_CurrentDirection = calcTilt;
Cyio_PushEvent(CYEVENT_ORIENTATIONCHANGED, true);
event.data.orientation = calcTilt / 90;
CyEvent_PushOrUpdateUniqueEvent(&event, false);
}
spin_lock(&suspendLock);
@@ -370,7 +371,7 @@ static int __init orizontilt_init(void)
ioProcEntry->write_proc = orizontilt_procWriteIo;
ioProcEntry->owner = THIS_MODULE;
}
FUNC_OUT();
return 0;
}