1    /* --COPYRIGHT--,EPL
     2     *  Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * --/COPYRIGHT--*/
    12    /*!
    13     * Universal Serial Communication Interface B1 I2C 2xx
    14     */
    15    metaonly interface IUSCI_B1_I2C inherits IUSCI_I2C {
    16    
    17    instance:
    18            /*! Control Register 0 */
    19        config UCxCTL0_t UCB1CTL0 = {
    20            UCA10       : UCA10_OFF,
    21            UCSLA10     : UCSLA10_OFF,
    22            UCMM        : UCMM_OFF,
    23            UCMST       : UCMST_OFF,
    24            UCMODE      : UCMODE_0,
    25            UCSYNC      : UCSYNC,
    26        };
    27    
    28            /*! Control Register 1 */
    29        config UCxCTL1_t UCB1CTL1 = {
    30            UCSSEL      : UCSSEL_0,
    31            UCTR        : UCTR_OFF,
    32            UCTXNACK    : UCTXNACK_OFF,
    33            UCTXSTP     : UCTXSTP_OFF,
    34            UCTXSTT     : UCTXSTT_OFF,
    35            UCSWRST     : UCSWRST,
    36        };
    37    
    38            /*! Status Register */
    39        config UCxSTAT_t UCB1STAT = {
    40            UCSCLLOW    : UCSCLLOW,
    41            UCGC        : UCGC,
    42            UCBBUSY     : UCBBUSY,
    43            UCNACKIFG   : UCNACKIFG,
    44            UCSTPIFG    : UCSTPIFG,
    45            UCSTTIFG    : UCSTTIFG,
    46            UCALIFG     : UCALIFG,
    47        };
    48        
    49            /*! I2C Own Address Register */
    50        config UCBxI2COA_t UCB1I2COA = {
    51            UCGCEN      : UCGCEN_OFF,
    52            I2COA       : 0,
    53        };
    54    
    55        /*! I2C Slave Address Register */
    56        config Bits8 UCB1I2CSA = 0;
    57        
    58        /*! Receive Buffer Register */
    59        config Bits8 UCB1RXBUF = 0;
    60        
    61            /*! Transmit Buffer Register */
    62        config Bits8 UCB1TXBUF = 0;
    63        
    64        /*! Bit Rate Control Register 0 */
    65        config Bits8 UCB1BR0 = 0;
    66        
    67        /*! Bit Rate Control Register 1 */
    68        config Bits8 UCB1BR1 = 0;
    69    }