@Summary This is the generated driver implementation file for the MEMORY driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs
@Description This file provides implementations of driver APIs for MEMORY. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7 Device : PIC18F25K80 Driver Version : 2.04 The generated drivers are tested against the following: Compiler : XC8 2.31 and above MPLAB : MPLAB X 5.45 */
/* (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. */
// Entire row will be erased, read and save the existing data for (i=0; i<ERASE_FLASH_BLOCKSIZE; i++) { flashRdBufPtr[i] = FLASH_ReadByte((blockStartAddr+i)); }
// Load byte at offset flashRdBufPtr[offset] = byte;
// Writes buffer contents to current block FLASH_WriteBlock(blockStartAddr, flashRdBufPtr); }
; XC8 PIC powerup routine ; ; This module may be modified to include custom code to be executed ; immediately after reset. After performing whatever powerup code ; is required, it should jump to "start"
#include "aspic.h"
global powerup,start psect powerup,class=CODE,delta=2 powerup:
; ; Insert special powerup code here ; ;
; Now lets jump to start #if defined(_PIC14) clrf STATUS movlw start>>8 movwf PCLATH goto start & 0x7FF | (powerup & not 0x7FF) #endif #if defined(_PIC14E) || defined(_PIC14EX) clrf STATUS movlp start>>8 goto start & 0x7FF | (powerup & not 0x7FF) #endif #if defined(_PIC16) movlw start>>8 movwf PCLATH movlw start & 0xFF movwf PCL #endif end