1 . 定义
CyU3PMutex SharedMutex; // Used to control access to a shared resource
2 . 初始化
Status = CyU3PMutexCreate(&SharedMutex, CYU3P_INHERIT);
//Whether priority inheritance should be allowed for this mutex. Allowed values for this parameter
//are CYU3P_NO_INHERIT and CYU3P_INHERIT.
3 . 使用
CyU3PReturnStatus_t Status;
Status = CyU3PMutexGet(&SharedMutex, CYU3P_WAIT_FOREVER); //获取
Status = CyU3PMutexPut(&SharedMutex);//释放