Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month 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:
2 Answers
10 years, 1 month 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
10 years, 1 month 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.
Steve