⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rom400_init.h

📁 tini的http-slientC程序
💻 H
📖 第 1 页 / 共 2 页
字号:
 *
 * <i>init_rom</i> will probe all available 1-Wire devices for an approximate
 * clock frequency and it will try to find a DS2502-E48 for an Ethernet MAC 
 * address. If no DS2502-E48 is present, you must use <i>init_setfrequency</i>
 * to specify a clock frequency, and you must modify startup.a51 to manually set
 * a MAC address.
 *
 * \param     mem_start_address The absolute beginning address for the heap.
 * \param     mem_end_address   The absolute ending address for the heap.
 * 
 * Use mem_start_address==0 to use the default settings for both start and end,
 * or pass a value to mem_start_address and use mem_end_address==0 to use 
 * the remaining memory in the same bank, or use valid values for
 * both addresses.
 * For example...
 * <center><table>
 *   <tr>
 *     <td>mem_start_address</td>  <td>mem_end_address</td>     <td>actual start</td>     <td>actual end</td>      <td>size of heap</td>
 *   </tr>
 *   <tr>
 *     <td>0x000000</td>           <td>0x000000</td>           <td>0x002900</td>        <td>0x00FFFF</td>            <td>55040</td>
 *   </tr>
 *   <tr>
 *     <td><i>#DEFAULT_HEAP_START</i></td> <td>0x07FFFF</td>           <td>0x002900</td>        <td>0x07FFFF</td>           <td>513792</td>
 *   </tr>
 *   <tr>
 *     <td>0x010440</td>           <td>0x000000</td>           <td>0x010440</td>        <td>0x01FFFF</td>            <td>64448</td>
 *   </tr>
 *   <tr>
 *     <td>0x010440</td>           <td>0x07FFFF</td>           <td>0x010440</td>        <td>0x07FFFF</td>           <td>457663</td>
 *   </tr>
 * </table></center>
 *
 * \sa #DEFAULT_HEAP_START
 */
//---------------------------------------------------------------------------
void  init_rom(unsigned long mem_start_address, unsigned long mem_end_address);

/**
 * \brief     Starts the netboot functionality.  Note that this will negate
 *            any initialization that has already been performed.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_netboot(void);

/**
 * \brief     Copies the interrupt vector table into memory.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_copyivt(void);

/**
 * \brief     Sets up the redirect table for ROM redirected calls.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_redirect(void);

/**
 * \brief     Clears system variables in internal RAM.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_clearSystemRAM(void);

/**
 * \brief     Clears system variables in external RAM.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * This function also sets the <b>EPFI</b> bit.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_clearXSEG(void);

/**
 * \brief    Initializes the heap.    
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \param     mem_start_address The absolute beginning address for the heap
 *                              (see <i>#init_rom</i> for a detailed discussion of
 *                              the input parameters).  
 *                              Unlike the <i>#init_rom</i> function, this function 
 *                              cannot accept <b>0</b> for default parameters.  The
 *                              start address must be specified. Use <i>#DEFAULT_HEAP_START</i>
 *                              to specify the default start address.
 * \param     mem_end_address   The absolute ending address for the heap
 *                              (see <i>#init_rom</i> for a detailed discussion of
 *                              the input parameters).
 *                              Unlike the <i>#init_rom</i> function, this function 
 *                              cannot accept <b>0</b> for default parameters.  The
 *                              end address must be specified.
 *
 * \sa        #init_rom
 * \sa        #DEFAULT_HEAP_START
 */
//---------------------------------------------------------------------------
void  init_mm(unsigned long mem_start_address, unsigned long mem_end_address);

/**
 * \brief     Initializes fast kernel memory.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_km(void);

/**
 * \brief     Initializes the internal 1-Wire.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \param DIVISOR Divisor value for given the DS80C400's operating frequency.
 *                The operating frequency is the oscillator adjusted by any 
 *                setting of the frequency multiplier (i.e. a 14 MHz oscillator with
 *                the clock doubler enabled should look for a divisor for 28 MHz)
 *                
 * \sa        #init_rom
 * \sa        #INIT_DIVISOR_3MHZ
 * \sa        #INIT_DIVISOR_4MHZ
 * \sa        #INIT_DIVISOR_5MHZ
 * \sa        #INIT_DIVISOR_6MHZ
 * \sa        #INIT_DIVISOR_7MHZ
 * \sa        #INIT_DIVISOR_8MHZ
 * \sa        #INIT_DIVISOR_10MHZ
 * \sa        #INIT_DIVISOR_12MHZ
 * \sa        #INIT_DIVISOR_14MHZ
 * \sa        #INIT_DIVISOR_16MHZ
 * \sa        #INIT_DIVISOR_20MHZ
 * \sa        #INIT_DIVISOR_24MHZ
 * \sa        #INIT_DIVISOR_28MHZ
 * \sa        #INIT_DIVISOR_32MHZ
 * \sa        #INIT_DIVISOR_40MHZ
 * \sa        #INIT_DIVISOR_48MHZ
 * \sa        #INIT_DIVISOR_56MHZ
 * \sa        #INIT_DIVISOR_64MHZ
 * \sa        #INIT_DIVISOR_80MHZ
 * \sa        #INIT_DIVISOR_96MHZ
 * \sa        #INIT_DIVISOR_112MHZ
 * \sa        #INIT_DIVISOR_128MHZ
 */
