variable size ble transmissions
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user