+#include "hw/hw_sipo.h"
+#include "cfg/cfg_sipo.h"
+
+#include <io/kfile.h>
+
+
+/*
+ * The following macros are needed to maintain compatibility with older sipo API.
+ * They can be safely removed once the old API is removed.
+ */
+
+ /**
+ * \addtogroup sipo_api
+ * \{
+ */
+#if COMPILER_C99
+ #define sipo_init(...) PP_CAT(sipo_init ## _, COUNT_PARMS(__VA_ARGS__)) (__VA_ARGS__)
+#else
+ /**
+ * Initialize SIPO module.
+ *
+ * To initialize the module you can write this code:
+ * \code
+ * Sipo ctx;
+ * sipo_init(&ctx, settings);
+ * \endcode
+ */
+ #define sipo_init(args...) PP_CAT(sipo_init ## _, COUNT_PARMS(args)) (args)
+
+#endif
+/**\}*/
+
+
+#define SIPO_DATAORDER_START_LSB 1
+#define SIPO_DATAORDER_START_MSB 0x80
+
+#if !CONFIG_SIPO_DISABLE_OLD_API
+/**
+ * Define enum to set sipo data order.
+ */
+typedef enum SipoBitOrder
+{
+ SIPO_DATAORDER_MSB = 0,
+ SIPO_DATAORDER_LSB = 1
+} SipoBitOrder;
+
+/**
+ * Define enum to set the start level of clock.
+ */
+typedef enum SipoClockPol
+{
+ SIPO_START_LOW = 0,
+ SIPO_START_HIGH = 1
+
+} SipoClkPol;
+
+/**
+ * Define enum to set load signal level.
+ */
+typedef enum SipoLoadPol
+{
+ SIPO_LOW_TO_HIGH = 0,
+ SIPO_HIGH_TO_LOW = 1
+
+} SipoLoadPol;