shuichan_new/STM32F103_App1/HardWare/24C02/24c02.h

19 lines
865 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __24C02_H
#define __24C02_H
#include "main.h"
#define M24C02_WADDR 0xA0 // 24C02 写地址
#define M24C02_RADDR 0xA1 // 24C02 读地址
uint8_t m24c02ReadOneByte(uint8_t ); // 从 24C02 指定地址读取一个字节
uint8_t m24c02WriteOneByte(uint8_t ,uint8_t ); // 向指定地址写入一个字节
uint8_t m24c02ReadSequential(uint8_t,uint8_t *,uint16_t); // 从指定地址连续读取指定长度数据
uint8_t eepromReadData(uint8_t ,void *, uint16_t); // 从 EEPROM 指定地址读取数据
uint8_t eepromWriteData(uint8_t, void *, uint16_t); // 向 EEPROM 指定地址写入数据(按页写入)
extern uint8_t g_mqtt_configured; /* 1=EEPROM 中已有有效设备身份0=待蓝牙配置 */
void eepromReadInfo(void); // 从 EEPROM 读取或验证 MQTT 配置信息
#endif