commit a9c9cd3363459a57e72612631655a295e44afef5
Author: Ruben Lipperts <rlipperts@techfak.uni-bielefeld.de>
Date:   Mon Jul 22 13:30:15 2019 +0200

    Implement untested driver functions for P9221R

diff --git a/include/P9221R/v1/alld_P9221R_v1.h b/include/P9221R/v1/alld_P9221R_v1.h
index 2de3e2c..23b3fde 100644
--- a/include/P9221R/v1/alld_P9221R_v1.h
+++ b/include/P9221R/v1/alld_P9221R_v1.h
@@ -101,10 +101,10 @@ extern "C" {
 #endif
   apalExitStatus_t p9221r_lld_read_register(const P9221RDriver* const p9221r, const p9221r_lld_register_t addr, uint8_t* const data, const uint8_t num, const apalTime_t timeout);
   apalExitStatus_t p9221r_lld_write_register(const P9221RDriver* const p9221r, const p9221r_lld_register_t addr, const uint16_t* const data, const uint8_t num, const apalTime_t timeout);
-  apalExitStatus_t p9221r_lld_read_x_alignment(const P9221RDriver* const p9221r, int32_t const x_alignment, const apalTime_t timeout);
-  apalExitStatus_t p9221r_lld_read_y_alignment(const P9221RDriver* const p9221r, int32_t const y_alignment, const apalTime_t timeout);
-  apalExitStatus_t p9221r_lld_read_voltage(const P9221RDriver* const p9221r, int32_t const voltage, const apalTime_t timeout);
-  apalExitStatus_t p9221r_lld_read_current(const P9221RDriver* const p9221r, int32_t const current, const apalTime_t timeout);
+  apalExitStatus_t p9221r_lld_read_x_alignment(const P9221RDriver* const p9221r, int8_t* const x_alignment, const apalTime_t timeout);
+  apalExitStatus_t p9221r_lld_read_y_alignment(const P9221RDriver* const p9221r, int8_t* const y_alignment, const apalTime_t timeout);
+  apalExitStatus_t p9221r_lld_read_voltage(const P9221RDriver* const p9221r, uint16_t* const voltage, const apalTime_t timeout);
+  apalExitStatus_t p9221r_lld_read_current(const P9221RDriver* const p9221r, uint16_t* const current, const apalTime_t timeout);
 
 #ifdef __cplusplus
 }
diff --git a/source/P9221R/v1/alld_P9221R_v1.c b/source/P9221R/v1/alld_P9221R_v1.c
index 2136f58..c7328c4 100644
--- a/source/P9221R/v1/alld_P9221R_v1.c
+++ b/source/P9221R/v1/alld_P9221R_v1.c
@@ -112,9 +112,10 @@ apalExitStatus_t p9221r_lld_write_register(const P9221RDriver* const p9221r, con
  * @param[in]   timeout     timeout
  * @return                  An indicator whether the call was successfull
  */
-apalExitStatus_t p9221r_lld_read_x_alignment(const P9221RDriver* const p9221r, int32_t const x_alignment, const apalTime_t timeout)
+apalExitStatus_t p9221r_lld_read_x_alignment(const P9221RDriver* const p9221r, int8_t* const x_alignment, const apalTime_t timeout)
 {
-    apalExitStatus_t status = NULL;
+    uint8_t address = P9221R_LLD_REGISTER_ALIGNMENT_X;
+    apalExitStatus_t status = apalI2CMasterTransmit(p9221r->i2cd, (P9221R_LLD_I2C_ADDR_FIXED | p9221r->addr), &address, 2, x_alignment, 1, timeout);
 
     return status;
 }
@@ -127,9 +128,10 @@ apalExitStatus_t p9221r_lld_read_x_alignment(const P9221RDriver* const p9221r, i
  * @param[in]   timeout     timeout
  * @return                  An indicator whether the call was successfull
  */
-apalExitStatus_t p9221r_lld_read_y_alignment(const P9221RDriver* const p9221r, int32_t const y_alignment, const apalTime_t timeout)
+apalExitStatus_t p9221r_lld_read_y_alignment(const P9221RDriver* const p9221r, int8_t* const y_alignment, const apalTime_t timeout)
 {
-    apalExitStatus_t status = NULL;
+    uint8_t address = P9221R_LLD_REGISTER_ALIGNMENT_Y;
+    apalExitStatus_t status = apalI2CMasterTransmit(p9221r->i2cd, (P9221R_LLD_I2C_ADDR_FIXED | p9221r->addr), &address, 2, y_alignment, 1, timeout);
 
     return status;
 }
@@ -142,7 +144,7 @@ apalExitStatus_t p9221r_lld_read_y_alignment(const P9221RDriver* const p9221r, i
  * @param[in]   timeout     timeout
  * @return                  An indicator whether the call was successfull
  */
-apalExitStatus_t p9221r_lld_read_voltage(const P9221RDriver* const p9221r, int32_t const voltage, const apalTime_t timeout)
+apalExitStatus_t p9221r_lld_read_voltage(const P9221RDriver* const p9221r, uint16_t* const voltage, const apalTime_t timeout)
 {
     apalExitStatus_t status = NULL;
 
@@ -157,7 +159,7 @@ apalExitStatus_t p9221r_lld_read_voltage(const P9221RDriver* const p9221r, int32
  * @param[in]   timeout     timeout
  * @return                  An indicator whether the call was successfull
  */
-apalExitStatus_t p9221r_lld_read_current(const P9221RDriver* const p9221r, int32_t const current, const apalTime_t timeout)
+apalExitStatus_t p9221r_lld_read_current(const P9221RDriver* const p9221r, uint16_t* const current, const apalTime_t timeout)
 {
     apalExitStatus_t status = NULL;
 
