Weather control switch for connected day. NXP LPC 1768 module. Ethernet connectivity.

Dependencies:   EthernetInterface mbed-rtos mbed nanoservice_client_1_12

Fork of Trenton_Switch_LPC1768_WIFLY by Demo Team

Revision:
1:99076f2d9408
Parent:
0:ce33c63eefe5
Child:
5:12ea15b9c2f4
--- a/main.h	Sun Sep 08 18:31:33 2013 +0000
+++ b/main.h	Fri Sep 13 18:02:03 2013 +0000
@@ -1,6 +1,25 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 #ifndef MAIN_H
 #define MAIN_H
 
+#define WIGO_BOARD 1
+
+#if (WIGO_BOARD == 1)
+
 extern DigitalOut ledr;
 extern DigitalOut ledg;
 extern DigitalOut ledb;
@@ -27,4 +46,47 @@
 #define LED_D3_ON      led3 = 0;
 #define LED_D3_TOGGLE  led3 = !led3;
 
+#define SET_PWR_EN1    PWR_EN1 = 0
+#define SET_PWR_EN2    PWR_EN2 = 1
+
+#define WLAN_ISF_PCR        PORTA->PCR[16]
+#define WLAN_ISF_ISFR       PORTA->ISFR
+#define WLAN_ISF_MASK       (1<<16)
+
+#define CLEAR_PCR_INTERRUPT    WLAN_ISF_PCR|=PORT_PCR_ISF_MASK;
+#define CLEAN_PORT_INTERRUPT    WLAN_ISF_ISFR|=WLAN_ISF_MASK;
+
+#else
+
+#define CLEAR_PCR_INTERRUPT
+#define CLEAN_PORT_INTERRUPT
+
+#define RED_OFF
+#define RED_ON
+#define RED_TOGGLE
+#define GREEN_OFF
+#define GREEN_ON
+#define GREEN_TOGGLE
+#define BLUE_OFF
+#define BLUE_ON
+#define BLUE_TOGGLE
+#define LED_D1_OFF
+#define LED_D1_ON
+#define LED_D1_TOGGLE
+#define LED_D2_OFF
+#define LED_D2_ON
+#define LED_D2_TOGGLE
+#define LED_D3_OFF
+#define LED_D3_ON
+#define LED_D3_TOGGLE
+
+#define SET_PWR_EN1
+#define SET_PWR_EN2
+
+#define WLAN_ISF_PCR
+#define WLAN_ISF_ISFR
+#define WLAN_ISF_MASK
+
 #endif
+
+#endif