#include "bexus_ms_exchange.h" /**----------------variables---------------------------*/ struct Dataset *dataset_tx; uint32_t last_exchanged=0; /**-----------------------------------------------------*/ /**------------------functions--------------------------*/ void Data_Exchange_Init(void){ //memcpy(&Dataset_Slave[buff_sensor_data_index], rx_buf, sizeof(struct Dataset)); } void Data_Exchange(void){ if(millis()-last_exchanged >= 10){ dataset_tx = &Dataset_Master[buff_sensor_data_index]; HAL_UART_Transmit_DMA(&huart3,(uint8_t*)dataset_tx,sizeof(struct Dataset)); last_exchanged=millis(); } } /**-----------------------------------------------------*/