]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcsdk-tools.git/blobdiff - writer/nor/src/norwriter.c
Added EMAC loopback support and updated projects to use resource manager
[keystone-rtos/mcsdk-tools.git] / writer / nor / src / norwriter.c
index c27e2289bf6f461ad577050f9eda1ea87a223b5f..c8847eef1bdb162e8b537a47bd6ded23d79e399d 100644 (file)
@@ -44,7 +44,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "platform.h"
-#include "../include/types.h"
+#include "types.h"
+#include "ti/csl/csl_semAux.h"
 
 /* NOR writer utility version */
 char version[] = "01.00.00.02";
@@ -97,6 +98,28 @@ void Osal_platformFree (uint8_t *dataPtr, uint32_t num_bytes)
     }
 }
 
+void Osal_platformSpiCsEnter(void)
+{
+    /* Get the hardware semaphore.
+     *
+     * Acquire Multi core CPPI synchronization lock
+     */
+    while ((CSL_semAcquireDirect (3)) == 0);
+
+    return;
+}
+
+void Osal_platformSpiCsExit (void)
+{
+    /* Release the hardware semaphore
+     *
+     * Release multi-core lock.
+     */
+    CSL_semReleaseSemaphore (3);
+
+    return;
+}
+
 /******************************************************************************
  * Function:    print_platform_errno
  ******************************************************************************/