Driver API for CCL (plib_ccl.h)
More...
|
| void | CCL_Enable (void) |
| | Enables the CCL module.
|
| |
| void | CCL_Disable (void) |
| | Disables the CCL module.
|
| |
| void | CCL_SoftwareReset (void) |
| | Performs a software reset of the CCL module.
|
| |
| void | CCL_RunInStandby (bool run_standby) |
| | Configures the CCL to run in standby mode.
|
| |
| void | CCL_SetLUTTruthTable (uint8_t lut_index, uint8_t truth_value) |
| | Sets the truth table for a specified LUT.
|
| |
| void | CCL_SetLUTInputs (uint8_t lut_index, uint8_t in0, uint8_t in1, uint8_t in2) |
| | Sets the input sources for a specified LUT.
|
| |
| void | CCL_SetLUTFilter (uint8_t lut_index, uint8_t filter) |
| | Sets the filter for a specified LUT.
|
| |
| void | CCL_SetLUTEdgeDetect (uint8_t lut_index, uint8_t edge) |
| | Sets the edge detection for a specified LUT.
|
| |
| void | CCL_EnableLUTOutput (uint8_t lut_index, bool enable) |
| | Enables or disables the output for a specified LUT.
|
| |
| void | CCL_SetLUTInvert (uint8_t lut_index, bool invert) |
| | Sets the output inversion for a specified LUT.
|
| |
| void | CCL_EnableLUTInput (uint8_t lut_index, bool input_enable) |
| | Enables or disables the input for a specified LUT.
|
| |
| void | CCL_ConfigureSequencer (uint8_t seq_index, uint8_t seq_type) |
| | Configures the sequencer for a specified index.
|
| |
| void | CCL_EnableWriteProtection (void) |
| | Enables write protection for CCL registers.
|
| |
| void | CCL_DisableWriteProtection (void) |
| | Disables write protection for CCL registers.
|
| |
| void | CCL_WriteProtectionLock (void) |
| | Locks write protection configuration until reset.
|
| |
| bool | CCL_WriteProtectionIsEnabled (void) |
| | Queries if write protection is enabled.
|
| |
| bool | CCL_WriteProtectionIsLocked (void) |
| | Queries if write protection is locked.
|
| |
Driver API for CCL (plib_ccl.h)
Usage Example
The following example demonstrates typical usage of the CCL peripheral:
#include <stdint.h>
#include <stdbool.h>
int configure_ccl(void)
{
CCL_LUTCTRL_INSEL0_IO_Val,
CCL_LUTCTRL_INSEL0_IO_Val,
CCL_LUTCTRL_INSEL0_IO_Val);
return 0;
}
void CCL_WriteProtectionLock(void)
Locks write protection configuration until reset.
void CCL_Disable(void)
Disables the CCL module.
void CCL_ConfigureSequencer(uint8_t seq_index, uint8_t seq_type)
Configures the sequencer for a specified index.
void CCL_EnableWriteProtection(void)
Enables write protection for CCL registers.
void CCL_SetLUTInputs(uint8_t lut_index, uint8_t in0, uint8_t in1, uint8_t in2)
Sets the input sources for a specified LUT.
void CCL_EnableLUTOutput(uint8_t lut_index, bool enable)
Enables or disables the output for a specified LUT.
void CCL_DisableWriteProtection(void)
Disables write protection for CCL registers.
void CCL_EnableLUTInput(uint8_t lut_index, bool input_enable)
Enables or disables the input for a specified LUT.
void CCL_SetLUTTruthTable(uint8_t lut_index, uint8_t truth_value)
Sets the truth table for a specified LUT.
void CCL_SetLUTFilter(uint8_t lut_index, uint8_t filter)
Sets the filter for a specified LUT.
void CCL_Enable(void)
Enables the CCL module.
void CCL_RunInStandby(bool run_standby)
Configures the CCL to run in standby mode.
Configurable Custom Logic (CCL) Peripheral Library Interface.
◆ CCL_ConfigureSequencer()
| void CCL_ConfigureSequencer |
( |
uint8_t | seq_index, |
|
|
uint8_t | seq_type ) |
Configures the sequencer for a specified index.
- Parameters
-
| seq_index | Index of the sequencer to configure. |
| seq_type | Sequencer type selection value. |
- Returns
- None.
◆ CCL_Disable()
| void CCL_Disable |
( |
void | | ) |
|
Disables the CCL module.
- Parameters
-
- Returns
- None.
◆ CCL_DisableWriteProtection()
| void CCL_DisableWriteProtection |
( |
void | | ) |
|
Disables write protection for CCL registers.
- Parameters
-
- Returns
- None.
◆ CCL_Enable()
Enables the CCL module.
- Parameters
-
- Returns
- None.
◆ CCL_EnableLUTInput()
| void CCL_EnableLUTInput |
( |
uint8_t | lut_index, |
|
|
bool | input_enable ) |
Enables or disables the input for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| input_enable | Set to true to enable input, false to disable. |
- Returns
- None.
◆ CCL_EnableLUTOutput()
| void CCL_EnableLUTOutput |
( |
uint8_t | lut_index, |
|
|
bool | enable ) |
Enables or disables the output for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| enable | Set to true to enable output, false to disable. |
- Returns
- None.
◆ CCL_EnableWriteProtection()
| void CCL_EnableWriteProtection |
( |
void | | ) |
|
Enables write protection for CCL registers.
- Parameters
-
- Returns
- None.
◆ CCL_RunInStandby()
| void CCL_RunInStandby |
( |
bool | run_standby | ) |
|
Configures the CCL to run in standby mode.
- Parameters
-
| run_standby | Set to true to enable run in standby, false to disable. |
- Returns
- None.
◆ CCL_SetLUTEdgeDetect()
| void CCL_SetLUTEdgeDetect |
( |
uint8_t | lut_index, |
|
|
uint8_t | edge ) |
Sets the edge detection for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| edge | Edge detection selection value. |
- Returns
- None.
◆ CCL_SetLUTFilter()
| void CCL_SetLUTFilter |
( |
uint8_t | lut_index, |
|
|
uint8_t | filter ) |
Sets the filter for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| filter | Filter selection value. |
- Returns
- None.
◆ CCL_SetLUTInputs()
| void CCL_SetLUTInputs |
( |
uint8_t | lut_index, |
|
|
uint8_t | in0, |
|
|
uint8_t | in1, |
|
|
uint8_t | in2 ) |
Sets the input sources for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| in0 | Input 0 source selection. |
| in1 | Input 1 source selection. |
| in2 | Input 2 source selection. |
- Returns
- None.
◆ CCL_SetLUTInvert()
| void CCL_SetLUTInvert |
( |
uint8_t | lut_index, |
|
|
bool | invert ) |
Sets the output inversion for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| invert | Set to true to invert output, false for normal output. |
- Returns
- None.
◆ CCL_SetLUTTruthTable()
| void CCL_SetLUTTruthTable |
( |
uint8_t | lut_index, |
|
|
uint8_t | truth_value ) |
Sets the truth table for a specified LUT.
- Parameters
-
| lut_index | Index of the LUT to configure. |
| truth_value | 8-bit truth table value. |
- Returns
- None.
◆ CCL_SoftwareReset()
| void CCL_SoftwareReset |
( |
void | | ) |
|
Performs a software reset of the CCL module.
- Parameters
-
- Returns
- None.
◆ CCL_WriteProtectionIsEnabled()
| bool CCL_WriteProtectionIsEnabled |
( |
void | | ) |
|
Queries if write protection is enabled.
- Parameters
-
- Returns
- true if enabled, false otherwise.
◆ CCL_WriteProtectionIsLocked()
| bool CCL_WriteProtectionIsLocked |
( |
void | | ) |
|
Queries if write protection is locked.
- Parameters
-
- Returns
- true if locked, false otherwise.
◆ CCL_WriteProtectionLock()
| void CCL_WriteProtectionLock |
( |
void | | ) |
|
Locks write protection configuration until reset.
- Parameters
-
- Returns
- None.