Lecture 30 - 0416 Assignment: Check out the following repository in CCS https://github.com/vt-ece2534-s18/msp432-i2c-1 Develop the function unsigned ReadLight() in the subrepo msp432-i2c-1-initial. You need the following manuals - Light sensor datasheet - Boost XL manual - Launchpad manual - Driverlib manual Purpose of ReadLight(): - This function reads the current output of the light sensor - It also programs the low/high threshold levels such that the INT pin on the light sensor chip is asserted (active low) when the light level is below the low threshold (LED ON) or the light level is above the high threshold (LED OFF) Approach? 1. Study schematics - Electrical connectivity - GPIO connectivity for additional interrupts 2. Study Data Sheet - I2C Slave Address - I2C Transfers - Register set - Bit field definition - Internal operation 3. Build programming sequence - Low-level connectivity - Initialization and configuration - Data transfers 4. Integration - Testing and Debugging - Refactoring in .h and .c files Driverlib calls I2C_initMaster I2C_setSlaveAddress I2C_enableModule I2C_setMode I2C_isBusBusy I2C_masterSendMultiByteStart I2C_masterSendMultiByteNext I2C_masterSendMultiByteFinish I2C_masterSendSingleByte I2C_masterReceiveStart I2C_masterReceiveMultiByteNext I2C_masterReceiveMultiByteFinish I2C_masterReceiveSingleByte I2C_getInterruptStatus