![]() |
![]() |
This file contains the OSAL API of the Enet driver. More...
#include <stdint.h>
#include <stdbool.h>
Data Structures | |
struct | EnetOsal_Cfg_s |
Enet driver OSAL function pointers. 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, 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 struct EnetOsal_Cfg_s | EnetOsal_Cfg |
Enet driver OSAL function pointers. | |
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, 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... | |
This file contains the OSAL API of the Enet driver.
typedef void(* EnetOsal_CacheInv)(const void *addr, int32_t size) |
Enet OSAL cache invalidate function prototype.
addr | Start address of the cache line/s |
size | Size (in bytes) of the memory to invalidate |
typedef void(* EnetOsal_CacheWb)(const void *addr, int32_t size) |
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 |
typedef void(* EnetOsal_CacheWbInv)(const void *addr, int32_t size) |
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 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 | Pointer to mutex object returned during create |
typedef uintptr_t(* EnetOsal_DisableAllIntr)(void) |
Enet OSAL intr disable function prototype.
typedef void(* EnetOsal_DisableIntr)(uint32_t coreIntrNum) |
Enet OSAL intr disable function prototype.
coreIntrNum | Interrupt to disable |
typedef bool(* EnetOsal_IsCacheCoherent)(void) |
Enet OSAL cache coherency check function prototype.
typedef void(* EnetOsal_Isr)(uintptr_t arg) |
Enet OSAL ISR callback function prototype.
arg | App data |
typedef void(* EnetOsal_LockMutex)(void *hMutex) |
Enet OSAL mutex lock function prototype.
hMutex | Pointer to mutex object returned during create |
typedef void*(* EnetOsal_RegisterIntr)(EnetOsal_Isr isrFxn, uint32_t coreIntrNum, uint32_t intrPriority, void *arg) |
Enet OSAL ISR register function prototype.
isrFxn | ISR callback fxn pointer |
coreIntrNum | Core interrupt number to register |
intrPriority | Priority |
arg | Arg that will be passed back in the ISR |
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_UnlockMutex)(void *hMutex) |
Enet OSAL mutex lock function prototype.
hMutex | Pointer to mutex object returned during create |
typedef void(* EnetOsal_UnregisterIntr)(void *hHwi) |
Enet OSAL ISR unregister function prototype.
hHwi | Hwi 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 |
void* EnetOsal_createMutex | ( | void | ) |
Create a mutex.
void EnetOsal_deinit | ( | void | ) |
Deinitialize OSAL.
Deinitializes the Enet driver OSAL by clearing the configuration previously set when calling EnetOsal_init().
void EnetOsal_deleteMutex | ( | void * | hMutex | ) |
Delete a mutex.
hMutex | Mutex handle pointer |
uintptr_t EnetOsal_disableAllIntr | ( | void | ) |
Enet OSAL intr disable function prototype.
void EnetOsal_disableIntr | ( | uint32_t | coreIntrNum | ) |
Disable interrupt.
coreIntrNum | Interrupt number |
void EnetOsal_enableIntr | ( | uint32_t | coreIntrNum | ) |
Enable interrupt.
coreIntrNum | Interrupt number |
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_lockMutex | ( | void * | hMutex | ) |
Lock a mutex.
hMutex | Mutex handle pointer |
void* EnetOsal_registerIntr | ( | EnetOsal_Isr | isrFxn, |
uint32_t | coreIntrNum, | ||
uint32_t | intrPriority, | ||
void * | arg | ||
) |
Register an ISR for an interrupt.
isrFxn | Interrupt service routine |
coreIntrNum | Interrupt number |
intrPriority | Interrupt priority |
arg | Argument to ISR function |
void EnetOsal_restoreAllIntr | ( | uintptr_t | cookie | ) |
Enet OSAL intr restore function prototype.
cookie | This is returned in disable interrupt function |
void EnetOsal_unlockMutex | ( | void * | hMutex | ) |
Unlock a mutex.
hMutex | Mutex handle pointer |
void EnetOsal_unregisterIntr | ( | void * | hHwi | ) |
Unregister an interrupt.
hHwi | Interrupt handle pointer |