46#include "timer_interface.h"
65#define CTRLLOOP_EXE_Initialize SCCP1_Timer_Initialize
70#define CTRLLOOP_EXE_Deinitialize SCCP1_Timer_Deinitialize
75#define CTRLLOOP_EXE_Tasks SCCP1_Timer_Tasks
80#define CTRLLOOP_EXE_Start SCCP1_Timer_Start
85#define CTRLLOOP_EXE_Stop SCCP1_Timer_Stop
87#if TIMER_PERIODCOUNTSET_API_SUPPORT
92#define CTRLLOOP_EXE_PeriodCountSet SCCP1_Timer_PeriodCountSet
99#define CTRLLOOP_EXE_PeriodSet SCCP1_Timer_PeriodSet
104#define CTRLLOOP_EXE_PeriodGet SCCP1_Timer_PeriodGet
109#define CTRLLOOP_EXE_CounterGet SCCP1_Timer_CounterGet
114#define CTRLLOOP_EXE_Counter16BitGet SCCP1_Timer_Counter16BitGet
119#define CTRLLOOP_EXE_InterruptPrioritySet SCCP1_Timer_InterruptPrioritySet
125#define CTRLLOOP_EXE_TimeoutCallbackRegister SCCP1_Timer_TimeoutCallbackRegister
181 if(CCP1CON1Lbits.T32 == 1)
183 return (((uint32_t)CCP1PRH << 16U) | (CCP1PRL) );
187 return (uint32_t) CCP1PRL;
199 if(CCP1CON1Lbits.T32 == 1)
201 return (((uint32_t)CCP1TMRH << 16U) | CCP1TMRL);
205 return (uint32_t)CCP1TMRL;
258#if TIMER_PERIODCOUNTSET_API_SUPPORT
void __attribute__((weak))
void SCCP1_Timer_PeriodCountSet(size_t count)
void SCCP1_Timer_Stop(void)
Stops the timer.
void SCCP1_Timer_PeriodSet(uint32_t count)
Sets the SCCP1-Timer period count value.
void SCCP1_TimeoutCallback(void)
This is the default callback with weak attribute. The user can override and implement the default cal...
const struct TIMER_INTERFACE CTRLLOOP_EXE
Structure object of type TIMER_INTERFACE with the custom name given by the user in the Melody Driver ...
static uint32_t SCCP1_Timer_PeriodGet(void)
This inline function gets the SCCP1-Timer period count value.
void SCCP1_Timer_Deinitialize(void)
Deinitializes the SCCP1 to POR values.
void SCCP1_Timer_TimeoutCallbackRegister(void(*handler)(void))
This function can be used to override default callback and to define custom callback for SCCP1 Timeou...
void SCCP1_TimeoutCallbackRegister(void *handler) __attribute__((deprecated("\nThis will be removed in future MCC releases. \nUse SCCP1_Timer_TimeoutCallbackRegister instead. ")))
This function can be used to override default callback and to define custom callback for SCCP1 Timeou...
void SCCP1_Timer_Start(void)
Starts the timer.
static uint16_t SCCP1_Timer_Counter16BitGet(void)
This inline function gets the SCCP1-Timer least significant 16 bit elapsed count value.
static uint32_t SCCP1_Timer_CounterGet(void)
This inline function gets the SCCP1-Timer elapsed count value.
void SCCP1_Timer_Initialize(void)
Initializes the SCCP1 module.
void SCCP1_Timer_InterruptPrioritySet(enum INTERRUPT_PRIORITY priority)
Sets the Interrupt Priority Value.
Structure containing the function pointers of TIMER driver.