summaryrefslogtreecommitdiff
path: root/mcc_generated_files
diff options
context:
space:
mode:
authorJoshua Drake <Joshua.Ellis.Drake@gmail.com>2024-06-14 02:19:51 -0500
committerJoshua Drake <Joshua.Ellis.Drake@gmail.com>2024-06-14 02:19:51 -0500
commit00f8c8b96c4a73fdac7b2ebe31408ee502a315cd (patch)
tree58b62cb19c5067f9ac2b35949d22658779c2e739 /mcc_generated_files
parented2644ef4e934f2f7cf93890760737790925a1c8 (diff)
Added ability to control power as a percentage and added controller feedback.HEADmaster
Diffstat (limited to 'mcc_generated_files')
-rw-r--r--mcc_generated_files/mssp2_i2c.c52
-rw-r--r--mcc_generated_files/mssp2_i2c.h3
2 files changed, 8 insertions, 47 deletions
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;
}
diff --git a/mcc_generated_files/mssp2_i2c.h b/mcc_generated_files/mssp2_i2c.h
index 329983a..d6df347 100644
--- a/mcc_generated_files/mssp2_i2c.h
+++ b/mcc_generated_files/mssp2_i2c.h
@@ -346,7 +346,8 @@ uint8_t *MSSP2_I2C_ReadPointerGet(void);
</code>
*/
-uint8_t getI2CArray(int);
+uint8_t getI2CArray(uint8_t);
+void setI2CArray(uint8_t index, uint8_t value);
uint8_t *MSSP2_I2C_WritePointerGet(void);