这个是用MCC生成的IO口配置程序的编译错误,这是怎么回事呢?
/**
PIN MANAGER Generated Driver File
@Company:
Microchip Technology Inc.
@file Name:
pin_manager.c
@Summary:
This is the generated manager file for the PIC24 / dsPIC33 / PIC32MM MCUs device. This manager
configures the pins direction, initial state, analog setting.
The peripheral pin select, PPS, configuration is also handled by this manager.
@Description:
This source file provides implementations for PIN MANAGER.
Generation Information :
Product Revision : PIC24 / dsPIC33 / PIC32MM MCUs - 1.125
Device : dsPIC33CH512MP508
The generated drivers are tested against the following:
Compiler : XC16 v1.36B
MPLAB : MPLAB X v5.20
*/
/*
(c) 2016 Microchip Technology Inc. and its subsidiaries. You may use this
software and any derivatives exclusively with Microchip products.
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, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
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.
MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
TERMS.
*/
/**
Section: Includes
*/
#include <xc.h>
#include <stdio.h>
#include "pin_manager.h"
/**
Section: File specific functions
*/
/**
Section: Driver Interface Function Definitions
*/
void PIN_MANAGER_Initialize (void)
{
/****************************************************************************
* Setting the Output Latch SFR(s)
***************************************************************************/
LATA = 0x0000;
LATB = 0x0000;
LATC = 0x0000;
LATD = 0x0000;
LATE = 0x0000;
/****************************************************************************
* Setting the GPIO Direction SFR(s)
***************************************************************************/
TRISA = 0x001F;
TRISB = 0xFFBD;
TRISC = 0xFFFF;
TRISD = 0xFFFF;
TRISE = 0xFFFF;
/****************************************************************************
* Setting the Weak Pull Up and Weak Pull Down SFR(s)
***************************************************************************/
CNPDA = 0x0000;
CNPDB = 0x0000;
CNPDC = 0x0000;
CNPDD = 0x0000;
CNPDE = 0x0000;
CNPUA = 0x0000;
CNPUB = 0x0000;
CNPUC = 0x0000;
CNPUD = 0x0000;
CNPUE = 0x0000;
/****************************************************************************
* Setting the Open Drain SFR(s)
***************************************************************************/
ODCA = 0x0000;
ODCB = 0x0000;
ODCC = 0x0000;
ODCD = 0x0000;
ODCE = 0x0000;
/****************************************************************************
* Setting the Analog/Digital Configuration SFR(s)
***************************************************************************/
ANSELA = 0x001F;
ANSELB = 0x009D;
ANSELC = 0x00CF;
ANSELD = 0x7C00;
ANSELE = 0x0040;
/****************************************************************************
* Set the PPS
***************************************************************************/
__builtin_write_RPCON(0x0000); // unlock PPS
RPOR3bits.RP38R = 0x000E; //RB6->INTERNAL OSCILLATOR:REFO
__builtin_write_RPCON(0x0800); // lock PPS
}
以上是程序代码
|