Commit Graph

11 Commits

Author SHA1 Message Date
Saleem Rashid 5c00b24307 trezor: Fix screen timeout (#131) 2016-11-26 13:48:04 +01:00
Saleem Rashid b4eaf7dbaf timer: Fix non-critical integer overflow (#129)
Every 4294967295 milliseconds (2 ^ 32 - 1), system_millis will overflow.
This means that every 49.71 days, system_millis will reset to zero.
Comparisons like `system_millis < (system_millis + 1)` would fail if the
latter had overflown and the former had not.

This is non-critical because the worst case is that one second could be
skipped or the screen could lock early.

This poses no threat to the exponential backoff used for protection
against brute force.
2016-11-23 20:22:28 +01:00
Saleem Rashid 0ec32a6146 timer: Replace screen timeout with SysTick
This provides an incredibly accurate screen timeout and removes the
superfluous screen timeout counter
2016-11-17 02:07:46 +01:00
Saleem Rashid 25b9bfd97b timer: Use Cortex-M3 SysTick timers
Removed `usbDelay(uint32_t cycles)`, added `usbSleep(uint32_t millis)`

The same method signature could cause silent code breakage at runtime,
as opposed to noisy code breakage at compile time which is the better
kind.
2016-11-17 02:07:46 +01:00
Pavol Rusnak 592f3c9afe
lock screen after 10 minutes of inactivity 2016-10-25 17:45:30 +02:00
Saleem Rashid 0b51d060d8
allow ClearSession purely via confirm button
Holding confirm button at home screen asks user whether they wish to
lock the TREZOR (clear the cached PIN and passphrase and show the
screensaver). This is identical behaviour to the ClearSession message.
2016-10-25 15:21:56 +02:00
Pavol Rusnak b1e3c52b08
remove DialogIcon enum, use bitmap structure directly 2016-06-08 19:20:07 +02:00
Pavol Rusnak 46119bd007
clear pin failures on wipe and when in debug mode 2016-05-20 17:00:10 +02:00
Pavol Rusnak 524f2a957a enable stack protector 2014-07-31 19:44:03 +02:00
Pavol Rusnak 2707e8aff6 move APPVER guards from includes to app code 2014-07-07 15:03:34 +02:00
Pavol Rusnak 0d0a1ab5f2 import v1.0.0 2014-04-29 14:38:32 +02:00