Looking at a single DIN handling buttons, the standard schematic has the 4 menu buttons on J3 (shift register 1). In 64E main.asm (64 is similar):
#define DEFAULT_DIN_SR_PIN_01_08 2
#define DEFAULT_DIN_SR_PIN_09_16 3
#define DEFAULT_DIN_SR_PIN_17_24 1
#define DEFAULT_DIN_SR_PIN_25_32 4
#define DEFAULT_DIN_SR_PIN_33_40 9
#define DEFAULT_DIN_SR_PIN_41_48 10
#define DEFAULT_DIN_SR_PIN_49_56 11
#define DEFAULT_DIN_SR_PIN_57_64 12
But
; DIN pin numbers of menu buttons
#if DEFAULT_ENC_DATAWHEEL == 0
#define DEFAULT_DIN_MENU_EXEC 7 ; menu exec button
assigned to DIN pin #7
#define DEFAULT_DIN_MENU_RIGHT 6 ; menu right button
assigned to DIN pin #6
#define DEFAULT_DIN_MENU_LEFT 5 ; menu left button
assigned to DIN pin #5
#define DEFAULT_DIN_MENU_SNAPSHOT 4
In the schematic the pins from shift register 2-4 are numbered 1-24 - i.e SR 2 - pins 1-8, SR 3 = pins 9-16, SR 4 = pins 17-24 and SR1 is unnumbered.
Going from that the first, second DEFAULT line matches and then it doesn’t match. Then in the DEFAULT_DIN_MENU calls the pin numbering is different again because pins from SR 1 are numbered 4,5,6,7 as if counting 1 from the first pin on SR1.
Is there something in one of the other application files that will explain this, or can anyone explain this as I’m totally confused.