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

Overview

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

Macros

#define SWISR_HandlerCall(hnd)
 Calls software interrupt. More...
 
#define SWISR_HandlerCountCall(hnd, count)
 Calls software interrupt every count period. More...
 
#define SWISR_HandlerFreqCall(hnd, base_task_freq, new_task_freq)
 Calls software interrupt at relative frequency defined by ratio (base_task_freq/new_task_freq). More...
 
#define SWISR_HandlerInit(hnd, ip, callback)
 Installs callback function for SWISR Interrupt Vectors. More...
 

Macro Definition Documentation

#define SWISR_HandlerCall (   hnd)

This macro calls software interrupt on given priority level. If macro is called from an interrupt routine that executes on the higher interrupt level then the callback function will execute afterwards.

Parameters
hnd0,1,2 (interrupt handler).
Note
Implemented as an inline macro.
See also
SWISR_HandlerFreqCall, SWISR_HandlerCountCall
#define SWISR_HandlerCountCall (   hnd,
  count 
)

This macro calls software interrupt on given priority level every count period. If macro is called from an interrupt routine that executes on the higher interrupt level then the callback function will execute afterwards.

Parameters
hnd0,1,2 (interrupt handler).
countNumber of counts to skip 0..65535.
Note
Implemented as an inline macro.
See also
SWISR_HandlerFreqCall, SWISR_HandlerCall
#define SWISR_HandlerFreqCall (   hnd,
  base_task_freq,
  new_task_freq 
)

This macro calls software interrupt on given priority level at relative frequency defined by ratio (base_task_freq/new_task_freq). If macro is called from an interrupt routine that executes on the higher interrupt level then the callback function will execute afterwards.

Parameters
hnd0,1,2 (interrupt handler).
base_task_freqFrequency of base task calling this macro in Hz.
new_task_freqFrequency of new task called by the macro in Hz.
Note
Implemented as an inline macro.
Warning
Frequency of base task must be integer multiply higher than frequency of new task being called.
See also
SWISR_HandlerCountCall, SWISR_HandlerCall
#define SWISR_HandlerInit (   hnd,
  ip,
  callback 
)

This function installs callback function for SWISR Interrupt Vectors. Interrupts are invoked by the software using SWISR_HandlerCall and SWISR_HandlerFreqCall macros.

Parameters
hnd0,1,2 (interrupt handler).
ipSelect one of the ARM Cortex-M0+ Interrupt Priority Levels.
callbackPointer to the SWISR Callback Function.
Note
Implemented as a function call.