FreeNOS
|
Broadcom Power Management. More...
#include <BroadcomPower.h>
Public Types | |
enum | Device { SD = (1 << 0), UART0 = (1 << 1), UART1 = (1 << 2), USB = (1 << 3) } |
Powered devices. More... | |
enum | Result { Success, IOError } |
Result codes. More... | |
Public Member Functions | |
BroadcomPower () | |
Constructor. More... | |
Result | initialize () |
Initialize the power manager. More... | |
Result | enable (Device device) |
Set power on. More... | |
Private Attributes | |
BroadcomMailbox | m_mailbox |
Mailbox for communicating with the GPU. More... | |
u32 | m_mask |
Current bitmask of enabled devices. More... | |
Broadcom Power Management.
Definition at line 39 of file BroadcomPower.h.
BroadcomPower::BroadcomPower | ( | ) |
Constructor.
Definition at line 21 of file BroadcomPower.cpp.
BroadcomPower::Result BroadcomPower::enable | ( | Device | device | ) |
Set power on.
device | Device to power on. |
Definition at line 39 of file BroadcomPower.cpp.
References m_mailbox, m_mask, BroadcomMailbox::PowerManagement, BroadcomMailbox::read(), Success, and BroadcomMailbox::write().
BroadcomPower::Result BroadcomPower::initialize | ( | ) |
Initialize the power manager.
Definition at line 26 of file BroadcomPower.cpp.
References ERROR, BroadcomMailbox::initialize(), IOError, m_mailbox, m_mask, BroadcomMailbox::PowerManagement, Success, BroadcomMailbox::Success, and BroadcomMailbox::write().
|
private |
Mailbox for communicating with the GPU.
Definition at line 89 of file BroadcomPower.h.
Referenced by enable(), and initialize().
|
private |
Current bitmask of enabled devices.
Definition at line 92 of file BroadcomPower.h.
Referenced by enable(), and initialize().