2.9 Event Output Driver

Overview

Event output is the change in the state of the pin output to high or low or to toggle after a specific time interval.Event output is the change in the state of the pin output to high or low or to toggle after a specific time interval.

Features

  • User configurable event change type, i,e to set the event output pin high or low, to toggle when the transition time elapses.
  • Event Transition time is user configurable, this value range varies based on the clock source selected from Hardware Dependency module (PLIB).
  • In Synchronization (Sync) operation, the timer Reset or clear occurs when the input selected by Sync is asserted.
  • In Trigger operation, the Timer is held in Reset until the input selected by Trigger is asserted.

The following waveform represents the Event Output generation and the effect of Sync signal assertion.The following waveform represents the Event Output generation and the effect of Sync signal assertion.

Figure . 

The following waveform represents the Trigger source effect on Event Output generation The following waveform represents the Trigger source effect on Event Output generation

Figure . 

2.9.1 Module Documentation

2.9.1.1 Event Output Driver

Event output Driver is used to generate single or series of Low, High or Toggle Output using dsPIC MCUs.

2.9.1.1.1 Module description

Event output Driver is used to generate single or series of Low, High or Toggle Output using dsPIC MCUs.

Data structures
Definitions
Functions

2.9.1.1.2 Definition Documentation

Event_Output9_Deinitialize

#define Event_Output9_Deinitialize MCCP9_EventOutput_Deinitialize

This macro defines the Custom Name for MCCP9_EventOutput_Deinitialize API.

Event_Output9_Disable

#define Event_Output9_Disable MCCP9_EventOutput_Disable

This macro defines the Custom Name for MCCP9_EventOutput_Disable API.

Event_Output9_Enable

#define Event_Output9_Enable MCCP9_EventOutput_Enable

This macro defines the Custom Name for MCCP9_EventOutput_Enable API.

Event_Output9_EventOutput_CallbackRegister

#define Event_Output9_EventOutput_CallbackRegister MCCP9_EventOutput_CallbackRegister

This macro defines the Custom Name for MCCP9_EventOutput_CallbackRegister API.

Event_Output9_Initialize

#define Event_Output9_Initialize MCCP9_EventOutput_Initialize

This macro defines the Custom Name for MCCP9_EventOutput_Initialize API.

Event_Output9_SoftwareTriggerSet

#define Event_Output9_SoftwareTriggerSet MCCP9_EventOutput_SoftwareTriggerSet

This macro defines the Custom Name for MCCP9_EventOutput_SoftwareTriggerSet API.

Event_Output9_Tasks

#define Event_Output9_Tasks MCCP9_EventOutput_Tasks

This macro defines the Custom Name for MCCP9_EventOutput_Tasks API.

Event_Output9_TransitTimeSet

#define Event_Output9_TransitTimeSet MCCP9_EventOutput_TransitTimeSet

This macro defines the Custom Name for MCCP9_EventOutput_TransitTimeSet API.

2.9.1.1.3 Function Documentation

MCCP9_EventOutput_Callback()

void MCCP9_EventOutput_Callback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MCCP9_EventOutput_CallbackRegister.

Parameters:
none
Returns:

none

MCCP9_EventOutput_CallbackRegister()

void MCCP9_EventOutput_CallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MCCP9 EventOutput event.

Parameters:
in handler

- Address of the callback function

Returns:

none

MCCP9_EventOutput_Deinitialize()

void MCCP9_EventOutput_Deinitialize (void )

Deinitializes the MCCP9 to POR values.

Parameters:
none
Returns:

none

MCCP9_EventOutput_Disable()

void MCCP9_EventOutput_Disable (void )

Disables the MCCP9 module.

Parameters:
none
Returns:

none

MCCP9_EventOutput_Enable()

void MCCP9_EventOutput_Enable (void )

Enables the MCCP9 module with the corresponding operation mode.

Parameters:
none
Returns:

none

MCCP9_EventOutput_Initialize()

void MCCP9_EventOutput_Initialize (void )

Initializes the MCCP9 Edge Event driver. This function must be called before any other MCCP9 function is called.

Parameters:
none
Returns:

none

MCCP9_EventOutput_SoftwareTriggerSet()

void MCCP9_EventOutput_SoftwareTriggerSet (void )

Sets the software trigger.

Parameters:
none
Returns:

none

MCCP9_EventOutput_Tasks()

void MCCP9_EventOutput_Tasks (void )

