From 00f8c8b96c4a73fdac7b2ebe31408ee502a315cd Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 14 Jun 2024 02:19:51 -0500 Subject: Added ability to control power as a percentage and added controller feedback. --- mcc_generated_files/mssp2_i2c.c | 52 +++++------------------------------------ 1 file changed, 6 insertions(+), 46 deletions(-) (limited to 'mcc_generated_files/mssp2_i2c.c') diff --git a/mcc_generated_files/mssp2_i2c.c b/mcc_generated_files/mssp2_i2c.c index 6a7e51e..8985153 100644 --- a/mcc_generated_files/mssp2_i2c.c +++ b/mcc_generated_files/mssp2_i2c.c @@ -1,47 +1,3 @@ -/** - MSSP2_I2C Generated Driver File - - @Company - Microchip Technology Inc. - - @File Name - mssp2_i2c.c - - @Summary - This is the generated source file for the MSSP2_I2C driver using PIC24 / dsPIC33 / PIC32MM MCUs - - @Description - This source file provides APIs for driver for MSSP2_I2C. - Generation Information : - Product Revision : PIC24 / dsPIC33 / PIC32MM MCUs - 1.171.4 - Device : PIC24FV16KM202 - The generated drivers are tested against the following: - Compiler : XC16 v2.10 - MPLAB : MPLAB X v6.05 -*/ - -/* - (c) 2020 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. -*/ - #include "mssp2_i2c.h" /** @@ -239,9 +195,13 @@ void resetTimeoutCounter() { I2C_timeout = 0x00; } -uint8_t getI2CArray(int index) +void setI2CArray(uint8_t index, uint8_t value) +{ + if(index < ARRAY_CNT) i2cArray[index] = value; +} +uint8_t getI2CArray(uint8_t index) { - if(index < 5)return i2cArray[index]; + if(index < ARRAY_CNT)return i2cArray[index]; else return 0; } -- cgit v1.2.3