MPAE-16196 Updated project and readme file

master
Mihai Alexandru Ricanu 2023-08-04 13:45:36 +03:00
rodzic e1c767da42
commit ed93462942
41 zmienionych plików z 1631 dodań i 1727 usunięć

Wyświetl plik

@ -4,27 +4,27 @@
"content": {
"metaDataVersion": "1.1.0",
"name": "com.microchip.mcu8.mplabx.project.avr128da48-cnano-led-blink-pwm-mcc",
"version": "2.0.0",
"version": "2.0.1",
"displayName": "LED Blink using PWM",
"projectName": "avr128da48-cnano-led-blink-pwm-mcc",
"shortDescription": "This repository provides an MPLAB X project with a MCC generated code example for an LED blink driven by a PWM signal. The example demonstrates how to generate a PWM signal using a timer",
"ide": {
"name": "MPLAB X",
"semverRange": ">=5.45.0"
"semverRange": ">=6.10.0"
},
"compiler": [
{
"name": "XC8",
"semverRange": "^2.31.0"
"semverRange": "^2.41.0"
}
],
"dfp": {
"name": "AVR-Dx_DFP",
"semverRange": "^1.8.112"
"semverRange": "^2.3.272"
},
"configurator": {
"name": "MCC",
"semverRange": ">=4.1.0"
"semverRange": ">=5.3.7"
},
"device": {
"metaDataVersion": "1.0.0",
@ -37,12 +37,6 @@
}
},
"author": "Microchip",
"subcategories": [
[
"Peripherals",
"TCA"
]
],
"peripherals": [
"TCA"
],

112
README.md
Wyświetl plik

