X-Git-Url: http://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/11f5d7c08426e67adfa3641958febe3543cdf245..ba55cdcb588fe371bfa684d61d9652c84cc3c42f:/projectconfig.h diff --git a/projectconfig.h b/projectconfig.h index 8911fbd..f8ae340 100644 --- a/projectconfig.h +++ b/projectconfig.h @@ -7,7 +7,7 @@ Software License Agreement (BSD License) - Copyright (c) 2010, microBuilder SARL + Copyright (c) 2012, microBuilder SARL All rights reserved. Redistribution and use in source and binary forms, with or without @@ -110,6 +110,16 @@ microBuilder.eu USB stick 802.15.4 868/915MHz RF transceiver + CFG_BRD_LPC1343_OLIMEX_P + ============================== + + Simple Olimex LPC1343 breakout board + + CFG_BRD_LPC1343_LPCXPRESSO + ============================== + + LPC1343 LPCXpresso board + -----------------------------------------------------------------------*/ #define CFG_BRD_LPC1343_REFDESIGN // #define CFG_BRD_LPC1343_REFDESIGN_MINIMAL @@ -117,6 +127,7 @@ // #define CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART // #define CFG_BRD_LPC1343_802154USBSTICK // #define CFG_BRD_LPC1343_OLIMEX_P + // #define CFG_BRD_LPC1343_LPCXPRESSO /*=========================================================================*/ @@ -198,9 +209,9 @@ /*========================================================================= FIRMWARE VERSION SETTINGS -----------------------------------------------------------------------*/ - #define CFG_FIRMWARE_VERSION_MAJOR (0) - #define CFG_FIRMWARE_VERSION_MINOR (9) - #define CFG_FIRMWARE_VERSION_REVISION (8) + #define CFG_FIRMWARE_VERSION_MAJOR (1) + #define CFG_FIRMWARE_VERSION_MINOR (0) + #define CFG_FIRMWARE_VERSION_REVISION (0) /*=========================================================================*/ @@ -293,6 +304,13 @@ // #define GPIO_ENABLE_IRQ2 // #define GPIO_ENABLE_IRQ3 #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #define GPIO_ENABLE_IRQ0 + #define GPIO_ENABLE_IRQ1 + // #define GPIO_ENABLE_IRQ2 + // #define GPIO_ENABLE_IRQ3 + #endif /*=========================================================================*/ @@ -358,6 +376,11 @@ #define CFG_UART_BAUDRATE (115200) #define CFG_UART_BUFSIZE (512) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define CFG_UART_BAUDRATE (115200) + #define CFG_UART_BUFSIZE (512) + #endif /*=========================================================================*/ @@ -393,6 +416,11 @@ #define CFG_SSP0_SCKPIN_2_11 // #define CFG_SSP0_SCKPIN_0_6 #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define CFG_SSP0_SCKPIN_2_11 + // #define CFG_SSP0_SCKPIN_0_6 + #endif /*=========================================================================*/ @@ -403,9 +431,9 @@ ADC_AVERAGING_ENABLE To get better results, the ADC code can take a number of samples and return the average value. This is slower, but can give more - accurate results caused of single-reading - peaks and dips. - To enable average, set ADC_AVERAGING_ENABLE + accurate results compared to single-reading. + + To enable averaging, set ADC_AVERAGING_ENABLE to a non-zero value. ADC_AVERAGING_SAMPLES The number of ADC samples to read and average if ADC averaging is enabled. @@ -435,6 +463,11 @@ #define ADC_AVERAGING_ENABLE (0) #define ADC_AVERAGING_SAMPLES (5) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define ADC_AVERAGING_ENABLE (0) + #define ADC_AVERAGING_SAMPLES (5) + #endif /*=========================================================================*/ @@ -482,6 +515,13 @@ #define CFG_LED_ON (0) #define CFG_LED_OFF (1) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define CFG_LED_PORT (0) + #define CFG_LED_PIN (7) + #define CFG_LED_ON (0) + #define CFG_LED_OFF (1) + #endif /*=========================================================================*/ @@ -543,6 +583,13 @@ #define CFG_SDCARD_CDPORT (3) #define CFG_SDCARD_CDPIN (0) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #define CFG_SDCARD + #define CFG_SDCARD_READONLY (1) // Must be 0 or 1 + #define CFG_SDCARD_CDPORT (3) + #define CFG_SDCARD_CDPIN (0) + #endif /*=========================================================================*/ @@ -617,6 +664,14 @@ #define CFG_USBCDC_INITTIMEOUT (5000) #define CFG_USBCDC_BUFFERSIZE (256) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #define CFG_USBHID + #define CFG_USBCDC + #define CFG_USBCDC_BAUDRATE (115200) + #define CFG_USBCDC_INITTIMEOUT (5000) + #define CFG_USBCDC_BUFFERSIZE (256) + #endif /*=========================================================================*/ @@ -624,6 +679,7 @@ PRINTF REDIRECTION ----------------------------------------------------------------------- + CFG_PRINTF_MAXSTRINGSIZE Maximum size of string buffer for printf CFG_PRINTF_UART Will cause all printf statements to be redirected to UART CFG_PRINTF_USBCDC Will cause all printf statements to be @@ -635,40 +691,53 @@ output will be ignored. -----------------------------------------------------------------------*/ #ifdef CFG_BRD_LPC1343_REFDESIGN + #define CFG_PRINTF_MAXSTRINGSIZE (255) // #define CFG_PRINTF_UART #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\r\n" #endif #ifdef CFG_BRD_LPC1343_REFDESIGN_MINIMAL + #define CFG_PRINTF_MAXSTRINGSIZE (255) #define CFG_PRINTF_UART // #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\r\n" #endif #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE_USB + #define CFG_PRINTF_MAXSTRINGSIZE (255) // #define CFG_PRINTF_UART #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\r\n" #endif #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART + #define CFG_PRINTF_MAXSTRINGSIZE (255) #define CFG_PRINTF_UART // #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\n" #endif #ifdef CFG_BRD_LPC1343_802154USBSTICK + #define CFG_PRINTF_MAXSTRINGSIZE (255) // #define CFG_PRINTF_UART #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\r\n" #endif #ifdef CFG_BRD_LPC1343_OLIMEX_P + #define CFG_PRINTF_MAXSTRINGSIZE (255) // #define CFG_PRINTF_UART #define CFG_PRINTF_USBCDC #define CFG_PRINTF_NEWLINE "\r\n" #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define CFG_PRINTF_MAXSTRINGSIZE (255) + // #define CFG_PRINTF_UART + #define CFG_PRINTF_USBCDC + #define CFG_PRINTF_NEWLINE "\r\n" + #endif /*=========================================================================*/ @@ -803,6 +872,19 @@ #define CFG_INTERFACE_SHORTERRORS (0) #define CFG_INTERFACE_CONFIRMREADY (0) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + #define CFG_INTERFACE + #define CFG_INTERFACE_MAXMSGSIZE (256) + #define CFG_INTERFACE_PROMPT "LPC-P1343 >> " + #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) + #endif /*=========================================================================*/ @@ -878,6 +960,11 @@ // #define CFG_I2CEEPROM #define CFG_I2CEEPROM_SIZE (3072) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #define CFG_I2CEEPROM + #define CFG_I2CEEPROM_SIZE (3072) + #endif /*=========================================================================*/ @@ -1017,6 +1104,16 @@ #define CFG_CHIBI_PROMISCUOUS (0) #define CFG_CHIBI_BUFFERSIZE (128) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #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 /*=========================================================================*/ @@ -1028,7 +1125,7 @@ a pre-determined LCD screen to be included during build. Only one LCD driver can be included during the build process (for ex. - 'drivers/lcd/hw/ILI9325.c') + 'drivers/displays/hw/ILI9325.c') CFG_TFTLCD_INCLUDESMALLFONTS If set to 1, smallfont support will be included for 3x6, 5x8, 7x8 and 8x8 fonts. This should only be enabled if these small @@ -1087,6 +1184,13 @@ #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50) #define CFG_TFTLCD_TS_KEYPADDELAY (100) #endif + + #ifdef CFG_BRD_LPC1343_LPCXPRESSO + // #define CFG_TFTLCD + #define CFG_TFTLCD_INCLUDESMALLFONTS (0) + #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50) + #define CFG_TFTLCD_TS_KEYPADDELAY (100) + #endif /*=========================================================================*/ @@ -1149,8 +1253,9 @@ !defined CFG_BRD_LPC1343_TFTLCDSTANDALONE_USB && \ !defined CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART && \ !defined CFG_BRD_LPC1343_802154USBSTICK && \ - !defined CFG_BRD_LPC1343_OLIMEX_P - #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)" + !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)" #endif #if defined CFG_PRINTF_USBCDC && defined CFG_PRINTF_UART