mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Revision:
122:f9eeca106725
Parent:
98:8ab26030e058
--- a/ticker_api.h	Wed May 25 16:44:06 2016 +0100
+++ b/ticker_api.h	Thu Jul 07 14:34:11 2016 +0100
@@ -16,6 +16,7 @@
 #ifndef MBED_TICKER_API_H
 #define MBED_TICKER_API_H
 
+#include <stdint.h>
 #include "device.h"
 
 typedef uint32_t timestamp_t;
@@ -40,32 +41,37 @@
     void (*set_interrupt)(timestamp_t timestamp); /**< Set interrupt function */
 } ticker_interface_t;
 
-/** Tickers events queue structure
+/** Ticker's event queue structure
  */
 typedef struct {
     ticker_event_handler event_handler; /**< Event handler */
     ticker_event_t *head;               /**< A pointer to head */
 } ticker_event_queue_t;
 
-/** Tickers data structure
+/** Ticker's data structure
  */
 typedef struct {
     const ticker_interface_t *interface; /**< Ticker's interface */
-    ticker_event_queue_t *queue;         /**< Ticker's events queue */
+    ticker_event_queue_t *queue;         /**< Ticker's event queue */
 } ticker_data_t;
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/** Initialize a ticker and sets the event handler
+/**
+ * \defgroup hal_ticker Ticker HAL functions
+ * @{
+ */
+
+/** Initialize a ticker and set the event handler
  *
  * @param data    The ticker's data
  * @param handler A handler to be set
  */
 void ticker_set_handler(const ticker_data_t *const data, ticker_event_handler handler);
 
-/** Irq handler which goes through the events to trigger events in the past.
+/** IRQ handler that goes through the events to trigger overdue events.
  *
  * @param data    The ticker's data
  */
@@ -74,14 +80,14 @@
 /** Remove an event from the queue
  *
  * @param data The ticker's data
- * @param obj  The event's queue to be removed
+ * @param obj  The event object to be removed from the queue
  */
 void ticker_remove_event(const ticker_data_t *const data, ticker_event_t *obj);
 
-/** Insert an event from the queue
+/** Insert an event to the queue
  *
  * @param data      The ticker's data
- * @param obj       The event's queue to be removed
+ * @param obj       The event object to be inserted to the queue
  * @param timestamp The event's timestamp
  * @param id        The event object
  */
@@ -101,6 +107,8 @@
  */
 int ticker_get_next_timestamp(const ticker_data_t *const data, timestamp_t *timestamp);
 
+/**@}*/
+
 #ifdef __cplusplus
 }
 #endif