Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-05-18 07:24:43 +0000
committerHenrik Rentz-Reichert2012-05-18 07:24:43 +0000
commit8f6fe13cc9f791ef6ce216e6758fcbd13f7a13d4 (patch)
treeba6482ddd232c7fd81d9c79a043aa2ced2e9ec3c /runtime
parent0b17b0295975dade3d205685c203fb8cc318f569 (diff)
parent5e9994971f573ff48a9f0cf146e17c429156ad2f (diff)
downloadorg.eclipse.etrice-8f6fe13cc9f791ef6ce216e6758fcbd13f7a13d4.tar.gz
org.eclipse.etrice-8f6fe13cc9f791ef6ce216e6758fcbd13f7a13d4.tar.xz
org.eclipse.etrice-8f6fe13cc9f791ef6ce216e6758fcbd13f7a13d4.zip
Merge branch 'master' of ssh://hrentzreich@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git
Conflicts: runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c35
2 files changed, 37 insertions, 2 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h
index fe1257ba4..0d212c593 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/platform/etTimer.h
@@ -10,8 +10,8 @@
*
*******************************************************************************/
-#ifndef __ETTIMER_H__
-#define __ETTIMER_H__
+#ifndef _ETTIMER_H_
+#define _ETTIMER_H_
#include "etDatatypes.h"
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c
index 9dec5c084..1650cd8a4 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MSP430/etPlatform.c
@@ -49,9 +49,44 @@ static void prvSetupHardware(void) {
/* select port pin functions */
halBoardInit();
+ P1DIR |= 0x03;
+ P2DIR &= ~0xC0;
+ P2REN |= 0xC0;
+ P2OUT |= 0xC0;
+
LFXT_Start(XT1DRIVE_0); /* enable oszillator */
Init_FLL_Settle((unsigned short) ulCPU_Clock_KHz, 488); /* clock divisor */
}
+unsigned char getButtonStatus(unsigned int id){
+ switch (id){
+ case 1:return P2IN & 0x80;
+ break;
+ case 2:return P2IN & 0x40;
+ break;
+ default: return 0xFF;
+ };
+}
+
+void setLedPin (unsigned int id, unsigned int onOff){
+ switch (id){
+ case 1:
+ if (onOff){
+ P1OUT |= 0x01;
+ }else{
+ P1OUT &= ~0x01;
+ }
+ break;
+ case 2:
+ if (onOff){
+ P1OUT |= 0x02;
+ }else{
+ P1OUT &= ~0x02;
+ }
+ break;
+ default:
+ }
+}
+

Back to the top