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

📄 board.h

📁 Real-Time Digital Signal Processing Implementations, Applications, and Experiments with the TMS320C
💻 H
📖 第 1 页 / 共 2 页
字号:
/*  Return:                                                                  */
/*  - BRD_OK on success                                                      */
/*  - BRD_ERROR on failure                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_led_disable(BrdLed led);

/*****************************************************************************/
/*  s16 brd_toggle_led(BrdLed led)                                           */
/*                                                                           */ 
/*  This routine toggles the specified user-defined LED.                     */
/*                                                                           */
/*  Parameters:                                                              */
/*      - led - specific led                                                 */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - BRD_OK on success                                                      */
/*  - BRD_ERROR on failure                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_led_toggle(BrdLed led);

/*****************************************************************************/
/*  s16 brd_sem_get(BrdSem sem)                                              */
/*                                                                           */ 
/*  This routine tries to obtain the specified user semaphore.               */
/*                                                                           */
/*                                                                           */
/*  Parameters:                                                              */
/*      - sem - desired semaphore                                            */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - BRD_OK on success                                                      */
/*  - BRD_ERROR on failure                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_sem_get(BrdSem sem);

/*****************************************************************************/
/*  s16 brd_sem_wait(BrdSem sem)                                             */
/*                                                                           */ 
/*  This routine tries to obtain the specified user semaphore. It blocks till*/
/*  the semaphore is obtained.                                               */
/*                                                                           */
/*  Parameters:                                                              */
/*      - sem - desired semaphore                                            */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - BRD_OK on success                                                      */
/*  - BRD_ERROR on failure                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_sem_wait(BrdSem sem);

/*****************************************************************************/
/*  s16 brd_sem_release(BrdSem sem)                                          */
/*                                                                           */ 
/*  This routine releases the previously obtained semaphore.                 */
/*                                                                           */
/*  Parameters:                                                              */
/*      - sem - semaphore to release                                         */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - BRD_OK on success                                                      */
/*  - BRD_ERROR on failure                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
s16 brd_sem_release(BrdSem sem);

/*****************************************************************************/
/*  void brd_fifo_reset(void)                                                */
/*                                                                           */
/*  This routine initializes the FIFO data structure.                        */
/*                                                                           */
/*  Parameters:                                                              */
/*  - none                                                                   */
/*                                                                           */
/*  Return:                                                                  */
/*  - none                                                                   */
/*                                                                           */
/*  Notes:                                                                   */
/*                                                                           */
/*****************************************************************************/
void brd_fifo_reset(void);

/*****************************************************************************/
/*  s16 brd_fifo_read (char *bufptr, u16 cnt)		            		     */
/*                                                                           */
/*  This routine begins a synchronous read from the fifo channel.            */
/*                                                                           */
/*  Parameters:                                                              */
/*  - bufptr is the location of the data to be read from the FIFO.           */
/*  - cnt is the number of bytes of data to be read from the FIFO.           */
/*                                                                           */
/*  Return:                                                                  */
/*  - returns BRD_OK or BRD_ERROR,										     */
/*      possible error conditions include: another send in progress,         */
/*      chan not open, no DMA chan available                                 */
/*                                                                           */
/*  Notes:                                                                   */
/*                                                                           */
/*****************************************************************************/
s16 brd_fifo_read(char *bufptr, u16 cnt);

/*****************************************************************************/
/*  s16 brd_fifo_write (char *bufptr, u16 cnt) 					             */
/*                                                                           */
/*  This routine begins a synchronous read from the fifo channel.            */
/*                                                                           */
/*  Parameters:                                                              */
/*  - bufptr is the location of the data to be written to the FIFO.          */
/*  - cnt is the number of bytes of data to be written to the FIFO.          */
/*                                                                           */
/*  Return:                                                                  */
/*  - returns BRD_OK or BRD_ERROR,											 */
/*                                                                           */
/*  Notes:                                                                   */
/*                                                                           */
/*****************************************************************************/
s16 brd_fifo_write(char *bufptr, u16 cnt);

/*****************************************************************************/
/*  void brd_busy_delay(u16 delay)                                           */
/*                                                                           */ 
/*  This routine delays execution by specified delay       .                 */
/*                                                                           */
/*  Parameters:                                                              */
/*      - delay - delay in multiples of 64K loop count                       */
/*                                                                           */ 
/*  Return:                                                                  */
/*  - None                                                                   */
/*                                                                           */ 
/*  Notes:                                                                   */
/*                                                                           */ 
/*****************************************************************************/
void brd_busy_delay(u16 delay);

/*****************************************************************************/
/*  void brd_set_cpu_freq(u16 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 160 MHz.                                           */ 
/*                                                                           */
/*****************************************************************************/
void brd_set_cpu_freq(u16 freq);

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

/*****************************************************************************/
/*  void brd_emif_init()                                                     */
/*                                                                           */
/*  This routine initializes the EMIF registers                              */
/*                                                                           */
/*  Parameters:                                                              */
/*  - none                                                                   */
/*                                                                           */
/*  Return:                                                                  */
/*  - None                                                                   */
/*                                                                           */
/*  Notes:  CE2 space, where the daughter board reside, is not configured    */
/*          so users will need to setup this space when a daughter board is  */
/*          present.                                                         */
/*****************************************************************************/
void brd_emif_init();

#endif //end of #ifndef _BOARD_H

⌨️ 快捷键说明

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