mbedmicro/mbed — pull request #79 by jorisa (2013-09-28 04:16:24+00:00)
Title: Merge common files between LPC11XX and LPC11CXX

Remaining differences now are
- device.h (DEVICE_CAN 0/1)
- pwmout_api.c (Assuming that these need to be the same, see below)
- PeripheralNames.h (The same after pwmout_api.c is resolved)
- PinNames.h (Currently not accurate for the 11CXX, see below)
- reserved_pins.h (Should be the same once PinNames is resolved)

Don't really understand the changes in pwmout_api.c? what's the reason that P1_6, P1_7, P1_1, P1_2, P1_3 are removed in LPC11XX? It looks like the differences between to the code are bugfixes that were not ported to the LPC11CXX. The relevant changes are in d0d2df3ce5d95ca1f25d8aa4f081869bbf66f18f (by Toyomasa Watarai), maybe he can comment.

PinNames needs to be updated according to the following differences:
```
PIN 111X 11C2X
17 PIO1_9/CT16B1_MAT0 --
18 PIO3_4 --
19 PIO2_4 --
20 PIO2_5 --
21 PIO3_5 --
22: PIO0_6/SCK0 --
23: PIO0_7/CTS PIO0_6/SCK0 (Serial clock for SPI0)
24: PIO2_9 PIO0_7/CTS (Clear To Send input for UART)
```

The SWDIO/SWCLK definition can be the same for both targets: Would it be an idea to leave them in the peripheral api's but disable them from being used in pinmap.c? Or would you rather pretend that they don't exist at all?

It could be something like:
```
void pin_function(PinName pin, int function) {
if (pin == (uint32_t)NC) return;

#if DEVICE_DISABLE_SWD_PINS
if(pin == P0_10 || pin == 1_3) {
error("Remapping SWD pins disabled");
}
#endif
[...]
}
```