4.3 CCL - Configurable Custom Logic

4.3.1 Introduction

The MCC Melody CCL PLIB Driver (Peripheral Library) generates API to support CCL-specific peripheral functionality on AVRxxxDx and ATtiny target MCU's.

The Configurable Custom Logic (CCL) is a programmable logic peripheral which can be connected to the device pins, events, or other internal peripherals thus serving as the ‘glue logic’ between the device peripherals and external devices. It can eliminate the need for external logic components and can also help the designer to overcome real-time constraints by combining Core Independent Peripherals (CIPs) to handle the most time-critical parts of the application independent of the CPU.

4.3.2 Supported Device Families

AVR® Dx AVR®EA ATtiny ATmega

4.3.3 Required header files:

#include "mcc_generated_files/ccl/ccl.h"

4.3.4 Module Documentation

4.3.4.1 CCL

This file contains the API prototype for the CCL driver.

4.3.4.1.1 Module description

This file contains the API prototype for the CCL driver.

Version: Driver Version 1.1.0
Functions

4.3.4.1.2 Function Documentation

CCL_Initialize()

int8_t CCL_Initialize (void )

Initializes the CCL. This is called only once during the system initialization.

Precondition:

None.

Parameters:
None.
Returns:

None.

LUT0_OUT_DefaultInterruptHandler()

void LUT0_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT0_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT0_OUT_SetInterruptHandler()

void LUT0_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT0_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT0_OUT at application runtime

LUT1_OUT_DefaultInterruptHandler()

void LUT1_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT1_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT1_OUT_SetInterruptHandler()

void LUT1_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT1_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT1_OUT at application runtime

LUT2_OUT_DefaultInterruptHandler()

void LUT2_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT2_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT2_OUT_SetInterruptHandler()

void LUT2_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT2_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT2_OUT at application runtime

LUT3_OUT_DefaultInterruptHandler()

void LUT3_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT3_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT3_OUT_SetInterruptHandler()

void LUT3_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT3_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT3_OUT at application runtime

LUT4_OUT_DefaultInterruptHandler()

void LUT4_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT4_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT4_OUT_SetInterruptHandler()

void LUT4_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT4_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT4_OUT at application runtime

LUT5_OUT_DefaultInterruptHandler()

void LUT5_OUT_DefaultInterruptHandler (void )

Default interrupt handler assigned to handle the LUT5_OUT interrupt events.

Precondition:

CCL_Initialize() is already called.

Parameters:
None.
Returns:

None.

LUT5_OUT_SetInterruptHandler()

void LUT5_OUT_SetInterruptHandler (void(*)(void) interruptHandler)

Assigns an interrupt handler for the LUT5_OUT interrupt event.

Precondition:

CCL_Initialize() is already called.

Parameters:
(*interruptHandler)(void)

- InterruptHandler function pointer.

Returns:

None.

Allows selecting an interrupt handler for LUT5_OUT at application runtime

4.3.5 File Documentation

4.3.5.1 source/ccl.c File Reference

This file contains the API implementations for the CCL driver.

#include "../ccl.h"

4.3.5.1.1 Functions

4.3.5.1.3 Detailed Description

This file contains the API implementations for the CCL driver.

CCL Generated Driver File

Version: Driver Version 1.1.1

4.3.5.1.4 Function Documentation

ISR()

ISR (CCL_CCL_vect )

4.3.5.1.5 Variable Documentation

LUT0_OUT_InterruptHandler

void(* LUT0_OUT_InterruptHandler) (void)[static]

LUT1_OUT_InterruptHandler

void(* LUT1_OUT_InterruptHandler) (void)[static]

LUT2_OUT_InterruptHandler

void(* LUT2_OUT_InterruptHandler) (void)[static]

LUT3_OUT_InterruptHandler

void(* LUT3_OUT_InterruptHandler) (void)[static]

LUT4_OUT_InterruptHandler

void(* LUT4_OUT_InterruptHandler) (void)[static]

LUT5_OUT_InterruptHandler

void(* LUT5_OUT_InterruptHandler) (void)[static]

4.3.5.2 source/ccl.h File Reference

#include <stdint.h>
#include <stdbool.h>
#include "../system/utils/compiler.h"

4.3.5.2.1 Functions

4.3.5.2.2 Detailed Description

CCL Generated Header File