]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/src/rpp/dac.c
Compile against the DRV library macro reduced to FREERTOS_POSIX
[pes-rpp/rpp-lib.git] / rpp / src / rpp / dac.c
index 1d59a3a071c95508871e49800dadf9f8d630e044..b3c52a1d098ca595a4d1c6cf8bac2ae122d9505f 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "rpp/rpp.h"
 
-#if rppCONFIG_DRV == 1
+#ifndef FREERTOS_POSIX
 #include "drv/dac.h"
 #endif
 
@@ -32,7 +32,7 @@ int8_t rpp_dac_init()
         return FAILURE;
     }
     initialized = TRUE;
-#if rppCONFIG_DRV == 1
+#ifndef FREERTOS_POSIX
     spi_tms570_init();
 #endif
     // Configure board
@@ -152,13 +152,13 @@ int8_t rpp_dac_update()
         // If changed commit changes to hardware
         if(changed_st[i]) {
 
-            #if rppCONFIG_DRV == 1
-            // TODO: Confirm via returned SPI code that transfer was successfull
+#ifndef FREERTOS_POSIX
+            // TODO: Confirm via returned SPI code that transfer was successful
             drv_dac_spi_transfer(i, enabled_cache[i], out_cache[i]);
-            #else
+#else
             UNUSED(enabled_cache);
             UNUSED(out_cache);
-            #endif
+#endif
 
             changed_st[i] = FALSE;
         }