6 years, 9 months ago.

Pin number declarations

I wanted to run this program on the application board, which meant re-defining the SPI and I2C pins. In the code they appear as D11, D12, ..... which appear to be enumerated declarations which map to physical pins. As I could not find the declarations I had to replace them with the more common form - p5, p7,..... Where can I find the declarations of the original enumerated values? By the way, the program runs fine on the Applications Board after re-mapping the pins.

Question relating to:

Example program with the C12832 display and MMA7660 I2C accelerometer of the mbed application shield. C12832, MMA7660, shield

2 Answers

6 years, 9 months ago.

They are in the file PinNames.h for each specific target which is buried in the source for the library.

Look in http://developer.mbed.org/users/mbed_official/code/mbed-src/

The path is: targets/hal/TARGET_[CPU Vendor]/TARGET_[CPU model]/[board]/PinNames.h

e.g. for the LPC1768 it is: targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_MBED_LPC1768/PinNames.h

Accepted Answer
6 years, 9 months ago.

Hi Julian

D11, D12 are one of the styles of pin names used on arduino form factor boards how they are connected varies from board to board.