MentOS  0.8.0
The Mentoring Operating System
Functions
mm_io.c File Reference

Memory Mapped IO functions implementation. More...

Functions

uint8_t in_memb (uint32_t addr)
 Reads a 8-bit value from the given address. More...
 
uint16_t in_mems (uint32_t addr)
 Reads a 16-bit value from the given address. More...
 
uint32_t in_meml (uint32_t addr)
 Reads a 32-bit value from the given address. More...
 
void out_memb (uint32_t addr, uint8_t value)
 Writes a 8-bit value at the given address. More...
 
void out_mems (uint32_t addr, uint16_t value)
 Writes a 16-bit value at the given address. More...
 
void out_meml (uint32_t addr, uint32_t value)
 Writes a 32-bit value at the given address. More...
 

Detailed Description

Memory Mapped IO functions implementation.

Function Documentation

◆ in_memb()

uint8_t in_memb ( uint32_t  addr)
inline

Reads a 8-bit value from the given address.

Parameters
addrthe address we want to read from.
Returns
the value we read.

◆ in_meml()

uint32_t in_meml ( uint32_t  addr)
inline

Reads a 32-bit value from the given address.

Parameters
addrthe address we want to read from.
Returns
the value we read.

◆ in_mems()

uint16_t in_mems ( uint32_t  addr)
inline

Reads a 16-bit value from the given address.

Parameters
addrthe address we want to read from.
Returns
the value we read.

◆ out_memb()

void out_memb ( uint32_t  addr,
uint8_t  value 
)
inline

Writes a 8-bit value at the given address.

Parameters
addrthe address we want to write to.
valuethe value we want to write.

◆ out_meml()

void out_meml ( uint32_t  addr,
uint32_t  value 
)
inline

Writes a 32-bit value at the given address.

Parameters
addrthe address we want to write to.
valuethe value we want to write.

◆ out_mems()

void out_mems ( uint32_t  addr,
uint16_t  value 
)
inline

Writes a 16-bit value at the given address.

Parameters
addrthe address we want to write to.
valuethe value we want to write.