Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Diatone Reactor66 target #108

Open
wants to merge 65 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7c533c2
make: use nosys.specs
tridge Aug 23, 2024
bc0379c
common.h: added externs for telem data
tridge Aug 22, 2024
777915c
main: expanded eeprom to 184 bytes
tridge Aug 24, 2024
c59af4f
added DroneCAN support
tridge Aug 22, 2024
61d25e6
l431: added RAM function support and flash_update
tridge Aug 25, 2024
d093a50
DroneCAN: support firmwate update over CAN
tridge Aug 25, 2024
554c2e9
added ArmingStatus messages
tridge Aug 25, 2024
cd26e00
DroneCAN: implement ArmingStatus
tridge Aug 25, 2024
f7ef8d2
DroneCAN: allow change of direction without reboot
tridge Aug 25, 2024
07f22a9
DroneCAN: added TELEM_RATE and REQUIRE_ARMING
tridge Sep 2, 2024
958cc73
use #if DRONECAN_SUPPORT
tridge Sep 11, 2024
138dee2
targets: added SierraPulse1
tridge Sep 12, 2024
e2d78b5
DroneCAN: added BI_DIRECTIONAL and ADVANCE_LEVEL
tridge Sep 13, 2024
76fd2cd
DroneCAN: stop motor after 0.25s of no input
tridge Sep 14, 2024
0340932
DroneCAN: split out STM32 specific CAN code
tridge Sep 15, 2024
bcc94ae
rename ldscript
tridge Oct 6, 2024
35771d7
DroneCAN: removed fw update logic
tridge Oct 6, 2024
578512d
use CAN suffix to select CAN target build
tridge Oct 6, 2024
01eef96
separate out CAN and non-CAN targets
tridge Oct 6, 2024
7e052a8
l431: don't override SCB->VTOR
tridge Oct 6, 2024
89221ff
DroneCAN: setup backup registers for fwupdate
tridge Oct 7, 2024
c24245f
DroneCAN: support application signature
tridge Oct 7, 2024
6527b33
fixed signature in debug.elf
tridge Oct 8, 2024
0e735cd
fix current value convert
Huibean Sep 19, 2024
1518d43
add motor kv and tune to dronecan params
Huibean Sep 20, 2024
0cbbd00
add HSE support and VIMDRONES_NANO_L431_CAN
Huibean Sep 21, 2024
59fa4fb
DroneCAN: prevent early CAN interrupts when canard not ready
tridge Oct 9, 2024
419e7b9
DroneCAN: all CAN targets will use 128k flash
tridge Oct 9, 2024
6ac15dc
l431: cleanup clock setup code
tridge Oct 9, 2024
aaa331b
l431: allow HSE_VALUE to be set in targets.h
tridge Oct 9, 2024
3aefe34
DroneCAN: ensure at least 1kHz input seen from DroneCAN
tridge Oct 9, 2024
9cfefff
DroneCAN: average current over last period
tridge Oct 9, 2024
667af5e
DroneCAN: fixed changing BI_DIRECTION
tridge Oct 9, 2024
a683c2a
DroneCAN: added REQUIRE_ZERO_THROTTLE
tridge Oct 9, 2024
7f26a46
f415: rework flash code based on bootloader
tridge Sep 15, 2024
71446bb
support F415 DroneCAN
tridge Sep 15, 2024
8aa3085
added TBS CAN F415 target
tridge Oct 9, 2024
4a251ab
DroneCAN: fixed F415 for PA11/PA12
tridge Oct 9, 2024
a74951b
targets: fixed TBS F415 targets
tridge Oct 9, 2024
f41e5a2
targets: fixed NANO_431_CAN current scaling
tridge Oct 9, 2024
a2a3698
f415: fixed vector table address for DroneCAN
tridge Oct 9, 2024
cc3b9ad
rename TUNE to STARTUP_TUNE
Huibean Oct 10, 2024
2a524f5
fix VIMDRONES_L431_CAN current sampling scale and add offset
Huibean Oct 10, 2024
b7236db
targets: fixed TBS F415 voltage
tridge Oct 10, 2024
96ab10d
DroneCAN: added optional acceleration filter
tridge Oct 14, 2024
552904d
DroneCAN: fill in defaults and min/max
tridge Oct 15, 2024
14ffa9a
DroneCAN: expose braking parameters
tridge Oct 19, 2024
44dfe3c
DroneCAN: expose AUTO_ADVANCE setting
tridge Oct 20, 2024
2ccc240
DroneCAN: get default value from default_settings array
tridge Oct 20, 2024
acd4635
DroneCAN: added DEBUG_RATE
tridge Oct 21, 2024
b102ec6
DroneCAN: added FlexDebug message
tridge Oct 21, 2024
ad083e9
move inputType enum to common.h
tridge Oct 21, 2024
de0690c
DroneCAN: added INPUT_SIGNAL_TYPE
tridge Oct 21, 2024
f0e57ea
DroneCAN: expose PWM frequency
tridge Oct 21, 2024
07c04be
DroneCAN: added FlexDebug debug messages
tridge Oct 21, 2024
8144b65
DroneCAN: fixed parameter load
tridge Oct 21, 2024
e582fc4
DroneCAN: fixed RPM calculation
tridge Oct 21, 2024
9667705
DroneCAN: added lua script for AM32 debug
tridge Oct 21, 2024
c5b3751
DroneCAN: send RX ecode
tridge Oct 22, 2024
8b9baac
DroneCAN: fixed F415 CAN build
tridge Oct 22, 2024
2269c60
DroneCAN: fixed a bug with setting BI_DIRECTION while booted
tridge Oct 26, 2024
91aadab
DroneCAN: fixes for new eeprom structure
Huibean Nov 5, 2024
552bd97
targets: fixed build of F415 TBS CAN board
tridge Nov 9, 2024
7384a73
Merge pull request #36 from tridge/pr-DroneCAN-support
AlkaMotors Nov 9, 2024
f26c81f
Update targets.h
JobeDevian Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Inc/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ extern char ic_timer_prescaler;
extern uint8_t buffersize;
extern char output_timer_prescaler;
extern uint8_t compute_dshot_flag;
extern uint16_t battery_voltage;
extern int16_t actual_current;
extern uint16_t e_rpm;


