Joystick with MKS gen L V2.1

Hello ,
I have my MPCNC up and running on a MKS gen L V2.1 board and all works very nice .
I 'm trying to add a joystick to move to the start position but I’m not sure to which pins to connect the joystick .
It seems pin A5,A10,A12 are located near the motor drivers and used for UART .
So question : can I use those pins if I declare them in configuration_adv.h
#define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
#define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

I’m also not sure about the pin number .
I activated the M43 command ( pins_debug ) and that gives me the output as below :

A5 is pin 59 .So Do i need to specify
#define JOY_X_PIN 59 or #define JOY_X_PIN 5 to connect to the A5 pin ?
Any help is welcome.

PIN: 54 Port: F0 (A 0) X_STEP_PIN protected
PIN: 55 Port: F1 (A 1) X_DIR_PIN protected
PIN: 56 Port: F2 (A 2) Y_ENABLE_PIN protected
PIN: 57 Port: F3 (A 3) <unused/unknown> Analog in = 206 Input = 0
PIN: 58 Port: F4 (A 4) <unused/unknown> Analog in = 245 Input = 0
PIN: 59 Port: F5 (A 5) <unused/unknown> Analog in = 481 Input = 0
PIN: 60 Port: F6 (A 6) Y_STEP_PIN protected
PIN: 61 Port: F7 (A 7) Y_DIR_PIN protected
PIN: 62 Port: K0 (A 8) Z_ENABLE_PIN protected
PIN: 63 Port: K1 (A 9) <unused/unknown> Analog in = 202 Input = 0
PIN: 64 Port: K2 (A10) <unused/unknown> Analog in = 334 Input = 0
PIN: 65 Port: K3 (A11) <unused/unknown> Analog in = 97 Input = 0
PIN: 66 Port: K4 (A12) E0_CS_PIN Input = 0

Best regards
Marc

A5 is pin 59 .So Do i need to specify
#define JOY_X_PIN 59 or #define JOY_X_PIN 5 to connect to the A5 pin ?
Any help is welcome.

Based on my programming of Arduino projects, you can refer to the pin as ‘A5’ or ‘59’ but not ‘5’. So you should be able to:

#define JOY_X_PIN A5