/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file    AliroSvc.h
  * @author  MCD Application Team
  * @brief   Header for AliroSvc.c
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef ALIROSVC_H
#define ALIROSVC_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "ble_types.h"
#include "ble_core.h"
#include "svc_ctl.h"
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported defines ----------------------------------------------------------*/
/* USER CODE BEGIN ED */

/* USER CODE END ED */

/* Exported types ------------------------------------------------------------*/
typedef enum
{
  ALIROSVC_R_SPSM,
  ALIROSVC_D_AC_PV,
  /* USER CODE BEGIN Service1_CharOpcode_t */

  /* USER CODE END Service1_CharOpcode_t */
  ALIROSVC_CHAROPCODE_LAST
} ALIROSVC_CharOpcode_t;

typedef enum
{
  ALIROSVC_R_SPSM_READ_EVT,
  ALIROSVC_D_AC_PV_WRITE_EVT,
  /* USER CODE BEGIN Service1_OpcodeEvt_t */

  /* USER CODE END Service1_OpcodeEvt_t */
  ALIROSVC_BOOT_REQUEST_EVT
} ALIROSVC_OpcodeEvt_t;

typedef struct
{
  uint8_t *p_Payload;
  uint8_t Length;

  /* USER CODE BEGIN Service1_Data_t */

  /* USER CODE END Service1_Data_t */
} ALIROSVC_Data_t;

typedef struct
{
  ALIROSVC_OpcodeEvt_t       EvtOpcode;
  ALIROSVC_Data_t             DataTransfered;
  uint16_t                ConnectionHandle;
  uint16_t                AttributeHandle;
  uint8_t                 ServiceInstance;
  /* USER CODE BEGIN Service1_NotificationEvt_t */

  /* USER CODE END Service1_NotificationEvt_t */
} ALIROSVC_NotificationEvt_t;

/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* External variables --------------------------------------------------------*/
/* USER CODE BEGIN EV */

/* USER CODE END EV */

/* Exported macros -----------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void ALIROSVC_Init(void);
void ALIROSVC_Notification(ALIROSVC_NotificationEvt_t *p_Notification);
tBleStatus ALIROSVC_UpdateValue(ALIROSVC_CharOpcode_t CharOpcode, ALIROSVC_Data_t *pData);
/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

#ifdef __cplusplus
}
#endif

#endif /*ALIROSVC_H */
