fix: BLE TX 먹통 해결 및 메모리 안전성 개선
- 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>
This commit is contained in:
@@ -33,8 +33,6 @@
|
||||
#include "math.h"
|
||||
#include "crc16.h" //add 25.04.23
|
||||
#include "nrf_ble_lesc.h"
|
||||
#include "cat_interface.h"
|
||||
#include "ir_i2c.h"
|
||||
#include "nrf_crypto.h"
|
||||
#include "nrf_pwr_mgmt.h"
|
||||
#include <ctype.h>
|
||||
@@ -43,23 +41,10 @@
|
||||
#include "main.h"
|
||||
#include "app_raw_main.h" //0117
|
||||
#include "main_timer.h"
|
||||
#include "ad5272_i2c.h"
|
||||
#include "ada2200_spi.h"
|
||||
#include "power_control.h"
|
||||
#include "tmp235_q1.h"
|
||||
#include "mcp4725_i2c.h"
|
||||
#include "measurements.h"
|
||||
//#include "fstorage.h"
|
||||
#include "battery_saadc.h"
|
||||
#include "mcp4725_adc.h"
|
||||
#include "meas_pd_voltage_simple.h"
|
||||
#include "meas_pd_voltage_half.h"
|
||||
#include "meas_pd_voltage_full.h"
|
||||
#include "full_agc.h"
|
||||
//#include "meas_pd_voltage_custom.h"
|
||||
#include "meas_pd_imm.h"
|
||||
|
||||
#include "meas_pd_48.h"
|
||||
typedef struct {
|
||||
char tag[5]; // Null-terminated 4-char command
|
||||
uint16_t value0; // Data value
|
||||
@@ -82,7 +67,6 @@ bool is_valid_serial_no(const char *serial);
|
||||
|
||||
|
||||
bool is_valid_passkey(const char *passkey);
|
||||
ret_code_t eeprom_init_values_read(void);
|
||||
|
||||
bool crc16_check(uint8_t const * p_data, uint32_t data_len, uint16_t expected_crc);
|
||||
bool crc16_check_packet(uint8_t const * packet, uint32_t packet_len);
|
||||
|
||||
Reference in New Issue
Block a user