OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [drivers/] [i2c_master_slave/] [i2c_master_slave.c] - Diff between revs 486 and 545

Show entire file | Details | Blame | View Log

Rev 486 Rev 545
Line 241... Line 241...
                return 1;
                return 1;
 
 
        if (stop)
        if (stop)
                i2c_master_slave_write_reg(core, I2C_MASTER_SLAVE_CR,
                i2c_master_slave_write_reg(core, I2C_MASTER_SLAVE_CR,
                                           I2C_MASTER_SLAVE_CR_READ |
                                           I2C_MASTER_SLAVE_CR_READ |
 
                                           // Final read, so send a NAK to slave
 
                                           I2C_MASTER_SLAVE_CR_ACK |
                                           I2C_MASTER_SLAVE_CR_STOP);
                                           I2C_MASTER_SLAVE_CR_STOP);
        else
        else
                i2c_master_slave_write_reg(core, I2C_MASTER_SLAVE_CR,
                i2c_master_slave_write_reg(core, I2C_MASTER_SLAVE_CR,
                                           I2C_MASTER_SLAVE_CR_READ);
                                           I2C_MASTER_SLAVE_CR_READ);
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.