MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
PIT API Specification

Overview

This section describes functions and macros of the driver's API.

Macros

#define PIT_SetLoadVal(module, ch, val)
 Sets load value register. More...
 
#define PIT_Enable(module, ch)
 Enables PIT channel. More...
 
#define PIT_Disable(module, ch)
 Disables PIT channel. More...
 
#define PIT_DebugFreezeOn(module, ctrl)
 Controls PIT module operation in debug mode. More...
 
#define PIT_InstallCallback(ip, callback)
 Installs callback function for interrupt vector 27. More...
 
#define PIT_Init(module, ch, cfg, val)
 PIT initialization. More...
 

Macro Definition Documentation

#define PIT_SetLoadVal (   module,
  ch,
  val 
)

This macro sets new load register value.

Parameters
modulePIT0,PIT1.
chCH0,CH1.
valuint32 load register value.
Note
Implemented as an inline macro.
#define PIT_Enable (   module,
  ch 
)

This macro enables PIT channel operation.

Parameters
modulePIT0,PIT1.
chCH0,CH1.
Note
Implemented as an inline macro.
See also
PIT_Disable
#define PIT_Disable (   module,
  ch 
)

This macro disables PIT channel operation.

Parameters
modulePIT0,PIT1.
chCH0,CH1.
Note
Implemented as an inline macro.
See also
PIT_Enable
#define PIT_DebugFreezeOn (   module,
  ctrl 
)

This macro controls operation mode of the PIT module in the debug mode.

Parameters
modulePIT0,PIT1.
ctrlTRUE (Timer module runs in Debug mode)
FALSE (Timer module stopped in Debug mode).
Note
Implemented as an inline macro.
#define PIT_InstallCallback (   ip,
  callback 
)

This function install callback function for interrupt vector 27.

Parameters
ipSelect one of the ARM Cortex-M0+ Interrupt Priority Levels.
callbackPointer to the PIT Callback Function.
Note
Implemented as a function call.
Warning
PIT0 and PIT1 interrupt sources are OR'ed into single interrupt vector.
See also
PIT_Init
#define PIT_Init (   module,
  ch,
  cfg,
  val 
)

This function initializes selected Timer channel of the Periodic Interrupt Timer (PIT) block.

Parameters
modulePIT0,PIT1.
chCH0,CH1.
cfgSelect one of the PIT Configuration Structures.
valuint32 load register value.
Note
Implemented as a function call.
See also
PIT_InstallCallback