FreeNOS
Public Member Functions
ARMIO Class Reference

Input/Output operations specific to the ARM architecture. More...

#include <ARMIO.h>

Inheritance diagram for ARMIO:
IO

Public Member Functions

void write (u32 reg, u32 data)
 write to memory mapped I/O register More...
 
u32 read (u32 reg) const
 read from memory mapped I/O register More...
 
void read (Address addr, Size count, void *buf) const
 Read a number of 32-bit values. More...
 
void write (Address addr, Size count, const void *buf)
 Write a number of 32-bit values. More...
 
void set (Address addr, u32 data)
 Set bits in memory mapped register. More...
 
void unset (Address addr, u32 data)
 Unset bits in memory mapped register. More...
 
- Public Member Functions inherited from IO
 IO ()
 Constructor. More...
 
Address getBase () const
 Get memory I/O base offset. More...
 
void setBase (const Address base)
 Set memory I/O base offset. More...
 
Result map (Address phys, Size size=4096, Memory::Access access=Memory::Readable|Memory::Writable|Memory::User)
 Map I/O address space. More...
 
Result unmap ()
 Unmap I/O address space. More...
 

Additional Inherited Members

- Public Types inherited from IO
enum  Result { Success, MapFailure, OutOfMemory }
 Result codes. More...
 
- Protected Attributes inherited from IO
Address m_base
 memory I/O base offset is added to each I/O address. More...
 
Memory::Range m_range
 Memory range for performing I/O mappings. More...
 

Detailed Description

Input/Output operations specific to the ARM architecture.

Definition at line 39 of file ARMIO.h.

Member Function Documentation

◆ read() [1/2]

void ARMIO::read ( Address  addr,
Size  count,
void *  buf 
) const
inline

Read a number of 32-bit values.

Parameters
addrAddress of the starting 32-bit value.
countNumber of bytes to read.
bufOutput buffer.

Definition at line 80 of file ARMIO.h.

References read().

◆ read() [2/2]

u32 ARMIO::read ( u32  reg) const
inline

◆ set()

void ARMIO::set ( Address  addr,
u32  data 
)
inline

Set bits in memory mapped register.

Parameters
addrAddress of the register to write.
data32-bit value containing the bits to set (bitwise or).

Definition at line 109 of file ARMIO.h.

References read(), and write().

Referenced by SunxiCpuConfig::boot(), SunxiClockControl::deassert(), ARMGenericInterrupt::disable(), SunxiClockControl::enable(), ARMGenericInterrupt::enable(), Sun8iEmac::reset(), BroadcomGPIO::setAltFunction(), Broadcom2836::setCoreTimerIrq(), and Sun8iEmac::startDMA().

◆ unset()

void ARMIO::unset ( Address  addr,
u32  data 
)
inline

Unset bits in memory mapped register.

Parameters
addrAddress of the register to write.
data32-bit value containing the bits to set (bitwise or).

Definition at line 122 of file ARMIO.h.

References read(), and write().

Referenced by SunxiCpuConfig::boot(), SunxiPowerManagement::powerOnCore(), and Broadcom2836::setCoreTimerIrq().

◆ write() [1/2]

void ARMIO::write ( Address  addr,
Size  count,
const void *  buf 
)
inline

Write a number of 32-bit values.

Parameters
addrAddress of the starting 32-bit value.
countNumber of bytes to write.
bufInput buffer.

Definition at line 95 of file ARMIO.h.

References write().

◆ write() [2/2]

void ARMIO::write ( u32  reg,
u32  data 
)
inline

The documentation for this class was generated from the following file: