OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [shmdr/] [cnvpkt.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  void Shm_Convert_packet( &packet )
2
 *
3
 *  This routine is the shared memory locked queue MPCI driver routine
4
 *  used to convert the RTEMS's information in a packet from non-native
5
 *  format to processor native format.
6
 *
7
 *  Input parameters:
8
 *    packet  - pointer to a packet
9
 *
10
 *  Output parameters:
11
 *    *packet - packet in native format
12
 *
13
 *  NOTE: Message buffers are not manipulated.
14
 *        Endian conversion is currently the only conversion.
15
 *
16
 *  COPYRIGHT (c) 1989-1999.
17
 *  On-Line Applications Research Corporation (OAR).
18
 *
19
 *  The license and distribution terms for this file may be
20
 *  found in the file LICENSE in this distribution or at
21
 *  http://www.OARcorp.com/rtems/license.html.
22
 *
23
 *  cnvpkt.c,v 1.8 1999/11/30 19:57:58 joel Exp
24
 */
25
 
26
#include <rtems.h>
27
#include "shm_driver.h"
28
 
29
void Shm_Convert_packet(
30
  rtems_packet_prefix *packet
31
)
32
{
33
  rtems_unsigned32 *pkt, i;
34
 
35
  pkt = (rtems_unsigned32 *) packet;
36
  for ( i=RTEMS_MINIMUN_HETERO_CONVERSION ; i ; i--, pkt++ )
37
    *pkt = CPU_swap_u32( *pkt );
38
 
39
  for ( i=packet->to_convert ; i ; i--, pkt++ )
40
    *pkt = CPU_swap_u32( *pkt );
41
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.