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     *  ======== SysBuf.xdc ========
    14     */
    15    import xdc.runtime.Types;
    16    
    17    /*!
    18     *  ======== SysBuf ========
    19     *  Minimal implementation of ISystemSupport
    20     *
    21     *  This module provides a simple but 100% portable implementation of the
    22     *  `{@link ISystemSupport}` interface.
    23     */
    24    module SysBuf inherits xdc.runtime.ISystemSupport {
    25     
    26        /*!
    27         *  ======== bufSize ========
    28         *  Size (in MAUs) of the output.
    29         *
    30         *  An internal buffer of this size is allocated. All output is stored 
    31         *  in this internal buffer. 
    32         *
    33         *  If 0 is specified for the size, no buffer is created and all output
    34         *  is simply dropped.
    35         */
    36        config SizeT bufSize = 1024;
    37    
    38        /*!
    39         *  ======== bufName ========
    40         *  Global variable name containing pointer to output buffer
    41         *
    42         *  This variable will be created so that it is easy to view the
    43         *  contents of the output buffer within a debugger.  If `bufName` is
    44         *  set to `null` or `undefined`, the variable will not be created.
    45         */
    46        metaonly config String bufName = "SYSBUF";
    47        
    48        /*!
    49         *  ======== sectionName ========
    50         *  Section where the internal buffer managed by `SysBuf` is placed.
    51         *
    52         *  The default is to have no explicit placement.
    53         */
    54        metaonly config String sectionName = null;
    55       
    56    internal:
    57        
    58        struct Module_State {
    59            Char outbuf[];  /* output buffer */
    60            UInt outidx;    /* index of next available output character */
    61        }
    62    }