|
FreeNOS
|
Broadcom System-on-Chip Mailbox interface. More...
#include <BroadcomMailbox.h>
Public Types | |
| enum | Result { Success, IOError } |
| Result codes. More... | |
| enum | Channel { PowerManagement = 0, FrameBuffer = 1, VirtualUART = 2, VCHIQ = 3, LED = 4, Button = 5, TouchScreen = 6, VCProperty = 8, ARMProperty = 9 } |
| Mailbox channels. More... | |
Public Member Functions | |
| BroadcomMailbox () | |
| Constructor. More... | |
| Result | initialize () |
| Initialize the Mailbox. More... | |
| Result | read (Channel channel, u32 *message) const |
| Read 28-bit message. More... | |
| Result | write (Channel channel, u32 message) |
| Write 28-bit message. More... | |
Private Types | |
| enum | Register { Read = 0x0880, Status = 0x0898, Config = 0x089c, Write = 0x08a0 } |
| Hardware registers. More... | |
| enum | StatusFlags { Full = 0x80000000, Empty = 0x40000000 } |
| Status register flags. More... | |
Private Attributes | |
| ARMIO | m_io |
| I/O object. More... | |
Static Private Attributes | |
| static const Address | Base = 0xb000 |
| Register base offset for the Mailbox. More... | |
| static const uint | ChannelMask = 0xf |
| Channel Mask when reading or writing (lowest 4-bits). More... | |
Broadcom System-on-Chip Mailbox interface.
The Mailbox on the BCM2835 is a message-based interface between the ARM and the GPU. It provides channels for sending and receiving messages.
Definition at line 47 of file BroadcomMailbox.h.
Mailbox channels.
| Enumerator | |
|---|---|
| PowerManagement | |
| FrameBuffer | |
| VirtualUART | |
| VCHIQ | |
| LED | |
| Button | |
| TouchScreen | |
| VCProperty | |
| ARMProperty | |
Definition at line 91 of file BroadcomMailbox.h.
|
private |
Hardware registers.
| Enumerator | |
|---|---|
| Read | |
| Status | |
| Config | |
| Write | |
Definition at line 60 of file BroadcomMailbox.h.
|
private |
| BroadcomMailbox::BroadcomMailbox | ( | ) |
Constructor.
Definition at line 21 of file BroadcomMailbox.cpp.
| BroadcomMailbox::Result BroadcomMailbox::initialize | ( | ) |
Initialize the Mailbox.
Definition at line 25 of file BroadcomMailbox.cpp.
References Base, Config, Memory::Device, IOError, m_io, IO::map(), PAGESIZE, Memory::Readable, IO::Success, Success, Memory::User, Memory::Writable, and ARMIO::write().
Referenced by BroadcomPower::initialize().
| BroadcomMailbox::Result BroadcomMailbox::read | ( | Channel | channel, |
| u32 * | message | ||
| ) | const |
Read 28-bit message.
| channel | |
| message | 28-bit message on output |
Definition at line 37 of file BroadcomMailbox.cpp.
References ChannelMask, Empty, m_io, Read, ARMIO::read(), Status, and Success.
Referenced by BroadcomPower::enable().
| BroadcomMailbox::Result BroadcomMailbox::write | ( | Channel | channel, |
| u32 | message | ||
| ) |
Write 28-bit message.
| channel | Channel to write to. |
| message | 28-bit message to write. |
Definition at line 54 of file BroadcomMailbox.cpp.
References Full, m_io, ARMIO::read(), Status, Success, ARMIO::write(), and Write.
Referenced by BroadcomPower::enable(), and BroadcomPower::initialize().
|
staticprivate |
Register base offset for the Mailbox.
Definition at line 52 of file BroadcomMailbox.h.
Referenced by initialize().
|
staticprivate |
Channel Mask when reading or writing (lowest 4-bits).
Definition at line 55 of file BroadcomMailbox.h.
Referenced by read().
|
private |
I/O object.
Definition at line 141 of file BroadcomMailbox.h.
Referenced by initialize(), read(), and write().
1.8.17