[Armadeus-commitlog] SF.net SVN: armadeus: [643] trunk/target/packages/ch7024ctrl/ch7024.c
Brought to you by:
sszy
|
From: <th...@us...> - 2007-09-18 09:22:05
|
Revision: 643
http://armadeus.svn.sourceforge.net/armadeus/?rev=643&view=rev
Author: thom25
Date: 2007-09-18 02:22:07 -0700 (Tue, 18 Sep 2007)
Log Message:
-----------
force reset of the DAC after paramter changing. This avoid flicking color effects
Modified Paths:
--------------
trunk/target/packages/ch7024ctrl/ch7024.c
Modified: trunk/target/packages/ch7024ctrl/ch7024.c
===================================================================
--- trunk/target/packages/ch7024ctrl/ch7024.c 2007-09-12 21:45:30 UTC (rev 642)
+++ trunk/target/packages/ch7024ctrl/ch7024.c 2007-09-18 09:22:07 UTC (rev 643)
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include <string.h>
-//#include <linux/i2c.h>
+#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <sys/ioctl.h>
@@ -192,6 +192,10 @@
if(nb>=8)
write_byte (fd, addr4, val4);
}
+ /* power down to reset the dac after parameter changing*/
+ write_byte (fd, POWER_STATE_CMD, 0xFF);
+ /* power on the dac after parameter changing*/
+ write_byte (fd, POWER_STATE_CMD, 0x00);
if(fd_conf != NULL)
fclose(fd_conf);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|