carl9170 toolchain: update to gcc 6.2.0 and binutils 2.27
[carl9170fw.git] / carlfw / include / timer.h
index 1c1c6cd4fa6f0f30c9f539c0a110c8f78baed5ee..f15e6fbdca33ef10ba596b96d8aad86383a82cf9 100644 (file)
@@ -19,8 +19,7 @@
  * 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
@@ -50,6 +49,11 @@ static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t mse
        return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_usec);
 }
 
+static inline __inline bool is_after_usecs(const uint32_t t0, const uint32_t usecs)
+{
+       return ((get_clock_counter() - t0)) > (usecs * fw.ticks_per_usec);
+}
+
 /*
  * Note: Be careful with [u]delay. They won't service the
  * hardware watchdog timer. It might trigger if you
@@ -85,4 +89,7 @@ static inline __inline void udelay(const uint32_t usec)
 }
 
 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 */