버퍼 초기화 추가

This commit is contained in:
2026-04-16 14:06:29 +09:00
parent 2861cb9815
commit 01bdbf7cfe
4 changed files with 19 additions and 18 deletions

View File

@@ -86,8 +86,8 @@ static uint32_t m_vref_mv = DR_ADC_VREF_MV;
/* Hardware SPI instance (SPIM3 - supports up to 32MHz, 16MHz for ADC121S051) */
static nrfx_spim_t m_spim = NRFX_SPIM_INSTANCE(3);
/* Echo capture buffer (module-level for external access) */
static uint16_t m_echo_buffer[DR_ADC_ECHO_SAMPLES_MAX];
/* IEC 62304 §5.5.3: zero-initialized for deterministic startup */
static uint16_t m_echo_buffer[DR_ADC_ECHO_SAMPLES_MAX] = {0};
/*==============================================================================
* PRIVATE FUNCTIONS
@@ -1104,7 +1104,7 @@ dr_adc_err_t dr_adc_transmit_channel_delta(const dr_maa_channel_t *ch_data,
}
/* Compress data first */
static uint8_t delta_buffer[400]; /* Worst case: 140*3 = 420 bytes */
static uint8_t delta_buffer[400] = {0}; /* Worst case: 140*3 = 420 bytes */
uint16_t compressed_size = 0;
dr_adc_err_t err = dr_adc_delta_compress(ch_data->samples, ch_data->num_samples,

View File

@@ -63,7 +63,7 @@
static struct inv_imu_device icm_driver;
/* Binary buffer for BLE transmission */
uint8_t imu_bin_buffer[BLE_NUS_MAX_DATA_LEN];
uint8_t imu_bin_buffer[BLE_NUS_MAX_DATA_LEN] = {0};
/*
* ICM42670P mounting matrix (Q30 fixed-point)