Pinmap not found for peripheral

Hi everyone~I’m struggling with a bug called"pinmap not found for peripheral"
The situation is like this, I used LCDN5110 and set pin-“N5110 lcd(PC_7, PA_9, PB_10, PB_5, PB_3, PA_10)” to create a menu bar for LCD display; after that I used once again After that I used the LCD and a joystick once again, the movement of the joystick would change the content displayed on the LCD.
At the very beginning, when I ran the LCD’s menu bar program and the Joystick’s LCD display program separately, both programs worked separately, but when I put the two pieces of code together and tried to display the LCD’s menu bar first and then the Joystick’s movement, it reported an error.
I’ve put the two code diagrams and the error display diagram below, I hope I can get some help from you. Thank you very much!
Here is the first program for menu bar in LCD:
1
Here is the second program for Joystick in LCD:


Here is the error display:

Hello,

because we don’t see what version of Mbed OS, what libraries you use and also Joystick’s pins, then we can not help you.
In general, this error usually is not a bug, but it prevents usage of pins what are not connected to a specific peripheral or not have that functionality. For example when you want use SPI and using different pins from different SPI modules (SPI1, SPI2 and so on) or when you are trying to use a PWM / ADC on a pin where this is not possible.

mbed-os/PeripheralPins.c at master · ARMmbed/mbed-os (github.com)

BR, Jan