diff --git a/.cproject b/.cproject
index 972f2bf..ec0630d 100644
--- a/.cproject
+++ b/.cproject
@@ -157,6 +157,7 @@
+
@@ -165,11 +166,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<TargetConfig>
-<Properties property_0="" property_1="" property_3="NXP" property_4="LPC1343" property_count="5" version="1"/>
-<infoList vendor="NXP">
-<info chip="LPC1343" match_id="0x3d00002b" name="LPC1343" stub="crt_emu_lpc11_13_nxp">
-<chip>
-<name>LPC1343</name>
+<Properties property_0="" property_3="NXP" property_4="LPC1343" property_count="5" version="1"/>
+<infoList vendor="NXP"><info chip="LPC1343" match_id="0x3d00002b" name="LPC1343" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC1343</name>
<family>LPC13xx</family>
<vendor>NXP (formerly Philips)</vendor>
<reset board="None" core="Real" sys="Real"/>
@@ -200,8 +198,7 @@
<peripheralInstance derived_from="LPC17_NVIC" determined="infoFile" id="NVIC" location="0xe000e000"/>
<peripheralInstance derived_from="CM3_DCR" determined="infoFile" id="DCR" location="0xe000edf0"/>
</chip>
-<processor>
-<name gcc_name="cortex-m3">Cortex-M3</name>
+<processor><name gcc_name="cortex-m3">Cortex-M3</name>
<family>Cortex-M</family>
</processor>
<link href="nxp_lpc11_13_peripheral.xme" show="embed" type="simple"/>
diff --git a/projectconfig.h b/projectconfig.h
index d3743ce..4bee4d3 100644
--- a/projectconfig.h
+++ b/projectconfig.h
@@ -120,14 +120,20 @@
LPC1343 LPCXpresso board
+ CFG_BRD_LPC1343_USBUG
+ ==============================
+
+ LPC1343 USBug board
+
-----------------------------------------------------------------------*/
- #define CFG_BRD_LPC1343_REFDESIGN
+ // #define CFG_BRD_LPC1343_REFDESIGN
// #define CFG_BRD_LPC1343_REFDESIGN_MINIMAL
// #define CFG_BRD_LPC1343_TFTLCDSTANDALONE_USB
// #define CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART
// #define CFG_BRD_LPC1343_802154USBSTICK
// #define CFG_BRD_LPC1343_OLIMEX_P
// #define CFG_BRD_LPC1343_LPCXPRESSO
+ #define CFG_BRD_LPC1343_USBUG
/*=========================================================================*/
@@ -314,6 +320,13 @@
// #define GPIO_ENABLE_IRQ2
// #define GPIO_ENABLE_IRQ3
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define GPIO_ENABLE_IRQ0
+ #define GPIO_ENABLE_IRQ1
+ // #define GPIO_ENABLE_IRQ2
+ // #define GPIO_ENABLE_IRQ3
+ #endif
/*=========================================================================*/
@@ -384,6 +397,11 @@
#define CFG_UART_BAUDRATE (115200)
#define CFG_UART_BUFSIZE (512)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define CFG_UART_BAUDRATE (115200)
+ #define CFG_UART_BUFSIZE (512)
+ #endif
/*=========================================================================*/
@@ -424,6 +442,11 @@
#define CFG_SSP0_SCKPIN_2_11
// #define CFG_SSP0_SCKPIN_0_6
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define CFG_SSP0_SCKPIN_2_11
+ // #define CFG_SSP0_SCKPIN_0_6
+ #endif
/*=========================================================================*/
@@ -471,6 +494,11 @@
#define ADC_AVERAGING_ENABLE (0)
#define ADC_AVERAGING_SAMPLES (5)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define ADC_AVERAGING_ENABLE (1)
+ #define ADC_AVERAGING_SAMPLES (5)
+ #endif
/*=========================================================================*/
@@ -525,6 +553,13 @@
#define CFG_LED_ON (0)
#define CFG_LED_OFF (1)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define CFG_LED_PORT (0)
+ #define CFG_LED_PIN (7)
+ #define CFG_LED_ON (0)
+ #define CFG_LED_OFF (1)
+ #endif
/*=========================================================================*/
@@ -593,6 +628,13 @@
#define CFG_SDCARD_CDPORT (3)
#define CFG_SDCARD_CDPIN (0)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define CFG_SDCARD
+ #define CFG_SDCARD_READONLY (1) // Must be 0 or 1
+ #define CFG_SDCARD_CDPORT (3)
+ #define CFG_SDCARD_CDPIN (0)
+ #endif
/*=========================================================================*/
@@ -675,6 +717,14 @@
#define CFG_USBCDC_INITTIMEOUT (5000)
#define CFG_USBCDC_BUFFERSIZE (256)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define CFG_USBHID
+ #define CFG_USBCDC
+ #define CFG_USBCDC_BAUDRATE (115200)
+ #define CFG_USBCDC_INITTIMEOUT (5000)
+ #define CFG_USBCDC_BUFFERSIZE (256)
+ #endif
/*=========================================================================*/
@@ -741,6 +791,13 @@
#define CFG_PRINTF_USBCDC
#define CFG_PRINTF_NEWLINE "\r\n"
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define CFG_PRINTF_MAXSTRINGSIZE (255)
+ // #define CFG_PRINTF_UART
+ #define CFG_PRINTF_USBCDC
+ #define CFG_PRINTF_NEWLINE "\r\n"
+ #endif
/*=========================================================================*/
@@ -902,6 +959,20 @@
#define CFG_INTERFACE_CONFIRMREADY (0)
#define CFG_INTERFACE_LONGSYSINFO (0)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ #define CFG_INTERFACE
+ #define CFG_INTERFACE_MAXMSGSIZE (256)
+ #define CFG_INTERFACE_PROMPT "LPC1343 >> "
+ #define CFG_INTERFACE_SILENTMODE (0)
+ #define CFG_INTERFACE_DROPCR (0)
+ #define CFG_INTERFACE_ENABLEIRQ (0)
+ #define CFG_INTERFACE_IRQPORT (0)
+ #define CFG_INTERFACE_IRQPIN (7)
+ #define CFG_INTERFACE_SHORTERRORS (0)
+ #define CFG_INTERFACE_CONFIRMREADY (0)
+ #define CFG_INTERFACE_LONGSYSINFO (0)
+ #endif
/*=========================================================================*/
@@ -982,6 +1053,11 @@
// #define CFG_I2CEEPROM
#define CFG_I2CEEPROM_SIZE (3072)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define CFG_I2CEEPROM
+ #define CFG_I2CEEPROM_SIZE (3072)
+ #endif
/*=========================================================================*/
@@ -1131,6 +1207,16 @@
#define CFG_CHIBI_PROMISCUOUS (0)
#define CFG_CHIBI_BUFFERSIZE (128)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define CFG_CHIBI
+ #define CFG_CHIBI_MODE (0) // OQPSK_868MHZ
+ #define CFG_CHIBI_POWER (0xE9) // CHB_PWR_EU2_3DBM
+ #define CFG_CHIBI_CHANNEL (0) // 868-868.6 MHz
+ #define CFG_CHIBI_PANID (0x1234)
+ #define CFG_CHIBI_PROMISCUOUS (0)
+ #define CFG_CHIBI_BUFFERSIZE (128)
+ #endif
/*=========================================================================*/
@@ -1220,6 +1306,14 @@
#define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
#define CFG_TFTLCD_TS_KEYPADDELAY (100)
#endif
+
+ #ifdef CFG_BRD_LPC1343_USBUG
+ // #define CFG_TFTLCD
+ #define CFG_TFTLCD_INCLUDESMALLFONTS (0)
+ #define CFG_TFTLCD_USEAAFONTS (0)
+ #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
+ #define CFG_TFTLCD_TS_KEYPADDELAY (100)
+ #endif
/*=========================================================================*/
@@ -1284,8 +1378,9 @@
!defined CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART && \
!defined CFG_BRD_LPC1343_802154USBSTICK && \
!defined CFG_BRD_LPC1343_OLIMEX_P && \
- !defined CFG_BRD_LPC1343_LPCXPRESSO
- #error "You must defined a target board (CFG_BRD_LPC1343_REFDESIGN or CFG_BRD_LPC1343_REFDESIGN_MINIMAL or CFG_BRD_LPC1343_TFTLCDSTANDALONE or CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART or CFG_BRD_LPC1343_802154USBSTICK or CFG_BRD_LPC1343_LPCXPRESSO)"
+ !defined CFG_BRD_LPC1343_LPCXPRESSO && \
+ !defined CFG_BRD_LPC1343_USBUG
+ #error "You must defined a target board (CFG_BRD_LPC1343_REFDESIGN or CFG_BRD_LPC1343_REFDESIGN_MINIMAL or CFG_BRD_LPC1343_TFTLCDSTANDALONE or CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART or CFG_BRD_LPC1343_802154USBSTICK or CFG_BRD_LPC1343_LPCXPRESSO or CFG_BRD_LPC1343_USBUG)"
#endif
#if defined CFG_PRINTF_USBCDC && defined CFG_PRINTF_UART