* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CARL9170FW_TIMER_H
*/
static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t msecs)
{
- return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_msec);
+ return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_usec);
}
/*
{
uint32_t t1, t2, dt, wt;
- wt = msec * fw.ticks_per_msec;
+ wt = msec * fw.ticks_per_usec;
t1 = get_clock_counter();
while (1) {
while (1) {
t2 = get_clock_counter();
dt = (t2 - t1);
- if (dt >= (usec * fw.ticks_per_msec))
+ if (dt >= (usec * fw.ticks_per_usec))
break;
}
}
void clock_set(enum cpu_clock_t _clock, bool on);
+void handle_timer(void);
+void timer_init(const unsigned int timer, const unsigned int interval);
+
#endif /* __CARL9170FW_TIMER_H */