sm1000_main: Store two copies of the settings.
authorsjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 27 Sep 2015 04:23:30 +0000 (04:23 +0000)
committersjlongland <sjlongland@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 27 Sep 2015 04:23:30 +0000 (04:23 +0000)
commit8dcc4193f7bf990bc32f25c28ae0465faebf9ecb
tree4af3d6088ba1507c593f785407f1fec4f22a8a3d
parent91c3386e1c3e5c1b2301997c68a0b4e23749bcdb
sm1000_main: Store two copies of the settings.

We keep a rolling serial number (64-bit, so probably flash will wear out
before rollover happens) that is incremented on each write, and we write
to the oldest image in flash.

On load, we pick the newest one that's valid.

git-svn-id: https://svn.code.sf.net/p/freetel/code@2405 01035d8c-6547-0410-b346-abe4f91aad63
codec2-dev/stm32/src/sm1000_main.c