RTEMS: Dual Ported Memory

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Functions
Dual Ported Memory
API » Classic

## 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.
rtems_status_code | rtems_port_ident (rtems_name name, rtems_id *id)
| RTEMS Port Name to Id.
rtems_status_code | rtems_port_delete (rtems_id id)
| RTEMS Delete Port.
rtems_status_code | rtems_port_external_to_internal (rtems_id id, void *external, void **internal)
| RTEMS Port External to Internal.
rtems_status_code | rtems_port_internal_to_external (rtems_id id, void *internal, void **external)
| RTEMS Port Internal to External.

## 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] | name | is the user defined port name
  [in] | internal_start | is the internal start address of port
  [in] | external_start | is the external start address of port
  [in] | length | is the physical length in bytes
  [out] | id | is the address of port id to set

Return values

  This | method 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] | id | is the dual-ported memory area id

Return values

  This | method 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] | id | is the id of dp memory object
  [in] | external | is the external address
  [out] | internal | is 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] | name | is the user defined port name
  [out] | id | is the pointer to port id

Return values

  RTEMS_SUCCESSFUL | if 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] | id | is the id of dual-ported memory object
  [in] | internal | is the internal address to set
  [in] | external | is the pointer to external address

Return values

  RTEMS_SUCCESSFUL | and the external will be filled in with the external addresses