RTEMS  5.0.0
Files | Functions
Dual Ported Memory

Files

file  dpmem.h
 Classic Dual Ported Memory Manager API.
 
file  dpmem.c
 Classic Dual Ported Memory Information with Zero Objects.
 
file  dpmemcreate.c
 RTEMS Create Port.
 
file  dpmemdelete.c
 RTEMS Delete Port.
 
file  dpmemexternal2internal.c
 RTEMS Port External to Internal.
 
file  dpmemident.c
 RTEMS Port Name to Id.
 
file  dpmeminternal2external.c
 RTEMS Port Internal to External.
 

Functions

rtems_status_code rtems_port_create (rtems_name name, void *internal_start, void *external_start, uint32_t length, rtems_id *id)
 Creates a port into a dual-ported memory area. More...
 
rtems_status_code rtems_port_ident (rtems_name name, rtems_id *id)
 RTEMS Port Name to Id. More...
 
rtems_status_code rtems_port_delete (rtems_id id)
 RTEMS Delete Port. More...
 
rtems_status_code rtems_port_external_to_internal (rtems_id id, void *external, void **internal)
 RTEMS Port External to Internal. More...
 
rtems_status_code rtems_port_internal_to_external (rtems_id id, void *internal, void **external)
 RTEMS Port Internal to External. More...
 

Detailed Description

This encapsulates functionality related to the Classic API Dual Ported Memory Manager.

Function Documentation

◆ rtems_port_create()

rtems_status_code rtems_port_create ( rtems_name  name,
void *  internal_start,
void *  external_start,
uint32_t  length,
rtems_id id 
)

Creates a port into a dual-ported memory area.

This routine implements the rtems_port_create directive. The port will have the name name. The port maps onto an area of dual ported memory of length bytes which has internal_start and external_start as the internal and external starting addresses, respectively. It returns the id of the created port in ID.

Parameters
[in]nameis the user defined port name
[in]internal_startis the internal start address of port
[in]external_startis the external start address of port
[in]lengthis the physical length in bytes
[out]idis the address of port id to set
Return values
Thismethod returns RTEMS_SUCCESSFUL if there was not an error. Otherwise, a status code is returned indicating the source of the error. If successful, the id will be filled in with the port id.

◆ rtems_port_delete()

rtems_status_code rtems_port_delete ( rtems_id  id)

RTEMS Delete Port.

This routine implements the rtems_port_delete directive. It deletes the port associated with ID.

Parameters
[in]idis the dual-ported memory area id
Return values
Thismethod returns RTEMS_SUCCESSFUL if there was not an error. Otherwise, a status code is returned indicating the source of the error.

◆ rtems_port_external_to_internal()

rtems_status_code rtems_port_external_to_internal ( rtems_id  id,
void *  external,
void **  internal 
)

RTEMS Port External to Internal.

This routine implements the rtems_port_external_to_internal directive. It returns the internal port address which maps to the provided external port address for the specified port ID. If the given external address is an invalid dual-ported address, then the internal address is set to the given external address.

Parameters
[in]idis the id of dp memory object
[in]externalis the external address
[out]internalis the pointer of internal address to set
Return values
RTEMS_SUCCESSFUL

◆ rtems_port_ident()

rtems_status_code rtems_port_ident ( rtems_name  name,
rtems_id id 
)

RTEMS Port Name to Id.

This routine implements the rtems_port_ident directive. This directive returns the port ID associated with name. If more than one port is named name, then the port to which the ID belongs is arbitrary.

Parameters
[in]nameis the user defined port name
[out]idis the pointer to port id
Return values
RTEMS_SUCCESSFULif successful or error code if unsuccessful

◆ rtems_port_internal_to_external()

rtems_status_code rtems_port_internal_to_external ( rtems_id  id,
void *  internal,
void **  external 
)

RTEMS Port Internal to External.

This routine implements the Port_internal_to_external directive. It returns the external port address which maps to the provided internal port address for the specified port ID. If the given internal address is an invalid dual-ported address, then the external address is set to the given internal address.

Parameters
[in]idis the id of dual-ported memory object
[in]internalis the internal address to set
[in]externalis the pointer to external address
Return values
RTEMS_SUCCESSFULand the external will be filled in with the external addresses