#include <ti/devices/msp432e4/driverlib/driverlib.h>

#include "common.h"

void main(void)
    {
    uint32_t g_ui32SysClock;                     // The system clock frequency
    int32_t status;

    tempReady = false;

    g_ui32SysClock = init_CLK();                 // configure system clock

    init_GPIO();                                 // configure the device pins

    int_disable();

    status = init_temp_I2C(g_ui32SysClock);      // configure temperature sensor I2C interface

    status = init_temperature();                 // initialize temperature driver parameters

// the code below is used to transfer data from the TMP117 under CPU control
//     int_enable();
// 
//     while(1){
//        while(!tempReady);
//        tempReady = false;
//     }
// end of CPU control

// the code below is used to transfer data from the TMP117 under uDMA control
    ConfigureuDMATX();

    MAP_uDMAChannelRequest(UDMA_CH23_I2C5TX);
// end of uDMA control
}
