![]()  | 
  
    PDK API Guide for J721E
    
   | 
 
This file contains the OSAL API of the Enet driver.
Go to the source code of this file.
Data Structures | |
| struct | EnetOsal_Cfg | 
| Enet OSAL configuration paramters.  More... | |
Typedefs | |
| typedef uintptr_t(* | EnetOsal_DisableAllIntr) (void) | 
| Enet OSAL intr disable function prototype.  More... | |
| typedef void(* | EnetOsal_RestoreAllIntr) (uintptr_t cookie) | 
| Enet OSAL intr restore function prototype.  More... | |
| typedef void(* | EnetOsal_RestoreIntr) (uint32_t coreIntrNum) | 
| Enet OSAL intr restore function prototype.  More... | |
| typedef void(* | EnetOsal_DisableIntr) (uint32_t coreIntrNum) | 
| Enet OSAL intr disable function prototype.  More... | |
| typedef void(* | EnetOsal_Isr) (uintptr_t arg) | 
| Enet OSAL ISR callback function prototype.  More... | |
| typedef void *(* | EnetOsal_RegisterIntr) (EnetOsal_Isr isrFxn, uint32_t coreIntrNum, uint32_t intrPriority, uint32_t triggerType, void *arg) | 
| Enet OSAL ISR register function prototype.  More... | |
| typedef void(* | EnetOsal_UnregisterIntr) (void *hHwi) | 
| Enet OSAL ISR unregister function prototype.  More... | |
| typedef void *(* | EnetOsal_CreateMutex) (void) | 
| Enet OSAL mutex create function prototype to protect critical section.  More... | |
| typedef void(* | EnetOsal_DeleteMutex) (void *hMutex) | 
| Enet OSAL mutex delete function prototype.  More... | |
| typedef void(* | EnetOsal_LockMutex) (void *hMutex) | 
| Enet OSAL mutex lock function prototype.  More... | |
| typedef void(* | EnetOsal_UnlockMutex) (void *hMutex) | 
| Enet OSAL mutex lock function prototype.  More... | |
| typedef bool(* | EnetOsal_IsCacheCoherent) (void) | 
| Enet OSAL cache coherency check function prototype.  More... | |
| typedef void(* | EnetOsal_CacheInv) (const void *addr, int32_t size) | 
| Enet OSAL cache invalidate function prototype.  More... | |
| typedef void(* | EnetOsal_CacheWb) (const void *addr, int32_t size) | 
| Enet OSAL cache writeback function prototype.  More... | |
| typedef void(* | EnetOsal_CacheWbInv) (const void *addr, int32_t size) | 
| Enet OSAL cache writeback invalidate function prototype.  More... | |
| typedef uint32_t(* | EnetOsal_TimerRead) (void) | 
| Enet OSAL timer read function prototype.  More... | |
| typedef void(* | EnetOsal_Delay) (uint64_t delayInNsecs) | 
| Enet OSAL delay in nanosecond function prototype.  More... | |
Functions | |
| void | EnetOsal_init (const EnetOsal_Cfg *cfg) | 
| Initialize OSAL with provided configuration.  More... | |
| void | EnetOsal_deinit (void) | 
| Deinitialize OSAL.  More... | |
| uintptr_t | EnetOsal_disableAllIntr (void) | 
| Enet OSAL intr disable function prototype.  More... | |
| void | EnetOsal_restoreAllIntr (uintptr_t cookie) | 
| Enet OSAL intr restore function prototype.  More... | |
| void * | EnetOsal_registerIntr (EnetOsal_Isr isrFxn, uint32_t coreIntrNum, uint32_t intrPriority, uint32_t intrTrigType, void *arg) | 
| Register an ISR for an interrupt.  More... | |
| void | EnetOsal_unregisterIntr (void *hHwi) | 
| Unregister an interrupt.  More... | |
| void | EnetOsal_enableIntr (uint32_t coreIntrNum) | 
| Enable interrupt.  More... | |
| void | EnetOsal_disableIntr (uint32_t coreIntrNum) | 
| Disable interrupt.  More... | |
| void * | EnetOsal_createMutex (void) | 
| Create a mutex.  More... | |
| void | EnetOsal_deleteMutex (void *hMutex) | 
| Delete a mutex.  More... | |
| void | EnetOsal_lockMutex (void *hMutex) | 
| Lock a mutex.  More... | |
| void | EnetOsal_unlockMutex (void *hMutex) | 
| Unlock a mutex.  More... | |
| void | EnetOsal_cacheInv (const void *addr, int32_t size) | 
| Invalidate cache.  More... | |
| void | EnetOsal_cacheWb (const void *addr, int32_t size) | 
| Write-back cache.  More... | |
| void | EnetOsal_cacheWbInv (const void *addr, int32_t size) | 
| Write-back and invalidate cache.  More... | |
| uint32_t | EnetOsal_timerGetDiff (uint32_t startTime) | 
| Get the time difference with respect to timestamp.  More... | |
| uint32_t | EnetOsal_timerRead (void) | 
| Read current timer value.  More... | |
| void | EnetOsal_delay (uint32_t delayInNsecs) | 
| Delay function.  More... | |
| typedef uintptr_t(* EnetOsal_DisableAllIntr) (void) | 
Enet OSAL intr disable function prototype.
| typedef void(* EnetOsal_RestoreAllIntr) (uintptr_t cookie) | 
Enet OSAL intr restore function prototype.
| cookie | This is returned in disable interrupt function | 
| typedef void(* EnetOsal_RestoreIntr) (uint32_t coreIntrNum) | 
Enet OSAL intr restore function prototype.
| coreIntrNum | Interrupt to restore | 
| typedef void(* EnetOsal_DisableIntr) (uint32_t coreIntrNum) | 
Enet OSAL intr disable function prototype.
| coreIntrNum | Interrupt to disable | 
| typedef void(* EnetOsal_Isr) (uintptr_t arg) | 
Enet OSAL ISR callback function prototype.
| arg | App data | 
| typedef void*(* EnetOsal_RegisterIntr) (EnetOsal_Isr isrFxn, uint32_t coreIntrNum, uint32_t intrPriority, uint32_t triggerType, void *arg) | 
Enet OSAL ISR register function prototype.
| isrFxn | ISR callback fxn pointer | 
| coreIntrNum | Core interrupt number to register | 
| intrPriority | Priority | 
| triggerType | interrupt trigger type for ARM corepac as OSAL_armGicTrigType_t | 
| arg | Arg that will be passed back in the ISR | 
| typedef void(* EnetOsal_UnregisterIntr) (void *hHwi) | 
Enet OSAL ISR unregister function prototype.
| hHwi | Hwi handle | 
| typedef void*(* EnetOsal_CreateMutex) (void) | 
Enet OSAL mutex create function prototype to protect critical section.
| typedef void(* EnetOsal_DeleteMutex) (void *hMutex) | 
Enet OSAL mutex delete function prototype.
| hMutex | Mutex handle returned during create | 
| typedef void(* EnetOsal_LockMutex) (void *hMutex) | 
Enet OSAL mutex lock function prototype.
| hMutex | Mutex handle returned during create | 
| typedef void(* EnetOsal_UnlockMutex) (void *hMutex) | 
Enet OSAL mutex lock function prototype.
| hMutex | Mutex handle returned during create | 
| typedef bool(* EnetOsal_IsCacheCoherent) (void) | 
Enet OSAL cache coherency check function prototype.
Enet OSAL cache invalidate function prototype.
| addr | Start address of the cache line/s | 
| size | Size (in bytes) of the memory to invalidate | 
Enet OSAL cache writeback function prototype.
| addr | Start address of the cache line/s | 
| size | Size (in bytes) of the memory to be written back | 
Enet OSAL cache writeback invalidate function prototype.
| addr | Start address of the cache line/s | 
| size | Size (in bytes) of the memory to be written back | 
| typedef uint32_t(* EnetOsal_TimerRead) (void) | 
Enet OSAL timer read function prototype.
| typedef void(* EnetOsal_Delay) (uint64_t delayInNsecs) | 
Enet OSAL delay in nanosecond function prototype.
| delayInNsecs | delay value in nanosecond | 
| void EnetOsal_init | ( | const EnetOsal_Cfg * | cfg | ) | 
Initialize OSAL with provided configuration.
Initializes the Enet driver OSAL with the provided configuration. It's expected that all function pointers in the configuration are not NULL.
| cfg | Configuration parameters | 
| void EnetOsal_deinit | ( | void | ) | 
Deinitialize OSAL.
Deinitializes the Enet driver OSAL by clearing the configuration previously set when calling EnetOsal_init().
| uintptr_t EnetOsal_disableAllIntr | ( | void | ) | 
Enet OSAL intr disable function prototype.
| void EnetOsal_restoreAllIntr | ( | uintptr_t | cookie | ) | 
Enet OSAL intr restore function prototype.
| cookie | This is returned in disable interrupt function | 
| void* EnetOsal_registerIntr | ( | EnetOsal_Isr | isrFxn, | 
| uint32_t | coreIntrNum, | ||
| uint32_t | intrPriority, | ||
| uint32_t | intrTrigType, | ||
| void * | arg | ||
| ) | 
Register an ISR for an interrupt.
| isrFxn | Interrupt service routine | 
| coreIntrNum | Interrupt number | 
| intrPriority | Interrupt priority | 
| intrTrigType | Interrupt trigger type | 
| arg | Argument to ISR function | 
| void EnetOsal_unregisterIntr | ( | void * | hHwi | ) | 
Unregister an interrupt.
| hHwi | Interrupt handle pointer | 
| void EnetOsal_enableIntr | ( | uint32_t | coreIntrNum | ) | 
Enable interrupt.
| coreIntrNum | Interrupt number | 
| void EnetOsal_disableIntr | ( | uint32_t | coreIntrNum | ) | 
Disable interrupt.
| coreIntrNum | Interrupt number | 
| void* EnetOsal_createMutex | ( | void | ) | 
Create a mutex.
| void EnetOsal_deleteMutex | ( | void * | hMutex | ) | 
Delete a mutex.
| hMutex | Mutex handle | 
| void EnetOsal_lockMutex | ( | void * | hMutex | ) | 
Lock a mutex.
| hMutex | Mutex handle | 
| void EnetOsal_unlockMutex | ( | void * | hMutex | ) | 
Unlock a mutex.
| hMutex | Mutex handle | 
| void EnetOsal_cacheInv | ( | const void * | addr, | 
| int32_t | size | ||
| ) | 
Invalidate cache.
Invalidates cache in a range of memory.
| addr | Start address of the cache line(s) | 
| size | Size (in bytes) of the memory to invalidate | 
| void EnetOsal_cacheWb | ( | const void * | addr, | 
| int32_t | size | ||
| ) | 
Write-back cache.
Writes back cache a range of memory from cache.
| addr | Start address of the cache line(s) | 
| size | Size (in bytes) of the memory to be written back | 
| void EnetOsal_cacheWbInv | ( | const void * | addr, | 
| int32_t | size | ||
| ) | 
Write-back and invalidate cache.
Writes back and invalidates a range of memory.
| addr | Start address of the cache line/s | 
| size | Size (in bytes) of the memory to be written back | 
| uint32_t EnetOsal_timerGetDiff | ( | uint32_t | startTime | ) | 
Get the time difference with respect to timestamp.
Gets the difference between time value passed to this function and current time from timer.
| uint32_t EnetOsal_timerRead | ( | void | ) | 
Read current timer value.
| void EnetOsal_delay | ( | uint32_t | delayInNsecs | ) | 
Delay function.
| delayInNsecs | Delay value in nanosecond |