/*
* -------------------------------------------
- * MSP432 DriverLib - v01_04_00_18
+ * MSP432 DriverLib - v3_10_00_09
* -------------------------------------------
*
* --COPYRIGHT--,BSD,BSD
- * Copyright (c) 2015, Texas Instruments Incorporated
+ * Copyright (c) 2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <msp.h>
#include "eusci.h"
-#define EUSCI_B_I2C_NO_AUTO_STOP UCASTP_0
-#define EUSCI_B_I2C_SET_BYTECOUNT_THRESHOLD_FLAG UCASTP_1
-#define EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD UCASTP_2
+#define EUSCI_B_I2C_NO_AUTO_STOP EUSCI_B_CTLW1_ASTP_0
+#define EUSCI_B_I2C_SET_BYTECOUNT_THRESHOLD_FLAG EUSCI_B_CTLW1_ASTP_1
+#define EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD \
+ EUSCI_B_CTLW1_ASTP_2
+#define EUSCI_B_I2C_SET_DATA_RATE_1MBPS 1000000
#define EUSCI_B_I2C_SET_DATA_RATE_400KBPS 400000
#define EUSCI_B_I2C_SET_DATA_RATE_100KBPS 100000
-#define EUSCI_B_I2C_CLOCKSOURCE_ACLK UCSSEL__ACLK
-#define EUSCI_B_I2C_CLOCKSOURCE_SMCLK UCSSEL__SMCLK
+#define EUSCI_B_I2C_CLOCKSOURCE_ACLK EUSCI_B_CTLW0_SSEL__ACLK
+#define EUSCI_B_I2C_CLOCKSOURCE_SMCLK EUSCI_B_CTLW0_SSEL__SMCLK
#define EUSCI_B_I2C_OWN_ADDRESS_OFFSET0 0x00
#define EUSCI_B_I2C_OWN_ADDRESS_OFFSET1 0x02
#define EUSCI_B_I2C_OWN_ADDRESS_OFFSET3 0x06
#define EUSCI_B_I2C_OWN_ADDRESS_DISABLE 0x00
-#define EUSCI_B_I2C_OWN_ADDRESS_ENABLE UCOAEN
+#define EUSCI_B_I2C_OWN_ADDRESS_ENABLE EUSCI_B_I2COA0_OAEN
-#define EUSCI_B_I2C_TRANSMIT_MODE UCTR
+#define EUSCI_B_I2C_TRANSMIT_MODE EUSCI_B_CTLW0_TR
#define EUSCI_B_I2C_RECEIVE_MODE 0x00
-#define EUSCI_B_I2C_NAK_INTERRUPT UCNACKIE
-#define EUSCI_B_I2C_ARBITRATIONLOST_INTERRUPT UCALIE
-#define EUSCI_B_I2C_STOP_INTERRUPT UCSTPIE
-#define EUSCI_B_I2C_START_INTERRUPT UCSTTIE
-#define EUSCI_B_I2C_TRANSMIT_INTERRUPT0 UCTXIE0
-#define EUSCI_B_I2C_TRANSMIT_INTERRUPT1 UCTXIE1
-#define EUSCI_B_I2C_TRANSMIT_INTERRUPT2 UCTXIE2
-#define EUSCI_B_I2C_TRANSMIT_INTERRUPT3 UCTXIE3
-#define EUSCI_B_I2C_RECEIVE_INTERRUPT0 UCRXIE0
-#define EUSCI_B_I2C_RECEIVE_INTERRUPT1 UCRXIE1
-#define EUSCI_B_I2C_RECEIVE_INTERRUPT2 UCRXIE2
-#define EUSCI_B_I2C_RECEIVE_INTERRUPT3 UCRXIE3
-#define EUSCI_B_I2C_BIT9_POSITION_INTERRUPT UCBIT9IE
-#define EUSCI_B_I2C_CLOCK_LOW_TIMEOUT_INTERRUPT UCCLTOIE
-#define EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT UCBCNTIE
-
-#define EUSCI_B_I2C_BUS_BUSY UCBBUSY
+#define EUSCI_B_I2C_NAK_INTERRUPT EUSCI_B_IE_NACKIE
+#define EUSCI_B_I2C_ARBITRATIONLOST_INTERRUPT EUSCI_B_IE_ALIE
+#define EUSCI_B_I2C_STOP_INTERRUPT EUSCI_B_IE_STPIE
+#define EUSCI_B_I2C_START_INTERRUPT EUSCI_B_IE_STTIE
+#define EUSCI_B_I2C_TRANSMIT_INTERRUPT0 EUSCI_B_IE_TXIE0
+#define EUSCI_B_I2C_TRANSMIT_INTERRUPT1 EUSCI_B_IE_TXIE1
+#define EUSCI_B_I2C_TRANSMIT_INTERRUPT2 EUSCI_B_IE_TXIE2
+#define EUSCI_B_I2C_TRANSMIT_INTERRUPT3 EUSCI_B_IE_TXIE3
+#define EUSCI_B_I2C_RECEIVE_INTERRUPT0 EUSCI_B_IE_RXIE0
+#define EUSCI_B_I2C_RECEIVE_INTERRUPT1 EUSCI_B_IE_RXIE1
+#define EUSCI_B_I2C_RECEIVE_INTERRUPT2 EUSCI_B_IE_RXIE2
+#define EUSCI_B_I2C_RECEIVE_INTERRUPT3 EUSCI_B_IE_RXIE3
+#define EUSCI_B_I2C_BIT9_POSITION_INTERRUPT EUSCI_B_IE_BIT9IE
+#define EUSCI_B_I2C_CLOCK_LOW_TIMEOUT_INTERRUPT EUSCI_B_IE_CLTOIE
+#define EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT EUSCI_B_IE_BCNTIE
+
+#define EUSCI_B_I2C_BUS_BUSY EUSCI_B_STATW_BBUSY
#define EUSCI_B_I2C_BUS_NOT_BUSY 0x00
#define EUSCI_B_I2C_STOP_SEND_COMPLETE 0x00
-#define EUSCI_B_I2C_SENDING_STOP UCTXSTP
+#define EUSCI_B_I2C_SENDING_STOP EUSCI_B_CTLW0_TXSTP
#define EUSCI_B_I2C_START_SEND_COMPLETE 0x00
-#define EUSCI_B_I2C_SENDING_START UCTXSTT
+#define EUSCI_B_I2C_SENDING_START EUSCI_B_CTLW0_TXSTT
//*****************************************************************************
//
-//! \typedef eUSCI_I2C_MasterConfig
+//! ypedef eUSCI_I2C_MasterConfig
//! \brief Type definition for \link _eUSCI_I2C_MasterConfig \endlink structure
//!
//! \struct _eUSCI_I2C_MasterConfig
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//! selectClockSource).
//! \param dataRate set up for selecting data transfer rate.
//! Valid values are
+//! - \b EUSCI_B_I2C_SET_DATA_RATE_1MBPS
//! - \b EUSCI_B_I2C_SET_DATA_RATE_400KBPS
//! - \b EUSCI_B_I2C_SET_DATA_RATE_100KBPS
//! \param byteCounterThreshold sets threshold for automatic STOP or UCSTPIFG
//! bus speed for the master; however I2C module is still disabled till
//! I2C_enableModule is invoked
//!
-//! If the parameter \e dataRate is EUSCI_B_I2C_SET_DATA_RATE_400KBPS, then the
-//! master block will be set up to transfer data at 400 kbps; otherwise, it will
-//! be set up to transfer data at 100 kbps.
-//!
//! Modified bits are \b UCMST,UCMODE_3,\b UCSYNC of \b UCBxCTL0 register
//! \b UCSSELx, \b UCSWRST, of \b UCBxCTL1 register
//! \b UCBxBR0 and \b UCBxBR1 registers
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
-//! \param slaveAddress 7-bit slave address
+//! \param slaveAddress 7-bit or 10-bit slave address
//! \param slaveAddressOffset Own address Offset referred to- 'x' value of
//! UCBxI2COAx. Valid values are:
//! - \b EUSCI_B_I2C_OWN_ADDRESS_OFFSET0,
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
-//! \param slaveAddress 7-bit slave address
+//! \param slaveAddress 7-bit or 10-bit slave address
//!
//! This function will set the address that the I2C Master will place on the
//! bus when initiating a transaction.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//! - \b EUSCI_B_I2C_BYTE_COUNTER_INTERRUPT - Byte counter interrupt enable
//
//*****************************************************************************
-uint_fast16_t I2C_getInterruptStatus(uint32_t moduleInstance, uint16_t mask);
+extern uint_fast16_t I2C_getInterruptStatus(uint32_t moduleInstance, uint16_t mask);
//*****************************************************************************
//
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//!
//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
//! parameters vary from part to part, but can include:
-//! - \b EUSCI_B0_MODULE
-//! - \b EUSCI_B1_MODULE
-//! - \b EUSCI_B2_MODULE
-//! - \b EUSCI_B3_MODULE
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
//! <br>It is important to note that for eUSCI modules, only "B" modules such as
//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
//! I2C mode.
//*****************************************************************************
extern void I2C_unregisterInterrupt(uint32_t moduleInstance);
+
+//*****************************************************************************
+//
+//! This function is used by the slave to send a NAK out over the I2C line
+//!
+//! \param moduleInstance is the instance of the eUSCI B (I2C) module. Valid
+//! parameters vary from part to part, but can include:
+//! - \b EUSCI_B0_BASE
+//! - \b EUSCI_B1_BASE
+//! - \b EUSCI_B2_BASE
+//! - \b EUSCI_B3_BASE
+//! <br>It is important to note that for eUSCI modules, only "B" modules such as
+//! EUSCI_B0 can be used. "A" modules such as EUSCI_A0 do not support the
+//! I2C mode.
+//!
+//! \return None.
+//
+//*****************************************************************************
+extern void I2C_slaveSendNAK(uint32_t moduleInstance);
+
/* Backwards Compatibility Layer */
#define EUSCI_B_I2C_slaveInit I2C_initSlave
#define EUSCI_B_I2C_enable I2C_enableModule