#ifdef STMICRO
extern GPIO_TypeDef* current_GPIO_PORT;
#ifndef MCU_F031
Expand Down Expand Up @@ -73,3 +78,15 @@ typedef struct fastPID {
int32_t integral_limit;
int32_t output_limit;
} fastPID;

/*
input signal types
*/
enum inputType {
AUTO_IN = 0,
DSHOT_IN = 1,
SERVO_IN = 2,
SERIAL_IN = 3,
EDTARM_IN = 4,
DRONECAN_IN = 5,
};
14 changes: 12 additions & 2 deletions Inc/eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,18 @@ typedef union EEprom_u {
uint8_t auto_advance; // 47
uint8_t reserved_2[4]; //48-51
uint8_t tune[124]; // 52-175
struct {
uint8_t can_node; // 176
uint8_t esc_index; // 177
uint8_t require_arming; // 178
uint8_t telem_rate; // 179
uint8_t require_zero_throttle; // 180
uint8_t filter_hz; // 181
uint8_t debug_rate; // 182
uint8_t reserved[9]; // 183-191
} can;
};
uint8_t buffer[184];
uint8_t buffer[192];
} EEprom_t;

extern EEprom_t eepromBuffer;
Expand All @@ -59,4 +69,4 @@ extern EEprom_t eepromBuffer;
// void read_flash(uint8_t* data, uint32_t address);
// void save_to_flash_bin(uint8_t *data, int length, uint32_t add);
void read_flash_bin(uint8_t* data, uint32_t add, int out_buff_len);
void save_flash_nolib(uint8_t* data, int length, uint32_t add);
void save_flash_nolib(uint8_t* data, int length, uint32_t add);
119 changes: 115 additions & 4 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@
#define EEPROM_START_ADD (uint32_t)0x0800F800
#endif

#ifdef VIMDRONES_L431_CAN
#define FIRMWARE_NAME "VimdroneL431"
#define FILE_NAME "VIMDRONES_L431_CAN"
#define DRONECAN_SUPPORT 1
#define DEAD_TIME 45
#define HARDWARE_GROUP_L4_B
#define TARGET_VOLTAGE_DIVIDER 94
#define MILLIVOLT_PER_AMP 30
#define CURRENT_OFFSET 110
#define USE_SERIAL_TELEMETRY
#endif

#ifdef VIMDRONES_NANO_L431
#define FIRMWARE_NAME "VM_NANO"
#define FILE_NAME "VIMDRONES_NANO_L431"
Expand All @@ -89,7 +101,31 @@
#define TARGET_VOLTAGE_DIVIDER 110
#define MILLIVOLT_PER_AMP 20
#define USE_SERIAL_TELEMETRY
#define EEPROM_START_ADD (uint32_t)0x0800F800
#endif

