summaryrefslogtreecommitdiff
path: root/ucoo/hal/gpio/gpio.stm32f4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ucoo/hal/gpio/gpio.stm32f4.cc')
-rw-r--r--ucoo/hal/gpio/gpio.stm32f4.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ucoo/hal/gpio/gpio.stm32f4.cc b/ucoo/hal/gpio/gpio.stm32f4.cc
index 1b46fd5..3ee060a 100644
--- a/ucoo/hal/gpio/gpio.stm32f4.cc
+++ b/ucoo/hal/gpio/gpio.stm32f4.cc
@@ -93,13 +93,15 @@ Gpio::output ()
void
Gpio::pull (Pull dir)
{
- GPIO_PUPDR (port_) = dmask_set (mask_, GPIO_PUPDR (port_), dir);
+ GPIO_PUPDR (port_) = dmask_set (mask_, GPIO_PUPDR (port_),
+ static_cast<uint32_t> (dir));
}
void
Gpio::speed (Speed s)
{
- GPIO_OSPEEDR (port_) = dmask_set (mask_, GPIO_OSPEEDR (port_), s);
+ GPIO_OSPEEDR (port_) = dmask_set (mask_, GPIO_OSPEEDR (port_),
+ static_cast<uint32_t> (s));
}
} // namespace ucoo