implement POC for EEPROM

This commit is contained in:
2023-08-27 21:35:19 +02:00
parent 5bbc7bc0c3
commit 2b31ef5c06
8 changed files with 61 additions and 12 deletions

View File

@ -1,8 +1,36 @@
/**
* @author R<>mi Heredero
* @author R<>mi Heredero
* @version 1.0.0
* @date August 2023
* @file eeprom_interface.h
*/
#include "eeprom_interface.h"
typedef union {
struct {
uint8_t byte0;
uint8_t byte1;
uint8_t byte2;
uint8_t byte3;
} separate;
struct {
uint32_t bytes;
} full;
} BYTES_4;
void MEM_write_one_byte(uint8_t addresse, uint8_t data) {
DATAEE_WriteByte(addresse, data);
}
void MEM_write_four_byte(uint8_t addresse, uint32_t data) {
}
uint8_t MEM_read_one_byte(uint8_t adresse) {
return DATAEE_ReadByte(adresse);
}
uint32_t MEM_read_four_byte(uint8_t adresse) {
}

View File

@ -1,5 +1,5 @@
/**
* @author R<>mi Heredero
* @author R<>mi Heredero
* @version 1.0.0
* @date August 2023
* @file eeprom_interface.h
@ -7,8 +7,14 @@
#ifndef EEPROM_INTERFACE_H
#define EEPROM_INTERFACE_H
MEM_write_1_byte(uint8_t addresse, uint8_t data);
MEM_write_4_byte(uint32_t data);
#include <stdint.h> // usage of standard types
#include <stdbool.h> // usage of boolean types
#include "../mcc_generated_files/mcc.h"
void MEM_write_one_byte(uint8_t addresse, uint8_t data);
void MEM_write_four_byte(uint8_t adresse, uint32_t data);
uint8_t MEM_read_one_byte(uint8_t adresse);
uint32_t MEM_read_four_byte(uint8_t adresse);
// void MEM_write_CONTROL_STEERING_MODE(uint8_t data);
#endif /* EEPROM_INTERFACE_H */