VesiScan BASIC origin: Piezo + IMU firmware initial code

- nRF52840 + SoftDevice S140 BLE firmware
- Piezo ultrasound TX driver (2MHz, 8ch MUX)
- ICM42670P IMU 6-axis driver
- Echo AFE chain (ADA2200 + ADC121S051)
- BLE NUS command parser (mpa/mpc/mdc/mec/maa/msp)
- FDS flash config storage
- pc_firm parser and ADC driver included

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Charles Kwon
2026-03-11 10:40:20 +09:00
parent a8ba31871e
commit b3adfd42e6
49 changed files with 8459 additions and 2887 deletions

View File

@@ -13,39 +13,19 @@
#include "nordic_common.h"
#include <stdint.h>
#include "measurements.h"
#define LED_NUM 48 /* LED0 사용하지 않음, 대신 NULL값 입력 */
#define PD_NUM 2 /* PD0 사용하지 않음, 대신 NULL값 입력 * 0,1 data 2 mod 3 off*/
#define mW 13 /* LED mW 설정 파워 값 */
#define M_LED_NUM 24 /*측정할 L*/
#pragma pack(1)
typedef struct
{
uint32_t magic_number;
//char serial_number[13];
// uint32_t pd_adc_calibration_PD0[M_LED_NUM];
// uint32_t pd_adc_calibration_PD1[M_LED_NUM];
// uint32_t pd_adc_calibration_PD2[M_LED_NUM];
// uint32_t dark_noise_for_pd[PD_NUM];
// int8_t pd_adc_cnt;
int8_t reset_status;
// uint16_t led_delay_us;
// uint16_t pd_delay_us;
#if FEATURE_SECURE_CONNECTION
// bool bond_data_delete;
uint8_t static_passkey[6];
#endif
// uint16_t led_pd_dac_v[LED_NUM];
// uint16_t led_power_dp[LED_NUM];
} config_data_t; /* Flash에 저장하는 값 */
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) */
} config_data_t; /* Total: 41 bytes - FDS에 저장하는 디바이스 설정 */
extern config_data_t m_config;