This function is used to implement the tasks for polled implementations.

Parameters:
none
Returns:

none

MCCP9_EventOutput_TransitTimeSet()

void MCCP9_EventOutput_TransitTimeSet (size_t count)

Sets the compare values for MCCP9.

Parameters:
in count

- edge event wait time count

Returns:

none

2.9.1.1.4 Variable Documentation

Event_Output9

const struct EVENTOUTPUT_INTERFACE Event_Output9

Structure object of type EVENTOUTPUT_INTERFACE with the custom name given by the user in the Melody Driver User interface.

The default name e.g. Event_Output1 can be changed by the user in the MCCP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.9.2 Class Documentation

2.9.2.1 EVENTOUTPUT_INTERFACE Struct Reference

Structure containing the function pointers of EVENTOUTPUT driver.

2.9.2.1.1 Detailed Description

Structure containing the function pointers of EVENTOUTPUT driver.

#include <eventoutput_interface.h>

Public Attributes
  • void(* Initialize )(void)

    Pointer to SCCPx_EventOutput_Initialize e.g. SCCP1_EventOutput_Initialize.

  • void(* Deinitialize )(void)

    Pointer to SCCPx_EventOutput_Deinitialize e.g. SCCP1_EventOutput_Deinitialize.

  • void(* Enable )(void)

    Pointer to SCCPx_EventOutput_Enable e.g. SCCP1_EventOutput_Enable.

  • void(* Disable )(void)

    Pointer to SCCPx_EventOutput_Disable e.g. SCCP1_EventOutput_Disable.

  • void(* TransitTimeSet )(size_t count)

    Pointer to SCCPx_EventOutput_TransitTimeSet e.g. SCCP1_EventOutput_TransitTimeSet.

  • void(* SoftwareTriggerSet )(void)

    Pointer to SCCPx_EventOutput_SoftwareTriggerSet e.g. SCCP1_EventOutput_SoftwareTriggerSet.

  • void(* CallbackRegister )(void(*handler)(void))

    Pointer to SCCPx_EventOutput_CallbackRegister e.g. SCCP1_EventOutput_CallbackRegister.

  • void(* Tasks )(void)

    Pointer to SCCPx_EventOutput_Tasks e.g. SCCP1_EventOutput_Tasks (Supported only in polling mode)

2.9.2.1.2 Member Data Documentation

The documentation for this struct was generated from the following file:

source/

eventoutput_interface.h

CallbackRegister

void(* CallbackRegister) (void(*handler)(void))

Pointer to SCCPx_EventOutput_CallbackRegister e.g. SCCP1_EventOutput_CallbackRegister.

Deinitialize

void(* Deinitialize) (void)

Pointer to SCCPx_EventOutput_Deinitialize e.g. SCCP1_EventOutput_Deinitialize.

Disable

void(* Disable) (void)

Pointer to SCCPx_EventOutput_Disable e.g. SCCP1_EventOutput_Disable.

Enable

void(* Enable) (void)

Pointer to SCCPx_EventOutput_Enable e.g. SCCP1_EventOutput_Enable.

Initialize

void(* Initialize) (void)

Pointer to SCCPx_EventOutput_Initialize e.g. SCCP1_EventOutput_Initialize.

SoftwareTriggerSet

void(* SoftwareTriggerSet) (void)

Pointer to SCCPx_EventOutput_SoftwareTriggerSet e.g. SCCP1_EventOutput_SoftwareTriggerSet.

Tasks

void(* Tasks) (void)

Pointer to SCCPx_EventOutput_Tasks e.g. SCCP1_EventOutput_Tasks (Supported only in polling mode)

TransitTimeSet

void(* TransitTimeSet) (size_t count)

Pointer to SCCPx_EventOutput_TransitTimeSet e.g. SCCP1_EventOutput_TransitTimeSet.

2.9.3 File Documentation

2.9.3.1 source/eventoutput_interface.h File Reference

#include <stddef.h>

2.9.3.1.1 Data structures

2.9.3.1.2 Detailed Description

EVENTOUTPUT Generated Driver Interface Header File

2.9.3.2 source/mccp9.h File Reference

This is the generated driver header file for the MCCP9 driver.

#include <stddef.h>
#include "eventoutput_interface.h"

2.9.3.2.1 Functions

2.9.3.2.2 Macros

2.9.3.2.4 Detailed Description

This is the generated driver header file for the MCCP9 driver.

MCCP9 Generated Driver Header File