發表文章

目前顯示的是 9月, 2019的文章

Tiva C I2C slave example code

//***************************************************************************** // //! \addtogroup i2c_examples_list //! <h1>Slave Receive Interrupt (slave_receive_int)</h1> //! //! This example shows how to configure a receive interrupt on the slave //! module.  This includes setting up the I2C0 module for loopback mode as well //! as configuring the master and slave modules.  Loopback mode internally //! connects the master and slave data and clock lines together.  The address //! of the slave module is set to a value so it can receive data from the //! master. //! //! This example uses the following peripherals and I/O signals.  You must //! review these and change as needed for your own board: //! - I2C0 peripheral //! - GPIO Port B peripheral (for I2C0 pins) //! - I2C0SCL - PB2 //! - I2C0SDA - PB3 //! //! The following UART signals are configured only for displaying console //! messages for this example.  These are not required for operation of I2C.