source: rtems/c/src/libchip/shmdr/cnvpkt.c @ 509fec9c

4.104.114.84.95
Last change on this file since 509fec9c was 509fec9c, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/31/04 at 11:18:37

2004-03-31 Ralf Corsepius <ralf_corsepius@…>

  • libchip/ide/ata.c, libchip/network/dec21140.c, libchip/network/elnk.c, libchip/network/i82586.c, libchip/network/if_fxp.c, libchip/network/if_fxpvar.h, libchip/network/open_eth.c, libchip/network/sonic.c, libchip/rtc/icm7170.c, libchip/serial/ns16550.c, libchip/serial/z85c30.c, libchip/shmdr/cnvpkt.c, libchip/shmdr/init.c, libchip/shmdr/intr.c, libchip/shmdr/shm_driver.h: Cosmetics.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*  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.rtems.com/license/LICENSE.
22 *
23 *  $Id$
24 */
25
26#include <rtems.h>
27#include "shm_driver.h"
28
29void Shm_Convert_packet(
30  rtems_packet_prefix *packet
31)
32{
33  uint32_t   *pkt, i;
34
35  pkt = (uint32_t*) 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}
Note: See TracBrowser for help on using the repository browser.