summaryrefslogtreecommitdiff
path: root/ucoo/hal/gpio/gpio.stm32f4.cc
diff options
context:
space:
mode:
authorNicolas Schodet2015-05-04 10:07:47 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commit9fe68a0e7b216f8142d6b0423d5cf8fc08ec7091 (patch)
tree6325e2bdec2070c6f8063d4c55de189d2c9d4e0b /ucoo/hal/gpio/gpio.stm32f4.cc
parenta91aa1aad65c5f5da38511175c79a72c019b271b (diff)
ucoo/hal: use enum class
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