From 9e9c0d9ca338be6337891ff3dc69269e35cb7a75 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Fri, 14 May 2021 14:57:03 +0300 Subject: [PATCH] Use uint8_t for GPIO enums --- src/hal/gpio.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hal/gpio.h b/src/hal/gpio.h index d475590..80f3545 100644 --- a/src/hal/gpio.h +++ b/src/hal/gpio.h @@ -10,18 +10,18 @@ namespace gpio { volatile uint8_t PORTx; }; - enum class Mode { + enum class Mode : uint8_t { input = 0, output, }; - enum class Pull { + enum class Pull : uint8_t { none = 0, up, down, //not available on the AVR }; - enum class Level { + enum class Level : uint8_t { low = 0, high, };