bootloader_common_select_otadata() function
Returns the number of active otadata.
Arguments
two_otadata
Pointer on array from two otadata structures.
valid_two_otadata
Pointer on array from two bools. True means select.
max
True - will select the maximum ota_seq number, otherwise the minimum.
Return value
The number of active otadata (0 or 1). - -1: If it does not have active otadata.