BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
e5fcec6
Branches
Tags
master
mips_sys
fw
cyc_cnt.c
improve 200ms tick and task processing, get rid of UART output of received ethernet frames
Stefan Schuermans
commited
e5fcec6
at 2012-03-24 19:05:42
cyc_cnt.c
Blame
History
Raw
#include "cyc_cnt.h" static volatile unsigned int *const cyc_cnt_ptr = (volatile unsigned int *)0x80001000; /** * @brief read cycle counter * @return cycle counter value */ unsigned int cyc_cnt_read(void) { return *cyc_cnt_ptr; } /** * @brief delay for a number of cycles * @param[in] cyc number of cycles */ void cyc_cnt_delay(unsigned int cyc) { unsigned int start = cyc_cnt_read(); while (cyc_cnt_read() - start < cyc) /* wait */; }