Spiga

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.

0 意見:

張貼留言