mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
SAM4CM free-running time: Change overflow type from uint16 to uint32. From Max Neklyudov.
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
static void sam_freerun_handler(TC_HANDLE tch, void *arg, uint32_t sr)
|
static void sam_freerun_handler(TC_HANDLE tch, void *arg, uint32_t sr)
|
||||||
{
|
{
|
||||||
struct sam_freerun_s *freerun = (struct sam_freerun_s *)arg;
|
struct sam_freerun_s *freerun = (struct sam_freerun_s *)arg;
|
||||||
DEBUGASSERT(freerun && freerun->overflow < UINT16_MAX);
|
DEBUGASSERT(freerun && freerun->overflow < UINT32_MAX);
|
||||||
freerun->overflow++;
|
freerun->overflow++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ struct sam_freerun_s
|
|||||||
{
|
{
|
||||||
uint8_t chan; /* The timer/counter in use */
|
uint8_t chan; /* The timer/counter in use */
|
||||||
bool running; /* True: the timer is running */
|
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() */
|
TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user