Spiga
顯示具有 embed system 標籤的文章。 顯示所有文章
顯示具有 embed system 標籤的文章。 顯示所有文章

Lighttpd + PHP + WebDav

First we could run php-fcgi use this command:
php-fcgi -b 1026 &

Add lighttpd.conf as follows:
# load module
server.modules = (
"mod_webdav",
"mod_fastcgi",
"mod_cgi",
)

# setting for webdav
$HTTP["url"] =~ "^/dav($|/)" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
webdav.sqlite-db-name = "/var/run/lighttpd/lighttpd.webdav_lock.db"
}

# setting for fast-cgi
fastcgi.server = (".php" =>
((
"host" => "127.0.0.1",
"port" => 1026,
))
)

Then we could trying to run lighttpd:
lighttpd -f lighttpd.conf

The fading effect implement in 863x

There are many ways to implement this, but the present here only use one scaler. The idea is to display picture A, and blend picture B to back buffer many times until only picture B is visible. This can be expressed in pseudo-code like this:

load_image(A)
flip_buff(X, Y)
MoveAndScaleRectangles(A->Y)
flip_buff(Y, X)
MoveAndScaleRectangles(A->X)

load_image(B)
SetupChannel(ID_Z, B);

EnableAlphaFading(ID_Z);

while(A_is_visible)
{
flip_buff(X, Y);
SetupChannel(ID_X, X);
SetupChannel(ID_NX, Y);
SetupChannel(ID_Z, B);
AlphaPalette(1 to 255);
BlendAndScaleRectangles( B->Y);
}

How to access i2c and gpio in Sigma Design 863x?

It must use RUAMap to establish a mapping into memory. And RUALock is necessary before RUAMap. As follows:

err=RUACreateInstance(&pRUA, 0);
RUALock(pRUA, 0x00010580, sizeof(i2c_reg));
i2creg=(void *)RUAMap(pRUA, 0x00010580, sizeof(i2c_reg));

Then we could access i2c via i2creg. GPIO is similar to access i2c.