//---------------------------------------------------------------------------
void  init_ow(unsigned char DIVISOR);

/**
 * \brief     Initializes the network.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_network(void);

/**
 * \brief     Initializes the ethernet support.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_eth(void);

/**
 * \brief     Initializest the socket layer.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_sockets(void);

/**
 * \brief     Initializes the system timer.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_tick(void);

/**
 * \brief     Enables system interrupts.
 *
 * Note that calling <i>#init_rom</i> is the preferred way of initializing the ROM.
 *
 * \sa        #init_rom
 */
//---------------------------------------------------------------------------
void  init_enableinterrupts(void);

/**
 * \brief     Performs initialization necessary for using the Keil Monitor.
 *
 * Performs initialization needed when using the Keil MON390 Monitor to debug
 * programs that access the DS80C400's ROM.  This function should be called
 * after calling <i>#init_rom</i>, and only if the monitor will be used.
 *
 * This file includes a macro <i>#USE_KEIL_MONITOR</i> which is defined to 
 * call this function if <i>#MONITOR</i> is defined.  Use the following
 * code to make use of this macro:
 *
 * <code><pre>
 *        init_rom();
 *         USE_KEIL_MONITOR
 * </pre></code>
 * 
 * \sa        #init_rom
 * \sa        #USE_KEIL_MONITOR
 */
//---------------------------------------------------------------------------
void  init_usekeilmonitor(void);

//void  init_resetMII(void);

/**
 * \brief     Returns the version number of this initialization library.
 *
 * \return    Version number of this INIT library.
 */
//---------------------------------------------------------------------------
unsigned int init_version(void);


/**
 * \brief     Returns the boot status flags.
 *
 * The status flags are defined as follows:
 *    Status.3 (0x08) - Power Fail Reset                 INIT_POWERFAIL_RESET
 *    Status.4 (0x10) - Watchdog Reset                   INIT_WATCHDOG_RESET
 *    Status.5 (0x20) - Crystal Oscillator Failure Reset INIT_CRYSTALFAIL_RESET
 * All other bits are reserved, but not necessarily 0.
 *
 * \return    Status flags
 *
 * \sa #INIT_POWERFAIL_RESET
 * \sa #INIT_WATCHDOG_RESET
 * \sa #INIT_CRYSTALFAIL_RESET
 */
//---------------------------------------------------------------------------
unsigned char init_getbootstate(void);


/**
 * \brief     Sets the crystal frequency.
 * 
 * \param value Clock frequency in kHz * 5/6 (e.g. 12288 for a 14.7456 MHz crystal).
 *              The operating frequency is the oscillator adjusted by any 
 *              setting of the frequency multiplier (i.e. a 14 MHz oscillator with
 *              the clock doubler enabled should set 28 MHz)
 *
 * Note that this function has to be called before <i>#init_rom</i>.
 * Users should call the more friendly macro <i>#init_setfrequency</i>.
 *
 * \sa	      #task_settickreload
 * \sa        #init_rom
 * \sa	      #init_setfrequency
 */
//---------------------------------------------------------------------------
void init_setclock(unsigned int value);

/**
 * \brief Sets the crystal frequency.
 * 
 * \param clock Clock frequency in kHz (e.g. 14746 for a 14.7456 MHz crystal).
 *              The operating frequency is the oscillator adjusted by any 
 *              setting of the frequency multiplier (i.e. a 14 MHz oscillator with
 *              the clock doubler enabled should set 28 MHz)
 *
 * Note that this macro has to be called before <i>#init_rom</i>.
 *
 * \sa	      #task_settickreload
 * \sa        #init_rom
 * \sa        #init_setclock
 */
//---------------------------------------------------------------------------
#define init_setfrequency(clock) init_setclock(((clock)*5L)/6)

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -