diff --git a/examples/ide-eclipse/README.rst b/examples/ide-eclipse/README.rst index 8e02c923..4bce5c62 100644 --- a/examples/ide-eclipse/README.rst +++ b/examples/ide-eclipse/README.rst @@ -5,7 +5,7 @@ The detailed information and steps are described in this article: `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO `_. -.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_build_arduino_pro5v-1024x822.png +.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_project_platformio_builder_1.png :width: 850px :target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio diff --git a/examples/ide-eclipse/titiva_lm4f120/.cproject b/examples/ide-eclipse/titiva_lm4f120/.cproject index 45fa200d..8cced02a 100644 --- a/examples/ide-eclipse/titiva_lm4f120/.cproject +++ b/examples/ide-eclipse/titiva_lm4f120/.cproject @@ -20,26 +20,26 @@ - + diff --git a/examples/ide-eclipse/titiva_lm4f120/src/main.c b/examples/ide-eclipse/titiva_lm4f120/src/main.c index c943670e..3a69d908 100644 --- a/examples/ide-eclipse/titiva_lm4f120/src/main.c +++ b/examples/ide-eclipse/titiva_lm4f120/src/main.c @@ -3,9 +3,9 @@ * See LICENSE for details. */ -#define false 0 -#define true 1 -typedef int bool; +#define false 0 +#define true 1 +typedef int bool; #include #include "inc/hw_memmap.h" @@ -16,27 +16,21 @@ typedef int bool; #define LED_BLUE GPIO_PIN_2 #define LED_GREEN GPIO_PIN_3 -int main(void) -{ + +void setup() { SysCtlClockSet( - SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); + SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN); - - while (1) - { - GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED); - SysCtlDelay(3000000); - GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_BLUE); - SysCtlDelay(3000000); - GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_GREEN); - SysCtlDelay(3000000); - } - - return 0; } -// hook for Energia main.cpp where these methods are defined -void setup() {} -void loop() {} + +void loop() { + GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED); + SysCtlDelay(3000000); + GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_BLUE); + SysCtlDelay(3000000); + GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_GREEN); + SysCtlDelay(3000000); +}