@ -1,64 +1,108 @@
[![MCHP](images/microchip.png)](https://www.microchip.com)
<a href="https://www.microchip.com" rel="nofollow"><img src="images/microchip.png" alt="MCHP" width="300"/></a>
# AVR128DA48 LED Blink using PWM Code Example
This repository provides a MPLAB X project with a MCC generated code example for an LED blink driven by a PWM signal. The example demonstrates how to generate a PWM signal using a timer. The output waveform is connected to the on-board LED. The PWM duty cycle value is set at 50%. For half of the period the LED is turned ON, and for the other half the LED is turned OFF.
## Related Documentation
More details and code examples on the AVR128DA48 can be found at the following links:
- [AVR128DA48 Product Page](https://www.microchip.com/wwwproducts/en/AVR128DA28)
- [AVR128DA48 Code Examples on GitHub](https://github.com/microchip-pic-avr-examples?q=avr128da48)
- [AVR128DA48 Project Examples in START](https://start.atmel.com/#examples/AVR128DA48CuriosityNano)
## Software Used
- MPLAB® X IDE 5.45 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide)
- MPLAB® XC8 2.31 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers)
- MPLAB® Code Configurator (MCC) 4.1.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
- MPLAB® Code Configurator (MCC) Device Libraries 8-bit AVR MCUs 2.5.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
- AVR-Dx 1.8.112 or newer Device Pack
- [MPLAB® X IDE](http://www.microchip.com/mplab/mplab-x-ide) v6.10 or newer
- [MPLAB® XC8](http://www.microchip.com/mplab/compilers) 2.41 or newer
- [AVR-Dx Device Family Pack](https://packs.download.microchip.com/) v2.3.272 or newer
## Hardware Used
- AVR128DA48 Curiosity Nano [(DM164151)](https://www.microchip.com/Developmenttools/ProductDetails/DM164151)
- [AVR128DA48 Curiosity Nano](https://www.microchip.com/Developmenttools/ProductDetails/DM164151) Development Board is used as test platform:
<br><img src="images/AVR128DA48_CNANO.png" width="600">
## Operation
To program the Curiosity Nano board with this MPLAB® X project, follow the steps provided in the [How to Program the Curiosity Nano Board](#how-to-program-the-curiosity-nano-board) chapter.<br><br>
## Setup
The AVR128DA48 Curiosity Nano Development Board is used as test platform
<br><img src="images/AVR128DA48_CNANO_instructions.PNG" width="500">
The following configurations must be made for this project:
Clock:
- 4 MHz clock with Prescaler Division of 16 (250 kHz actual)
- Clock Control:
- Clock Selection: Internal high-frequency oscillator
- Internal Oscillator Frequency: 1-32 MHz internal oscillator
- Oscillator Frequency Selection: 4 MHz system clock
- Prescaler Enable: Yes
- Prescaler Division: 16X
<br><img src="images/clock_control.PNG" width="600">
TCA1:
- Single-slope PWM Mode
- Compare channel 2 enabled with 50% duty cycle
- System clock 250 kHz
- Requested timeout 262ms
- Configuration Bits:
- Watchdog Timeout Period: Watch-Dog timer off
<br><img src="images/configuration_bits.PNG" width="600">
|Pin | Configuration |
- Interrupt Manager:
- Global Interrupt Enable: No
<br><img src="images/interrupt_manager.PNG" width="600">
- TCA1:
- Enable Timer: Yes
- Clock Selection: System Clock
- Requested Timeout: 262 ms
- Waveform Generation Mode: Single Slope PWM
- Enable Channel 2: Yes
- Duty Cycle 2: 50%
<br><img src="images/tca1_1.PNG" width="600">
<br><img src="images/tca1_2.PNG" width="600">
| Pin | Configuration |
| :----------: | :----------------: |
|PC6 (LED0) | Digital Output |
| PC6 (LED0) | Digital Output |
## Operation
1. Connect the board to the PC.
<br><img src="images/pin_manager.PNG" width="600">
2. Open the *avr128da48-cnano-led-blink-pwm-mcc.X* project in MPLAB® X IDE.
## Demo
3. Set *avr128da48-cnano-led-blink-pwm-mcc.X* project as main project. Right click on the project in the *Projects* tab and click *Set as Main Project*.
4. Select the *AVR128DA28 Curiosity Nano* in the *Connected Hardware Tool* section of the project settings:
- Right click on the project and click *Properties*;
- Click on the arrow right next to *Connected Hardware Tool*;
- Select the *AVR128DA28 Curiosity Nano* (click on the SN), click *Apply* and then click *OK*:
<br><img src="images/Tool-selection.PNG" width="600">
5. Program the project to the board: right click on the project and click *Make and Program Device*.
Demo:
<br><img src="images/AVR-DA_led_blink_pwm.gif" width="500">
<br><img src="images/AVR-DA_led_blink_pwm.gif" width="600">
## Summary
The demo shows how to generate a PWM signal using Timer/Counter Type A (TCA). The output of the TCA is connected to the on-board LED of the AVR128DA48 Curiosity Nano board and a waveform signal is generated.
## How to Program the Curiosity Nano board
This chapter shows how to use the MPLAB X IDE to program an AVR® device with an `Example_Project.X`. This can be applied for any other projects.
1. Connect the board to the PC.
2. Open the `Example_Project.X` project in MPLAB X IDE.
3. Set the `Example_Project.X` project as main project:
<br>Right click on the project in the **Projects** tab and click Set as Main Project.
<br><img src="images/Program_Set_as_Main_Project.PNG" width="400">
4. Clean and build the `Example_Project.X` project:
<br>Right click on the `Example_Project.X` project and select Clean and Build.
<br><img src="images/Program_Clean_and_Build.PNG" width="400">
5. Select AVRxxxxx Curiosity Nano in the Connected Hardware Tool section of the project settings:
<br>Right click on the project and click Properties.
<br>Click on the arrow under the Connected Hardware Tool.
<br>Select the AVRxxxxx Curiosity Nano (click on the SN).
<br>Click Apply and then OK.
<br><img src="images/Program_Tool_Selection.PNG" width="600">
6. Program the project to the board:
<br>Right click on the project and then Make and Program Device.
<br><img src="images/Program_Make_and_Program_Device.PNG" width="600">
<br>
- [Back to Setup](#setup)
- [Back to Demo](#demo)
- [Back to Summary](#summary)
- [Back to Top](#avr128da48-led-blink-using-pwm-code-example)

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -1,35 +1,34 @@
/*
* MAIN Generated Driver File
*
* @file main.c
*
* @defgroup main MAIN
*
* @brief This is the generated driver implementation file for the MAIN driver.
*
* @version MAIN Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include "mcc_generated_files/system/system.h"

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CCP Header File
*
* @file ccp.h
*
* @ingroup config_bitsdriver
*
* @brief This file contains the Configuration Change Protection (CCP) header file for the Configuration bits driver.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -53,39 +42,29 @@ extern "C" {
#endif
/**
* \brief Write to a CCP-protected 8-bit I/O register
*
* \param addr Address of the I/O register
* \param value Value to be written
*
* \note Using IAR Embedded workbench, the choice of memory model has an impact
* on calling convention. The memory model is not visible to the
* preprocessor, so it must be defined in the Assembler preprocessor directives.
* @brief Writes to a CCP-protected 8-bit I/O register.
* @param addr Address of the I/O register.
* @param value Value to be written.
* NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
* Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
*/
static inline void ccp_write_io(void *addr, uint8_t value)
{
protected_write_io(addr, CCP_IOREG_gc, value);
}
/** @} */
/**
* \brief Write to CCP-protected 8-bit SPM register
*
* \param addr Address of the SPM register
* \param value Value to be written
*
* \note Using IAR Embedded workbench, the choice of memory model has an impact
* on calling convention. The memory model is not visible to the
* preprocessor, so it must be defined in the Assembler preprocessor directives.
* @brief Writes to a CCP-protected 8-bit SPM register.
* @param addr Address of the SPM register.
* @param value Value to be written.
* NOTE: Using IAR Embedded workbench, the choice of memory model has an impacton calling convention.
* Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
*/
static inline void ccp_write_spm(void *addr, uint8_t value)
{
protected_write_io(addr, CCP_SPM_gc, value);
}
/** @} */
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CLKCTRL Generated Driver API Header File
*
* @file clkctrl.h
*
* @defgroup clkctrl CLKCTRL
*
* @brief This file contains the API prototype for the CLKCTRL driver.
*
* @version CLKCTRL Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -50,7 +39,13 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
#endif
#include "ccp.h"
/**
* @ingroup clkctrl
* @brief Initializes the Clock controller.
* @param None.
* @return None.
*
*/
void CLOCK_Initialize(void);
#endif // CLOCK_CONFIG_H

Wyświetl plik

@ -0,0 +1,42 @@
/**
* CONFIGURATION BITS Generated Driver Header File
*
* @file config_bits.h
*
* @defgroup config_bitsdriver Configuration Bits Driver
*
* @brief This file contains the generated header file for the Configuration bits driver.
*
* @version Driver Version 1.0.4
*/
/*
© [2023] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef CONFIG_BITS_H
#define CONFIG_BITS_H
#include "../system/clock.h"
#endif //CONFIG_BITS_H
/**
End of File
*/

Wyświetl plik

@ -1,44 +1,34 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* Interrupt Manager Generated Driver API Header File.
*
* @file interrupt.h
*
* @defgroup interrupt INTERRUPT
*
* @brief This file contains the API prototype for the Interrupt Manager.
*
* @version Interrupt Manager Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -51,11 +41,13 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
#ifdef __cplusplus
extern "C" {
#endif /** \
* \brief Initialize cpuint interface \
* \
* \return Initialization status \
*/
#endif
/**
* @ingroup interrupt
* @brief Initializes the Interrupt module.
* @retval 0 - Initialization is successful.
*/
int8_t CPUINT_Initialize();
#ifdef __cplusplus

Wyświetl plik

@ -1,11 +1,35 @@
/**
@Company
Microchip Technology Inc.
* Generated Pins header File
*
* @file pins.h
*
* @defgroup pinsdriver Pins Driver
*
* @brief This is generated driver header for pins.
* This header file provides APIs for all pins selected in the GUI.
*
* @version Driver Version 1.1.0
*/
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
/*
© [2023] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef PINS_H_INCLUDED
@ -31,8 +55,34 @@
#define IO_PC6_EnableInterruptForFallingEdge() do { PORTC.PIN6CTRL = (PORTC.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
#define IO_PC6_DisableDigitalInputBuffer() do { PORTC.PIN6CTRL = (PORTC.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
#define IO_PC6_EnableInterruptForLowLevelSensing() do { PORTC.PIN6CTRL = (PORTC.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
#define PC6_SetInterruptHandler IO_PC6_SetInterruptHandler
/**
* @ingroup pinsdriver
* @brief GPIO and peripheral I/O initialization
* @param none
* @return none
*/
void PIN_MANAGER_Initialize();
void PC6_DefaultInterruptHandler(void);
void PC6_SetInterruptHandler(void (* interruptHandler)(void)) ;
/**
* @ingroup pinsdriver
* @brief Default Interrupt Handler for IO_PC6 pin.
* This is a predefined interrupt handler to be used together with the IO_PC6_SetInterruptHandler() method.
* This handler is called every time the IO_PC6 ISR is executed.
* @pre PIN_MANAGER_Initialize() has been called at least once
* @param none
* @return none
*/
void IO_PC6_DefaultInterruptHandler(void);
/**
* @ingroup pinsdriver
* @brief Interrupt Handler Setter for IO_PC6 pin input-sense-config functionality.
* Allows selecting an interrupt handler for IO_PC6 at application runtime
* @pre PIN_MANAGER_Initialize() has been called at least once
* @param InterruptHandler function pointer.
* @return none
*/
void IO_PC6_SetInterruptHandler(void (* interruptHandler)(void)) ;
#endif /* PINS_H_INCLUDED */

Wyświetl plik

@ -1,56 +1,36 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
*/
/**
* \defgroup doc_driver_system_protected_io Protected IO
* \ingroup doc_driver_system
* protected_io Header File
*
* @file protected_io.h
*
* @defgroup doc_driver_system_protected_io Protected IO
*
* \section doc_driver_protected_io_rev Revision History
* - v0.0.0.1 Initial Commit
* @brief This file contains the generated prtected_io header file for the CONFIGURATION BITS.
*
* @version Driver Version 1.0.0
*
*@{
*/
*/
/*
© [2023] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef PROTECTED_IO_H
#define PROTECTED_IO_H
@ -64,24 +44,21 @@ extern "C" {
//@{
/**
* \def CONFIG_MEMORY_MODEL_TINY
* \brief Configuration symbol to enable 8 bit pointers.
*
* @def CONFIG_MEMORY_MODEL_TINY
* @brief Configuration symbol to enable 8 bit pointers.
*/
#define CONFIG_MEMORY_MODEL_TINY
/**
* \def CONFIG_MEMORY_MODEL_SMALL
* \brief Configuration symbol to enable 16 bit pointers.
* \note If no memory model is defined, SMALL is default.
*
* @def CONFIG_MEMORY_MODEL_SMALL
* @brief Configuration symbol to enable 16 bit pointers.
* NOTE: If no memory model is defined, SMALL is default.
*/
#define CONFIG_MEMORY_MODEL_SMALL
/**
* \def CONFIG_MEMORY_MODEL_LARGE
* \brief Configuration symbol to enable 24 bit pointers.
*
* @def CONFIG_MEMORY_MODEL_LARGE
* @brief Configuration symbol to enable 24 bit pointers.
*/
#define CONFIG_MEMORY_MODEL_LARGE
@ -89,15 +66,12 @@ extern "C" {
#endif
/**
* \brief Write to am 8-bit I/O register protected by CCP or a protection bit
*
* \param addr Address of the I/O register
* \param magic CCP magic value or Mask for protection bit
* \param value Value to be written
*
* \note Using IAR Embedded workbench, the choice of memory model has an impact
* on calling convention. The memory model is not visible to the
* preprocessor, so it must be defined in the Assembler preprocessor directives.
* @brief Writes to an 8-bit I/O register protected by CCP or a protection bit.
* @param addr Address of the I/O register.
* @param magic CCP magic value or Mask for protection bit.
* @param value Value to be written.
* NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
* Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
*/
extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);

Wyświetl plik

@ -1,54 +1,40 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CLKCTRL Generated Driver File
*
* @file clkctrl.c
*
* @ingroup clkctrl
*
* @brief This file contains the API implementation for the CLKCTRL driver.
*
* @version CLKCTRL Driver Version 1.0.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include <xc.h>
#include "../clock.h"
void CLOCK_Initialize(void)
{
// Set the CLKCTRL module to the options selected in the user interface.
{
//CLKOUT disabled; CLKSEL Internal high-frequency oscillator;
ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),0x0);
@ -61,7 +47,7 @@ void CLOCK_Initialize(void)
//EXTS disabled; OSCHFS disabled; OSC32KS disabled; PLLS disabled; SOSC disabled; XOSC32KS disabled;
ccp_write_io((void*)&(CLKCTRL.MCLKSTATUS),0x0);
//AUTOTUNE disabled; FREQSEL 4 MHz system clock (default); RUNSTDBY disabled;
//AUTOTUNE disabled; FRQSEL 4 MHz system clock (default); RUNSTDBY disabled;
ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),0xC);
//TUNE 0x0;

Wyświetl plik

@ -1,53 +1,40 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CONFIGURATION BITS Generated Driver Source File
*
* @file config_bits.c
*
* @ingroup config_bitsdriver
*
* @brief This file contains the generated Device Configuration Bits file.
*
* @version Driver Version 1.0.4
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include <avr/io.h>
/**
* Configures Fuse bits
* Configures the Fuse bits.
*/
FUSES =
{
.BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,

Wyświetl plik

@ -1,52 +1,39 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* Interrupt Manager Generated Driver File.
*
* @file interrupt.c
*
* @ingroup interrupt
*
* @brief This file contains the API implementation for the Interrupt Manager.
*
* @version Interrupt Manager Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include "../interrupt.h"
/**
* \brief Initialize cpuint interface
*/
int8_t CPUINT_Initialize()
{
/* IVSEL and CVT are Configuration Change Protected */

Wyświetl plik

@ -1,48 +1,43 @@
/**
Generated Pin Manager File
Company:
Microchip Technology Inc.
File Name:
pins.c
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* Generated Driver File
*
* @file pins.c
*
* @ingroup pinsdriver
*
* @brief This is generated driver implementation for pins.
* This file provides implementations for pin APIs for all pins selected in the GUI.
*
* @version Driver Version 1.1.0
*/
/*
(c) 2018 Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip software and any
derivatives exclusively with Microchip products. It is your responsibility to comply with third party
license terms applicable to your use of third party software (including open source software) that
may accompany Microchip software.
THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
FOR A PARTICULAR PURPOSE.
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
SOFTWARE.
© [2023] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include "../pins.h"
static void (*PC6_InterruptHandler)(void);
void PORT_Initialize(void);
static void (*IO_PC6_InterruptHandler)(void);
void PIN_MANAGER_Initialize()
{
PORT_Initialize();
/* DIR Registers Initialization */
PORTA.DIR = 0x0;
PORTB.DIR = 0x0;
@ -109,31 +104,7 @@ void PIN_MANAGER_Initialize()
PORTF.PIN6CTRL = 0x0;
PORTF.PIN7CTRL = 0x0;
/* Multi-pin Config registers Initialization */
PORTA.PINCONFIG = 0x00;
PORTA.PINCTRLCLR = 0x00;
PORTA.PINCTRLSET = 0x00;
PORTA.PINCTRLUPD = 0x00;
PORTB.PINCONFIG = 0x00;
PORTB.PINCTRLCLR = 0x00;
PORTB.PINCTRLSET = 0x00;
PORTB.PINCTRLUPD = 0x00;
PORTC.PINCONFIG = 0x00;
PORTC.PINCTRLCLR = 0x00;
PORTC.PINCTRLSET = 0x00;
PORTC.PINCTRLUPD = 0x00;
PORTD.PINCONFIG = 0x00;
PORTD.PINCTRLCLR = 0x00;
PORTD.PINCTRLSET = 0x00;
PORTD.PINCTRLUPD = 0x00;
PORTE.PINCONFIG = 0x00;
PORTE.PINCTRLCLR = 0x00;
PORTE.PINCTRLSET = 0x00;
PORTE.PINCTRLUPD = 0x00;
PORTF.PINCONFIG = 0x00;
PORTF.PINCTRLCLR = 0x00;
PORTF.PINCTRLSET = 0x00;
PORTF.PINCTRLUPD = 0x00;
/* EVGENCTRL registers Initialization */
/* PORTMUX Initialization */
PORTMUX.ACROUTEA = 0x0;
@ -149,102 +120,59 @@ void PIN_MANAGER_Initialize()
PORTMUX.ZCDROUTEA = 0x0;
// register default ISC callback functions at runtime; use these methods to register a custom function
PC6_SetInterruptHandler(PC6_DefaultInterruptHandler);
IO_PC6_SetInterruptHandler(IO_PC6_DefaultInterruptHandler);
}
void PORT_Initialize(void)
{
/* On AVR devices all peripherals are enable from power on reset, this
* disables all peripherals to save power. Driver shall enable
* peripheral if used */
/* Set all pins to low power mode */
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
for (uint8_t i = 0; i < 8; i++) {
*((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
}
}
/**
Allows selecting an interrupt handler for PC6 at application runtime
Allows selecting an interrupt handler for IO_PC6 at application runtime
*/
void PC6_SetInterruptHandler(void (* interruptHandler)(void))
void IO_PC6_SetInterruptHandler(void (* interruptHandler)(void))
{
PC6_InterruptHandler = interruptHandler;
IO_PC6_InterruptHandler = interruptHandler;
}
void PC6_DefaultInterruptHandler(void)
void IO_PC6_DefaultInterruptHandler(void)
{
// add your PC6 interrupt custom code
// or set custom function using PC6_SetInterruptHandler()
// add your IO_PC6 interrupt custom code
// or set custom function using IO_PC6_SetInterruptHandler()
}
ISR(PORTA_PORT_vect)
{
// Call the interrupt handler for the callback registered at runtime
{
/* Clear interrupt flags */
VPORTA.INTFLAGS = 0xff;
}
ISR(PORTB_PORT_vect)
{
// Call the interrupt handler for the callback registered at runtime
{
/* Clear interrupt flags */
VPORTB.INTFLAGS = 0xff;
}
ISR(PORTC_PORT_vect)
{
{
// Call the interrupt handler for the callback registered at runtime
if(VPORTC.INTFLAGS & PORT_INT6_bm)
{
PC6_InterruptHandler();
IO_PC6_InterruptHandler();
}
/* Clear interrupt flags */
VPORTC.INTFLAGS = 0xff;
}
ISR(PORTD_PORT_vect)
{
// Call the interrupt handler for the callback registered at runtime
{
/* Clear interrupt flags */
VPORTD.INTFLAGS = 0xff;
}
ISR(PORTE_PORT_vect)
{
// Call the interrupt handler for the callback registered at runtime
{
/* Clear interrupt flags */
VPORTE.INTFLAGS = 0xff;
}
ISR(PORTF_PORT_vect)
{
// Call the interrupt handler for the callback registered at runtime
{
/* Clear interrupt flags */
VPORTF.INTFLAGS = 0xff;
}

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* protected_io Source Code File
*
* @file protected_io.S
*
* @ingroup config_bitsdriver
*
* @brief This file contains the generated protected_io source code file for the CONFIGURATION BITS.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

Wyświetl plik

@ -1,53 +1,37 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* System Driver Source File
*
* @file system.c
*
* @ingroup systemdriver
*
* @brief This file contains the API implementation for the System driver.
*
* @version Driver Version 1.0.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include "../system.h"
/**
* Initializes MCU, drivers and middleware in the project
**/
void SYSTEM_Initialize(void)
{

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* System Driver Header File
*
* @file system.h
*
* @defgroup systemdriver System Driver
*
* @brief This file contains the API prototypes for the System driver.
*
* @version Driver Version 1.0.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -50,17 +39,23 @@ extern "C" {
#endif
#include "../system/utils/compiler.h"
#include "../system/clock.h"
#include "config_bits.h"
#include "../system/clock.h"
#include "../system/pins.h"
#include "../timer/tca1.h"
#include "../system/interrupt.h"
/**
* Initializes MCU, drivers and middleware in the project
**/
* @ingroup systemdriver
* @brief Initializes the system module. This routine must be called only once during the system initialization and before any other routine is called.
* @param None.
* @return None.
*/
void SYSTEM_Initialize(void);
#ifdef __cplusplus
}
#endif
#endif /* MCC_H */
#endif /* MCC_H */
/**
End of File
*/

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* Assembler Header File
*
* @file assembler.h
*
* @ingroup config_bitsdriver
*
* @brief This file contains the assembler header file for the configuration bits driver.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* GAS Header File
*
* @file gas.h
*
* @ingroup config_bitsdriver
*
* @brief This file contains the generated GAS header file for the Configuration bits driver.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* IAR Header File
*
* @file iar.h
*
* @ingroup config_bitsdriver
*
* @brief This file contains the generated IAR header file for the Configuration bits driver.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/

Wyświetl plik

@ -1,79 +1,49 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CONFIGURATION BITS Generated Atomic Header File
*
* @file atomic.h
*
* @defgroup doc_driver_utils_atomic Atomic memory access and critical sections
*
* @brief This file contains the atomic memory access and critical sections header file for the configuration bits driver.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef ATOMIC_H
#define ATOMIC_H
/**
* \defgroup doc_driver_utils_atomic Atomic memory access and critical sections
* \ingroup doc_driver_utils
*
* Atomic memory access and critical sections
*
* \{
*/
/* clang-format off */
#if defined(__GNUC__) || defined (__DOXYGEN__)
/**
* \brief Enter a critical region
*
* Saves the contents of the status register, including the Global
* Interrupt Enable bit, so that it can be restored upon leaving the
* critical region. Thereafter, clears the Global Interrupt Enable Bit.
* This macro takes a parameter P that is unused for the GCC compiler,
* but necessary for code compatibility with the IAR compiler. The IAR
* compiler declares a variable with the name of the parameter for
* holding the SREG value. Since a variable is declared in the macro,
* this variable must have a name that is unique within the scope
* that the critical region is declared within, otherwise compilation
* will fail.
*
* \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
*
* @brief Enters critical region. Saves the contents of the status register, including the Global Interrupt Enable bit, so that it can be restored upon leaving the critical region.
* Thereafter, clears the Global Interrupt Enable Bit.This macro takes a parameter P that is unused for the GCC compiler,but necessary for code compatibility with the IAR compiler.
* The IAR compiler declares a variable with the name of the parameter forholding the SREG value.
* Compilation will fail when the variable declared in the macro is not unique within the scope that the critical region is declared within.
* @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG.
*/
#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
@ -84,18 +54,11 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
)
/**
* \brief Exit a critical region
*
* Restores the contents of the status register, including the Global
* Interrupt Enable bit, as it was when entering the critical region.
* This macro takes a parameter P that is unused for the GCC compiler,
* but necessary for code compatibility with the IAR compiler. The IAR
* compiler uses this parameter as the name of a variable that holds
* the SREG value. The parameter must be identical to the parameter
* used in the corresponding ENTER_CRITICAL().
*
* \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
*
* @brief Exits a critical region. Restores the contents of the status register, including the Global Interrupt Enable bit, as it was when entering the critical region.
* This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler.
* The IAR compiler uses this parameter as the name of a variable that holds the SREG value.
* The parameter must be identical to the parameter used in the corresponding ENTER_CRITICAL().
* @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
*/
#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \

Wyświetl plik

@ -1,64 +1,45 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* Compiler Header File
*
* @file compiler.h
*
* @defgroup doc_driver_utils_compiler Compiler abstraction
*
* @brief This file contains the compiler abstraction layer and code utilities for 8-bit AVR. This module provides various abstraction layers and utilities to make code compatible between different compilers.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef UTILS_COMPILER_H
#define UTILS_COMPILER_H
/**
* \defgroup doc_driver_utils_compiler Compiler abstraction
* \ingroup doc_driver_utils
*
* Compiler abstraction layer and code utilities for 8-bit AVR.
* This module provides various abstraction layers and utilities
* to make code compatible between different compilers.
*
* \{
*/
#if defined(__GNUC__)
#include <avr/io.h>
#include <avr/builtins.h>
#if defined(__XC8__)
#include <xc.h>
#endif
#elif defined(__ICCAVR__)
#define ENABLE_BIT_DEFINITIONS 1
#include <ioavr.h>
@ -83,8 +64,8 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
#include "interrupt_avr8.h"
/**
* \def UNUSED
* \brief Marking \a v as a unused parameter or value.
* @def UNUSED
* @brief Marking \a v as a unused parameter or value.
*/
#define UNUSED(v) (void)(v)

Wyświetl plik

@ -1,56 +1,35 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* interrupt_avr8 Header File
*
* @file interrupt_avr8.h
*
* @defgroup doc_driver_utils_interrupts ISR abstraction
*
* @brief Interrupt-related functionality.
*
* @version Driver Version 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
/**
* \defgroup doc_driver_utils_interrupts ISR abstraction
* \ingroup doc_driver_utils
*
* Interrupt-related functionality.
*
* \{
*/
#ifndef UTILS_INTERRUPT_AVR8_H
#define UTILS_INTERRUPT_AVR8_H
@ -65,18 +44,16 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
#else
/**
* \def ISR
* \brief Define service routine for specified interrupt vector
*
* Usage:
* \code
* @def ISR
* @brief Define service routine for specified interrupt vector.
* @code
ISR(FOO_vect)
{
...
}
\endcode
* @endcode
*
* \param vect Interrupt vector name as found in the device header files.
* @param vect Interrupt vector name as found in the device header files.
*/
#if defined(__DOXYGEN__)
#define ISR(vect)

Wyświetl plik

@ -1,57 +1,37 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* utils Header File
*
* @file system.h
*
* @defgroup doc_driver_utils AVR Code utility functions
*
* @brief This file contains the compiler abstraction layer and code utilities for AVR.This module provides various abstraction layers and utilities to make code compatible between different compilers.
*
* @version Driver Version 1.0.1
* \{
*
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
/**
* \defgroup doc_driver_utils AVR Code utility functions
*
* Compiler abstraction layer and code utilities for AVR.
* This module provides various abstraction layers and utilities
* to make code compatible between different compilers.
*
* \{
*/
#ifndef UTILS_H_INCLUDED
#define UTILS_H_INCLUDED
@ -60,7 +40,7 @@ extern "C" {
#endif
/**
* \brief Retrieve array size
* @brief Retrieve array size
*/
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))

Wyświetl plik

@ -1,54 +1,35 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* utils_assert Header File
*
* @file utils_assert.h
*
* @defgroup doc_driver_utils_assert Functionality for assert
*
* @brief This file contains the generated utils_assert header file for the configuration bits driver.
*
* @version Driver Version 1.0.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
/**
* \defgroup doc_driver_utils_assert Functionality for assert.
* \ingroup doc_driver_utils
*
* \{
*/
#ifndef _ASSERT_H_INCLUDED
#define _ASSERT_H_INCLUDED
@ -59,13 +40,9 @@ extern "C" {
#include <stdbool.h>
/**
* \brief Assert macro
*
* This macro is used to throw asserts. It can be mapped to different function
* based on debug level.
*
* \param[in] condition A condition to be checked;
* assert is thrown if the given condition is false
* @brief Assert macro
* Macro used to throw asserts. It can be mapped to different function based on debug level.
* @param[in] condition A condition to be checked; assert is thrown if the given condition is false.
*/
#ifdef DEBUG

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 2.0.0
* TCA1 Generated Driver File
*
* @file tca1.c
*
* @ingroup tca1_normal
*
* @brief This file contains the API implementations for TCA1 module driver in Normal (16-bit) mode.
*
* @version TCA1 Driver Version 2.1.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -46,8 +35,8 @@ Copyright (c) [2012-2020] Microchip Technology Inc.
const struct TMR_INTERFACE TCA1_Interface = {
.Initialize = TCA1_Initialize,
.Start = NULL,
.Stop = NULL,
.Start = TCA1_Start,
.Stop = TCA1_Stop,
.PeriodCountSet = TCA1_Write,
.TimeoutCallbackRegister = TCA1_OverflowCallbackRegister,
.Tasks = NULL
@ -135,18 +124,15 @@ ISR(TCA1_OVF_vect)
}
/**
* \brief Initialize TCA interface
*/
void TCA1_Initialize(void) {
// Compare 0
TCA1.SINGLE.CMP0 = 0xFFDB;
TCA1.SINGLE.CMP0 = 0x0;
// Compare 1
TCA1.SINGLE.CMP1 = 0xFFDB;
TCA1.SINGLE.CMP1 = 0x0;
// Compare 2
TCA1.SINGLE.CMP2 = 0x7FED;
TCA1.SINGLE.CMP2 = 0x7FEE;
// Count
TCA1.SINGLE.CNT = 0x0;
@ -207,7 +193,7 @@ void TCA1_Stop(void)
void TCA1_Write(uint16_t timerVal)
{
TCA1.SINGLE.CNT=timerVal;
TCA1.SINGLE.PER=timerVal;
}
uint16_t TCA1_Read(void)
@ -235,39 +221,39 @@ void TCA1_DisableInterrupt(void)
}
void TCA1_ClearOverflowInterruptFlag(void)
{
TCA1.SINGLE.INTFLAGS &= ~TCA_SINGLE_OVF_bm; /* Overflow Interrupt: disabled */
TCA1.SINGLE.INTFLAGS = TCA_SINGLE_OVF_bm; /* Clear Overflow Interrupt Flag */
}
bool TCA1_IsOverflowInterruptEnabled(void)
bool TCA1_IsOverflowInterruptFlagSet(void)
{
return ((TCA1.SINGLE.INTFLAGS & TCA_SINGLE_OVF_bm) > 0);
}
void TCA1_ClearCMP0InterruptFlag(void)
{
TCA1.SINGLE.INTFLAGS &= ~TCA_SINGLE_CMP0_bm; /* Compare Channel-0 Interrupt: disabled */
TCA1.SINGLE.INTFLAGS = TCA_SINGLE_CMP0_bm; /* Clear Compare Channel-0 Interrupt Flag */
}
bool TCA1_IsCMP0InterruptEnabled(void)
bool TCA1_IsCMP0InterruptFlagSet(void)
{
return ((TCA1.SINGLE.INTFLAGS & TCA_SINGLE_CMP0_bm) > 0);
}
void TCA1_ClearCMP1InterruptFlag(void)
{
TCA1.SINGLE.INTFLAGS &= ~TCA_SINGLE_CMP1_bm; /* Compare Channel-1 Interrupt: disabled */
TCA1.SINGLE.INTFLAGS = TCA_SINGLE_CMP1_bm; /* Clear Compare Channel-1 Interrupt Flag */
}
bool TCA1_IsCMP1InterruptEnabled(void)
bool TCA1_IsCMP1InterruptFlagSet(void)
{
return ((TCA1.SINGLE.INTFLAGS & TCA_SINGLE_CMP1_bm) > 0);
}
void TCA1_ClearCMP2InterruptFlag(void)
{
TCA1.SINGLE.INTFLAGS &= ~TCA_SINGLE_CMP2_bm; /* Compare Channel-2 Interrupt: disabled */
TCA1.SINGLE.INTFLAGS = TCA_SINGLE_CMP2_bm; /* Clear Compare Channel-2 Interrupt Flag */
}
bool TCA1_IsCMP2InterruptEnabled(void)
bool TCA1_IsCMP2InterruptFlagSet(void)
{
return ((TCA1.SINGLE.INTFLAGS & TCA_SINGLE_CMP2_bm) > 0);
}

Wyświetl plik

@ -1,44 +1,33 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 2.0.0
* TCA1 Generated Driver API Header File
*
* @file tca1.h
*
* @defgroup tca1_normal TCA1 in Normal Mode
*
* @brief This file contains the API prototypes for the TCA1 driver in Normal (16-bit) mode.
*
* @version TCA1 Driver Version 2.1.1
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
@ -56,34 +45,152 @@ extern "C" {
#endif
/**
* \brief Initialize tca interface
*
* \return Initialization status.
*/
typedef void (*TCA1_cb_t)(void);
* @ingroup tca1_normal
* @typedef void TCA1_cb_t
* @brief Function pointer to the callback function called by TCA when operating in Normal mode. The default value is set to NULL which means that no callback function will be used.
*/
typedef void (*TCA1_cb_t)(void);
extern const struct TMR_INTERFACE TCA1_Interface;
/**
* @ingroup tca1_normal
* @brief Initializes the TCA.
* @param None.
* @return None.
*/
void TCA1_Initialize(void);
/**
* @ingroup tca1_normal
* @brief Starts the 16-bit timer/counter for the TCA.
* @param None.
* @return None.
*/
void TCA1_Start(void);
/**
* @ingroup tca1_normal
* @brief Stops the 16-bit timer/counter for the TCA.
* @param None.
* @return None.
*/
void TCA1_Stop(void);
/**
* @ingroup tca1_normal
* @brief Interrupt Service Routine (ISR) callback function register to be called if the Overflow Interrupt flag is set.
* @param TCA1_cb_t cb - Callback function for Overflow event.
* @return None.
*/
void TCA1_OverflowCallbackRegister(TCA1_cb_t cb);
/**
* @ingroup tca1_normal
* @brief ISR callback function to be called if the Compare 0 Match Interrupt flag is set.
* @param TCA1_cb_t cb - Callback function for Compare 0 match event.
* @return None.
*/
void TCA1_Compare0CallbackRegister(TCA1_cb_t cb);
/**
* @ingroup tca1_normal
* @brief ISR callback function to be called if the Compare 1 Match Interrupt flag is set.
* @param TCA1_cb_t cb - Callback function for Compare 1 match event.
* @return None.
*/
void TCA1_Compare1CallbackRegister(TCA1_cb_t cb);
/**
* @ingroup tca1_normal
* @brief ISR callback function to be called if the Compare 2 Match Interrupt flag is set.
* @param TCA1_cb_t cb - Callback function for Compare 2 match event.
* @return None.
*/
void TCA1_Compare2CallbackRegister(TCA1_cb_t cb);
/**
* @ingroup tca1_normal
* @brief Enables the 16-bit timer/counter interrupt for the TCA.
* @param None.
* @return None.
*/
void TCA1_EnableInterrupt(void);
/**
* @ingroup tca1_normal
* @brief Disables the 16-bit timer/counter interrupt for the TCA.
* @param None.
* @return None.
*/
void TCA1_DisableInterrupt(void);
/**
* @ingroup tca1_normal
* @brief Reads the 16-bit timer/counter value for the TCA.
* @param None.
* @return uint16_t - timer/counter value returns from the TCA1.
*/
uint16_t TCA1_Read(void);
/**
* @ingroup tca1_normal
* @brief Writes the timer value to load to the TCA.
* @param uint16_t timerVal - Loading the timer value for the TCA.
* @return None.
*/
void TCA1_Write(uint16_t timerVal);
/**
* @ingroup tca1_normal
* @brief Clears the Overflow Interrupt flag after the Overflow flag set.
* @param None.
* @return None.
*/
void TCA1_ClearOverflowInterruptFlag(void);
bool TCA1_IsOverflowInterruptEnabled(void);
/**
* @ingroup tca1_normal
* @brief Checks the Overflow Interrupt flag status for the TCA.
* @param None.
* @retval True - Overflow Interrupt flag is set.
* @retval False - Overflow Interrupt flag is not set.
*/
bool TCA1_IsOverflowInterruptFlagSet(void);
/**
* @ingroup tca1_normal
* @brief Clears the Compare 0 Interrupt flag after the Compare 0 flag is set.
* @param None.
* @return None.
*/
void TCA1_ClearCMP0InterruptFlag(void);
bool TCA1_IsCMP0InterruptEnabled(void);
/**
* @ingroup tca1_normal
* @brief Checks the Compare 0 Interrupt flag status for the TCA.
* @param None.
* @retval True - Compare 0 Interrupt flag is set.
* @retval False - Compare 0 Interrupt flag is not set.
*/
bool TCA1_IsCMP0InterruptFlagSet(void);
/**
* @ingroup tca1_normal
* @brief Clears the Compare 1 Interrupt flag after the Compare 1 flag is set.
* @param None.
* @return None.
*/
void TCA1_ClearCMP1InterruptFlag(void);
bool TCA1_IsCMP1InterruptEnabled(void);
/**
* @ingroup tca1_normal
* @brief Checks the Compare 1 Interrupt flag status for the TCA.
* @param None.
* @retval True - Compare 1 Interrupt flag is set.
* @retval False - Compare 1 Interrupt flag is not set.
*/
bool TCA1_IsCMP1InterruptFlagSet(void);
/**
* @ingroup tca1_normal
* @brief Clears the Compare 2 Interrupt flag after the Compare 2 flag is set.
* @param None.
* @return None.
*/
void TCA1_ClearCMP2InterruptFlag(void);
bool TCA1_IsCMP2InterruptEnabled(void);
/**
* @ingroup tca1_normal
* @brief Checks the Compare 2 Interrupt flag status for the TCA.
* @param None.
* @retval True - Compare 2 Interrupt flag is set.
* @retval False - Compare 2 Interrupt flag is not set.
*/
bool TCA1_IsCMP2InterruptFlagSet(void);
#ifdef __cplusplus
}

Wyświetl plik

@ -17,37 +17,24 @@
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2023] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#ifndef TMR_INTERFACE_H

Wyświetl plik

@ -27,6 +27,7 @@
<itemPath>mcc_generated_files/system/ccp.h</itemPath>
<itemPath>mcc_generated_files/system/interrupt.h</itemPath>
<itemPath>mcc_generated_files/system/system.h</itemPath>
<itemPath>mcc_generated_files/system/config_bits.h</itemPath>
</logicalFolder>
<logicalFolder name="timer" displayName="timer" projectFiles="true">
<itemPath>mcc_generated_files/timer/tca1.h</itemPath>
@ -77,13 +78,13 @@
<targetDevice>AVR128DA48</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>nEdbgTool</platformTool>
<platformTool>noID</platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.31</languageToolchainVersion>
<languageToolchainVersion>2.41</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<packs>
<pack name="AVR-Dx_DFP" vendor="Microchip" version="1.8.112"/>
<pack name="AVR-Dx_DFP" vendor="Microchip" version="2.3.272"/>
</packs>
<ScriptingSettings>
</ScriptingSettings>
@ -136,9 +137,9 @@
<property key="optimization-level" value="-O1"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="tentative-definitions" value="-fno-common"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
@ -192,36 +193,23 @@
<property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="omit-pack-options" value="false"/>
<property key="omit-pack-options-new" value="1"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
<property key="wpo-lto" value="false"/>
</XC8-config-global>
<nEdbgTool>
<Tool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="communication.activationmode" value="nohv"/>
<property key="communication.interface" value="updi"/>
<property key="communication.speed" value="0.500"/>
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="event.recorder.enabled" value="false"/>
<property key="event.recorder.scvd.files" value=""/>
<property key="firmware.path"
value="Press to browse for a specific firmware version"/>
<property key="firmware.toolpack"
value="Press to select which tool pack to use"/>
<property key="firmware.update.action" value="firmware.update.use.latest"/>
<property key="freeze.timers" value="false"/>
<property key="lastid" value=""/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
@ -254,6 +242,75 @@
<property key="toolpack.updateoptions.packversion"
value="Press to select which tool pack to use"/>
<property key="voltagevalue" value=""/>
</Tool>
<XC8-CO>
<property key="coverage-enable" value=""/>
<property key="stack-guidance" value="false"/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="constdata-progmem" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="mapped-progmem" value="false"/>
<property key="omit-pack-options" value="false"/>
<property key="omit-pack-options-new" value="1"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="smart-io-format" value=""/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
<property key="wpo-lto" value="false"/>
</XC8-config-global>
<nEdbgTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="communication.activationmode" value="nohv"/>
<property key="communication.interface" value="updi"/>
<property key="communication.speed" value="0.500"/>
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="event.recorder.enabled" value="false"/>
<property key="event.recorder.scvd.files" value=""/>
<property key="firmware.path"
value="Press to browse for a specific firmware version"/>
<property key="firmware.toolpack"
value="Press to select which tool pack to use"/>
<property key="firmware.update.action" value="firmware.update.use.latest"/>
<property key="freeze.timers" value="false"/>
<property key="lastid" value=""/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.configurationmemory2" value="true"/>
<property key="memories.dataflash" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.exclude.configurationmemory" value="true"/>
<property key="memories.flashdata" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.instruction.ram.ranges"
value="${memories.instruction.ram.ranges}"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.ranges" value="0-ffff"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preservedataflash.ranges"
value="${memories.dataflash.default}"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveeeprom.ranges" value="1400-15ff"/>
<property key="programoptions.preserveprogram.ranges" value=""/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveuserid" value="false"/>
<property key="programoptions.programuserotp" value="false"/>
<property key="toolpack.updateoptions"
value="toolpack.updateoptions.uselatestoolpack"/>
<property key="toolpack.updateoptions.packversion"
value="Press to select which tool pack to use"/>
<property key="voltagevalue" value=""/>
</nEdbgTool>
</conf>
<conf name="pro" type="2">
@ -264,11 +321,11 @@
<targetPluginBoard></targetPluginBoard>
<platformTool>noID</platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.31</languageToolchainVersion>
<languageToolchainVersion>2.41</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<packs>
<pack name="AVR-Dx_DFP" vendor="Microchip" version="1.8.112"/>
<pack name="AVR-Dx_DFP" vendor="Microchip" version="2.3.272"/>
</packs>
<ScriptingSettings>
</ScriptingSettings>
@ -318,12 +375,12 @@
<property key="optimization-debug" value="false"/>
<property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O3"/>
<property key="optimization-speed" value="true"/>
<property key="optimization-level" value="-Os"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="tentative-definitions" value="-fno-common"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
@ -379,15 +436,19 @@
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
<property key="stack-guidance" value="false"/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="constdata-progmem" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="mapped-progmem" value="false"/>
<property key="omit-pack-options" value="false"/>
<property key="omit-pack-options-new" value="1"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="smart-io-format" value=""/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 329 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 103 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 160 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 109 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 188 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 100 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 52 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 31 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 64 KiB

BIN
images/tca1_1.PNG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 89 KiB

BIN
images/tca1_2.PNG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 82 KiB