SDL API Guide for J7200

Introduction

Functions

int32_t SDL_OSAL_init (SDL_OSAL_Interface *osalInterface)
 OSAL init. More...
 
int32_t SDL_OSAL_enableInterrupt (int32_t intNum)
 OSAL enable interrupt. More...
 
int32_t SDL_OSAL_disableInterrupt (int32_t intNum)
 OSAL disable interrupt. More...
 
int32_t SDL_OSAL_registerInterrupt (SDL_OSAL_hwipParams *pParams, pSDL_OSAL_hwipHandle *handle)
 OSAL register interrupt. More...
 
int32_t SDL_OSAL_deregisterInterrupt (pSDL_OSAL_hwipHandle handle)
 OSAL deregister interrupt. More...
 
int32_t SDL_OSAL_globalDisableInterrupts (uintptr_t *key)
 OSAL globally disable interrupts. More...
 
int32_t SDL_OSAL_globalRestoreInterrupts (uintptr_t key)
 OSAL globally enable interrupts. More...
 
void SDL_OSAL_printf (const char *traceBuf)
 OSAL print function. More...
 
int32_t SDL_OSAL_delay (int32_t ndelay)
 OSAL delay. More...
 
void * SDL_OSAL_addrTranslate (uint64_t addr, uint32_t size)
 OSAL Address translation function. More...
 

Function Documentation

◆ SDL_OSAL_init()

int32_t SDL_OSAL_init ( SDL_OSAL_Interface osalInterface)

OSAL init.

This function initializes the OSAL interface structure with the functions provided by the application. These functions are application dependent, so it is required to be passed by the user.

Parameters
osalInterface[IN] OSAL interface structure.
Returns
The SDL error code for the API. If osalInterface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_enableInterrupt()

int32_t SDL_OSAL_enableInterrupt ( int32_t  intNum)

OSAL enable interrupt.

This function will enable the specific interrupt number passed.

Parameters
intNum[IN] Interrupt Number
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_disableInterrupt()

int32_t SDL_OSAL_disableInterrupt ( int32_t  intNum)

OSAL disable interrupt.

This function will disable the specific interrupt number passed.

Parameters
intNum[IN] Interrupt Number
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_registerInterrupt()

int32_t SDL_OSAL_registerInterrupt ( SDL_OSAL_hwipParams pParams,
pSDL_OSAL_hwipHandle handle 
)

OSAL register interrupt.

This function will register the specific interrupt number passed.

Parameters
pParams[IN] Parameters for interrupt registration
handle[OUT] Handle for this registered interrupt
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_deregisterInterrupt()

int32_t SDL_OSAL_deregisterInterrupt ( pSDL_OSAL_hwipHandle  handle)

OSAL deregister interrupt.

This function will deregister the specific interrupt number passed.

Parameters
handle[IN] Handle for the registered interrupt
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_globalDisableInterrupts()

int32_t SDL_OSAL_globalDisableInterrupts ( uintptr_t *  key)

OSAL globally disable interrupts.

This function will disable interrupts globally. Interrupts can be enabled with the globalRestoreInterrupts() function. Usually used for critical sections.

The returned key is used to restore the context once interrupts are restored.

Parameters
key[OUT] key to use when restoring interrupts
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_globalRestoreInterrupts()

int32_t SDL_OSAL_globalRestoreInterrupts ( uintptr_t  key)

OSAL globally enable interrupts.

This function will enable interrupts globally. Usually used for critical sections.

The key is used to restore the context.

Parameters
key[IN] key to use when restoring interrupts
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_printf()

void SDL_OSAL_printf ( const char *  traceBuf)

OSAL print function.

This function prints the provided string

Parameters
traceBuf[IN] String to be printed
Returns
None

◆ SDL_OSAL_delay()

int32_t SDL_OSAL_delay ( int32_t  ndelay)

OSAL delay.

This function is used assign delay in the function

Parameters
ndelay[IN] delay in microseconds
Returns
The SDL error code for the API. If function pointer in interface is NULL: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS

◆ SDL_OSAL_addrTranslate()

void* SDL_OSAL_addrTranslate ( uint64_t  addr,
uint32_t  size 
)

OSAL Address translation function.

This function is used by the SDL to get a translation for a 64-bit address to local address space. It is expected that the requested adddress will remain available at the returned address and not be removed.

Parameters
addr[IN] Memory address to be translated
size[IN] Size of the memory
Returns
The translated address or (-1) for failure.