diff --git a/EAPI/Dmo/x86/EApi_1.dll b/EAPI/Dmo/x86/EApi_1.dll
new file mode 100644
index 0000000..6d69889
Binary files /dev/null and b/EAPI/Dmo/x86/EApi_1.dll differ
diff --git a/EAPI/Dmo/x86/EApi_1.lib b/EAPI/Dmo/x86/EApi_1.lib
new file mode 100644
index 0000000..ef76514
Binary files /dev/null and b/EAPI/Dmo/x86/EApi_1.lib differ
diff --git a/EAPI/Dmo/x86_64/EApi_1.dll b/EAPI/Dmo/x86_64/EApi_1.dll
new file mode 100644
index 0000000..09ad032
Binary files /dev/null and b/EAPI/Dmo/x86_64/EApi_1.dll differ
diff --git a/EAPI/Dmo/x86_64/EApi_1.lib b/EAPI/Dmo/x86_64/EApi_1.lib
new file mode 100644
index 0000000..6954c92
Binary files /dev/null and b/EAPI/Dmo/x86_64/EApi_1.lib differ
diff --git a/EApiOsNTC.c b/EApiOsNTC.c
new file mode 100644
index 0000000..194908f
--- /dev/null
+++ b/EApiOsNTC.c
@@ -0,0 +1,59 @@
+/*
+ *
+ *+=========================================================================
+ *I Project Name: EApiDK Embedded Application Development Kit
+ *+=========================================================================
+ *I $HeadURL: https://eapidk.svn.sourceforge.net/svnroot/eapidk/trunk/lib/WINNT/EApiOsNTC.c $
+ *+=========================================================================
+ *I Copyright: Copyright (c) 2002-2009, Kontron Embedded Modules GmbH
+ *I Author: John Kearney, John.Kearney@kontron.com
+ *I
+ *I License: All rights reserved. This program and the accompanying
+ *I materials are licensed and made available under the
+ *I terms and conditions of the BSD License which
+ *I accompanies this distribution. The full text of the
+ *I license may be found at
+ *I http://opensource.org/licenses/bsd-license.php
+ *I
+ *I THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "
+ *I AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
+ *I ANY KIND, EITHER EXPRESS OR IMPLIED.
+ *I
+ *I Description: Auto Created for EApiOsNTC.c
+ *I
+ *+-------------------------------------------------------------------------
+ *I
+ *I File Name : EApiOsNTC.c
+ *I File Location : lib\WINNT
+ *I Last committed : $Revision: 38 $
+ *I Last changed by : $Author: dethrophes $
+ *I Last changed date : $Date: 2010-01-26 07:48:22 +0100 (Di, 26. Jan 2010) $
+ *I ID : $Id: EApiOsNTC.c 38 2010-01-26 06:48:22Z dethrophes $
+ *I
+ *+=========================================================================
+ *
+ */
+#include
+#include
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void usleep(unsigned long us)
+{
+ LARGE_INTEGER cnt1;
+ LARGE_INTEGER cnt2;
+ QueryPerformanceCounter (&cnt1);
+ QueryPerformanceFrequency (&cnt2);
+ cnt1.QuadPart+=(us*cnt2.QuadPart)/1000000;
+ do{
+ QueryPerformanceCounter (&cnt2);
+ }while(cnt1.QuadPart>cnt2.QuadPart);
+ return ;
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gpio.cpp b/gpio.cpp
index acd91f8..8a3d873 100644
--- a/gpio.cpp
+++ b/gpio.cpp
@@ -1,6 +1,6 @@
#include "gpio.h"
-#include
+
#include
const EApiId_t EApiGpioDevices[]={
diff --git a/gpio.h b/gpio.h
index e2ce431..c59d355 100644
--- a/gpio.h
+++ b/gpio.h
@@ -9,6 +9,12 @@
#include
#include
+#ifdef _MSC_VER
+ #include
+#else
+ #include
+#endif
+
class gpio: public QWidget
{
Q_OBJECT
diff --git a/gui-demo.pro b/gui-demo.pro
index ea65635..b828004 100644
--- a/gui-demo.pro
+++ b/gui-demo.pro
@@ -23,6 +23,8 @@ SOURCES += main.cpp\
temperatureBar.cpp \
pwm.cpp
+win32: SOURCES += EApiOsNTC.c
+
HEADERS += mainwindow.h \
boardinfo.h \
realtimeinfo.h \
@@ -42,6 +44,24 @@ equals(LIBPATH, "") {
}
unix:!macx: LIBS += -L$$LIBPATH -lEApi
+# Windows, tested w/ MSVC compilers
+win32: {
+ TARGET_ARCH = $$QMAKE_TARGET.arch
+ DESTDIR = $$PWD/Bin/$$TARGET_ARCH/
+ TARGET = $$TARGET-$$TARGET_ARCH
+ EAPI = EAPI/Dmo
+ LIBS += -L$$PWD/$${EAPI}/$$TARGET_ARCH/ -lEApi_1
+ DEPLOY_COMMAND = windeployqt
+ DEPLOY_TARGET = $$shell_quote($$shell_path($${DESTDIR}))
+ EAPI_DLL = $$PWD/$${EAPI}/$$TARGET_ARCH/EApi_1.dll
+ CP_EAPI = $$QMAKE_COPY $$shell_quote($$shell_path($${EAPI_DLL})) $$shell_quote($$shell_path($${DESTDIR})) $$escape_expand(\\n\\t)
+ QMAKE_POST_LINK = $${CP_EAPI}
+ QMAKE_POST_LINK += $${DEPLOY_COMMAND} $${DEPLOY_TARGET}
+
+ INCLUDEPATH += $$PWD/include/WinNt
+ DEPENDPATH += $$PWD/include/WinNt
+}
+
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include
diff --git a/i2c.cpp b/i2c.cpp
index 49d3aa6..97fafdc 100644
--- a/i2c.cpp
+++ b/i2c.cpp
@@ -1,9 +1,11 @@
#include "i2c.h"
+#ifndef _MSC_VER
#include
+#endif
#include
#include
#include
-#include
+
#include
@@ -24,12 +26,6 @@ i2c::i2c(QWidget *parent)
timer = new QTimer(this);
- int tempresult = find_eeprom();
- if (tempresult == -1 )
- base_addr = 0;
- else
- base_addr = tempresult;
-
readWriteByteRadioButton = new QRadioButton("Read/Write Register");
readWriteByteRadioButton->setFont(fontvalue);
@@ -55,8 +51,6 @@ i2c::i2c(QWidget *parent)
protocolGroup->setFont(fontlabel);
protocolGroup->setLayout(protocolLayout);
- if (base_addr == 0) /* no i2c*/
- protocolGroup->setEnabled(false);
/*************************************************/
i2cIDLabel = new QLabel("I2C Select:");
@@ -64,20 +58,16 @@ i2c::i2c(QWidget *parent)
i2cID = new QComboBox;
i2cID->setFont(fontvalue);
-
- if (base_addr == 0) /* no i2c*/
+
+ base_addr = uint32_t(add_i2c_busses(i2cID));
+ if (base_addr == uint32_t(-1))
+ protocolGroup->setEnabled(false);
+ if (base_addr == uint32_t(-1)) /* no i2c*/
{
i2cIDLabel->setStyleSheet("color : red");
i2cID->addItem("-");
}
- else
- {
- i2cID->addItem(QString::number(base_addr));
- i2cID->addItem(QString::number(base_addr+1));
- i2cID->addItem(QString::number(base_addr+2));
- }
- i2cBus = base_addr;
connect(i2cID , SIGNAL(currentIndexChanged(int)),this,SLOT(handleI2CselectionChanged(int)));
slaveLabel = new QLabel("Slave Address(Hex, ex. A5):");
@@ -105,7 +95,7 @@ i2c::i2c(QWidget *parent)
deviceGroup->setFont(fontlabel);
deviceGroup->setLayout(deviceLayout);
- if (base_addr == 0) /* no i2c*/
+ if (base_addr == uint32_t(-1)) /* no i2c*/
deviceGroup->setEnabled(false);
/***********************************************/
@@ -213,7 +203,7 @@ i2c::i2c(QWidget *parent)
controlGroup->setFont(fontlabel);
controlGroup->setLayout(parameterGrid);
- if (base_addr == 0) /* no i2c*/
+ if (base_addr == uint32_t(-1)) /* no i2c*/
controlGroup->setEnabled(false);
/******************************************************/
@@ -228,8 +218,9 @@ i2c::i2c(QWidget *parent)
unsigned char TmpStrBuf;
- EApiStatus_t StatusCode;
- StatusCode=EApiI2CReadTransfer(base_addr, 0x48, EAPI_I2C_ENC_STD_CMD(0),&TmpStrBuf, 1, 1);
+ EApiStatus_t StatusCode = EAPI_STATUS_ERROR;
+ if (base_addr != uint32_t(-1))
+ StatusCode=EApiI2CReadTransfer(base_addr, 0x48, EAPI_I2C_ENC_STD_CMD(0),&TmpStrBuf, 1, 1);
if(EAPI_TEST_SUCCESS(StatusCode))
temperatureButton->setEnabled(true);
@@ -244,7 +235,7 @@ i2c::i2c(QWidget *parent)
demoGroup->setFont(fontlabel);
demoGroup->setLayout(demoGrid);
- if (base_addr == 0) /* no i2c*/
+ if (base_addr == (uint32_t(-1)) /* no i2c*/
demoGroup->setEnabled(false);
grid = new QGridLayout;
@@ -292,7 +283,7 @@ void i2c::timingSelected(bool checked)
}
void i2c::handleI2CselectionChanged(int index)
{
- i2cBus = i2cID->itemText(index).toInt();
+ i2cBus = i2cID->itemData(index).toInt();
}
void i2c::slaveChanged(QString text)
{
@@ -587,8 +578,9 @@ void i2c::temperatureClicked()
void i2c::timeoutTimer()
{
unsigned char TmpStrBuf;
- EApiStatus_t StatusCode;
- StatusCode=EApiI2CReadTransfer(base_addr, 0x48, EAPI_I2C_ENC_STD_CMD(0),&TmpStrBuf, 1, 1);
+ EApiStatus_t StatusCode = EAPI_STATUS_ERROR;
+ if (base_addr != -1)
+ StatusCode=EApiI2CReadTransfer(base_addr, 0x48, EAPI_I2C_ENC_STD_CMD(0),&TmpStrBuf, 1, 1);
if(EAPI_TEST_SUCCESS(StatusCode))
{
@@ -619,6 +611,7 @@ void i2c::getInput()
}
/**************************************/
+#ifndef _MSC_VER
struct i2c_adap* i2c::more_adapters(struct i2c_adap *adapters, int n)
{
struct i2c_adap *new_adapters;
@@ -753,27 +746,75 @@ void i2c::free_adapters(struct i2c_adap *adapters)
free(adapters[i].name);
free(adapters);
}
+#endif // _MSC_VER
-int i2c::find_eeprom(void)
+int i2c::add_i2c_busses(QComboBox *i2cBusComboBox)
{
+#ifndef _MSC_VER
struct i2c_adap *adapters = NULL;
- int count;
int result = -1;
+ int i;
+ int mux_channel;
+ char mux[NAME_MAX] = "\0";
+
adapters = gather_i2c_busses();
if (adapters == NULL)
{
fprintf(stderr, "Error: Out of memory!\n");
- return result;
+ return (result);
}
- for (count = 0; adapters[count].name; count++) {
- if (!strncmp(adapters[count].name, I2C_DMEC,8))
+
+ for (i = 0; adapters[i].name; i++) {
+ if (!strncmp(adapters[i].name, I2C_DMEC,8))
{
- result = adapters[count].nr +1;
+ // found DMEC base instance now get all mux busses and add them to the Combobox
+ sprintf(mux, "i2c-%d-mux", adapters[i].nr);
break;
}
}
+
+ if (mux[0] != 0) {
+ char c[NAME_MAX] = "\0";
+ int index = 0;
+ for (i = 0; adapters[i].name; i++) {
+ if (!strncmp(adapters[i].name, mux,strlen(mux)))
+ {
+ // found DMEC mux bus, get channel number
+ if (sscanf(adapters[i].name, MUX_CHANNEL, c, &mux_channel)) {
+ i2cBusComboBox->addItem(QString::number(adapters[i].nr) + " (CH" + QString::number(mux_channel) + ")");
+ i2cBusComboBox->setItemData(index++, adapters[i].nr);
+ if (mux_channel == 0) {
+ result = adapters[i].nr;
+ }
+ }
+ }
+ }
+
+ }
+
free_adapters(adapters);
- return result;
+ return (result);
+#else // _MSC_VER
+ EApiStatus_t StatusCode;
+ uint32_t MaxBlkLen = 0;
+ int result = -1;
+
+ StatusCode = EApiI2CGetBusCap(EAPI_ID_I2C_EXTERNAL, &MaxBlkLen);
+ if(EAPI_TEST_SUCCESS(StatusCode)) {
+ i2cBusComboBox->addItem(QString::number(EAPI_ID_I2C_EXTERNAL));
+ result = EAPI_ID_I2C_EXTERNAL;
+ }
+
+ StatusCode = EApiI2CGetBusCap(EAPI_ID_I2C_LVDS_1, &MaxBlkLen);
+ if(EAPI_TEST_SUCCESS(StatusCode))
+ i2cBusComboBox->addItem(QString::number(EAPI_ID_I2C_LVDS_1));
+
+ StatusCode = EApiI2CGetBusCap(EAPI_ID_I2C_LVDS_2, &MaxBlkLen);
+ if(EAPI_TEST_SUCCESS(StatusCode))
+ i2cBusComboBox->addItem(QString::number(EAPI_ID_I2C_LVDS_2));
+ return (result);
+#endif // _MSC_VER
}
+
diff --git a/i2c.h b/i2c.h
index de2faf6..8512017 100644
--- a/i2c.h
+++ b/i2c.h
@@ -15,6 +15,13 @@
#include
#include
+#ifndef _MSC_VER
+ #include
+#else
+ #include
+ #include
+#endif
+
#include "temperatureBar.h"
struct i2c_adap {
@@ -23,7 +30,8 @@ struct i2c_adap {
};
#define BUNCH 8
-#define I2C_DMEC "i2c-dmec"
+#define I2C_DMEC "i2c-dmec"
+#define MUX_CHANNEL "%s (chan_id %d"
class i2c: public QWidget
{
@@ -34,7 +42,7 @@ class i2c: public QWidget
void free_adapters(struct i2c_adap *adapters);
struct i2c_adap* gather_i2c_busses(void);
struct i2c_adap* more_adapters(struct i2c_adap *adapters, int n);
-
+ int add_i2c_busses(QComboBox *i2cBusses);
public slots:
void readClicked();
diff --git a/include/EApi.h b/include/EApi.h
index efc810b..a1fc964 100644
--- a/include/EApi.h
+++ b/include/EApi.h
@@ -34,6 +34,11 @@
*
*/
+#ifdef _MSC_VER
+ #include
+ #include
+#endif
+
#ifndef _EAPI_H_
#define _EAPI_H_
diff --git a/include/WinNt/EApiCommon.h b/include/WinNt/EApiCommon.h
new file mode 100644
index 0000000..b394e68
--- /dev/null
+++ b/include/WinNt/EApiCommon.h
@@ -0,0 +1,64 @@
+/*
+ *
+ *+=========================================================================
+ *I Project Name: EApiDK Embedded Application Development Kit
+ *+=========================================================================
+ *I $HeadURL: http://svn.code.sf.net/p/eapidk/code/trunk/include/EApiCommon.h $
+ *+=========================================================================
+ *I Copyright: Copyright (c) 2009-2010, PICMG
+ *I Author: John Kearney, John.Kearney@kontron.com
+ *I
+ *I License: All rights reserved. This program and the accompanying
+ *I materials are licensed and made available under the
+ *I terms and conditions of the BSD License which
+ *I accompanies this distribution. The full text of the
+ *I license may be found at
+ *I http://opensource.org/licenses/bsd-license.php
+ *I
+ *I THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "
+ *I AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
+ *I ANY KIND, EITHER EXPRESS OR IMPLIED.
+ *I
+ *I Description: Auto Created for EApiCommon.h
+ *I
+ *+-------------------------------------------------------------------------
+ *I
+ *I File Name : EApiCommon.h
+ *I File Location : include
+ *I Last committed : $Revision: 74 $
+ *I Last changed by : $Author: dethrophes $
+ *I Last changed date : $Date: 2010-06-23 21:26:50 +0200 (Wed, 23 Jun 2010) $
+ *I ID : $Id: EApiCommon.h 74 2010-06-23 19:26:50Z dethrophes $
+ *I
+ *+=========================================================================
+ *
+ */
+/* EApi Common Header */
+#ifndef _EAPICOMMON_H_
+#define _EAPICOMMON_H_
+/*
+ * ALL Of these MACROS can be overridden by MACROS
+ * in the OS Specific Header File EApiOs.h
+ */
+#ifndef ELEMENT_SIZE
+# define ELEMENT_SIZE(x) (sizeof((x)[0]))
+#endif
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(x) (sizeof(x)/ELEMENT_SIZE(x))
+#endif
+#ifndef STRLEN
+# define STRLEN(x) (ARRAY_SIZE(x)- ARRAY_SIZE(""))
+#endif
+
+#define EAPI_CREATE_PTR(Base, ByteOffset, PtrType) \
+ ((PtrType)(((uint8_t*)(Base))+(ByteOffset)))
+
+#define EAPI_GET_PTR_OFFSET(Ptr1, Ptr2) \
+ ((unsigned long)(((const uint8_t* const)(Ptr1))-((const uint8_t*const)(Ptr2))))
+
+#ifndef STRICT_VALIDATION
+# define STRICT_VALIDATION 2
+#endif
+
+#endif /* _EAPICOMMON_H_ */
+
diff --git a/include/WinNt/EApiOs.h b/include/WinNt/EApiOs.h
new file mode 100644
index 0000000..a510154
--- /dev/null
+++ b/include/WinNt/EApiOs.h
@@ -0,0 +1,173 @@
+/*
+ *
+ *+=========================================================================
+ *I Project Name: EApiDK Embedded Application Development Kit
+ *+=========================================================================
+ *I $HeadURL: http://svn.code.sf.net/p/eapidk/code/trunk/include/linux/EApiOs.h $
+ *+=========================================================================
+ *I Copyright: Copyright (c) 2002-2009, Kontron Embedded Modules GmbH
+ *I Author: John Kearney, John.Kearney@kontron.com
+ *I
+ *I License: All rights reserved. This program and the accompanying
+ *I materials are licensed and made available under the
+ *I terms and conditions of the BSD License which
+ *I accompanies this distribution. The full text of the
+ *I license may be found at
+ *I http://opensource.org/licenses/bsd-license.php
+ *I
+ *I THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "
+ *I AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
+ *I ANY KIND, EITHER EXPRESS OR IMPLIED.
+ *I
+ *I Description: Auto Created for EApiOs.h
+ *I
+ *+-------------------------------------------------------------------------
+ *I
+ *I File Name : EApiOs.h
+ *I File Location : include\linux
+ *I Last committed : $Revision: 72 $
+ *I Last changed by : $Author: dethrophes $
+ *I Last changed date : $Date: 2010-06-20 04:28:21 +0200 (Sun, 20 Jun 2010) $
+ *I ID : $Id: EApiOs.h 72 2010-06-20 02:28:21Z dethrophes $
+ *I
+ *+=========================================================================
+ *
+ */
+/* Windows NT Common Header */
+#ifndef _EAPIOS_H_
+#define _EAPIOS_H_
+
+#ifndef __IN
+# define __IN
+#endif
+
+#include
+#include
+#include
+#ifndef _MSC_VER
+ #include
+#endif
+#include
+#include
+#include
+#include
+#include
+
+
+
+#if defined _WIN32 || defined __CYGWIN__
+ #ifdef EAPI_BUILDING_LIB
+ #ifdef __GNUC__
+ #define EAPI_CALLTYPE __attribute__((dllexport))
+ #else
+ #define EAPI_CALLTYPE __declspec(dllexport) /* Note: actually gcc seems to also supports this syntax. */
+ #endif
+ #else
+ #ifdef __GNUC__
+ #define EAPI_CALLTYPE __attribute__((dllimport))
+ #else
+ #ifdef _WIN64
+ #define EAPI_CALLTYPE __declspec(dllimport) /* Note: actually gcc seems to also supports this syntax. */
+ #else
+ #define EAPI_CALLTYPE __stdcall /* DMO 2019-09-18 17:50:00 jank Note: use WINAPI calling convention for 32Bit DLL exports. */
+ #endif
+ #endif
+ #endif
+#else
+ #if __GNUC__ >= 4
+ #define EAPI_CALLTYPE __attribute__ ((visibility("default")))
+ #else
+ #define EAPI_CALLTYPE
+ #endif
+#endif
+#ifdef __GNUC__
+#ifdef __i386__
+# ifndef __fastcall
+# define __fastcall __attribute__((fastcall))
+# endif
+# ifndef __stdcall
+# define __stdcall __attribute__((stdcall))
+# endif
+# ifndef __cdecl
+# define __cdecl __attribute__((cdecl))
+# endif
+#else
+# ifndef __fastcall
+# define __fastcall
+# endif
+# ifndef __stdcall
+# define __stdcall
+# endif
+# ifndef __cdecl
+# define __cdecl
+# endif
+#endif
+# ifndef _fastcall
+# define _fastcall __fastcall
+# endif
+# ifndef _stdcall
+# define _stdcall __stdcall
+# endif
+# ifndef _cdecl
+# define _cdecl __cdecl
+# endif
+
+#endif
+
+#define EAPI_PRINTF_ARG(Format, Arg) __attribute__((format(printf, Format, Arg)))
+void EApiSleepns(unsigned long ns);
+#define EAPI_EMUL_DELAY_NS(x) EApiSleepns(x)
+
+#ifndef EApiSleep
+# define EApiSleep(x) usleep(x*1000)
+#endif
+
+
+
+#ifdef UNICODE
+//#ifndef TEXT
+//# define TEXT(x) Lx
+//#endif
+# define EAPI_strlen wcslen
+# define EAPI_strnlen wcsnlen
+# define EAPI_strncpy wcsncpy
+# define EAPI_vsnprintf vsnwprintf
+# define EAPI_fprintf fwprintf
+# define EAPI_printf wprintf
+# define EAPI_fopen _wfopen
+#else
+//#ifndef TEXT
+//# define TEXT(x) x
+//#endif
+# define EAPI_strlen strlen
+# define EAPI_strnlen strnlen
+# define EAPI_strncpy strncpy
+# define EAPI_vsnprintf vsnprintf
+# define EAPI_fprintf fprintf
+# define EAPI_fopen fopen
+# define EAPI_printf printf
+#endif
+
+#define EAPI_vsnprintfA vsnprintf
+#define EAPI_strdup strdup
+#define EAPI_strncpyA strncpy
+
+#define _strdup strdup
+
+#ifdef _MSC_VER
+ #include
+ #include
+ #include "inttypes.h"
+
+ #ifndef NAME_MAX
+ #define NAME_MAX 255
+ #endif
+
+ #define snprintf _snprintf
+ #define strcasecmp _stricmp
+ #define strncasecmp _strnicmp
+#endif // _MSC_VERS
+
+#endif /* _EAPIOS_H_ */
+
+
diff --git a/include/WinNt/EApiOsNTC.h b/include/WinNt/EApiOsNTC.h
new file mode 100644
index 0000000..43f5156
--- /dev/null
+++ b/include/WinNt/EApiOsNTC.h
@@ -0,0 +1,50 @@
+/*
+ *
+ *+=========================================================================
+ *I Project Name: EApiDK Embedded Application Development Kit
+ *+=========================================================================
+ *I $HeadURL: https://eapidk.svn.sourceforge.net/svnroot/eapidk/trunk/lib/WINNT/EApiOsNTC.c $
+ *+=========================================================================
+ *I Copyright: Copyright (c) 2002-2009, Kontron Embedded Modules GmbH
+ *I Author: John Kearney, John.Kearney@kontron.com
+ *I
+ *I License: All rights reserved. This program and the accompanying
+ *I materials are licensed and made available under the
+ *I terms and conditions of the BSD License which
+ *I accompanies this distribution. The full text of the
+ *I license may be found at
+ *I http://opensource.org/licenses/bsd-license.php
+ *I
+ *I THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "
+ *I AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
+ *I ANY KIND, EITHER EXPRESS OR IMPLIED.
+ *I
+ *I Description: Auto Created for EApiOsNTC.c
+ *I
+ *+-------------------------------------------------------------------------
+ *I
+ *I File Name : EApiOsNTC.c
+ *I File Location : lib\WINNT
+ *I Last committed : $Revision: 38 $
+ *I Last changed by : $Author: dethrophes $
+ *I Last changed date : $Date: 2010-01-26 07:48:22 +0100 (Di, 26. Jan 2010) $
+ *I ID : $Id: EApiOsNTC.c 38 2010-01-26 06:48:22Z dethrophes $
+ *I
+ *+=========================================================================
+ *
+ */
+#ifndef _EAPIOSNTC_H_
+#define _EAPIOSNTC_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void usleep(unsigned long us);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_EAPIOSNTC_H_
diff --git a/pwm.cpp b/pwm.cpp
index b9222f6..5add658 100644
--- a/pwm.cpp
+++ b/pwm.cpp
@@ -1,5 +1,5 @@
#include "pwm.h"
-#include
+
#include
static const QStandardItemModel* model;
@@ -23,7 +23,7 @@ pwm::pwm(QWidget *parent)
fontvalue.setBold(false);
fontvalue.setPointSize(11);
- EApiStatus_t StatusCode;
+ //EApiStatus_t StatusCode;
QStringList list;
pwmch0 = new QRadioButton("PWM Channel0");
diff --git a/pwm.h b/pwm.h
index a86cd88..2ddf0a2 100644
--- a/pwm.h
+++ b/pwm.h
@@ -13,6 +13,10 @@
#include
#include
+#ifndef _MSC_VER
+ #include
+#endif
+
class pwm: public QWidget
{
Q_OBJECT
diff --git a/storage.h b/storage.h
index 52e4683..bec8ed7 100644
--- a/storage.h
+++ b/storage.h
@@ -10,6 +10,9 @@
#include
#include
+#ifdef _MSC_VER
+ #include
+#endif
class storage: public QWidget
{