SAM4CM free-running time: Change overflow type from uint16 to uint32. From Max Neklyudov.

This commit is contained in:
Gregory Nutt
2015-02-25 08:12:31 -06:00
parent 54c8efab69
commit 234cc5b7bf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -85,7 +85,7 @@
static void sam_freerun_handler(TC_HANDLE tch, void *arg, uint32_t sr)
{
struct sam_freerun_s *freerun = (struct sam_freerun_s *)arg;
DEBUGASSERT(freerun && freerun->overflow < UINT16_MAX);
DEBUGASSERT(freerun && freerun->overflow < UINT32_MAX);
freerun->overflow++;
}
+1 -1
View File
@@ -63,7 +63,7 @@ struct sam_freerun_s
{
uint8_t chan; /* The timer/counter in use */
bool running; /* True: the timer is running */
uint16_t overflow; /* Timer counter overflow */
uint32_t overflow; /* Timer counter overflow */
TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */
};