boot: refactor to use sts::boot namespace

This commit is contained in:
Michael Scire
2019-06-22 00:10:21 -07:00
parent 4fbae9e5a4
commit 06416aeded
91 changed files with 3665 additions and 3155 deletions

View File

@@ -14,14 +14,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "boot_functions.hpp"
#include "boot_fan_enable.hpp"
#include "boot_gpio_utils.hpp"
#include "boot_spl_utils.hpp"
static constexpr u32 GpioPadName_FanEnable = 0x4B;
namespace sts::boot {
namespace {
/* Convenience definitions. */
constexpr u32 GpioPadName_FanEnable = 0x4B;
void Boot::SetFanEnabled() {
if (Boot::GetHardwareType() == HardwareType_Copper) {
Boot::GpioConfigure(GpioPadName_FanEnable);
Boot::GpioSetDirection(GpioPadName_FanEnable, GpioDirection_Output);
Boot::GpioSetValue(GpioPadName_FanEnable, GpioValue_High);
}
void SetFanEnabled() {
if (GetHardwareType() == spl::HardwareType::Copper) {
gpio::Configure(GpioPadName_FanEnable);
gpio::SetDirection(GpioPadName_FanEnable, GpioDirection_Output);
gpio::SetValue(GpioPadName_FanEnable, GpioValue_High);
}
}
}