switch to use sysInWord and friends

This commit is contained in:
Michael Davidsaver
2014-07-25 11:15:27 -04:00
parent 0bf17be9e3
commit b5fe4abfa8
3 changed files with 16 additions and 58 deletions

View File

@@ -120,8 +120,6 @@ Com_SRCS += osdMessageQueue.c
Com_SRCS += devLibVME.c
Com_SRCS += devLibVMEOSD.c
Com_SRCS_vxWorks += epicsMMIO.c
Com_SRCS_vxWorks += atReboot.cpp
# For old vxWorks applications

View File

@@ -1,40 +0,0 @@
/*************************************************************************\
* Copyright (c) 2014 Brookhaven Science Associates, as Operator of
* Brookhaven National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Author: Michael Davidsaver <mdavidsaver@bnl.gov>
*/
#ifndef __m68k__
#include "epicsMMIODef.h"
epicsUInt16 sysIn16 (volatile void*) __attribute__((weak));
epicsUInt32 sysIn32 (volatile void*) __attribute__((weak));
void sysOut16 (volatile void*, epicsUInt16) __attribute__((weak));
void sysOut32 (volatile void*, epicsUInt32) __attribute__((weak));
epicsUInt16 sysIn16 (volatile void* addr)
{
return nat_read16(addr);
}
epicsUInt32 sysIn32 (volatile void* addr)
{
return nat_read32(addr);
}
void sysOut16 (volatile void* addr, epicsUInt16 val)
{
nat_write16(addr, val);
}
void sysOut32 (volatile void* addr, epicsUInt32 val)
{
nat_write32(addr, val);
}
#endif /* m68k */

View File

@@ -57,10 +57,10 @@
extern "C" {
#endif
epicsUInt16 sysIn16 (volatile void*); /* Synchronous 16 bit read */
epicsUInt32 sysIn32 (volatile void*); /* Synchronous 32 bit read */
void sysOut16 (volatile void*, epicsUInt16); /* Synchronous 16 bit write */
void sysOut32 (volatile void*, epicsUInt32); /* Synchronous 32 bit write */
epicsUInt16 sysInWord (volatile void*); /* Synchronous 16 bit read */
epicsUInt32 sysInLong (volatile void*); /* Synchronous 32 bit read */
void sysOutWord (volatile void*, epicsUInt16); /* Synchronous 16 bit write */
void sysOutLong (volatile void*, epicsUInt32); /* Synchronous 32 bit write */
#ifdef __cplusplus
@@ -96,23 +96,23 @@ void sysOut32 (volatile void*, epicsUInt32); /* Synchronous 32 bit w
#define ioread8(address) sysInByte ((epicsUInt32)(address))
#define iowrite8(address,data) sysOutByte ((epicsUInt32)(address), (epicsUInt8)(data))
#define nat_ioread16(address) sysIn16 ((address))
#define nat_ioread32(address) sysIn32 ((address))
#define nat_ioread16(address) sysInWord ((address))
#define nat_ioread32(address) sysInLong ((address))
#define nat_iowrite16(address,data) sysOut16(address,data)
#define nat_iowrite32(address,data) sysOut32(address,data)
#define nat_iowrite16(address,data) sysOutWord(address,data)
#define nat_iowrite32(address,data) sysOutLong(address,data)
#define be_ioread16(address) be16_to_cpu (sysIn16 ((address)))
#define be_ioread32(address) be32_to_cpu (sysIn32 ((address)))
#define be_ioread16(address) be16_to_cpu (sysInWord ((address)))
#define be_ioread32(address) be32_to_cpu (sysInLong ((address)))
#define be_iowrite16(address,data) sysOut16 ((address), be16_to_cpu((epicsUInt16)(data)))
#define be_iowrite32(address,data) sysOut32 ((address), be32_to_cpu((epicsUInt32)(data)))
#define be_iowrite16(address,data) sysOutWord ((address), be16_to_cpu((epicsUInt16)(data)))
#define be_iowrite32(address,data) sysOutLong ((address), be32_to_cpu((epicsUInt32)(data)))
#define le_ioread16(address) le16_to_cpu (sysIn16 ((address)))
#define le_ioread32(address) le32_to_cpu (sysIn32 ((address)))
#define le_ioread16(address) le16_to_cpu (sysInWord ((address)))
#define le_ioread32(address) le32_to_cpu (sysInLong ((address)))
#define le_iowrite16(address,data) sysOut16 ((address), le16_to_cpu((epicsUInt16)(data)))
#define le_iowrite32(address,data) sysOut32 ((address), le32_to_cpu((epicsUInt32)(data)))
#define le_iowrite16(address,data) sysOutWord ((address), le16_to_cpu((epicsUInt16)(data)))
#define le_iowrite32(address,data) sysOutLong ((address), le32_to_cpu((epicsUInt32)(data)))
#ifndef VX_MEM_BARRIER_R
# define VX_MEM_BARRIER_R() do{}while(0)