serprog: Test synchronicity before trying to synchronize

Run one test round ahead of trying to synchronize. If the test
succeeds, it saves us the 1s unconditional delay on startup.

Change-Id: I5b727d299cac0cbeadab39af3975dfd8019db8d7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72995
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Riku Viitanen <riku.viitanen@protonmail.com>
1 file changed