Digital Power Starter Kit 3 Firmware
dsPIC33C Buck Converter Voltage Mode Control Example

Public functions of the SCCP/MCCP PRAL driver. More...

+ Collaboration diagram for Public Functions:

Functions

volatile struct P33C_CCP_INSTANCE_SFRSET_sp33c_CcpInstance_GetHandle (volatile uint16_t ccpInstance)
 Gets pointer to CCP instance SFR set. More...
 
volatile struct P33C_CCP_INSTANCE_SFRSET_s p33c_CcpInstance_ConfigRead (volatile uint16_t ccpInstance)
 Read the current configuration from the CCP instance registers. More...
 
volatile uint16_t p33c_CcpInstance_ConfigWrite (volatile uint16_t ccpInstance, volatile struct P33C_CCP_INSTANCE_SFRSET_s ccpConfig)
 Writes a user-defined configuration to the CCP instance registers. More...
 

Detailed Description

Public functions of the SCCP/MCCP PRAL driver.

This is the detailed description of public functions of the SCCP/MCCP PRAL driver

Function Documentation

◆ p33c_CcpInstance_ConfigRead()

volatile struct P33C_CCP_INSTANCE_SFRSET_s p33c_CcpInstance_ConfigRead ( volatile uint16_t  ccpInstance)

Read the current configuration from the CCP instance registers.

Parameters
ccpInstanceIndex of the Capture/Compare peripheral instance of type unsinged integer
Returns
SCCP/MCCP instance special function register data object of type struct P33C_CCP_INSTANCE_SFRSET_s

This function reads all registers with their current configuration into a data structure of type P33C_CCP_MODULE_SFRSET_s. Users can read and verify of modify the configuration to write it back to any other CCP peripheral instance.

Definition at line 60 of file p33c_ccp.c.

◆ p33c_CcpInstance_ConfigWrite()

volatile uint16_t p33c_CcpInstance_ConfigWrite ( volatile uint16_t  ccpInstance,
volatile struct P33C_CCP_INSTANCE_SFRSET_s  ccpConfig 
)

Writes a user-defined configuration to the CCP instance registers.

Parameters
ccpInstanceIndex of the Capture/Compare peripheral instance of type unsinged integer
ccpConfigSCCP/MCCP instance special function register data object of type struct P33C_CCP_INSTANCE_SFRSET_s
Returns
0 = failure, writing to CCP instance was not successful
1 = success, writing to CCP instance was successful

This function writes a user-defined CCP instance configuration of type P33C_CCP_MODULE_SFRSET_s to the CCP instance registers. The individual register configurations have to be set in user-code before calling this function. To simplify the configuration process of standard functions, this driver provides templates, which can be loaded and written directly

Definition at line 116 of file p33c_ccp.c.

◆ p33c_CcpInstance_GetHandle()

volatile struct P33C_CCP_INSTANCE_SFRSET_s * p33c_CcpInstance_GetHandle ( volatile uint16_t  ccpInstance)

Gets pointer to CCP instance SFR set.

Parameters
ccpInstanceIndex of the Capture/Compare peripheral instance of type unsinged integer
Returns
Pointer to SCCP/MCCP instance special function register data object of type struct P33C_CCP_INSTANCE_SFRSET_s

This function returns the pointer to a CCP module register set Special Function Register memory space. This pointer can be used to directly write to/read from the Special Function Registers of the CCP peripheral module configuration.

Definition at line 60 of file p33c_ccp.c.