Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_hwtimer.h File Reference
#include <stdint.h>
#include "fsl_clock_manager.h"

Data Structures

struct  hwtimer_ptr_t
 HwTimer structure. More...
 
struct  hwtimer_time_ptr_t
 Hwtimer_time structure. More...
 
struct  hwtimer_devif_ptr_t
 hwtimer_devif structure. More...
 

Macros

#define HWTIMER_LL_CONTEXT_LEN   5U
 HwTimer low level context data length definition.
 

Typedefs

typedef void(* hwtimer_callback_t )(void *p)
 Definition for low level context data length.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_init_t )(hwtimer_t *hwtimer, uint32_t id, void *data)
 Type defines initialization function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_deinit_t )(hwtimer_t *hwtimer)
 Type defines deinitialization function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_set_div_t )(hwtimer_t *hwtimer, uint32_t period)
 Type defines set_div function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_start_t )(hwtimer_t *hwtimer)
 Type defines start function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_stop_t )(hwtimer_t *hwtimer)
 Type defines stop function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_reset_t )(hwtimer_t *hwtimer)
 Type defines reset function for devif structure.
 
typedef _hwtimer_error_code_t(* hwtimer_devif_get_time_t )(hwtimer_t *hwtimer, hwtimer_time_t *time)
 Type defines get_time function for devif structure.
 

Enumerations

enum  _hwtimer_error_code_t {
  kHwtimerSuccess,
  kHwtimerInvalidInput,
  kHwtimerInvalidPointer,
  kHwtimerClockManagerError,
  kHwtimerRegisterHandlerError,
  kHwtimerUnknown
}
 HwTimer error codes definition. More...
 

Functions

_hwtimer_error_code_t HWTIMER_SYS_Init (hwtimer_t *hwtimer, const hwtimer_devif_t *kDevif, uint32_t id, void *data)
 Initializes a caller allocated structure according to given parameters. More...
 
_hwtimer_error_code_t HWTIMER_SYS_Deinit (hwtimer_t *hwtimer)
 Deinitializes the HwTimer. More...
 
_hwtimer_error_code_t HWTIMER_SYS_SetPeriod (hwtimer_t *hwtimer, uint32_t period)
 Sets the period of the HwTimer. More...
 
uint32_t HWTIMER_SYS_GetPeriod (hwtimer_t *hwtimer)
 Gets the period of the HwTimer. More...
 
_hwtimer_error_code_t HWTIMER_SYS_Start (hwtimer_t *hwtimer)
 Enables the timer and leaves it running. More...
 
_hwtimer_error_code_t HWTIMER_SYS_Stop (hwtimer_t *hwtimer)
 The timer stops counting after this function is called. More...
 
uint32_t HWTIMER_SYS_GetModulo (hwtimer_t *hwtimer)
 The function returns period of the timer in sub-ticks. More...
 
_hwtimer_error_code_t HWTIMER_SYS_GetTime (hwtimer_t *hwtimer, hwtimer_time_t *time)
 The function reads the current value of the HwTimer. More...
 
uint32_t HWTIMER_SYS_GetTicks (hwtimer_t *hwtimer)
 The function reads the current value of the HwTimer. More...
 
_hwtimer_error_code_t HWTIMER_SYS_RegisterCallback (hwtimer_t *hwtimer, hwtimer_callback_t callbackFunc, void *callbackData)
 Registers function to be called when the timer expires. More...
 
_hwtimer_error_code_t HWTIMER_SYS_BlockCallback (hwtimer_t *hwtimer)
 The function is used to block callbacks in circumstances when execution of the callback function is undesired. More...
 
_hwtimer_error_code_t HWTIMER_SYS_UnblockCallback (hwtimer_t *hwtimer)
 The function is used to unblock previously blocked callbacks. More...
 
_hwtimer_error_code_t HWTIMER_SYS_CancelCallback (hwtimer_t *hwtimer)
 The function cancels pending callback, if any. More...