#ifdef VIMDRONES_NANO_L431_CAN
#define FIRMWARE_NAME "VM_NANO_CAN"
#define FILE_NAME "VIMDRONES_NANO_L431_CAN"
#define DRONECAN_SUPPORT 1
#define USE_HSE
#undef HSE_VALUE
#define HSE_VALUE 24000000
#define DEAD_TIME 45
#define HARDWARE_GROUP_L4_B
#define TARGET_VOLTAGE_DIVIDER 110
#define MILLIVOLT_PER_AMP 20
#define USE_SERIAL_TELEMETRY
#endif

#ifdef SIERRA_PULSE1_L431_CAN
#define FIRMWARE_NAME "SierraPulse1"
#define FILE_NAME "SIERRA_PULSE1_L431_CAN"
#define DRONECAN_SUPPORT 1
#define DEAD_TIME 45
#define HARDWARE_GROUP_L4_C
#define TARGET_VOLTAGE_DIVIDER 100
#define MILLIVOLT_PER_AMP 100
#define USE_SERIAL_TELEMETRY
#endif

#ifdef REF_L431
Expand Down Expand Up @@ -634,6 +670,43 @@
#define LOOP_FREQUENCY_HZ 20000
#endif

#ifdef TBS_12S_F415
#define FIRMWARE_NAME "TBS 12S F415"
#define FILE_NAME "TBS_12S_F415"
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_D
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define LOOP_FREQUENCY_HZ 20000
#define PA6_VOLTAGE
#define EEPROM_START_ADD (uint32_t)0x0801F800
#endif

#ifdef TBS_12S_F415_CAN
#define FIRMWARE_NAME "TBS 12S CAN"
#define FILE_NAME "TBS_12S_F415_CAN"
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_D
#define HARDWARE_GROUP_AT_045
#define DRONECAN_SUPPORT 1
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define LOOP_FREQUENCY_HZ 20000
#define PA6_VOLTAGE
#define EEPROM_START_ADD (uint32_t)0x0801F800
#endif

#ifdef AIKON_SINGLE_F421
#define FIRMWARE_NAME "AIKON S F4 "
#define FILE_NAME "AIKON_SINGLE_F421"
Expand Down Expand Up @@ -663,6 +736,23 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef REF_F415_CAN
#define FIRMWARE_NAME "REF F415 CAN"
#define FILE_NAME "REF_F415_CAN"
#define DRONECAN_SUPPORT 1
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_D
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define LOOP_FREQUENCY_HZ 20000
#endif

#ifdef DAKEFPV_35A_F415
#define FIRMWARE_NAME "DakeFPV 35A"
#define FILE_NAME "DAKEFPV_35A_F415" // DISABLE_BUILD
Expand All @@ -680,10 +770,11 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef TBS_CAN_F415
#define FIRMWARE_NAME "TBS_CAN_F415"
#define FILE_NAME "TBS_CAN_F415"
#ifdef TBS_F415_CAN
#define FIRMWARE_NAME "TBS_F415_CAN"
#define FILE_NAME "TBS_F415_CAN"
#define DEAD_TIME 120
#define DRONECAN_SUPPORT 1
#define HARDWARE_GROUP_AT_H
#define HARDWARE_GROUP_AT_045
#define TARGET_VOLTAGE_DIVIDER 210
Expand Down Expand Up @@ -729,6 +820,15 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef MAMBA_REACTOR_66_F421
#define FIRMWARE_NAME "MAMBA REACTOR 66 F4"
#define FILE_NAME "MAMBA_REACTOR_66_F421"
#define DEAD_TIME 100
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_450
#define USE_SERIAL_TELEMETRY
#endif

#ifdef JUPITER_50A_F421
#define FIRMWARE_NAME "Jupiter 50A "
#define FILE_NAME "JUPITER_50A_F421"
Expand Down Expand Up @@ -3387,7 +3487,9 @@
#ifdef MCU_AT415
#define ARTERY
#define CPU_FREQUENCY_MHZ 144
#ifndef EEPROM_START_ADD
#define EEPROM_START_ADD (uint32_t)0x08007C00
#endif
#define INTERVAL_TIMER TMR4
#define TEN_KHZ_TIMER TMR9
#define UTILITY_TIMER TMR10
Expand Down Expand Up @@ -3438,3 +3540,12 @@
#endif

#define PID_LOOP_DIVIDER (LOOP_FREQUENCY_HZ / 1000)

