eeprom test failed (somebody help)

This commit is contained in:
2024-10-15 22:21:10 +02:00
parent 5255b6944a
commit 05eb7db05f
109 changed files with 4063 additions and 3977 deletions

View File

@ -2,7 +2,8 @@
#define INC_24LC02_H_
#include <stdint.h>
#define EEPROM_ADDR 0b1010000
#define EEPROM_ADDR 0b1010111
uint8_t eeprom_init();
uint8_t eeprom_write(uint8_t addr, uint8_t data);

View File

@ -1,19 +1,19 @@
// Write Code:
// ICOMx[3:0]
#define I2C_START 0b0110
#define I2C_STOP 0b0001
#define I2C_STRT 0b0110
#define I2C_STP 0b0001
#define BLANK 0b0000
#define NO_TRANSMIT 0b0111
// FCOMx[3:0]
#define MSTR_ACK 0b0000
#define MSTR_NO_ACK 0b1000
#define MSTR_NO_ACK_ST 0b1001
#define MSTR_NO_ACK_STP 0b1001
// Read Code:
// ICOMx[3:0]
#define MSTR_START 0b0110
#define MSTR_STOP 0b0001
#define MSTR_SRT 0b0110
#define MSTR_STP 0b0001
#define BLANK_LOW 0b0000
#define BLANK_HIGH 0b0111
@ -21,5 +21,5 @@
#define MSTR_ACK 0b0000
#define SLV_ACK 0b0111
#define SLV_NO_ACK 0b1111
#define SLV_ACK_STOP 0b0001
#define SLV_NO_ACK_STOP 0b1001
#define SLV_ACK_STP 0b0001
#define SLV_NO_ACK_STP 0b1001

View File

@ -28,7 +28,7 @@ uint16 updateDataPEC(uint16 currentPEC, uint8 din);
uint8 checkDataPEC(uint8* data, uint8 datalen);
uint8 writeCMD(uint16 command, uint8* args, uint8 arglen);
uint8 writeCMD_I2C(uint16 command, uint8* args, uint8 arglen);
uint8 writeCMD_I2C(uint16 command, uint16_t waitTime, uint8* args, uint8 arglen);
uint8 readCMD(uint16 command, uint8* buffer, uint8 buflen);
uint8 pollCMD(uint16 command);