/** ****************************************************************************** * @file ymodem.h * @author MCD Application Team * @brief This file contains definitions for Ymodem functionalities. ****************************************************************************** * @attention * *

© Copyright (c) 2020 STMicroelectronics. * All rights reserved.

* * This software component is licensed by ST under Ultimate Liberty license * SLA0044, the "License"; You may not use this file except in compliance with * the License. You may obtain a copy of the License at: * www.st.com/SLA0044 * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef YMODEM_H_ #define YMODEM_H_ /** @addtogroup USER_APP User App Example * @{ */ /** @addtogroup FW_UPDATE Firmware Update Example * @{ */ /* Includes ------------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/ typedef enum { COM_OK = 0x00U, /*!< OK */ COM_ERROR = 0x01U, /*!< Error */ COM_ABORT = 0x02U, /*!< Abort */ COM_TIMEOUT = 0x03U, /*!< Timeout */ COM_DATA = 0x04U, /*!< Data */ COM_LIMIT = 0x05U /*!< Limit*/ } COM_StatusTypeDef; /*!< Comm status structures definition */ typedef struct { HAL_StatusTypeDef(* Ymodem_HeaderPktRxCpltCallback)(uint32_t uFileSize); HAL_StatusTypeDef(* Ymodem_DataPktRxCpltCallback)(uint8_t *pData, uint32_t uFlashDestination, uint32_t uSize); } YMODEM_CallbacksTypeDef; /* Exported constants --------------------------------------------------------*/ /* Packet structure defines */ #define PACKET_HEADER_SIZE ((uint32_t)3U) /*!