Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG by
DeviceTimers.h
- Committer:
- Diletant
- Date:
- 2016-06-19
- Revision:
- 173:7f938afb0447
- Parent:
- 167:bedc0a9d559a
File content as of revision 173:7f938afb0447:
#ifndef __DEVICE_TIMERS_H__
#define __DEVICE_TIMERS_H__
typedef struct _DeviceTimerSettings {
} DeviceTimerSettings;
typedef struct _DeviceTimerState {
//Match Register 0. MR0 can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR0 matches the TC.
uint32_t MR0;
//Match Control Register. The MCR is used to control if an interrupt is generated and if the TC is reset when a Match occurs.
uint32_t MCR;
//Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR.
uint32_t TCR;
} DeviceTimerState;
typedef struct _DeviceTimer {
DeviceTimerSettings settings;
DeviceTimerState state;
} DeviceTimer;
void InitMeasurementTimerDefaultSettings(void);
void InitMeasurementTimerState(void);
void DeviceStartMeasurementTimer(void);
void timersSetMeasurementPeriod(uint32_t period);
void InitRegularTimerDefaultSettings(void);
void InitRegularTimerState(void);
void DeviceStartRegularTimer(void);
void timersSetRegularPeriod(uint32_t period);
#endif /* __DEVICE_TIMERS_H__ */
