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    import ti.catalog.msp430.peripherals.clock.IClock;
    13    
    14    /*!
    15     *  ======== ITimer ========
    16     *  MSP430 ITimer interface
    17     */
    18    metaonly interface ITimer inherits xdc.platform.IPeripheral {
    19    
    20        /*!
    21        *  ======== ForceSetDefaultRegister_t ========
    22        *  Force Set Default Register
    23        *
    24        *  Type to store if each register needs to be forced initialized
    25        *  even if the register is in default state.
    26        *
    27        *  @see #ForceSetDefaultRegister_t
    28        */
    29        struct ForceSetDefaultRegister_t {
    30            String     register;
    31            Bool       regForceSet;
    32        }
    33        
    34        create(IClock.Instance clock);
    35    
    36    instance:
    37        /*!
    38         *  ======== baseAddr ========
    39         *  Address of the peripheral's control register.
    40         *
    41         *  A peripheral's registers are commonly accessed through a structure
    42         *  that defines the offsets of a particular register from the lowest
    43         *  address mapped to a peripheral. That lowest address is specified by
    44         *  this parameter.
    45         */
    46        config UInt baseAddr;
    47          
    48        /*!
    49         *  ======== intNum ========
    50         *  Interrupt source number
    51         *
    52         */
    53        config UInt intNum;
    54    
    55        /*!
    56         *  ======== numberOfTimers ========
    57         *  Stores the number of available timer capture compare blocks
    58         *
    59         */
    60        config UChar numberOfTimers;
    61    
    62        /*!
    63        *  ======== setTxxCCRx ========
    64        *  Sets TxxCCRx register value based on which CCR register
    65        *
    66        *  @see #setTxxCCRx
    67        */
    68        void setTxxCCRx(UChar ccrNumber , Bits16 value);
    69        
    70        /*!
    71        *  ======== getTxxCCRx ========
    72        *  Returns TxxCCRx register value based on which CCR register
    73        *
    74        *  @see #getTxxCCRx
    75        */
    76        Bits16 getTxxCCRx(UChar ccrNumber);
    77    
    78        /*! @_nodoc */
    79        config IClock.Instance clock;
    80    }