bootloader_utility_get_selected_boot_partition() function
Return the index of the selected boot partition. This is the preferred boot partition, as determined by the partition table & any OTA sequence number found in OTA data. This partition will only be booted if it contains a valid app image, otherwise load_boot_image() will search for a valid partition using this selection as the starting point.
Arguments
bs
Bootloader state structure.
Return value
Returns the index on success, INVALID_INDEX otherwise.