489064daa5fcd09888ec6035f887bc54512589e1
1 /**************************************************************************/
4 @author K. Townsend (microBuilder.eu)
8 Software License Agreement (BSD License)
10 Copyright (c) 2010, microBuilder SARL
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 1. Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 2. Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 3. Neither the name of the copyright holders nor the
21 names of its contributors may be used to endorse or promote products
22 derived from this software without specific prior written permission.
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
25 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
28 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /**************************************************************************/
37 #ifndef _PROJECTCONFIG_H_
38 #define _PROJECTCONFIG_H_
43 /*=========================================================================
46 Because several boards use this code library with sometimes slightly
47 different pin configuration, you will need to specify which board you
48 are using by enabling one of the following definitions. The code base
49 will then try to configure itself accordingly for that board.
50 -----------------------------------------------------------------------*/
51 // #define CFG_BRD_LPC1343_REFDESIGN
52 #define CFG_BRD_LPC1343_TFTLCDSTANDALONE
53 // #define CFG_BRD_LPC1343_802154USBSTICK
54 /*=========================================================================*/
57 /**************************************************************************
59 -----------------------------------------------------------------------
60 This table tries to give an indication of which GPIO pins and
61 peripherals are used by the available drivers and SW examples. Only
62 dedicated GPIO pins available on the LPC1343 Reference Board are shown
63 below. Any unused peripheral blocks like I2C, SSP, ADC, etc., can
64 also be used as GPIO if they are available.
67 ========= ================= =======
68 8 9 10 11 1 2 3 4 5 6 7 8 9 0 1 2 3
70 SDCARD . . . . . . . . . . . . . X . . .
71 PWM . X . . . . . . . . . . . . . . .
72 STEPPER . . . . . . . . . . . . . X X X X
73 CHIBI X X X . . . . . . . . . . . . . .
74 ILI9325/8 X X X X X X X X X X X X X . . . X
75 ST7565 X X X X X X X X X X X X X . . . X
76 ST7735 . . . . X X X X X X . . . . . . .
77 SSD1306 . . . . X X X . X X . . . . . . .
78 MCP121 . . . . . . . . . . . . . . X . .
81 ====================== === ======= ====
82 16B0 16B1 32B0 32B1 0 0 1 2 3 0
84 SDCARD . . . . X . . . . .
85 PWM . X . . . . . . . .
86 PMU [1] . . X . . . . . . .
87 USB . . . X . . . . . .
88 STEPPER . . X . . . . . . .
89 CHIBI x . . . X . . . . .
90 ILI9325/8 . . . . . X X X X .
91 ST7565 . . . . . X X X X .
92 ST7535 . . . . . . . . . .
93 SSD1306 . . . . . . . . . .
94 INTERFACE . . . . . . . . . X[2]
96 [1] PMU uses 32-bit Timer 0 for SW wakeup from deep-sleep. This timer
97 can safely be used by other peripherals, but may need to be
98 reconfigured when you wakeup from deep-sleep.
99 [2] INTERFACE can be configured to use either USBCDC or UART
101 **************************************************************************/
104 /*=========================================================================
105 FIRMWARE VERSION SETTINGS
106 -----------------------------------------------------------------------*/
107 #define CFG_FIRMWARE_VERSION_MAJOR (0)
108 #define CFG_FIRMWARE_VERSION_MINOR (9)
109 #define CFG_FIRMWARE_VERSION_REVISION (2)
110 /*=========================================================================*/
113 /*=========================================================================
115 -----------------------------------------------------------------------
117 CFG_CPU_CCLK Value is for reference only. 'core/cpu/cpu.c' must
118 be modified to change the clock speed, but the value
119 should be indicated here since CFG_CPU_CCLK is used by
120 other peripherals to determine timing.
122 -----------------------------------------------------------------------*/
123 #ifdef CFG_BRD_LPC1343_REFDESIGN
124 #define CFG_CPU_CCLK (72000000) // 1 tick = 13.88nS
127 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
128 #define CFG_CPU_CCLK (72000000) // 1 tick = 13.88nS
131 #ifdef CFG_BRD_LPC1343_802154USBSTICK
132 #define CFG_CPU_CCLK (72000000) // 1 tick = 13.88nS
134 /*=========================================================================*/
137 /*=========================================================================
139 -----------------------------------------------------------------------
141 CFG_SYSTICK_DELAY_IN_MS The number of milliseconds between each tick
142 of the systick timer.
144 -----------------------------------------------------------------------*/
145 #ifdef CFG_BRD_LPC1343_REFDESIGN
146 #define CFG_SYSTICK_DELAY_IN_MS (1)
149 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
150 #define CFG_SYSTICK_DELAY_IN_MS (1)
153 #ifdef CFG_BRD_LPC1343_802154USBSTICK
154 #define CFG_SYSTICK_DELAY_IN_MS (1)
156 /*=========================================================================*/
159 /*=========================================================================
161 -----------------------------------------------------------------------
163 CFG_UART_BAUDRATE The default UART speed. This value is used
164 when initialising UART, and should be a
165 standard value like 57600, 9600, etc.
166 NOTE: This value may be overridden if
167 another value is stored in EEPROM!
168 CFG_UART_BUFSIZE The length in bytes of the UART RX FIFO. This
169 will determine the maximum number of received
170 characters to store in memory.
172 -----------------------------------------------------------------------*/
173 #ifdef CFG_BRD_LPC1343_REFDESIGN
174 #define CFG_UART_BAUDRATE (115200)
175 #define CFG_UART_BUFSIZE (512)
178 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
179 #define CFG_UART_BAUDRATE (115200)
180 #define CFG_UART_BUFSIZE (512)
183 #ifdef CFG_BRD_LPC1343_802154USBSTICK
184 #define CFG_UART_BAUDRATE (115200)
185 #define CFG_UART_BUFSIZE (512)
187 /*=========================================================================*/
190 /*=========================================================================
192 -----------------------------------------------------------------------
194 CFG_SSP0_SCKPIN_2_11 Indicates which pin should be used for SCK0
197 -----------------------------------------------------------------------*/
198 #ifdef CFG_BRD_LPC1343_REFDESIGN
199 #define CFG_SSP0_SCKPIN_2_11
200 // #define CFG_SSP0_SCKPIN_0_6
203 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
204 #define CFG_SSP0_SCKPIN_2_11
205 // #define CFG_SSP0_SCKPIN_0_6
208 #ifdef CFG_BRD_LPC1343_802154USBSTICK
209 // #define CFG_SSP0_SCKPIN_2_11
210 #define CFG_SSP0_SCKPIN_0_6
212 /*=========================================================================*/
215 /*=========================================================================
217 -----------------------------------------------------------------------
219 CFG_LED_PORT The port for the on board LED
220 CFG_LED_PIN The pin for the on board LED
221 CFG_LED_ON The pin state to turn the LED on (0 = low, 1 = high)
222 CFG_LED_OFF The pin state to turn the LED off (0 = low, 1 = high)
224 -----------------------------------------------------------------------*/
225 #ifdef CFG_BRD_LPC1343_REFDESIGN
226 #define CFG_LED_PORT (2)
227 #define CFG_LED_PIN (10)
228 #define CFG_LED_ON (0)
229 #define CFG_LED_OFF (1)
232 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
233 #define CFG_LED_PORT (2)
234 #define CFG_LED_PIN (10)
235 #define CFG_LED_ON (0)
236 #define CFG_LED_OFF (1)
239 #ifdef CFG_BRD_LPC1343_802154USBSTICK
240 #define CFG_LED_PORT (3)
241 #define CFG_LED_PIN (2)
242 #define CFG_LED_ON (0)
243 #define CFG_LED_OFF (1)
245 /*=========================================================================*/
248 /*=========================================================================
250 -----------------------------------------------------------------------
252 CFG_SDCARD If this field is defined SD Card and FAT32
253 file system support will be included
254 CFG_SDCARD_READONLY If this is set to 1, all commands to
255 write to the SD card will be removed
256 saving some flash space.
257 CFG_SDCARD_CDPORT The card detect port number
258 CFG_SDCARD_CDPIN The card detect pin number
260 NOTE: All config settings for FAT32 are defined
263 BENCHMARK: With SPI set to 6.0MHz, FATFS can read
264 ~300KB/s (w/512 byte read buffer)
266 PIN LAYOUT: The pin layout that is used by this driver
267 can be seen in the following schematic:
268 /tools/schematics/Breakout_TFTLCD_ILI9325_v1.3
270 DEPENDENCIES: SDCARD requires the use of SSP0.
271 -----------------------------------------------------------------------*/
272 #ifdef CFG_BRD_LPC1343_REFDESIGN
273 // #define CFG_SDCARD
274 #define CFG_SDCARD_READONLY (1) // Must be 0 or 1
275 #define CFG_SDCARD_CDPORT (3)
276 #define CFG_SDCARD_CDPIN (0)
279 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
281 #define CFG_SDCARD_READONLY (1) // Must be 0 or 1
282 #define CFG_SDCARD_CDPORT (3)
283 #define CFG_SDCARD_CDPIN (0)
286 #ifdef CFG_BRD_LPC1343_802154USBSTICK
287 // #define CFG_SDCARD
288 #define CFG_SDCARD_READONLY (1) // Must be 0 or 1
289 #define CFG_SDCARD_CDPORT (3)
290 #define CFG_SDCARD_CDPIN (0)
292 /*=========================================================================*/
295 /*=========================================================================
297 -----------------------------------------------------------------------
299 CFG_USBHID If this field is defined USB HID support will
300 be included. Currently uses ROM-based USB HID
301 CFG_USBCDC If this field is defined USB CDC support will
302 be included, with the USB Serial Port speed
303 set to 115200 BPS by default
304 CFG_USBCDC_BAUDRATE The default TX/RX speed. This value is used
305 when initialising USBCDC, and should be a
306 standard value like 57600, 9600, etc.
307 CFG_USBCDC_INITTIMEOUT The maximum delay in milliseconds to wait for
308 USB to connect. Must be a multiple of 10!
309 CFG_USBCDC_BUFFERSIZE Size of the buffer (in bytes) that stores
310 printf data until it can be sent out in
311 64 byte frames. The buffer is required since
312 only one frame per ms can be sent using USB
313 CDC (see 'puts' in systeminit.c).
315 -----------------------------------------------------------------------*/
316 #define CFG_USB_VID (0x239A)
317 #define CFG_USB_PID (0x1002)
319 #ifdef CFG_BRD_LPC1343_REFDESIGN
320 // #define CFG_USBHID
322 #define CFG_USBCDC_BAUDRATE (115200)
323 #define CFG_USBCDC_INITTIMEOUT (5000)
324 #define CFG_USBCDC_BUFFERSIZE (256)
327 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
328 // #define CFG_USBHID
330 #define CFG_USBCDC_BAUDRATE (115200)
331 #define CFG_USBCDC_INITTIMEOUT (5000)
332 #define CFG_USBCDC_BUFFERSIZE (256)
335 #ifdef CFG_BRD_LPC1343_802154USBSTICK
336 // #define CFG_USBHID
338 #define CFG_USBCDC_BAUDRATE (115200)
339 #define CFG_USBCDC_INITTIMEOUT (5000)
340 #define CFG_USBCDC_BUFFERSIZE (256)
342 /*=========================================================================*/
345 /*=========================================================================
347 -----------------------------------------------------------------------
349 CFG_PRINTF_UART Will cause all printf statements to be
351 CFG_PRINTF_USBCDC Will cause all printf statements to be
352 redirect to USB Serial
353 CFG_PRINTF_NEWLINE This should be either "\r\n" for Windows or
356 Note: If no printf redirection definitions are present, all printf
357 output will be ignored, though this will also save ~350 bytes flash.
359 NOTE: PRINTF Support = ~350 bytes Flash (-Os)
360 -----------------------------------------------------------------------*/
361 #ifdef CFG_BRD_LPC1343_REFDESIGN
362 // #define CFG_PRINTF_UART
363 #define CFG_PRINTF_USBCDC
364 #define CFG_PRINTF_NEWLINE "\r\n"
367 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
368 // #define CFG_PRINTF_UART
369 #define CFG_PRINTF_USBCDC
370 #define CFG_PRINTF_NEWLINE "\r\n"
373 #ifdef CFG_BRD_LPC1343_802154USBSTICK
374 // #define CFG_PRINTF_UART
375 #define CFG_PRINTF_USBCDC
376 #define CFG_PRINTF_NEWLINE "\r\n"
378 /*=========================================================================*/
381 /*=========================================================================
382 COMMAND LINE INTERFACE
383 -----------------------------------------------------------------------
385 CFG_INTERFACE If this field is defined the UART or USBCDC
386 based command-line interface will be included
387 CFG_INTERFACE_MAXMSGSIZE The maximum number of bytes to accept for an
389 CFG_INTERFACE_PROMPT The command prompt to display at the start
390 of every new data entry line
391 CFG_INTERFACE_SILENTMODE If this is set to 1 only text generated in
392 response to commands will be send to the
393 output buffer. The command prompt will not
394 be displayed and incoming text will not be
395 echoed back to the output buffer (allowing
396 you to see the text you have input). This
397 is normally only desirable in a situation
398 where another MCU is communicating with
400 CFG_INTERFACE_ENABLEIRQ If this is set to 1 the IRQ pin will be
401 set high when a command starts executing
402 and will go low when the command has
403 finished executing or the LCD is not busy.
404 This allows another device to know when a
405 new command can safely be sent.
406 CFG_INTERFACE_IRQPORT The gpio port for the IRQ/busy pin
407 CFG_INTERFACE_IRQPIN The gpio pin number for the IRQ/busy pin
409 NOTE: The command-line interface will use either
410 USB-CDC or UART depending on whether
411 CFG_PRINTF_UART or CFG_PRINTF_USBCDC are
413 -----------------------------------------------------------------------*/
414 #ifdef CFG_BRD_LPC1343_REFDESIGN
415 #define CFG_INTERFACE
416 #define CFG_INTERFACE_MAXMSGSIZE (256)
417 #define CFG_INTERFACE_PROMPT "LPC1343 >> "
418 #define CFG_INTERFACE_SILENTMODE (0)
419 #define CFG_INTERFACE_ENABLEIRQ (0)
420 #define CFG_INTERFACE_IRQPORT (2)
421 #define CFG_INTERFACE_IRQPIN (0)
424 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
425 #define CFG_INTERFACE
426 #define CFG_INTERFACE_MAXMSGSIZE (256)
427 #define CFG_INTERFACE_PROMPT "LCD >> "
428 #define CFG_INTERFACE_SILENTMODE (0)
429 #define CFG_INTERFACE_ENABLEIRQ (1)
430 #define CFG_INTERFACE_IRQPORT (2)
431 #define CFG_INTERFACE_IRQPIN (0)
434 #ifdef CFG_BRD_LPC1343_802154USBSTICK
435 // #define CFG_INTERFACE
436 #define CFG_INTERFACE_MAXMSGSIZE (256)
437 #define CFG_INTERFACE_PROMPT "CMD >> "
438 #define CFG_INTERFACE_SILENTMODE (0)
439 #define CFG_INTERFACE_ENABLEIRQ (0)
440 #define CFG_INTERFACE_IRQPORT (2)
441 #define CFG_INTERFACE_IRQPIN (0)
443 /*=========================================================================*/
446 /*=========================================================================
448 -----------------------------------------------------------------------
450 CFG_PWM If this is defined, a basic PWM driver
451 will be included using 16-bit Timer 1 and
452 Pin 1.9 (MAT0) for the PWM output. In
453 order to allow for a fixed number of
454 pulses to be generated, some PWM-specific
455 code is required in the 16-Bit Timer 1
456 ISR. See "core/timer16/timer16.c" for
458 CFG_PWM_DEFAULT_PULSEWIDTH The default pulse width in ticks
459 CFG_PWM_DEFAULT_DUTYCYCLE The default duty cycle in percent
461 DEPENDENCIES: PWM output requires the use of 16-bit
462 timer 1 and pin 1.9 (CT16B1_MAT0).
463 -----------------------------------------------------------------------*/
464 #ifdef CFG_BRD_LPC1343_REFDESIGN
466 #define CFG_PWM_DEFAULT_PULSEWIDTH (CFG_CPU_CCLK / 1000)
467 #define CFG_PWM_DEFAULT_DUTYCYCLE (50)
470 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
472 #define CFG_PWM_DEFAULT_PULSEWIDTH (CFG_CPU_CCLK / 1000)
473 #define CFG_PWM_DEFAULT_DUTYCYCLE (50)
476 #ifdef CFG_BRD_LPC1343_802154USBSTICK
478 #define CFG_PWM_DEFAULT_PULSEWIDTH (CFG_CPU_CCLK / 1000)
479 #define CFG_PWM_DEFAULT_DUTYCYCLE (50)
481 /*=========================================================================*/
484 /*=========================================================================
485 STEPPER MOTOR SETTINGS
486 -----------------------------------------------------------------------
488 CFG_STEPPER If this is defined, a simple bi-polar
489 stepper motor will be included for common
490 H-bridge chips like the L293D or SN754410N
492 DEPENDENCIES: STEPPER requires the use of pins 3.0-3 and
494 -----------------------------------------------------------------------*/
495 #ifdef CFG_BRD_LPC1343_REFDESIGN
496 // #define CFG_STEPPER
499 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
500 // #define CFG_STEPPER
503 #ifdef CFG_BRD_LPC1343_802154USBSTICK
504 // #define CFG_STEPPER
506 /*=========================================================================*/
509 /*=========================================================================
511 -----------------------------------------------------------------------
513 CFG_I2CEEPROM If defined, drivers for the onboard EEPROM
514 will be included during build
515 CFG_I2CEEPROM_SIZE The number of bytes available on the EEPROM
517 -----------------------------------------------------------------------*/
518 #ifdef CFG_BRD_LPC1343_REFDESIGN
519 #define CFG_I2CEEPROM
520 #define CFG_I2CEEPROM_SIZE (3072)
523 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
524 #define CFG_I2CEEPROM
525 #define CFG_I2CEEPROM_SIZE (3072)
528 #ifdef CFG_BRD_LPC1343_802154USBSTICK
529 #define CFG_I2CEEPROM
530 #define CFG_I2CEEPROM_SIZE (3072)
532 /*=========================================================================*/
535 /*=========================================================================
537 -----------------------------------------------------------------------
538 EEPROM is used to persist certain user modifiable values to make
539 sure that these changes remain in effect after a reset or hard
540 power-down. The addresses in EEPROM for these various system
541 settings/values are defined below. The first 256 bytes of EEPROM
542 are reserved for this (0x0000..0x00FF).
544 CFG_EEPROM_RESERVED The last byte of reserved EEPROM memory
546 EEPROM Address (0x0000..0x00FF)
547 ===============================
548 0 1 2 3 4 5 6 7 8 9 A B C D E F
549 000x x x x x x x x x . x x . . . . . Chibi
550 001x . . . . . . . . . . . . . . . .
551 002x x x x x . . . . . . . . . . . . UART
552 003x x x x x x x x x x x x x x x x x Touch Screen Calibration
553 004x x x x x x x x x x x x x x x . . Touch Screen Calibration
554 005x . . . . . . . . . . . . . . . .
555 006x . . . . . . . . . . . . . . . .
556 007x . . . . . . . . . . . . . . . .
557 008x . . . . . . . . . . . . . . . .
558 009x . . . . . . . . . . . . . . . .
559 00Ax . . . . . . . . . . . . . . . .
560 00Bx . . . . . . . . . . . . . . . .
561 00Cx . . . . . . . . . . . . . . . .
562 00Dx . . . . . . . . . . . . . . . .
563 00Ex . . . . . . . . . . . . . . . .
564 00Fx . . . . . . . . . . . . . . . .
566 -----------------------------------------------------------------------*/
567 #define CFG_EEPROM_RESERVED (0x00FF) // Protect first 256 bytes of memory
568 #define CFG_EEPROM_CHIBI_IEEEADDR (uint16_t)(0x0000) // 8
569 #define CFG_EEPROM_CHIBI_SHORTADDR (uint16_t)(0x0009) // 2
570 #define CFG_EEPROM_TOUCHSCREEN_CALIBRATED (uint16_t)(0x0030) // 1
571 #define CFG_EEPROM_TOUCHSCREEN_CAL_AN (uint16_t)(0x0031) // 4
572 #define CFG_EEPROM_TOUCHSCREEN_CAL_BN (uint16_t)(0x0035) // 4
573 #define CFG_EEPROM_TOUCHSCREEN_CAL_CN (uint16_t)(0x0039) // 4
574 #define CFG_EEPROM_TOUCHSCREEN_CAL_DN (uint16_t)(0x003D) // 4
575 #define CFG_EEPROM_TOUCHSCREEN_CAL_EN (uint16_t)(0x0041) // 4
576 #define CFG_EEPROM_TOUCHSCREEN_CAL_FN (uint16_t)(0x0045) // 4
577 #define CFG_EEPROM_TOUCHSCREEN_CAL_DIVIDER (uint16_t)(0x0049) // 4
578 #define CFG_EEPROM_TOUCHSCREEN_THRESHHOLD (uint16_t)(0x004D) // 1
579 #define CFG_EEPROM_UART_SPEED (uint16_t)(0x0020) // 4
580 /*=========================================================================*/
583 /*=========================================================================
584 LM75B TEMPERATURE SENSOR
585 -----------------------------------------------------------------------
587 CFG_LM75B If defined, drivers for an optional LM75B
588 temperature sensor will be included during
589 build (requires external HW)
591 -----------------------------------------------------------------------*/
592 #ifdef CFG_BRD_LPC1343_REFDESIGN
596 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
600 #ifdef CFG_BRD_LPC1343_802154USBSTICK
603 /*=========================================================================*/
606 /*=========================================================================
608 -----------------------------------------------------------------------
610 CFG_CHIBI If defined, the CHIBI wireless stack will be
611 included during build. Requires external HW.
612 CFG_CHIBI_MODE The mode to use when receiving and transmitting
613 wireless data. See chb_drvr.h for possible values
614 CFG_CHIBI_POWER The power level to use when transmitting. See
615 chb_drvr.h for possible values
616 CFG_CHIBI_CHANNEL 802.15.4 Channel (0 = 868MHz, 1-10 = 915MHz)
617 CFG_CHIBI_PANID 16-bit PAN Identifier (ex.0x1234)
618 CFG_CHIBI_PROMISCUOUS Set to 1 to enabled promiscuous mode or
619 0 to disable it. If promiscuous mode is
620 enabled be sure to set CFG_CHIBI_BUFFERSIZE
621 to an appropriately large value (ex. 1024)
622 CFG_CHIBI_BUFFERSIZE The size of the message buffer in bytes
624 DEPENDENCIES: Chibi requires the use of SSP0, 16-bit timer
625 0 and pins 3.1, 3.2, 3.3. It also requires
626 the presence of CFG_I2CEEPROM.
628 NOTE: These settings are not relevant to all boards!
629 'tools/schematics/AT86RF212LPC1114_v1.6.pdf'
630 show how 'CHIBI' is meant to be connected
631 -----------------------------------------------------------------------*/
632 #ifdef CFG_BRD_LPC1343_REFDESIGN
634 #define CFG_CHIBI_MODE (0) // OQPSK_868MHZ
635 #define CFG_CHIBI_POWER (0xE9) // CHB_PWR_EU2_3DBM
636 #define CFG_CHIBI_CHANNEL (0) // 868-868.6 MHz
637 #define CFG_CHIBI_PANID (0x1234)
638 #define CFG_CHIBI_PROMISCUOUS (0)
639 #define CFG_CHIBI_BUFFERSIZE (128)
642 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
644 #define CFG_CHIBI_MODE (0) // OQPSK_868MHZ
645 #define CFG_CHIBI_POWER (0xE9) // CHB_PWR_EU2_3DBM
646 #define CFG_CHIBI_CHANNEL (0) // 868-868.6 MHz
647 #define CFG_CHIBI_PANID (0x1234)
648 #define CFG_CHIBI_PROMISCUOUS (0)
649 #define CFG_CHIBI_BUFFERSIZE (128)
652 #ifdef CFG_BRD_LPC1343_802154USBSTICK
654 #define CFG_CHIBI_MODE (0) // OQPSK_868MHZ
655 #define CFG_CHIBI_POWER (0xE9) // CHB_PWR_EU2_3DBM
656 #define CFG_CHIBI_CHANNEL (0) // 868-868.6 MHz
657 #define CFG_CHIBI_PANID (0x1234)
658 #define CFG_CHIBI_PROMISCUOUS (0)
659 #define CFG_CHIBI_BUFFERSIZE (1024)
661 /*=========================================================================*/
664 /*=========================================================================
666 -----------------------------------------------------------------------
668 CFG_TFTLCD If defined, this will cause drivers for
669 a pre-determined LCD screen to be included
670 during build. Only one LCD driver can be
671 included during the build process (for ex.
672 'drivers/lcd/hw/ILI9325.c')
673 CFG_TFTLCD_INCLUDESMALLFONTS If set to 1, smallfont support will be
674 included for 3x6, 5x8, 7x8 and 8x8 fonts.
675 This should only be enabled if these small
676 fonts are required since there is already
677 support for larger fonts generated with
679 http://www.pavius.net/downloads/tools/53-the-dot-factory
680 CFG_TFTLCD_TS_DEFAULTTHRESHOLD Default minimum threshold to trigger a
681 touch event with the touch screen (and exit
682 from 'tsWaitForEvent' in touchscreen.c).
683 Should be an 8-bit value somewhere between
684 8 and 75 in normal circumstances. This is
685 the default value and may be overriden by
686 a value stored in EEPROM.
687 CFG_TFTLCD_TS_KEYPADDELAY The delay in milliseconds between key
688 presses in dialogue boxes
690 PIN LAYOUT: The pin layout that is used by this driver
691 can be seen in the following schematic:
692 /tools/schematics/Breakout_TFTLCD_ILI9325_v1.3
694 DEPENDENCIES: TFTLCD requires the use of pins 1.8, 1.9,
695 1.10, 1.11, 3.3 and 2.1-9.
696 -----------------------------------------------------------------------*/
697 #ifdef CFG_BRD_LPC1343_REFDESIGN
698 // #define CFG_TFTLCD
699 #define CFG_TFTLCD_INCLUDESMALLFONTS (0)
700 #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
701 #define CFG_TFTLCD_TS_KEYPADDELAY (100)
704 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
706 #define CFG_TFTLCD_INCLUDESMALLFONTS (0)
707 #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
708 #define CFG_TFTLCD_TS_KEYPADDELAY (100)
711 #ifdef CFG_BRD_LPC1343_802154USBSTICK
712 // #define CFG_TFTLCD
713 #define CFG_TFTLCD_INCLUDESMALLFONTS (0)
714 #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
715 #define CFG_TFTLCD_TS_KEYPADDELAY (100)
717 /*=========================================================================*/
720 /*=========================================================================
722 -----------------------------------------------------------------------
724 CFG_ST7565 If defined, this will cause drivers for
725 the 128x64 pixel ST7565 LCD to be included
726 CFG_SSD1306 If defined, this will cause drivers for
727 the 128x64 pixel SSD1306 OLED display to be
730 Note: LPC1114 @ 36MHz and the ST7565 with the
731 backlight enabled consumes ~35mA
733 DEPENDENCIES: ST7565 requires the use of pins 2.1-6.
734 DEPENDENCIES: SSD1306 requires the use of pins 2.1-6.
735 -----------------------------------------------------------------------*/
736 #ifdef CFG_BRD_LPC1343_REFDESIGN
737 // #define CFG_ST7565
738 // #define CFG_SSD1306
741 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
742 // #define CFG_ST7565
743 // #define CFG_SSD1306
746 #ifdef CFG_BRD_LPC1343_802154USBSTICK
747 // #define CFG_ST7565
748 // #define CFG_SSD1306
750 /*=========================================================================*/
753 /*=========================================================================
755 -----------------------------------------------------------------------
757 CFG_RSA If defined, support for basic RSA
758 encryption will be included.
759 CFG_RSA_BITS Indicates the number of bits used for
760 RSA encryption keys. To keep code size
761 reasonable, RSA encryption is currently
762 limited to using 64-bit or 32-bit numbers,
763 with 64-bit providing higher security, and
764 32-bit providing smaller encrypted text
767 NOTE: Please note that Printf can not be
768 used to display 64-bit values (%lld)!
769 -----------------------------------------------------------------------*/
770 #ifdef CFG_BRD_LPC1343_REFDESIGN
772 #define CFG_RSA_BITS (32)
775 #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE
777 #define CFG_RSA_BITS (32)
780 #ifdef CFG_BRD_LPC1343_802154USBSTICK
782 #define CFG_RSA_BITS (32)
784 /*=========================================================================*/
789 /*=========================================================================
790 CONFIG FILE VALIDATION
791 -------------------------------------------------------------------------
792 Basic error checking to make sure that incompatible defines are not
793 enabled at the same time, etc.
795 =========================================================================*/
797 #if !defined CFG_BRD_LPC1343_REFDESIGN && !defined CFG_BRD_LPC1343_TFTLCDSTANDALONE && !defined CFG_BRD_LPC1343_802154USBSTICK
798 #error "You must defined a target board (CFG_BRD_LPC1343_REFDESIGN or CFG_BRD_LPC1343_TFTLCDSTANDALONE or CFG_BRD_LPC1343_802154USBSTICK)"
800 #if (defined CFG_BRD_LPC1343_REFDESIGN && defined CFG_BRD_LPC1343_TFTLCDSTANDALONE) || (defined CFG_BRD_LPC1343_TFTLCDSTANDALONE && defined CFG_BRD_LPC1343_802154USBSTICK) || (defined CFG_BRD_LPC1343_REFDESIGN && defined CFG_BRD_LPC1343_802154USBSTICK)
801 #error "Only one target board can be defined at a time"
804 #if defined CFG_PRINTF_USBCDC && defined CFG_PRINTF_UART
805 #error "CFG_PRINTF_UART or CFG_PRINTF_USBCDC cannot both be defined at once"
808 #if defined CFG_PRINTF_USBCDC && !defined CFG_USBCDC
809 #error "CFG_PRINTF_CDC requires CFG_USBCDC to be defined as well"
812 #if defined CFG_USBCDC && defined CFG_USBHID
813 #error "Only one USB class can be defined at a time (CFG_USBCDC or CFG_USBHID)"
816 #if defined CFG_SSP0_SCKPIN_2_11 && defined CFG_SSP0_SCKPIN_0_6
817 #error "Only one SCK pin can be defined at a time for SSP0"
820 #if !defined CFG_SSP0_SCKPIN_2_11 && !defined CFG_SSP0_SCKPIN_0_6
821 #error "An SCK pin must be selected for SSP0 (CFG_SSP0_SCKPIN_2_11 or CFG_SSP0_SCKPIN_0_6)"
825 #if !defined CFG_PRINTF_UART && !defined CFG_PRINTF_USBCDC
826 #error "CFG_PRINTF_UART or CFG_PRINTF_USBCDC must be defined for for CFG_INTERFACE Input/Output"
828 #if defined CFG_PRINTF_USBCDC && CFG_INTERFACE_SILENTMODE == 1
829 #error "CFG_INTERFACE_SILENTMODE typically isn't enabled with CFG_PRINTF_USBCDC"
834 #if !defined CFG_I2CEEPROM
835 #error "CFG_CHIBI requires CFG_I2CEEPROM to store and retrieve addresses"
838 #error "CFG_CHIBI and CFG_SDCARD can not be defined at the same time. Only one SPI block is available on the LPC1343."
841 #error "CFG_CHIBI and CFG_TFTLCD can not be defined at the same time since they both use pins 1.8, 1.9 and 1.10."
844 #error "CFG_CHIBI and CFG_PWM can not be defined at the same time since they both use pin 1.9."
846 #if CFG_CHIBI_PROMISCUOUS != 0 && CFG_CHIBI_PROMISCUOUS != 1
847 #error "CFG_CHIBI_PROMISCUOUS must be equal to either 1 or 0"
853 #error "CFG_TFTLCD and CFG_ST7565 can not be defined at the same time."
856 #error "CFG_TFTLCD and CFG_SSD1306 can not be defined at the same time."
859 #error "CFG_TFTLCD and CFG_PWM can not be defined at the same time since they both use pin 1.9."
861 #if !defined CFG_I2CEEPROM
862 #error "CFG_TFTLCD requires CFG_I2CEEPROM to store and retrieve configuration settings"
868 #error "CFG_SDCARD and CFG_STEPPER can not be defined at the same time since they both use pin 3.0."
874 #error "CFG_ST7565 and CFG_SSD1306 can not be defined at the same time"
879 #if CFG_RSA_BITS != 64 && CFG_RSA_BITS != 32
880 #error "CFG_RSA_BITS must be equal to either 32 or 64."
This page took 0.100215 seconds and 3 git commands to generate.