3.6 CLC - Configurable Logic Cell
3.6.1 Introduction
The MPLAB® Code Configurator (MCC) Melody Configurable Logic Cell Peripheral Library (PLIBs) drivers generates APIs to support CLC-specific peripheral functionality on target MCUs.
The Configurable Logic Cell (CLC) module provides programmable logic that operates outside the speed limitations of software execution. The logic cell takes up to 256 input signals and, through the use of configurable gates, reduces those inputs to four logic lines that drive one of eight selectable single-output logic functions.
3.6.2 Supported Device Families
PIC12/16F150x | PIC12/16F161x | PIC12/16F184x |
PIC16F153xx | PIC16F170x | PIC16F171x |
PIC16F171xx | PIC16F176x | PIC16F177x |
PIC16F180xx | PIC16F181xx | PIC16F183xx |
PIC16F184xx | PIC16F188xx | PIC16F191xx |
PIC18F-K42 | PIC18F-K83 | PIC18F-Q10 |
PIC18F-Q20 | PIC18F-Q24 | PIC18F-Q40 |
PIC18F-Q41 | PIC18F-Q43 | PIC18F-Q71 |
PIC18F-Q83 | PIC18F-Q84 |
3.6.3 Required header files:
#include "mcc_generated_files/clc/clc[x].h"
3.6.4 Module Documentation
3.6.4.1 CLC1
This file contains the API prototypes for the CLC1 driver.
3.6.4.1.1 Module description
This file contains the API prototypes for the CLC1 driver.
Functions
void CLCx_Initialize (void)
Initializes the CLCx. This routine configures the CLC1 specific control registers.
void CLCx_Enable (void)
Enables the CLCx module.
void CLCx_Disable (void)
Disables the CLCx module.
void CLCx_ISR (void)
Implements the Interrupt Service Routine (ISR) for the CLC interrupt events.
bool CLCx_OutputStatusGet (void)
Returns the output pin status of the CLC module.
3.6.4.1.2 Function Documentation
CLCx_Disable()
void CLCx_Disable (void )
Disables the CLCx module.
None. |
None. |
CLCx_Enable()
void CLCx_Enable (void )
Enables the CLCx module.
None. |
None. |
CLCx_Initialize()
void CLCx_Initialize (void )
Initializes the CLCx. This routine configures the CLC1 specific control registers.
None. |
None. |
CLCx_ISR()
void CLCx_ISR (void )
Implements the Interrupt Service Routine (ISR) for the CLC interrupt events.
CLCx_Initialize() is already called. |
None. |
None. |
CLCx_OutputStatusGet()
bool CLCx_OutputStatusGet (void )
Returns the output pin status of the CLC module.
None. |
True |
- Output is 1. |
False |
- Output is 0. |
3.6.5 File Documentation
3.6.5.1 source/clc1.c File Reference
This file contains the API implementations for the CLC1 driver.
#include <xc.h> #include "../clc(x).h"
3.6.5.1.1 Functions
static void CLCx_DefaultCLCI_ISR (void)
void CLCx_Initialize (void)
Initializes the CLCx. This routine configures the CLC1 specific control registers.
void CLCx_Enable (void)
Enables the CLCx module.
void CLCx_Disable (void)
Disables the CLCx module.
void CLCx_ISR (void)
Implements the Interrupt Service Routine (ISR) for the CLC interrupt events.
void CLCx_CLCI_SetInterruptHandler (void(*InterruptHandler)(void))
Sets the callback function for the interrupt event.
bool CLCx_OutputStatusGet (void)
Returns the output pin status of the CLC module.
3.6.5.1.2 Variables
static void(* CLCx_CLCI_InterruptHandler )(void)
3.6.5.1.3 Detailed Description
This file contains the API implementations for the CLC1 driver.
CLC1 Generated Driver File.
3.6.5.1.4 Function Documentation
CLCx_CLCI_SetInterruptHandler()
void CLCx_CLCI_SetInterruptHandler (void(*)(void) InterruptHandler)
Sets the callback function for the interrupt event.
*InterruptHandler |
- Callback function for the interrupt event. |
None. |
CLCx_DefaultCLCI_ISR()
static void CLCx_DefaultCLCI_ISR (void )[static]
3.6.5.1.5 Variable Documentation
CLCx_CLCI_InterruptHandler
void(* CLCx_CLCI_InterruptHandler) (void)[static]
3.6.5.2 source/clc1.h File Reference
#include <xc.h> #include <stdint.h> #include <stdbool.h>
3.6.5.2.1 Functions
void CLCx_Initialize (void)
Initializes the CLCx. This routine configures the CLC1 specific control registers.
void CLCx_Enable (void)
Enables the CLCx module.
void CLCx_Disable (void)
Disables the CLCx module.
void CLCx_ISR (void)
Implements the Interrupt Service Routine (ISR) for the CLC interrupt events.
void CLCx_CLCI_SetInterruptHandler (void(*InterruptHandler)(void))
Sets the callback function for the interrupt event.
bool CLCx_OutputStatusGet (void)
Returns the output pin status of the CLC module.
3.6.5.2.2 Macros
#define CLCx_Initialize CLCx_Initialize
#define CLCx_Enable CLCx_Enable
#define CLCx_Disable CLCx_Disable
#define CLCx_ISR CLCx_ISR
#define CLCx_OutputStatusGet CLCx_OutputStatusGet
#define CLCx_CLCI_SetInterruptHandler CLCx_CLCI_SetInterruptHandler
3.6.5.2.3 Detailed Description
CLC1 Generated Driver API Header File.
3.6.5.2.4 Function Documentation
CLCx_CLCI_SetInterruptHandler()
void CLCx_CLCI_SetInterruptHandler (void(*)(void) InterruptHandler)
Sets the callback function for the interrupt event.
*InterruptHandler |
- Callback function for the interrupt event. |
None. |
3.6.5.2.5 Macro Definition Documentation
CLCx_CLCI_SetInterruptHandler
#define CLCx_CLCI_SetInterruptHandler CLCx_CLCI_SetInterruptHandler
CLCx_Disable
#define CLCx_Disable CLCx_Disable
CLCx_Enable
#define CLCx_Enable CLCx_Enable
CLCx_Initialize
#define CLCx_Initialize CLCx_Initialize
CLCx_ISR
#define CLCx_ISR CLCx_ISR
CLCx_OutputStatusGet
#define CLCx_OutputStatusGet CLCx_OutputStatusGet