/*
 *  Copyright (c) 1996-2007 Digi International Inc., All Rights Reserved
 *
 *  This software contains proprietary and confidential information of Digi
 *  International Inc.  By accepting transfer of this copy, Recipient agrees
 *  to retain this software in confidence, to prevent disclosure to others,
 *  and to make no use of this software other than that for which it was
 *  delivered.  This is an unpublished copyrighted work of Digi International
 *  Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly
 *  prohibited.
 *
 *  Restricted Rights Legend
 *
 *  Use, duplication, or disclosure by the Government is subject to
 *  restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
 *  Technical Data and Computer Software clause at DFARS 252.227-7031 or
 *  subparagraphs (c)(1) and (2) of the Commercial Computer Software -
 *  Restricted Rights at 48 CFR 52.227-19, as applicable.
 *
 *  Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
 *
 * Description.
 * =======================================================================
 *  This file contains all the externs used in the files under bsp.                                            
 *                                                                        
 * Edit Date/Ver   Edit Description
 * ==============  ===================================================
 *
 */

#ifndef _BSP_LOCAL_H
#define _BSP_LOCAL_H

#include <stdio.h>
#include <stdlib.h>
#include <Npttypes.h>
#include "sockapi.h"
#include <boardParams.h>

/* Externs used in bsp_root.c */
#ifdef NETOS_GNU_TOOLS
extern int customizeGetEthernetPresent(void);
extern void _EXFUN (__sinit, (struct _reent *));
extern int filesystem_init (void);      /* 07/02/03 */
#endif
 
extern void customizeClockDisable(unsigned int *ramSizes);
extern void customizeClockDisableMain(void);

extern devBoardParamsType defaultParams;
extern void applicationStart (void);    /* declaration for user's entry point */
extern void applicationTcpDown (void);  /* declaration for user's TCP wait loop function */

extern void DDISecondLevelInitialize (void);    /* 05/20/03 */

extern int watchThisFileDescriptor (char *filename, int ourDescriptors);        /* 5/20/03 */

extern int ioctl (int fd, int request, char *argp);

extern int fnsErr2BSD(int fnsVal);

#if (PROCESSOR == ns9210) || (PROCESSOR == ns9215)
/* these variables must be protected to avoid crash */
extern int naPdAreWeInCatnapMode;
extern unsigned naPdSlowClockScale;
extern unsigned naPdFastClockScale;
extern int naPdFastClockCount;
extern void naPdCpuSleepAndResume(void);

#elif (defined BSP_ARM9) /* for other ARM9 platforms */

extern void NAPDCpuSleep(void);
extern void NAPDCpuDeepSleep(unsigned long addr, unsigned long bit);
extern int mii_check_negotiable(void);

#endif

extern void customizeMiiPhySleep(void);
extern void customizeMiiPhyWakeup(void);

#endif /* _BSP_LOCAL_H */ 
