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:
2026-03-16 16:39:26 +09:00
parent 836ebe5878
commit a1ad2a4b5b
76 changed files with 43253 additions and 16370 deletions

View File

@@ -290,7 +290,7 @@ void imu_callback(inv_imu_sensor_event_t *event)
ssp_data[5] = (uint16_t)gyro[2];
format_data(imu_bin_buffer, "rsp:", ssp_data,12);
printf("Tp%d,%d,%d,%d,%d,%d\r\n\r\n", accel[0], accel[1], accel[2], gyro[0], gyro[1], gyro[2]);
binary_tx_handler(imu_bin_buffer,8);
dr_binary_tx_safe(imu_bin_buffer,8);
if(custom_add_data==true)
{
custom_add_data = false;
@@ -405,7 +405,7 @@ int imu_read_direct(void)
ssp_data[5] = (uint16_t)gyro[2];
format_data(imu_bin_buffer, "rsp:", ssp_data, 12);
binary_tx_handler(imu_bin_buffer, 8);
dr_binary_tx_safe(imu_bin_buffer, 8);
/* Put IMU back to sleep: accel OFF + gyro OFF */
{

View File

@@ -22,7 +22,6 @@
#include "nrf_delay.h"
#include "app_util_platform.h"
#include "meas_pd_48.h"
#include <cmd_parse.h>
#include "i2c_manager.h"
/* --------------------------------------------------------------------------------------

View File

@@ -20,7 +20,6 @@
#include "system_interface.h"
#include "nrf_delay.h"
#include "meas_pd_48.h"
/* I2C number and slave address for INV device */
#define ICM_I2C_ADDR 0x68