// default to no DroneCAN support
#ifndef DRONECAN_SUPPORT
#define DRONECAN_SUPPORT 0
#elif DRONECAN_SUPPORT == 1
// all DroneCAN ESCs use 128k flash layout
#undef EEPROM_START_ADD
#define EEPROM_START_ADD (uint32_t)0x0801F800
#endif
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ FIRMWARE_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR)
# Compiler options

CFLAGS_BASE := -fsingle-precision-constant -fomit-frame-pointer -ffast-math
CFLAGS_BASE += -I$(MAIN_INC_DIR) -g3 -O2 -ffunction-sections
CFLAGS_BASE += -I$(MAIN_INC_DIR) -g3 -O2 -ffunction-sections --specs=nosys.specs
CFLAGS_BASE += -Wall -Wundef -Wextra -Werror -Wno-unused-parameter -Wno-stringop-truncation

CFLAGS_COMMON := $(CFLAGS_BASE)
Expand All @@ -59,6 +59,9 @@ SRC_COMMON := $(foreach dir,$(SRC_DIRS_COMMON),$(wildcard $(dir)/*.[cs]))
OBJ := obj
BIN_DIR := $(ROOT)/$(OBJ)

# Function to check for _CAN suffix
has_can_suffix = $(findstring _CAN,$1)

# find the SVD files
$(foreach MCU,$(MCU_TYPES),$(eval SVD_$(MCU) := $(wildcard $(HAL_FOLDER_$(MCU))/*.svd)))

Expand Down Expand Up @@ -88,20 +91,26 @@ $$($(2)_BASENAME).bin: $$($(2)_BASENAME).elf
echo building BIN $$@
@$(ECHO) Generating $$(notdir $$@)
$(QUIET)$(OBJCOPY) -O binary $$(<) $$@
$(QUIET)python3 Src/DroneCAN/set_app_signature.py $$@ $$(<)
$(QUIET)$(OBJCOPY) $$(<) -O ihex $$(@:.bin=.hex)
$(QUIET)$(CP) -f $$(<) $(OBJ)$(DSEP)debug.elf > $(NUL)

# check for CAN support
$(eval xLDSCRIPT := $$(if $$(call has_can_suffix,$$(2)),$(LDSCRIPT_CAN_$(1)),$(LDSCRIPT_$(1))))
$(eval xCFLAGS := $$(if $$(call has_can_suffix,$$(2)),$(CFLAGS_CAN_$(1))))
$(eval xSRC := $$(if $$(call has_can_suffix,$$(2)),$(SRC_CAN_$(1))))

CFLAGS_$(2) = $(MCU_$(1)) -D$(2) $(CFLAGS_$(1)) $(CFLAGS_COMMON)
LDFLAGS_$(2) = $(LDFLAGS_COMMON) $(LDFLAGS_$(1)) -T$(LDSCRIPT_$(1))
CFLAGS_$(2) = -DAM32_MCU=\"$(MCU)\" $(MCU_$(1)) -D$(2) $(CFLAGS_$(1)) $(CFLAGS_COMMON) $(xCFLAGS)
LDFLAGS_$(2) = $(LDFLAGS_COMMON) $(LDFLAGS_$(1)) -T$(xLDSCRIPT)

-include $$($(2)_BASENAME).d

$$($(2)_BASENAME).elf: $(SRC_COMMON) $$(SRC_$(1))
$$($(2)_BASENAME).elf: $(SRC_COMMON) $$(SRC_$(1)) $(xSRC)
@$(ECHO) Compiling $$(notdir $$@)
$(QUIET)$(MKDIR) -p $(OBJ)
$(QUIET)$(CC) $$(CFLAGS_$(2)) $$(LDFLAGS_$(2)) -MMD -MP -MF $$(@:.elf=.d) -o $$(@) $(SRC_COMMON) $$(SRC_$(1))
$(QUIET)$(CC) $$(CFLAGS_$(2)) $$(LDFLAGS_$(2)) -MMD -MP -MF $$(@:.elf=.d) -o $$(@) $(SRC_COMMON) $$(SRC_$(1)) $(xSRC)
# we copy debug.elf to give us a constant debug target for vscode
# this means the debug button will always debug the last target built
$(QUIET)$(CP) -f $$(@) $(OBJ)$(DSEP)debug.elf > $(NUL)
$(QUIET)$(CP) -f $$(SVD_$(1)) $(OBJ)/debug.svd
# also copy the openocd.cfg from the MCU directory to obj/openocd.cfg for auto config of Cortex-Debug
# in vscode
Expand Down
1 change: 1 addition & 0 deletions Mcu/f415/Drivers/drivers/inc/at32f415_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ extern "C" {
* @{
*/

#define CAN1_GMUX_0000 IOMUX_MAKE_VALUE(0x2C, 0, 4, 0x00) /*!< can_rx(pa11), can_tx(pa12) */
#define CAN1_GMUX_0010 IOMUX_MAKE_VALUE(0x2C, 0, 4, 0x02) /*!< can_rx(pb8), can_tx(pb9) */
#define SDIO1_GMUX_0100 IOMUX_MAKE_VALUE(0x2C, 8, 4, 0x04) /*!< sdio1_ck(pc4), sdio1_cmd(pc5), sdio1_d0(pc0), sdio1_d1(pc1), sdio1_d2(pc2), sdio1_d3(pc3), sdio1_d4(pa4), sdio1_d5(pa5), sdio1_d6(pa6), sdio1_d7(pa7) */
#define SDIO1_GMUX_0101 IOMUX_MAKE_VALUE(0x2C, 8, 4, 0x05) /*!< sdio1_ck(pc4), sdio1_cmd(pc5), sdio1_d0(pa4), sdio1_d1(pa5), sdio1_d2(pa6), sdio1_d3(pa7) */
Expand Down
71 changes: 38 additions & 33 deletions Mcu/f415/Src/eeprom.c
Original file line number Diff line number Diff line change
@@ -1,55 +1,60 @@
#include "eeprom.h"
#include "targets.h"

#include <string.h>
#include <stdbool.h>

//#pragma GCC optimize("O0")

#include "at32f415_flash.h"

// #define APP_START (uint32_t)0x08001000
// #define FLASH_STORAGE 0x08005000 // at the 31kb mark
#define page_size 0x400 // 1 kb for f051
// uint32_t FLASH_FKEY1 =0x45670123;
// uint32_t FLASH_FKEY2 =0xCDEF89AB;
/*
the F415 can be either 1k or 2k sector size. The 256k flash part has
2k sector size. We only support ESCs with 128k flash or less, so 1k
sector size, but it is useful to work with 2k sector size when using
a F415 dev board like the AT-Start F415, so we detect here.
*/
static inline uint32_t sector_size()
{
const uint16_t *F_SIZE = (const uint16_t *)0x1FFFF7E0;
if (*F_SIZE <= 128) {
// 1k sectors for 128k flash or less
return 1024;
}
// 256k flash is 2k sectors
return 2048;
}

void save_flash_nolib(uint8_t* data, int length, uint32_t add)
{ /// todo

// fmc_wscnt_set(2);

// fmc_prefetch_enable();

uint32_t data_to_FLASH[length / 4];
memset(data_to_FLASH, 0, length / 4);
for (int i = 0; i < length / 4; i++) {
data_to_FLASH[i] = data[i * 4 + 3] << 24 | data[i * 4 + 2] << 16 | data[i * 4 + 1] << 8 | data[i * 4]; // make 16 bit
{
if ((add & 0x3) != 0 || (length & 0x3) != 0) {
return;
}
volatile uint32_t data_length = length / 4;
/*
we need the data to be 32 bit aligned
*/
const uint32_t word_length = length / 4;

// unlock flash

flash_unlock();

// erase page if address even divisable by 1024
if ((add % 1024) == 0) {
flash_sector_erase(add);
// erase page if address even divisable by sector size
if ((add % sector_size()) == 0) {
flash_sector_erase(add);
}

volatile uint32_t index = 0;
while (index < data_length) {
// fmc_word_program(add + (index*4),data_to_FLASH[index]);
flash_word_program(add + (index * 4), data_to_FLASH[index]);
// fmc_flag_clear(FMC_FLAG_END |
// FMC_FLAG_WPERR |
// FMC_FLAG_PGERR);
flash_flag_clear(FLASH_PROGRAM_ERROR | FLASH_EPP_ERROR | FLASH_OPERATE_DONE);
uint32_t index = 0;
while (index < word_length) {
uint32_t word;
memcpy(&word, &data[index*4], sizeof(word));
flash_word_program(add + (index * 4), word);
flash_flag_clear(FLASH_PROGRAM_ERROR | FLASH_EPP_ERROR | FLASH_OPERATE_DONE);
index++;
}
flash_lock();
}

void read_flash_bin(uint8_t* data, uint32_t add, int out_buff_len)
{
// volatile uint32_t read_data;
for (int i = 0; i < out_buff_len; i++) {
data[i] = *(uint8_t*)(add + i);
}
}
memcpy(data, (void*)add, out_buff_len);
}
Loading