
/*
 *            Copyright (c) 1998-2003 by NETsilicon Inc.
 *
 *  This software is copyrighted by and is the sole property of 
 *  NETsilicon.  All rights, title, ownership, or other interests
 *  in the software remain the property of NETsilicon.  This
 *  software may only be used in accordance with the corresponding
 *  license agreement.  Any unauthorized use, duplication, transmission,  
 *  distribution, or disclosure of this software is expressly forbidden.
 *
 *  This Copyright notice may not be removed or modified without prior
 *  written consent of NETsilicon.
 *
 *  NETsilicon, reserves the right to modify this software
 *  without notice.
 *
 *  NETsilicon
 *  411 Waverley Oaks Road                  USA 781.647.1234
 *  Suite 227                               http://www.netsilicon.com
 *  Waltham, MA 02452                       AmericaSales@netsilicon.com
 *
 *************************************************************************
 *
 *     Module Name: bsp_api.h	
 *         Version: 1.00
 *   Creation Date: Wednesday, March 26, 2003	
 *          Author: Contact Netsilicon tech support for questions on this file
 *        Language: Ansi C
 * Compile Options: 
 * Compile defines: 
 *       Libraries: 
 *    Link Options: 
 *
 *    Entry Points: 
 *
 * Description.
 * =======================================================================
 * This header file contains declarations for functions that can be used
 * by code compiled seperately from the BSP that needs to read values
 * set in bsp.h.
 *                                                                        
 *                                                                        
 * Edit Date/Ver   Edit Description
 * ==============  ===================================================
 *
 *
 */


#ifndef BSP_API_H
#define BSP_API_H

#include "Npttypes.h"
#ifdef WIN32
    typedef unsigned int  UINT;
#else
#include "tx_api.h"
#endif

#ifdef __cplusplus
extern "C"
{
#endif


extern char const NABspPlatform[];

extern int const NABspNvramDriver;
extern WORD32 const NABspTicksPerSecond;
extern int const NABspFlashBanks;
extern int const NABspClockSource;
extern UINT const NABspHighPriority;
extern UINT const NABspMediumPriority;
extern UINT const NABspLowPriority;
extern UINT const NABspDefaultPriority;
extern WORD32 const NABspStartupDelay;
extern WORD32 const NABspEepromBase;
extern WORD32 const NABspEepromSize;

extern WORD32 const NAAppOffsetInFlash;
extern WORD32 const NABootloaderSizeInFlash;
extern WORD32 const NAAppMaxSizeInFlash;
extern WORD32 const NABspApplicationImageSize;
extern WORD32 const NABspApplicationFlashAddress;
extern WORD32 const NABspFileSystemSize;

extern WORD32 const NABspRTCDriver;
extern WORD32 const NABspFilesystemForCLib;
extern BOOLEAN const NABspUsePhyInterrupt;
extern BOOLEAN const NABspLowInterruptLatency;

WORD32 NABspFileSystemStartOffset(void);


/**
 * This enum type lists the priority levels the BSP
 * supports.
 *
 * @since 6.0
 * @external
 * @category general_purpose
 *
 * @param naHighPriority        Threads at this priority can preempt naMedium and naLowPriority threads
 * @param naMediumPriority      Threads at this priority can preempt naLowPriority threads
 * @param naLowPriority         Threads at this priority can be preempted by naMedium and naHighPriority threads
 * @param naDefaultPriority     Normal priority level for threads
 * @param naFtpPriority         Priority level for FTP server thread
 * @param naSnmpPriority        Priority level for SNMP agent thread
 * @param naTelnetPriority      Priority level for Telnet server thread
 * @param naSntpPriority        Priority level for SNTP client thread
 */
typedef enum
{
    naHighPriority,
    naMediumPriority,
    naLowPriority,
    naDefaultPriority,
    naFtpPriority,
    naSnmpPriority,
    naTelnetPriority,
    naSntpPriority
} bspPriorityEnumType;




int NABspSerialPortType(int port);
UINT NATranslatePriorityLevel(bspPriorityEnumType level);
BOOLEAN NABspGetEepromInfo(WORD32 *base, WORD32 *size);




#ifdef __cplusplus
}
#endif

#endif
