57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/**
|
|
* @file eeprom_lc02b.h
|
|
* @author xxx
|
|
* @date 2023-12-27 14:44:02
|
|
* @brief
|
|
* @copyright Copyright (c) 2024 by xxx, All Rights Reserved.
|
|
*/
|
|
#ifndef __EEPROM_LC02B_H
|
|
#define __EEPROM_LC02B_H
|
|
#include "main.h"
|
|
#include "entity.h"
|
|
|
|
#define PRRESSURE_CALIBRATION_ADDRESS 0x00 ///< 压力校准地址
|
|
|
|
/**
|
|
* @brief Initializes the LC02B EEPROM module.
|
|
*/
|
|
void eeprom_lc02b_init(TIM_TypeDef *timer_us);
|
|
|
|
/**
|
|
* @brief Deinitializes the LC02B EEPROM module.
|
|
*/
|
|
void eeprom_lc02b_dinit(void);
|
|
|
|
/**
|
|
* @brief Writes data to the LC02B EEPROM module.
|
|
*
|
|
* @param write_addr The starting address to write the data.
|
|
* @param data The pointer to the data to be written.
|
|
* @param length The length of the data to be written.
|
|
*/
|
|
void eeprom_lc02b_write(uint32_t write_addr, uint8_t *data, uint16_t length);
|
|
|
|
/**
|
|
* @brief Reads data from the LC02B EEPROM module.
|
|
*
|
|
* @param read_addr The starting address to read the data.
|
|
* @param data The pointer to store the read data.
|
|
* @param length The length of the data to be read.
|
|
*/
|
|
void eeprom_lc02b_read(uint32_t read_addr, uint8_t *data, uint16_t length);
|
|
|
|
/**
|
|
* @brief Performs a test on the LC02B EEPROM module.
|
|
*/
|
|
void eeprom_lc02b_test(void);
|
|
|
|
/**
|
|
* @brief Gets the LC02B EEPROM status.
|
|
*
|
|
* This function is used to get the current status of the LC02B EEPROM.
|
|
*
|
|
* @return TRUE if the LC02B EEPROM is in normal status, FALSE otherwise.
|
|
*/
|
|
BOOL eeprom_lc02b_status_get(void);
|
|
#endif ///< !__EEPROM_LC02B_H
|