- binary_tx_handler를 dr_binary_tx_safe로 전체 교체 (APP_ERROR_CHECK 제거) - data_tx_handler APP_ERROR_CHECK → DBG_PRINTF 교체 - memset/memcpy 하드코딩 크기를 define 상수로 교체 (버퍼 오버런 수정) - SERIAL_NO_LENGTH, HW_NO_LENGTH, PASSKEY_LENGTH를 main.h로 통합 - 미사용 HW 드라이버/EEPROM 코드 삭제, TWI를 i2c_manager.c로 통합 - EEPROM → FDS 전환, 코드 리뷰 현황 문서 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/*******************************************************************************
|
|
* @file fstorage.h
|
|
* @author CandyPops Co.
|
|
* @version V1.0.0
|
|
* @date 2022-09-05
|
|
* @brief
|
|
******************************************************************************/
|
|
|
|
#ifndef IHP_FSTORAGE_H_
|
|
#define IHP_FSTORAGE_H_
|
|
|
|
#include "sdk_config.h"
|
|
|
|
#include "nordic_common.h"
|
|
#include <stdint.h>
|
|
|
|
#pragma pack(1)
|
|
typedef struct
|
|
{
|
|
uint32_t magic_number; /* 4B - 0x20231226 */
|
|
char hw_no[12]; /* 12B - HW Number */
|
|
char serial_no[12]; /* 12B - Serial Number */
|
|
uint8_t static_passkey[6]; /* 6B - BLE Passkey */
|
|
uint8_t bond_data_delete; /* 1B - Bond delete flag */
|
|
int8_t reset_status; /* 1B - Reset status */
|
|
uint8_t pd_adc_cnt; /* 1B - ADC sample count */
|
|
uint16_t pd_delay_us; /* 2B - PD delay (us) */
|
|
uint32_t life_cycle; /* 4B - Device usage count (sxz/syz command) */
|
|
} config_data_t; /* Total: 45 bytes - FDS에 저장하는 디바이스 설정 */
|
|
|
|
extern config_data_t m_config;
|
|
|
|
void fds_default_value_set(void);
|
|
void config_load( void );
|
|
void config_save( void );
|
|
|
|
void fs_set_value(void);
|
|
void fs_storage_init(void);
|
|
|
|
#endif /* IHP_FSTORAGE_H_ */
|
|
|