commit 78cc79d4e470ffbd441c47a8835c138718996c85
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Fri Mar 15 11:57:03 2019 +0100

    Introduced the MIC9404x power switch driver

diff --git a/include/MIC9404x/alld_MIC9404x.h b/include/MIC9404x/alld_MIC9404x.h
new file mode 100644
index 0000000..9b99af0
--- /dev/null
+++ b/include/MIC9404x/alld_MIC9404x.h
@@ -0,0 +1,43 @@
+/*
+AMiRo-LLD is a compilation of low-level hardware drivers for the Autonomous Mini Robot (AMiRo) platform.
+Copyright (C) 2016..2019  Thomas Schöpping et al.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file    alld_MIC9404x.h
+ *
+ * @addtogroup lld_powerswitch
+ * @{
+ */
+
+#ifndef AMIROLLD_MIC9404x_H
+#define AMIROLLD_MIC9404x_H
+
+#include <amiro-lld.h>
+
+#if defined(AMIROLLD_CFG_MIC9404x)
+
+#if (AMIROLLD_CFG_MIC9404x == 1)
+  #include "v1/alld_MIC9404x_v1.h"
+#else
+  #error "invalid value assigned to AMIROLLD_CFG_MIC9404x in alldconf.h"
+#endif
+
+#endif /* defined(AMIROLLD_CFG_MIC9404x) */
+
+#endif /* AMIROLLD_MIC9404x_H */
+
+/** @} */
diff --git a/include/MIC9404x/v1/alld_MIC9404x_v1.h b/include/MIC9404x/v1/alld_MIC9404x_v1.h
new file mode 100644
index 0000000..0467f87
--- /dev/null
+++ b/include/MIC9404x/v1/alld_MIC9404x_v1.h
@@ -0,0 +1,95 @@
+/*
+AMiRo-LLD is a compilation of low-level hardware drivers for the Autonomous Mini Robot (AMiRo) platform.
+Copyright (C) 2016..2019  Thomas Schöpping et al.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file    alld_MIC9404x_v1.h
+ * @brief   MIC9404x power switch macros and structures.
+ *
+ * @addtogroup lld_powerswitch
+ * @{
+ */
+
+#ifndef AMIROLLD_MIC9404x_V1_H
+#define AMIROLLD_MIC9404x_V1_H
+
+#include <amiro-lld.h>
+
+#if (defined(AMIROLLD_CFG_MIC9404x) && (AMIROLLD_CFG_MIC9404x == 1)) || defined(__DOXYGEN__)
+
+/******************************************************************************/
+/* CONSTANTS                                                                  */
+/******************************************************************************/
+
+/**
+ * @brief Active state of EN GPIO (active high).
+ */
+#define MIC9404x_LLD_EN_ACTIVE_STATE            APAL_GPIO_ACTIVE_HIGH
+
+/******************************************************************************/
+/* SETTINGS                                                                   */
+/******************************************************************************/
+
+/******************************************************************************/
+/* CHECKS                                                                     */
+/******************************************************************************/
+
+/******************************************************************************/
+/* DATA STRUCTURES AND TYPES                                                  */
+/******************************************************************************/
+
+/**
+ * @brief MIC9404x driver data structure.
+ */
+typedef struct {
+  const apalControlGpio_t* en;  /**< @brief The identifier of the EN GPIO.  */
+} MIC9404xDriver;
+
+/**
+ * @brief The state of the MIC9404x.
+ */
+typedef enum {
+  MIC9404x_LLD_STATE_OFF = 0x00,   /**< 'on' state of the MIC9404x */
+  MIC9404x_LLD_STATE_ON  = 0x01,   /**< 'off' state of the MIC9404x */
+} mic9404x_lld_state_t;
+
+/******************************************************************************/
+/* MACROS                                                                     */
+/******************************************************************************/
+
+/******************************************************************************/
+/* EXTERN DECLARATIONS                                                        */
+/******************************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  apalExitStatus_t mic9404x_lld_set(const MIC9404xDriver* const mic9404x, const mic9404x_lld_state_t state);
+  apalExitStatus_t mic9404x_lld_get(const MIC9404xDriver* const mic9404x, mic9404x_lld_state_t* const state);
+#ifdef __cplusplus
+}
+#endif
+
+/******************************************************************************/
+/* INLINE FUNCTIONS                                                           */
+/******************************************************************************/
+
+#endif /* defined(AMIROLLD_CFG_MIC9404x) && (AMIROLLD_CFG_MIC9404x == 1) */
+
+#endif /* AMIROLLD_MIC9404x_V1_H */
+
+/** @} */
diff --git a/source/MIC9404x/v1/alld_MIC9404x_v1.c b/source/MIC9404x/v1/alld_MIC9404x_v1.c
new file mode 100644
index 0000000..ef844b7
--- /dev/null
+++ b/source/MIC9404x/v1/alld_MIC9404x_v1.c
@@ -0,0 +1,87 @@
+/*
+AMiRo-LLD is a compilation of low-level hardware drivers for the Autonomous Mini Robot (AMiRo) platform.
+Copyright (C) 2016..2019  Thomas Schöpping et al.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file    alld_MIC9404x_v1.c
+ * @brief   MIC9404x power switch function implementations.
+ *
+ * @addtogroup lld_powerswitch
+ * @{
+ */
+
+#include <alld_MIC9404x.h>
+
+#if (defined(AMIROLLD_CFG_MIC9404x) && (AMIROLLD_CFG_MIC9404x == 1)) || defined(__DOXYGEN__)
+
+/******************************************************************************/
+/* LOCAL DEFINITIONS                                                          */
+/******************************************************************************/
+
+/******************************************************************************/
+/* EXPORTED VARIABLES                                                         */
+/******************************************************************************/
+
+/******************************************************************************/
+/* LOCAL TYPES                                                                */
+/******************************************************************************/
+
+/******************************************************************************/
+/* LOCAL VARIABLES                                                            */
+/******************************************************************************/
+
+/******************************************************************************/
+/* LOCAL FUNCTIONS                                                            */
+/******************************************************************************/
+
+/******************************************************************************/
+/* EXPORTED FUNCTIONS                                                         */
+/******************************************************************************/
+
+/**
+ * @brief Set the MIC9404x to a specific state.
+ * @param[in]   mic9404x    The MIC9404x driver object.
+ * @param[in]   state       The state to set the MIC9404x to.
+ * @return                  An indicator whether the call was successful.
+ */
+apalExitStatus_t mic9404x_lld_set(const MIC9404xDriver* const mic9404x, const mic9404x_lld_state_t state)
+{
+  apalDbgAssert(mic9404x != NULL);
+
+  return apalControlGpioSet(mic9404x->en, (state == MIC9404x_LLD_STATE_ON) ? APAL_GPIO_ON : APAL_GPIO_OFF);
+}
+
+/**
+ * @brief Get the current status of the MIC9404x.
+ * @param[in]   mic9404x    The MIC9404x driver object.
+ * @param[out]  state       The state object to fill.
+ * @return                  An indicator whether the call was successful.
+ */
+apalExitStatus_t mic9404x_lld_get(const MIC9404xDriver* const mic9404x, mic9404x_lld_state_t* const state)
+{
+  apalDbgAssert(mic9404x != NULL);
+  apalDbgAssert(state != NULL);
+
+  apalControlGpioState_t gpio_state;
+  apalExitStatus_t status = apalControlGpioGet(mic9404x->en, &gpio_state);
+  *state = gpio_state == APAL_GPIO_ON ? MIC9404x_LLD_STATE_ON : MIC9404x_LLD_STATE_OFF;
+  return status;
+}
+
+#endif /* defined(AMIROLLD_CFG_MIC9404x) && (AMIROLLD_CFG_MIC9404x == 1) */
+
+/** @} */
