MKS Gen L MPCNC Dual Endstop firmware

I’ve juste fried my Arduino Mega and don’t have another on hand but i have MKS Gen L mainboard.
Do you know how to set it up with dual endstop firmware please ?

I used a MKS Gen L v1.0 on my Primo with DRV8825 stepper drivers. I used the standard RAMPS firmware. The Gen L.v1.0 is a Mega2560 + RAMPS.1.4 board, with 24V tolerance and the Discount Controller daughterboard. It will work with the 12864 controller straight off of the V1 firmware.

Caveat: the MKS 10 pin connectors for.the ribbon cables are keyed backwards to most RAMPS and to the RAMBo boards, so you need to plug in the cables backwards to how they arw keyed. I simply cut the keys off of the cable end with a chisel when I used the MKS board.