Latest changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user