// ******************** risc_dsp_sync.h *************************************** // Risc-Dsp runtime library // // This file contains initialization of primitives. Synchronization primitives for // dsp - semaphore (16 semaphores, access by index) and lock by XBUF. // Works only in XBUF synchronous mode. Don`t use X31 register! // // (c) multicore.ru // // ******************************************************************* #ifndef _RISC_DSP_SYNC_H_ #define _RISC_DSP_SYNC_H_ #ifdef __cplusplus extern "C" { #endif #define LEN_SEM 16 // Function: risc_dsp_create_xbuflock // // Initialize XBUF lock by setting XBUF in synchronous mode // and writing to X31 // void risc_dsp_create_xbuflock(); // Function: risc_dsp_sem_init // // Initialize semaphore for dsp. Uses xbuflock! // // Parameters: // num - pointer to semaphore (extern from dsp) // val - initial value of semaphore // // See also: // // risc_dsp_create_xbuflock // void risc_dsp_sem_init(int num, int val); #ifdef __cplusplus } #endif #endif // _RISC_DSP_SYNC_H_