Skip to content

Add Peripheral Pin Select (PPS) configuration for PIC18F26K83#41

Open
taisirhassan wants to merge 9 commits intoi2c-compile-fixfrom
pps-diagram
Open

Add Peripheral Pin Select (PPS) configuration for PIC18F26K83#41
taisirhassan wants to merge 9 commits intoi2c-compile-fixfrom
pps-diagram

Conversation

@taisirhassan
Copy link
Contributor

Introduce PPS initialization and configuration for I2C, SPI, and UART peripherals, along with documentation detailing setup and usage. Include helper functions for managing PPS register access.

This commit introduces the pin_config.h and pin_config.c files, implementing the initialization and configuration of PPS mappings for I2C, SPI, and UART peripherals. The pin_init function is added to set up all necessary pin configurations after MCU initialization. Additionally, helper functions for unlocking and locking PPS registers are included to ensure safe modifications.
…iguration

This commit introduces a new documentation file, pin_config.rst, detailing the setup and usage of the PPS module for the PIC18F26K83. It includes an overview, function descriptions, implementation details, and usage examples for initializing and configuring peripheral mappings for I2C, SPI, and UART. The index.rst file is also updated to include this new documentation.
@taisirhassan taisirhassan self-assigned this May 14, 2025
This commit simplifies the PWM initialization and duty cycle update functions by removing the pin configuration parameter and introducing dedicated functions to retrieve register addresses for CCP modules.
…ion functions

This commit expands the pin_config.h file by introducing structures for I2C, SPI, UART, PWM, and external interrupt pin configurations. It also adds functions for dynamically configuring these pins, enhancing the Peripheral Pin Select (PPS) capabilities.
This commit introduces several new functions for configuring pins dynamically, including support for I2C, SPI, UART, and PWM. It also adds validation for pin configurations and improves the handling of Peripheral Pin Select (PPS) mappings, ensuring safe modifications by unlocking and locking PPS registers as needed.
@taisirhassan taisirhassan marked this pull request as ready for review May 31, 2025 07:47
@taisirhassan taisirhassan requested a review from JasonBrave as a code owner May 31, 2025 07:47
…ge examples and enhanced structure descriptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant