move eeprom

This commit is contained in:
Rémi Heredero 2023-08-28 18:23:11 +02:00
parent a360586503
commit 792625bab1
4 changed files with 14 additions and 13 deletions

View File

@ -19,7 +19,7 @@
#include "../../middleware/alive_checker.h" #include "../../middleware/alive_checker.h"
#include "../../middleware/can_interface.h" #include "../../middleware/can_interface.h"
#include "../../middleware/watchdog.h" #include "../../middleware/watchdog.h"
#include "../../middleware/eeprom_interface.h" #include "../../middleware/eeprom.h"
typedef struct { typedef struct {

View File

@ -5,7 +5,7 @@
* @file eeprom_interface.h * @file eeprom_interface.h
*/ */
#include "eeprom_interface.h" #include "eeprom.h"
#include "../app/car.h" #include "../app/car.h"
typedef union { typedef union {
@ -33,20 +33,20 @@ void MEM_init(){
CAR_CST.JOYSTICK_MODE = 0; CAR_CST.JOYSTICK_MODE = 0;
CAR_CST.JOYSTICK_PARAM1 = 100; CAR_CST.JOYSTICK_PARAM1 = 100;
CAR_CST.JOYSTICK_PARAM2 = 1; CAR_CST.JOYSTICK_PARAM2 = 1;
CAR_CST.JOYSTICK_ALIVE_TIME = 50; CAR_CST.JOYSTICK_ALIVE_TIME = 10;
CAR_CST.DISPLAY_ALIVE_TIME = 0; CAR_CST.DISPLAY_ALIVE_TIME = 50;
CAR_CST.DRIVE_SPEED_TIME = 0; CAR_CST.DRIVE_SPEED_TIME = 0;
CAR_CST.DRIVE_STOP_TIME = 0; CAR_CST.DRIVE_STOP_TIME = 0;
CAR_CST.DRIVE_ALIVE_TIME = 0; CAR_CST.DRIVE_ALIVE_TIME = 10;
CAR_CST.STEERING_ALIVE_TIME = 0; CAR_CST.STEERING_ALIVE_TIME = 100;
CAR_CST.BATTERY_VOLT_TIME = 0; CAR_CST.BATTERY_VOLT_TIME = 50;
CAR_CST.BATTERY_CURRENT_TIME = 0; CAR_CST.BATTERY_CURRENT_TIME = 50;
CAR_CST.BATTERY_ENERGY_TIME = 0; CAR_CST.BATTERY_ENERGY_TIME = 50;
CAR_CST.BATTERY_ALIVE_TIME = 0; CAR_CST.BATTERY_ALIVE_TIME = 50;
MEM_write_1_byte(MEMADD_CONTROL_STEERING_MODE, CAR_CST.CONTROL_STEERING_MODE); MEM_write_1_byte(MEMADD_CONTROL_STEERING_MODE, CAR_CST.CONTROL_STEERING_MODE);
MEM_write_1_byte(MEMADD_CONTROL_ALIVE_TIME, CAR_CST.CONTROL_ALIVE_TIME); MEM_write_1_byte(MEMADD_CONTROL_ALIVE_TIME, CAR_CST.CONTROL_ALIVE_TIME);

View File

@ -27,7 +27,7 @@
<itemPath>middleware/can_interface.h</itemPath> <itemPath>middleware/can_interface.h</itemPath>
<itemPath>middleware/alive_checker.h</itemPath> <itemPath>middleware/alive_checker.h</itemPath>
<itemPath>middleware/watchdog.h</itemPath> <itemPath>middleware/watchdog.h</itemPath>
<itemPath>middleware/eeprom_interface.h</itemPath> <itemPath>middleware/eeprom.h</itemPath>
</logicalFolder> </logicalFolder>
<logicalFolder name="xf" displayName="xf" projectFiles="true"> <logicalFolder name="xf" displayName="xf" projectFiles="true">
<itemPath>xf/event.h</itemPath> <itemPath>xf/event.h</itemPath>
@ -64,7 +64,7 @@
<itemPath>middleware/can_interface.c</itemPath> <itemPath>middleware/can_interface.c</itemPath>
<itemPath>middleware/alive_checker.c</itemPath> <itemPath>middleware/alive_checker.c</itemPath>
<itemPath>middleware/watchdog.c</itemPath> <itemPath>middleware/watchdog.c</itemPath>
<itemPath>middleware/eeprom_interface.c</itemPath> <itemPath>middleware/eeprom.c</itemPath>
</logicalFolder> </logicalFolder>
<logicalFolder name="xf" displayName="xf" projectFiles="true"> <logicalFolder name="xf" displayName="xf" projectFiles="true">
<itemPath>xf/event.c</itemPath> <itemPath>xf/event.c</itemPath>
@ -94,7 +94,7 @@
<platformTool>PICkit3PlatformTool</platformTool> <platformTool>PICkit3PlatformTool</platformTool>
<languageToolchain>XC8</languageToolchain> <languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.41</languageToolchainVersion> <languageToolchainVersion>2.41</languageToolchainVersion>
<platform>3</platform> <platform>2</platform>
</toolsSet> </toolsSet>
<packs> <packs>
<pack name="PIC18F-K_DFP" vendor="Microchip" version="1.7.134"/> <pack name="PIC18F-K_DFP" vendor="Microchip" version="1.7.134"/>
@ -216,6 +216,7 @@
<property key="debugoptions.debug-startup" value="Use system settings"/> <property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/> <property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.useswbreakpoints" value="false"/> <property key="debugoptions.useswbreakpoints" value="false"/>
<property key="firmware.download.all" value="false"/>
<property key="hwtoolclock.frcindebug" value="false"/> <property key="hwtoolclock.frcindebug" value="false"/>
<property key="memories.aux" value="false"/> <property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/> <property key="memories.bootflash" value="true"/>