Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2016-05-09 17:50:04 +0000
committerHenrik Rentz-Reichert2016-05-09 17:51:27 +0000
commitad30ec16c936e9397be92c465c8db76503d3cc1a (patch)
tree6fbc071a0a0298216e16a731e39f17ab9fb52cc1 /runtime/org.eclipse.etrice.runtime.c/src
parent24c678ee036cde6e3424f8cf5185c8365de79faf (diff)
downloadorg.eclipse.etrice-ad30ec16c936e9397be92c465c8db76503d3cc1a.tar.gz
org.eclipse.etrice-ad30ec16c936e9397be92c465c8db76503d3cc1a.tar.xz
org.eclipse.etrice-ad30ec16c936e9397be92c465c8db76503d3cc1a.zip
* turned C++ into C comments
* generic Posix uses default C standard * Windows MinGW uses C99 standard Change-Id: Ieddec47ca62aed66c859348849ded5e6f1801bbd
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h6
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etDatatypes.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etPlatformLifecycle.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etThread.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.c84
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etThread.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etThread.c10
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etDatatypes.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etPlatformLifecycle.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etThread.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etDatatypes.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etPlatformLifecycle.c16
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSema.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave.c22
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c14
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etThread.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etTimer.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etDatatypes.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatform.h18
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatformLifecycle.c8
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSema.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c14
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etThread.c4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etTimer.c2
29 files changed, 129 insertions, 126 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
index a9078a5db..4e66254cd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/config/etRuntimeConfig.h
@@ -46,9 +46,9 @@
#define ET_DATA_LOGGER_ACTIVATE
/* timing and scheduling */
-//#define FREQUENCY 10L
-//#define ET_RUNTIME_MAXLOOP 100
-/*#define ET_RUNTIME_ENDLESS*/
+/* #define FREQUENCY 10L */
+/* #define ET_RUNTIME_MAXLOOP 100 */
+/* #define ET_RUNTIME_ENDLESS */
/** enable multi threading (e.g. for protection of message queues) */
#define ET_MULTI_THREADING
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etDatatypes.h
index 65e6aad00..183e1c08c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etDatatypes.h
@@ -20,7 +20,7 @@
#define ET_INT64
#define ET_FLOAT32
-//#define ET_FLOAT64 /* not available on this platform */
+/*#define ET_FLOAT64 /* not available on this platform */ */
#include "etStdDatatypes.h"
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
index d94b6b3a6..c423eb1a4 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
@@ -23,16 +23,16 @@
void etMultiThreadedFreeRTOSProjectSpecificUserEntry();
-// this function will be called during initialization
-// and must be implemented project spezific
+/* this function will be called during initialization */
+/* and must be implemented project specific */
void etMultiThreadedFreeRTOSProjectSpecificUserEntry(){
if (DAVE_Init() == DAVE_STATUS_FAILURE){
while(1);
}
}
-// the FreeRTOS Hooks must be implemented depending on
-// your FreeRTOS configuration
+/* the FreeRTOS Hooks must be implemented depending on */
+/* your FreeRTOS configuration */
void vApplicationMallocFailedHook(void){
while (1);
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etPlatformLifecycle.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etPlatformLifecycle.c
index 75c69bda7..f4f56c62b 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etPlatformLifecycle.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etPlatformLifecycle.c
@@ -18,7 +18,7 @@
/* implemenatation for eTrice interfaces*/
-// must be implemented projectspecific
+/* must be implemented projectspecific */
extern void etMultiThreadedFreeRTOSProjectSpecificUserEntry();
void etTimeInit(void);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etThread.c
index d682bfa11..042b63380 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_32Bit_FreeRTOS_Generic/etThread.c
@@ -43,7 +43,7 @@ void etThread_construct(
if (xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData)) != pdPASS){
while(1){};
}
-// xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData) );
+/* xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData) ); */
ET_MSC_LOGGER_SYNC_EXIT
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.c
index f0ec0d417..70220cec2 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.c
@@ -11,7 +11,7 @@
*******************************************************************************/
#include "msp430f5438a.h"
-//#include "platform/etTimer.h"
+/*#include "platform/etTimer.h" */
#include "hal_pmm.h"
#include "etPlatform.h"
#include "etDatatypes.h"
@@ -53,8 +53,8 @@ void initHw(void) {
volatile unsigned int i=0;
volatile unsigned char j,m;
-// WDTCTL = WDTPW + 0x36; //WDT as Timer;
- WDTCTL = WDTPW + 0x80; //disable WDT;
+// WDTCTL = WDTPW + 0x36; /*WDT as Timer; */
+ WDTCTL = WDTPW + 0x80; /*disable WDT; */
SetVCore(PMMCOREV_3);
initClockSystem();
@@ -70,7 +70,7 @@ void vApplicationMallocFailedHook(void){
}
void enableInterrupt(void){
- // SFRIE1|=WDTIE;
+ /* SFRIE1|=WDTIE; */
_enable_interrupt();
}
void initPortsForElevator(void){
@@ -86,7 +86,7 @@ void initPortsForElevator(void){
P8OUT = 0x00;
P8DIR = 0x00;
P8REN = 0xE0;
-// for time measurement
+/* for time measurement */
P10OUT = 0xC0;
P10DIR = 0xC0;
}
@@ -223,12 +223,12 @@ unsigned int data;
}
void writeToDoor(unsigned char floor, unsigned char data){
- // clear door bits
- // avoid array out of bound access
+ /* clear door bits */
+ /* avoid array out of bound access */
if (data > 11)return;
if(floor > 5)return;
floorLatchShadow[floor] &= ~0x03FF;
- // set door bits according data
+ /* set door bits according data */
floorLatchShadow[floor] |= (doorPattern3[data] & 0x3FF);
updateFloorLatch(floor);
}
@@ -258,25 +258,25 @@ unsigned char mask = 0x01;
}
void initClockSystem(void){
- //Select DCO range 4..60Mhz
+ /*Select DCO range 4..60Mhz */
UCSCTL1=DCORSEL_6;
- //enable XT1
+ /*enable XT1 */
P7SEL|=0x01;
UCSCTL6=0x01CC;
- // wait until Clock is ok
+ /* wait until Clock is ok */
while(UCSCTL7&0x0002){UCSCTL7=0;}
- // DCO => appr. 50Mhz
- // SMCLK MCLK => 25Mhz
+ /* DCO => appr. 50Mhz */
+ /* SMCLK MCLK => 25Mhz */
UCSCTL2 = FLLD_1 + 0x2f8;
- // Loop until XT1,XT2 & DCO fault flag is cleared
+ /* Loop until XT1,XT2 & DCO fault flag is cleared */
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);
- // Clear XT2,XT1,DCO fault flags
- SFRIFG1 &= ~OFIFG; // Clear fault flags
- }while (SFRIFG1&OFIFG); // Test oscillator fault flag
+ /* Clear XT2,XT1,DCO fault flags */
+ SFRIFG1 &= ~OFIFG; /* Clear fault flags */
+ }while (SFRIFG1&OFIFG); /* Test oscillator fault flag */
}
@@ -330,23 +330,23 @@ const unsigned short usACLK_Frequency_Hz = 32768;
void executeModel(void);
void initUART1(void){
- // set IO Pins to Peripheral
+ /* set IO Pins to Peripheral */
- UCA1CTL1 |= 0x01; // hold the UART in Reset during initialization
- UCA1CTL1 |= 0x80; //CLK = SMCLK
+ UCA1CTL1 |= 0x01; /* hold the UART in Reset during initialization */
+ UCA1CTL1 |= 0x80; /*CLK = SMCLK */
P5SEL |= 0xC0;
- UCA1CTL0 = 0x00; //8N1 LSB first
- UCA1BR0 = 6; //Baudrate 0
- UCA1BR1 = 0; //Baudrate 1
+ UCA1CTL0 = 0x00; /*8N1 LSB first */
+ UCA1BR0 = 6; /*Baudrate 0 */
+ UCA1BR1 = 0; /*Baudrate 1 */
UCA1MCTL = 0x81;
- UCA1STAT = 0; //clear all flags
- UCA1IRTCTL = 0; //IrDA Tx disabled
- UCA1IRRCTL = 0; //IrDA Rx disabled
- UCA1ABCTL = 0; //Autobaud disabled
+ UCA1STAT = 0; /*clear all flags */
+ UCA1IRTCTL = 0; /*IrDA Tx disabled */
+ UCA1IRRCTL = 0; /*IrDA Rx disabled */
+ UCA1ABCTL = 0; /*Autobaud disabled */
- UCA1CTL1 &= ~0x01; //release the reset for operation
+ UCA1CTL1 &= ~0x01; /*release the reset for operation */
UCA1IE = 0x01;
}
@@ -387,7 +387,7 @@ unsigned char cs;
UCA1TXBUF = chnl;
for (i=0;i<len-1;i++){
- // wait until TX Buffer is empty
+ /* wait until TX Buffer is empty */
while ((UCA1IFG & 0x02) == 0);
UCA1TXBUF = *data;
cs ^= *data++;
@@ -404,17 +404,17 @@ unsigned char cChar;
switch (UCA1IV){
case 2:
- //receive interrupt
+ /*receive interrupt */
cChar = UCA1RXBUF;
switch (etSerialState){
case 0:
- // synch pattern => 0x2d,0xD4
+ /* synch pattern => 0x2d,0xD4 */
if (cChar==0x2D){
etSerialState++;
}
break;
case 1:
- // second byte of synch pattern
+ /* second byte of synch pattern */
if (cChar==0xD4){
etSerialState++;
etSerialRxBufferWritePointer=etSerialRxBuffer;
@@ -424,7 +424,7 @@ switch (UCA1IV){
}
break;
case 2:
- // first byte is the len
+ /* first byte is the len */
if ((etSerialLen=cChar) <= ET_SERIAL_RXBUFFER_LEN){
*etSerialRxBufferWritePointer++=cChar;
etSerialCS^=cChar;
@@ -432,21 +432,21 @@ switch (UCA1IV){
}else{etSerialState=0;}
break;
case 3:
- // receive the data
+ /* receive the data */
*etSerialRxBufferWritePointer++=cChar;
etSerialCS^=cChar;
etSerialLen--;
if(etSerialLen==0){etSerialState++;}
break;
case 4:
- // receive the CS
- //if (etSerialCS != cChar){etSerialState=0;}
- //else{
- // command received OK
+ /* receive the CS */
+ /*if (etSerialCS != cChar){etSerialState=0;} */
+ /*else{ */
+ /* command received OK */
etSerialState=0;
etSerialDataReceived=1;
executeModel();
- //}
+ /*} */
break;
default:etSerialState=0; break;
@@ -454,9 +454,9 @@ switch (UCA1IV){
break;
case 4:
- //transmit interrupt
- //UCA1TXBUF = cChar;
- //UCA1IE &= ~UCTXIE;
+ /*transmit interrupt */
+ /*UCA1TXBUF = cChar; */
+ /*UCA1IE &= ~UCTXIE; */
break;
default:;
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.h
index 72283cd74..68bdd9366 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etPlatform.h
@@ -37,7 +37,7 @@ void initHw(void);
void enableInterrupt(void);
void getTimeFromTarget(etTime *t);
-//serial
+/*serial */
void etSendSerialData(unsigned char len, unsigned char chnl, unsigned char * data);
extern unsigned char etSerialDataReceived;
extern unsigned char etSerialRxBuffer[];
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etThread.c
index e8e1ac3ea..dbf5321c2 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_MSP430_F5438_FreeRTOS_CCS5_HWElevator/etThread.c
@@ -21,7 +21,7 @@
#include "debugging/etLogger.h"
#include "debugging/etMSCLogger.h"
-// #include <process.h>
+/* #include <process.h> */
void etThread_execute(etThread* self);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h
index 14407a0a1..8835f7ffe 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h
@@ -25,11 +25,14 @@
#include "etStdDatatypes.h"
+#include <sys/types.h>
+#include <unistd.h>
+#include <signal.h>
+#include <bits/siginfo.h>
+#include <time.h>
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
-#include <signal.h>
-#include <sys/types.h>
/*--- Data types for room.basic.types */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etThread.c
index 2d7c145f5..30d920a5b 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etThread.c
@@ -90,11 +90,11 @@ void etThread_destruct(etThread* self){
void etThread_sleep(etInt32 millis){
ET_MSC_LOGGER_SYNC_ENTRY("etThread", "sleep")
{
- // TODO: nanosleep doesn't work at all
-// struct timespec time;
-// time.tv_nsec = 1000*1000*millis;
-// time.tv_sec = 0;
-// nanosleep(&time, NULL);
+ /* TODO: nanosleep doesn't work at all */
+/* struct timespec time; */
+/* time.tv_nsec = 1000*1000*millis; */
+/* time.tv_sec = 0; */
+/* nanosleep(&time, NULL); */
if (millis<1000)
millis = 1000;
sleep(millis/1000);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
index a6d15487d..97fe30ef8 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
@@ -67,9 +67,9 @@ void etTimer_start(etTimer* self){
void etTimer_stop(etTimer* self){
ET_MSC_LOGGER_SYNC_ENTRY("etTimer", "stop")
- // To wait until timer has expired use INVALID_HANDLE_VALUE
+ /* To wait until timer has expired use INVALID_HANDLE_VALUE */
if (DeleteTimerQueueTimer(hTimerQueue, self->osTimerData, NULL) == ET_FALSE){
- // ERROR_IO_PENDING indicates outstanding callback functions => no error
+ /* ERROR_IO_PENDING indicates outstanding callback functions => no error */
if(GetLastError() != ERROR_IO_PENDING)
etLogger_logError("etTimer_stop: Timer could not be stopped");
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etDatatypes.h
index 78538eec9..b3344183d 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etDatatypes.h
@@ -20,7 +20,7 @@
#define ET_INT64
#define ET_FLOAT32
-//#define ET_FLOAT64 /* not available on this platform */
+/*#define ET_FLOAT64 /* not available on this platform */ */
#include "etStdDatatypes.h"
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
index 1231b0644..b37d71139 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etMultiThreadedFreeRTOSProjectSpecific_Examples/etMultiThreadedFreeRTOSProjectSpecific_XMC_Dave.c
@@ -23,7 +23,7 @@
void etMultiThreadedFreeRTOSProjectSpecificUserEntry();
-// this function will be called during initialization
-// and must be implemented project spezific
+/* this function will be called during initialization */
+/* and must be implemented project spezific */
void etMultiThreadedFreeRTOSProjectSpecificUserEntry(){
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etPlatformLifecycle.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etPlatformLifecycle.c
index 75c69bda7..f4f56c62b 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etPlatformLifecycle.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etPlatformLifecycle.c
@@ -18,7 +18,7 @@
/* implemenatation for eTrice interfaces*/
-// must be implemented projectspecific
+/* must be implemented projectspecific */
extern void etMultiThreadedFreeRTOSProjectSpecificUserEntry();
void etTimeInit(void);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etThread.c
index d682bfa11..042b63380 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_XMC_FreeRTOS_Dave/etThread.c
@@ -43,7 +43,7 @@ void etThread_construct(
if (xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData)) != pdPASS){
while(1){};
}
-// xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData) );
+/* xTaskCreate( threadFunction, ( signed char * ) threadName, stacksize, self->threadFunctionData, priority, &(self->osData) ); */
ET_MSC_LOGGER_SYNC_EXIT
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etDatatypes.h
index 675ab357b..64eef8a70 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etDatatypes.h
@@ -20,7 +20,7 @@
#define ET_INT64
#define ET_FLOAT32
-//#define ET_FLOAT64 /* not available on this platform */
+/*#define ET_FLOAT64 /* not available on this platform */ */
#include "etStdDatatypes.h"
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etPlatformLifecycle.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etPlatformLifecycle.c
index 38a92d5fb..4a6d937b3 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etPlatformLifecycle.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etPlatformLifecycle.c
@@ -19,24 +19,24 @@
/* implemenatation for eTrice interfaces*/
-// noThread contains the pointer to the one and only execute function
-// in the single threaded environment
+/* noThread contains the pointer to the one and only execute function */
+/* in the single threaded environment */
extern etThread * noThread;
-//void etThread_execute(etThread* self);
+/*void etThread_execute(etThread* self); */
-// must be implemented projectspecific
+/* must be implemented projectspecific */
extern void etSingleThreadedProjectSpecificUserEntry();
void etUserEntry(void){
etTimeInit();
etSingleThreadedProjectSpecificUserEntry();
-// DAVE_Init();
-// DAVE_InstallTickHandler();
-// initHw();
+/* DAVE_Init(); */
+/* DAVE_InstallTickHandler(); */
+/* initHw(); */
}
void etUserPreRun(void){
-// __enable_irq();
+/* __enable_irq(); */
etThread_execute(noThread);
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSema.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSema.c
index aee0abff7..00579a65c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSema.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSema.c
@@ -40,11 +40,11 @@ void etSema_waitForWakeup(etSema* self){
static etTime nextTime = {0,0};
etTime actualTime;
ET_MSC_LOGGER_SYNC_ENTRY("etSema", "waitForWakeup")
- // busy wait as specified in etphys
+ /* busy wait as specified in etphys */
getTimeFromTarget(&actualTime);
if (etTimeHelpers_isGreater(&actualTime, &nextTime)){
etTimeHelpers_add(&nextTime,&(singleThreadedTimer->timerInterval));
- // call the do actions for the single thread
+ /* call the do actions for the single thread */
singleThreadedTimer->timerFunction(singleThreadedTimer->timerFunctionData);
}
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave.c
index 5010b89a6..537c454a0 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave.c
@@ -38,30 +38,30 @@ void DAVE_InstallTickHandler(void);
void getTimeFromTarget(etTime *t) {
etTime t1={0,0};
- // keep in mind that it is not possible to stop the timer counter itself
- // overflow must be checked after reading the counter
- // if an overflow occurs do it again
+ /* keep in mind that it is not possible to stop the timer counter itself */
+ /* overflow must be checked after reading the counter */
+ /* if an overflow occurs do it again */
- // the count flag is clear on read, read it
+ /* the count flag is clear on read, read it */
t1.nSec=ppb->SYST_CSR;
do {
- // amount of ticks = reloadRegister - countRegister
+ /* amount of ticks = reloadRegister - countRegister */
t1.nSec=(ppb->SYST_RVR-ppb->SYST_CVR);
*t = etTargetTime;
}while(ppb->SYST_CSR & 0x00010000);
- // nSec = amount of ticks * 1000 / 120; if CPUCLK == 120Mhz
+ /* nSec = amount of ticks * 1000 / 120; if CPUCLK == 120Mhz */
t1.nSec*=1000;
t1.nSec/=(SYSTIMER_SYS_CORE_CLOCK/1000000);
- // add t1 to time
+ /* add t1 to time */
etTimeHelpers_add(t,&t1);
}
/* the timer interrupt */
void etTick_Handler(void *nanoSecPerTick) {
-// this interrupt will be called every 1ms
-// targetTime.nSec += 1000000L;
+/* this interrupt will be called every 1ms */
+/* targetTime.nSec += 1000000L; */
etTargetTime.nSec += (uint32_t)nanoSecPerTick;
if (etTargetTime.nSec >= 1000000000L) {
@@ -70,13 +70,13 @@ void etTick_Handler(void *nanoSecPerTick) {
}
}
-// initialize the DAVE generated APPs
+/* initialize the DAVE generated APPs */
void etSingleThreadedProjectSpecificUserEntry(void){
DAVE_Init();
DAVE_InstallTickHandler();
}
-// the Dave APP SYSTIMER must be available in the project
+/* the Dave APP SYSTIMER must be available in the project */
void DAVE_InstallTickHandler(void){
uint32_t timerId;
timerId = SYSTIMER_CreateTimer(1000,SYSTIMER_PERIODIC,etTick_Handler,(void*) 1000000);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
index 9725310ba..4f8ef52f8 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
@@ -32,17 +32,17 @@ extern etTime etTargetTime;
void DAVE_InstallTickHandler(void);
void getTimeFromTarget(etTime *t) {
-// return the time
-// make sure that reading the time is an atomic opration
-// => the timer interrupt should not interrupt this operation
+/* return the time */
+/* make sure that reading the time is an atomic opration */
+/* => the timer interrupt should not interrupt this operation */
__disable_irq();
*t = etTargetTime;
__enable_irq();
}
-// the timer interrupt
+/* the timer interrupt */
void etTick_Handler(void *nanoSecPerTick) {
-// this interrupt will be called every 1ms
+/* this interrupt will be called every 1ms */
etTargetTime.nSec += (uint32_t)nanoSecPerTick;
@@ -52,13 +52,13 @@ void etTick_Handler(void *nanoSecPerTick) {
}
}
-// this function will be called during initialization
+/* this function will be called during initialization */
void etSingleThreadedProjectSpecificUserEntry(void){
DAVE_Init();
DAVE_InstallTickHandler();
}
-// The SYSTIMER App from DAVE must be available
+/* The SYSTIMER App from DAVE must be available */
void DAVE_InstallTickHandler(void){
uint32_t timerId;
timerId = SYSTIMER_CreateTimer(1000,SYSTIMER_PERIODIC,etTick_Handler,(void*) 1000000);
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etThread.c
index efec2794f..d359b9609 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etThread.c
@@ -41,8 +41,8 @@ void etThread_construct(
self->threadName = threadName;
self->threadFunction = threadFunction;
self->threadFunctionData = threadFunctionData;
- // for the single threaded port stacksize and prio is not needed
- // save the Threadpointer as singleton
+ /* for the single threaded port stacksize and prio is not needed */
+ /* save the Threadpointer as singleton */
if(noThread==0){
noThread=self;
}else{
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etTimer.c
index 68ee59dc8..1b6a8a923 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etTimer.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_32Bit_Generic/etTimer.c
@@ -27,7 +27,7 @@ void etTimer_construct(etTimer* self, etTime* timerInterval, etTimerFunction tim
self->timerFunction = timerFunction;
self->timerFunctionData = timerFunctionData;
}
- // store the timer, it will be needed to call the do actions
+ /* store the timer, it will be needed to call the do actions */
singleThreadedTimer = self;
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etDatatypes.h
index 675ab357b..64eef8a70 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etDatatypes.h
@@ -20,7 +20,7 @@
#define ET_INT64
#define ET_FLOAT32
-//#define ET_FLOAT64 /* not available on this platform */
+/*#define ET_FLOAT64 /* not available on this platform */ */
#include "etStdDatatypes.h"
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatform.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatform.h
index 6eb199dc7..7ab99bb19 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatform.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatform.h
@@ -10,17 +10,17 @@
/** Dave ST specific definitions */
-// define if SYSTIMER App is available or not
-// some higher level Apps requires the SYSTIMER App
-// if SYSTIMER App is not required from the application,
-// eTrice will use the TimerTick Interrupt directly
+/* define if SYSTIMER App is available or not */
+/* some higher level Apps requires the SYSTIMER App */
+/* if SYSTIMER App is not required from the application, */
+/* eTrice will use the TimerTick Interrupt directly */
#define ET_USE_DAVE_SYSTIMER_APP
-// define systimer interrupt period [us]
-// valid with or without SYSTIMER App
-// e.g. 1000 => Systimer will tick every 1ms
-// 500 => Systimer will tick every 500us
-// 4000 => Systimer will tick every 4ms
+/* define systimer interrupt period [us] */
+/* valid with or without SYSTIMER App */
+/* e.g. 1000 => Systimer will tick every 1ms */
+/* 500 => Systimer will tick every 500us */
+/* 4000 => Systimer will tick every 4ms */
#define ET_DAVE_TICK_PERIOD_USEC 1000
/*********************************/
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatformLifecycle.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatformLifecycle.c
index c007a524a..a8a7a3cd3 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatformLifecycle.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etPlatformLifecycle.c
@@ -19,12 +19,12 @@
/* implemenatation for eTrice interfaces*/
-// noThread contains the pointer to the one and only execute function
-// in the single threaded environment
+/* noThread contains the pointer to the one and only execute function */
+/* in the single threaded environment */
extern etThread * noThread;
void etThread_execute(etThread* self);
-// must be implemented projectspecific
+/* must be implemented projectspecific */
extern void etSingleThreadedProjectSpecificUserEntry();
void etUserEntry(void){
@@ -34,7 +34,7 @@ void etUserEntry(void){
}
void etUserPreRun(void){
-// __enable_irq();
+/* __enable_irq(); */
etThread_execute(noThread);
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSema.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSema.c
index aee0abff7..00579a65c 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSema.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSema.c
@@ -40,11 +40,11 @@ void etSema_waitForWakeup(etSema* self){
static etTime nextTime = {0,0};
etTime actualTime;
ET_MSC_LOGGER_SYNC_ENTRY("etSema", "waitForWakeup")
- // busy wait as specified in etphys
+ /* busy wait as specified in etphys */
getTimeFromTarget(&actualTime);
if (etTimeHelpers_isGreater(&actualTime, &nextTime)){
etTimeHelpers_add(&nextTime,&(singleThreadedTimer->timerInterval));
- // call the do actions for the single thread
+ /* call the do actions for the single thread */
singleThreadedTimer->timerFunction(singleThreadedTimer->timerFunctionData);
}
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
index 0f4e704c3..fa6708967 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etSingleThreadedProjectSpecific_Examples/etSingleThreadedProjectSpecific_XMC_Dave_simple.c
@@ -34,15 +34,15 @@ extern etTime etTargetTime;
void DAVE_InstallTickHandler(void);
void getTimeFromTarget(etTime *t) {
-// return the time
-// make sure that reading the time is an atomic opration
-// => the timer interrupt should not interrupt this operation
+/* return the time */
+/* make sure that reading the time is an atomic opration */
+/* => the timer interrupt should not interrupt this operation */
__disable_irq();
*t = etTargetTime;
__enable_irq();
}
-// the timer interrupt
+/* the timer interrupt */
void etTick_Handler(void *nanoSecPerTick) {
etTargetTime.nSec += (uint32_t)nanoSecPerTick;
@@ -53,7 +53,7 @@ void etTick_Handler(void *nanoSecPerTick) {
}
}
-// this function will be called during initialization
+/* this function will be called during initialization */
void etSingleThreadedProjectSpecificUserEntry(void){
DAVE_InstallTickHandler();
}
@@ -65,7 +65,7 @@ void SysTick_Handler(void){
}
#endif
-// The SYSTIMER App from DAVE must be available
+/* The SYSTIMER App from DAVE must be available */
void DAVE_InstallTickHandler(void){
#ifdef ET_USE_DAVE_SYSTIMER_APP
uint32_t timerId;
@@ -73,5 +73,5 @@ void DAVE_InstallTickHandler(void){
SYSTIMER_StartTimer(timerId);
#else
SysTick_Config(SystemCoreClock * (ET_DAVE_TICK_PERIOD_USEC * 0.000001F));
-#endif //ET_USE_DAVE_SYSTIMER_APP
+#endif /*ET_USE_DAVE_SYSTIMER_APP */
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etThread.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etThread.c
index efec2794f..d359b9609 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etThread.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etThread.c
@@ -41,8 +41,8 @@ void etThread_construct(
self->threadName = threadName;
self->threadFunction = threadFunction;
self->threadFunctionData = threadFunctionData;
- // for the single threaded port stacksize and prio is not needed
- // save the Threadpointer as singleton
+ /* for the single threaded port stacksize and prio is not needed */
+ /* save the Threadpointer as singleton */
if(noThread==0){
noThread=self;
}else{
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etTimer.c
index b75385e3c..0554072fd 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etTimer.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_XMC_Dave/etTimer.c
@@ -27,7 +27,7 @@ void etTimer_construct(etTimer* self, etTime* timerInterval, etTimerFunction tim
self->timerFunction = timerFunction;
self->timerFunctionData = timerFunctionData;
}
- // store the timer, it will be needed to call the do actions
+ /* store the timer, it will be needed to call the do actions */
singleThreadedTimer = self;
ET_MSC_LOGGER_SYNC_EXIT

Back to the top