26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
#ifndef EEPROM_H
|
|
#define EEPROM_H
|
|
|
|
#include <xc.h>
|
|
#include <stdint.h>
|
|
|
|
// ─────────────────────────────────────────────
|
|
// Adresses EEPROM
|
|
// ─────────────────────────────────────────────
|
|
|
|
#define EE_ARM_OFFSET_H 0x10 // ARM offset high byte
|
|
#define EE_ARM_OFFSET_L 0x11 // ARM offset low byte
|
|
#define EE_SPOOL_RATIO_H 0x12
|
|
#define EE_SPOOL_RATIO_L 0x13
|
|
|
|
// ─────────────────────────────────────────────
|
|
// API publique
|
|
// ─────────────────────────────────────────────
|
|
|
|
uint8_t EE_ReadByte(uint8_t addr);
|
|
void EE_WriteByte(uint8_t addr, uint8_t data);
|
|
uint16_t EE_ReadWord(uint8_t addr_h, uint8_t addr_l);
|
|
void EE_WriteWord(uint8_t addr_h, uint8_t addr_l, uint16_t data);
|
|
|
|
#endif // EEPROM_H
|