Skip to content

Commit 28f0cf7

Browse files
committed
Update to macro test in board.c, remove C027.cpp(h), set default IO in mbed_main and fixed copy paste error in MBED_LPC1768 reserved_pins.h
1 parent f1fa9a0 commit 28f0cf7

File tree

7 files changed

+13
-248
lines changed

7 files changed

+13
-248
lines changed

libraries/mbed/common/board.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020
WEAK void mbed_die(void);
2121
WEAK void mbed_die(void) {
22-
#if defined(DEVICE_ERROR_RED)
22+
__disable_irq(); // dont allow interrupts to disturb the flash pattern
23+
24+
#if (DEVICE_ERROR_RED == 1)
2325
gpio_t led_red; gpio_init(&led_red, LED_RED, PIN_OUTPUT);
2426

2527
#elif (DEVICE_ERROR_PATTERN == 1)
@@ -30,18 +32,19 @@ WEAK void mbed_die(void) {
3032
#endif
3133

3234
while (1) {
33-
#if defined(DEVICE_ERROR_RED)
35+
#if (DEVICE_ERROR_RED == 1)
3436
gpio_write(&led_red, 1);
3537

36-
#elif (DEVICE_ERROR_PATTERN == 1)
38+
#elif (DEVICE_ERROR_PATTERN == 1)
3739
gpio_write(&led_1, 1);
3840
gpio_write(&led_2, 0);
3941
gpio_write(&led_3, 0);
4042
gpio_write(&led_4, 1);
4143
#endif
44+
4245
wait_ms(150);
4346

44-
#if defined(DEVICE_ERROR_RED)
47+
#if (DEVICE_ERROR_RED == 1)
4548
gpio_write(&led_red, 0);
4649

4750
#elif (DEVICE_ERROR_PATTERN == 1)
@@ -50,6 +53,7 @@ WEAK void mbed_die(void) {
5053
gpio_write(&led_3, 1);
5154
gpio_write(&led_4, 0);
5255
#endif
56+
5357
wait_ms(150);
5458
}
5559
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// List of reserved pins for LPC1114
1+
// List of reserved pins for MBED LPC1768
22

33
#ifndef RESERVED_PINS_H
44
#define RESERVED_PINS_H
55

6-
#define TARGET_RESERVED_PINS {P0_0, P0_11, P1_0, P1_1, P1_2}
6+
#define TARGET_RESERVED_PINS {}
77

88
#endif

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/C027.cpp

Lines changed: 0 additions & 189 deletions
This file was deleted.

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/C027.h

Lines changed: 0 additions & 47 deletions
This file was deleted.

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/PinNames.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ typedef enum {
141141
// ISP port
142142
// -----------------------------------------------------------
143143
ISP = P2_10,
144-
145-
// Reserved / NC pins
146-
// -----------------------------------------------------------
147-
RSVD2 = P3_26,
148144

149145
// Other mbed Pin Names
150146
LED = P3_25,

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353

5454
#define DEVICE_STDIO_MESSAGES 1
5555

56+
// should only enable one or the other, not both
5657
#define DEVICE_ERROR_PATTERN 0
5758
#define DEVICE_ERROR_RED 1
5859

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// List of reserved pins for LPC1768
1+
// List of reserved pins for C027 LPC1768
22

33
#ifndef RESERVED_PINS_H
44
#define RESERVED_PINS_H
55

6-
#define TARGET_RESERVED_PINS {}
6+
#define TARGET_RESERVED_PINS {P3_26}
77

88
#endif

0 commit comments

Comments
 (0)