forked from platformio/platformio-core
Fix multiple definition of "main" function
This commit is contained in:
@ -13,27 +13,19 @@
|
||||
#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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user