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

📄 board.h

📁 ti dsp 5510 的BOOT程序。利用此程序实现将代码写入到FLASH 的功能。
💻 H
📖 第 1 页 / 共 3 页
字号:
/*      - extendedProg - dsk onboard external program memory wait states     */
/*      - flashDbProg - flash/daughter board memory wait states              */
/*      - data0_32 - first 32K data memory wait states                       */
/*      - data32_64 - Second 32K data memory wait states                     */
/*      - io - I/O wait states                                               */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - OK success                                                             */
/*  - ERROR failure                                                          */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_set_wait_states(u16 flashDbProg, 
                        u16 data32_64, 
                        u16 io);

/*****************************************************************************/
/*   brd_set_cpu_freq()                                                      */
/*                                                                           */
/*  This routine sets the CPU frequency                                      */
/*                                                                           */
/*  Parameters:                                                              */
/*  - freq frequency in MHz to set cpu clock                                 */
/*                                                                           */
/*  Return:                                                                  */
/*  - void                                                                   */
/*                                                                           */
/*  Notes:                                                                   */
/*                                                                           */
/*  Board frequencies must be a multiple of 10 with the lowest being 20 MHz  */
/*  and the highest being 100 MHz.  Board frequencies supported are:		 */
/*  20,30,40,50,60,70,                                                       */ 
/*                                                                           */
/*****************************************************************************/
void brd_set_cpu_freq(u16 freq);

/*****************************************************************************/
/*   brd_get_cpu_freq()                                                      */
/*                                                                           */
/*  This routine returns the CPU frequency                                   */
/*                                                                           */
/*  Parameters:                                                              */
/*  - None                    					                             */
/*                                                                           */
/*  Return:                                                                  */
/*  - void                                                                   */
/*                                                                           */
/*  Notes:                                                                   */
/*****************************************************************************/
u16 brd_get_cpu_freq();

/*****************************************************************************/
/*   brd_io_redir()                                                          */
/*                                                                           */
/*  This routine redirects printfs to the host terminal.                     */
/*                                                                           */
/*  Parameters:                                                              */
/*  - None                    					                             */
/*                                                                           */
/*  Return:                                                                  */
/*  - void                                                                   */
/*                                                                           */
/*  Notes:                                                                   */
/*****************************************************************************/
void brd_io_redir(BOOL enable);

/*****************************************************************************/
/*  s16 brd_mem_transfer()                                                   */
/*                                                                           */ 
/*  This routine uses the DMA to transfer data from one mem location to the  */
/*  the other.                                                               */
/*                                                                           */ 
/*  Parameters:                                                              */
/*      - ch : DMA channel to use.                                           */
/*      - src_addr - source address.                                         */
/*      - src_space - source memory space. Values in dma5410.h               */
/*      - dst_addr - destination address.                                    */
/*      - dst_space - destination memory space. Values in dma5410.h          */
/*      - cnt - number of words to transfer.                                 */
/*      - sync - wait for transfer to complete.                              */
/*  Return:                                                                  */
/*  - OK success                                                             */
/*  - ERROR failure                                                          */
/*                                                                           */ 
/*  Notes:                                                                   */
/*  - If channel is busy call waits for channel to be available.             */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_mem_transfer(u16 ch, u16 *src_addr, u16 src_space, 
                             u16 *dst_addr, u16 dst_space, u16 cnt, BOOL sync);

/*****************************************************************************/
/*  s16 cio_open(const char *path, unsigned flags, s16 mode)                 */
/*                                                                           */ 
/*  This routine opens the I/O channel to the host.                          */
/*                                                                           */
/*  Parameters:                                                              */
/*  - None.                                                                  */
/*                                                                           */
/*  Return:                                                                  */
/*  - a stream number on success or 0 on failure                             */
/*                                                                           */
/*  Notes:                                                                   */
/*  - only one open stream is supported                                      */
/*                                                                           */ 
/*****************************************************************************/
s16 cio_open();

/*****************************************************************************/
/*  s16 cio_read(s16 fildes, char *bufptr, unsigned cnt)                     */
/*                                                                           */ 
/*  This routine reads 'cnt' bytes of data from the host.                    */
/*                                                                           */
/*  Parameters:                                                              */
/*  - fildes parameter is the file descriptor returned from a successful     */
/*      open call                                                            */
/*  - bufptr parameter is the location of the buffer where read data         */
/*      is placed.                                                           */
/*  - cnt parameter is the number of characters to be read from the host.    */
/*                                                                           */
/*  Return:                                                                  */
/*  - the number of characters read or -1 on failure                         */
/*                                                                           */
/*  Notes:                                                                   */
/*****************************************************************************/
s16 cio_read(int fildes, char *bufptr, unsigned int cnt);

/*****************************************************************************/
/*  s16 cio_write(s16 fildes, char *bufptr, unsigned cnt)                    */
/*                                                                           */ 
/*  This routine writes 'cnt' bytes of data to the host.                     */
/*                                                                           */
/*  Parameters:                                                              */
/*  - fildes parameter is the file descriptor returned from a successful     */
/*      open call                                                            */
/*  - bufptr parameter is the location of the buffer where data is read from */
/*                                                                           */
/*  - cnt parameter is the number of characters to write to the host.        */
/*                                                                           */
/*  Return:                                                                  */
/*  - the number of characters written or -1 on failure                      */
/*                                                                           */
/*  Notes:                                                                   */
/*****************************************************************************/
s16 cio_write(int fildes, char *bufptr, unsigned int cnt);

/*****************************************************************************/
/*  s16 cio_close(s16 fildes)                                                */
/*                                                                           */ 
/*  This routine closes the FIFO device.                                     */
/*                                                                           */
/*  Parameters:                                                              */
/*  - fildes parameter is the file descriptor returned from a successful     */
/*      open call                                                            */
/*                                                                           */
/*  Return:                                                                  */
/*  - returns 0 on success or -1 on failure                                  */
/*                                                                           */
/*  Notes:                                                                   */
/*  - this function will utilize the pci_fifo_close routine                  */
/*                                                                           */ 
/*****************************************************************************/
s16 cio_close(int fildes);

#endif /* end of #ifndef _BOARD_H */

⌨️ 快捷键说明

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