variable size ble transmissions

This commit is contained in:
ggw
2026-05-08 16:54:36 -05:00
parent 41ec35233d
commit 2b5ade4bec
5 changed files with 24 additions and 13 deletions
@@ -30,6 +30,7 @@
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <stdbool.h>
#include "gpio.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
+6 -3
View File
@@ -23,7 +23,7 @@
#include "custom_stm.h"
/* USER CODE BEGIN Includes */
#include "gpio.h"
#include "usart.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -39,7 +39,7 @@ typedef struct{
extern uint16_t Connection_Handle;
/* USER CODE BEGIN PTD */
uint8_t uart_to_l452_data[1];
/* USER CODE END PTD */
/* Private defines -----------------------------------------------------------*/
@@ -192,7 +192,10 @@ static SVCCTL_EvtAckStatus_t Custom_STM_Event_Handler(void *Event)
{
return_value = SVCCTL_EvtAckFlowEnable;
/* USER CODE BEGIN CUSTOM_STM_Service_1_Char_1_ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE */
HAL_GPIO_TogglePin(GPIOA, LED4_Pin);
if (attribute_modified->Attr_Data[0] != 'R') {
uart_to_l452_data[0] = attribute_modified->Attr_Data[0];
HAL_UART_Transmit_DMA(&huart1, uart_to_l452_data, 1);
}
/* USER CODE END CUSTOM_STM_Service_1_Char_1_ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE */
} /* if (attribute_modified->Attr_Handle == (CustomContext.CustomArrwriteHdle + CHARACTERISTIC_VALUE_ATTRIBUTE_OFFSET))*/
/* USER CODE BEGIN EVT_BLUE_GATT_ATTRIBUTE_MODIFIED_END */