Files
@ 8f7cba39fbe7
Branch filter:
Location: therm/drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_ppp.h - annotation
8f7cba39fbe7
11.6 KiB
text/plain
Added notes about jumping to user program, etc. Need to check boot flags to match F042 processor (example was f1).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 ab7abb62e433 | /**
******************************************************************************
* @file stm32f0xx_hal_ppp.h
* @author MCD Application Team
* @version V1.1.0
* @date 03-Oct-2014
* @brief Header file of PPP HAL module.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F0xx_HAL_PPP_H
#define __STM32F0xx_HAL_PPP_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f0xx_hal_def.h"
/** @addtogroup STM32F0xx_HAL_Driver
* @{
*/
/** @addtogroup PPP PPP HAL module driver
* @{
*/
/* Exported types ------------------------------------------------------------*/
/** @defgroup PPP_Exported_Types PPP Exported Types
* @{
*/
/**
* @brief PPP
*/
typedef struct
{
__IO uint32_t REGx; /*!< PPP register x Address offset: 0x00 */
} PPP_TypeDef;
/**
* @brief PPP Configuration Structure definition
*/
typedef struct
{
uint32_t Config1; /*!< Add Config1 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
uint32_t Config2; /*!< Add Config2 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
uint32_t Config3; /*!< Add Config3 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
uint32_t Config4; /*!< Add Config4 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
uint32_t Config5; /*!< Add Config5 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
uint32_t Config6; /*!< Add Config6 description
This parameter can be any value of @ref PPP_CONFIGx_Define */
} PPP_InitTypeDef;
/**
* @brief HAL State structures definition
*/
typedef enum
{
HAL_PPP_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
HAL_PPP_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
HAL_PPP_STATE_BUSY_TX = 0x03, /*!< Data Transmission process is ongoing */
HAL_PPP_STATE_BUSY_RX = 0x04, /*!< Data Reception process is ongoing */
HAL_PPP_STATE_BUSY_TX_RX = 0x05, /*!< Data Transmission and Reception process is ongoing */
HAL_PPP_STATE_TIMEOUT = 0x06, /*!< Timeout state */
HAL_PPP_STATE_ERROR = 0x07, /*!< Error state */
HAL_PPP_STATE_DISABLED = 0x08 /*!< Disabled state */
}HAL_PPP_StateTypeDef;
/**
* @brief PPP Handle Structure definition
*/
typedef struct
{
PPP_TypeDef *Instance; /*!< Register base address */
PPP_InitTypeDef Config; /*!< PPP required parameters */
/* !!! Add HAL PPP required handler parameters !!! */
HAL_StatusTypeDef Status; /*!< PPP peripheral status */
HAL_LockTypeDef Lock; /*!< Locking object */
__IO HAL_PPP_StateTypeDef State; /*!< PPP communication state */
} PPP_HandleTypeDef;
/**
* @brief PPP Configuration enumeration values definition
*/
typedef enum
{
Control1 = 0, /*!< Control related Config1 Paramater in PPP_InitTypeDef */
Control2 = 1, /*!< Control related Config2 Paramater in PPP_InitTypeDef */
Control3 = 2, /*!< Control related Config3 Paramater in PPP_InitTypeDef */
Control4 = 3, /*!< Control related Config4 Paramater in PPP_InitTypeDef */
Control5 = 4, /*!< Control related Config5 Paramater in PPP_InitTypeDef */
Control6 = 5 /*!< Control related Config6 Paramater in PPP_InitTypeDef */
}PPP_ControlTypeDef;
/**
* @}
*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup PPP_Exported_Constants PPP Exported Constants
* @{
*/
/** @defgroup PPP_CONFIGx_Define PPP CONFIGx Define
* @{
*/
#define PPP_CONFIGx_VALUE1 ((uint32_t)0x00) /*!< PPP Config Value description */
#define PPP_CONFIGx_VALUE2 ((uint32_t)0x01) /*!< PPP Config Value description */
#define PPP_CONFIGx_VALUE3 ((uint32_t)0x02) /*!< PPP Config Value description */
#define IS_PPP_CONFIGx(CONFIG) (((CONFIG) == PPP_CONFIGx_VALUE1) || \
((CONFIG) == PPP_CONFIGx_VALUE2) || \
((CONFIG) == PPP_CONFIGx_VALUE3))
/**
* @}
*/
/** @defgroup PPP_Flag_definition PPP Flag definition
* @brief Flag definition
* Elements values convention: 0x00000ZZZZ
* - ZZZZ: Flag mask
*
* @#define PPP_FLAG_xxxx ((uint32_t)0x0000ZZZZ)
* @{
*/
#define PPP_FLAG_TC ((uint32_t)0x00000002)
#define PPP_FLAG_RXNE ((uint32_t)0x00000001)
/**
* @}
*/
/** @defgroup PPP_Interrupt_definition PPP Interrupt definition
* @brief PPP Interrupt definition
* Elements values convention: 0xXXYYZZZZ
* - XX : Interrupt register Index
* - YY : Interrupt Source Position
* - ZZZZ: Interrupt mask
*
* @#define PPP_IT_xxxx ((uint32_t)0xXXYYZZZZ)
* @{
*/
#define PPP_IT_TC ((uint32_t)0x00000002)
#define PPP_IT_RXNE ((uint32_t)0x00000001)
/**
* @}
*/
/** @defgroup PPP_Instance_definition PPP Instance definition
* @{
*/
#define IS_PPP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == PPP1) || \
((INSTANCE) == PPP2) || \
((INSTANCE) == PPP3) || \
((INSTANCE) == PPP4))
/**
* @}
*/
/**
* @}
*/
/* Exported macro ------------------------------------------------------------*/
/** @defgroup PPP_Exported_Macros PPP Exported Macros
* @{
*/
/** @defgroup PPP_Interrupt_Clock PPP Interrupt Clock
* @brief macros to handle interrupts and specific clock configurations
* @{
*/
#define __HAL_PPP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->REGx |= (ENABLE))
#define __HAL_PPP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->REGx &= ~(ENABLE))
#define __HAL_PPP_ENABLE_I(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->REGx |= (__INTERRUPT__))
#define __HAL_PPP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->REGx &= ~(__INTERRUPT__))
#define __HAL_PPP_GET_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->REGx & ((uint16_t)1 << ((__INTERRUPT__)>> 0x08)))
#define __HAL_PPP_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->REGx &= ((uint16_t)~((uint16_t)0x01 << (uint16_t)((__INTERRUPT__) >> 0x08))))
#define __HAL_PPP_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->REGx & (__FLAG__)) == (__FLAG__))
#define __HAL_PPP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->REGx &= ~(__FLAG__))
#define __HAL_PPP_PRESCALER(__HANDLE__, __PRESC__)
#define __HAL_PPP_YYYY(__HANDLE__, __PRESC__)
/**
* @}
*/
/**
* @}
*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup PPP_Exported_Functions PPP Exported Functions
* @{
*/
/** @addtogroup PPP_Exported_Functions_Group1 Initialization/de-initialization functions
* @{
*/
/* Initialization and de-initialization functions ****************************/
HAL_StatusTypeDef HAL_PPP_Init(PPP_HandleTypeDef *hppp);
HAL_StatusTypeDef HAL_PPP_DeInit (PPP_HandleTypeDef *hppp);
void HAL_PPP_MspInit(PPP_HandleTypeDef *hppp);
void HAL_PPP_MspDeInit(PPP_HandleTypeDef *hppp);
/**
* @}
*/
/** @addtogroup PPP_Exported_Functions_Group2 I/O operation functions
* @{
*/
/* IO operation functions *****************************************************/
/* Blocking mode: Polling */
HAL_StatusTypeDef HAL_PPP_Transmit(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_PPP_Receive(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
/* Non-Blocking mode: Interrupt */
HAL_StatusTypeDef HAL_PPP_Transmit_IT(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_PPP_Receive_IT(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
void HAL_PPP_IRQHandler(PPP_HandleTypeDef *hppp);
/* Non-Blocking mode: DMA */
HAL_StatusTypeDef HAL_PPP_Transmit_DMA(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_PPP_Receive_DMA(PPP_HandleTypeDef *hppp, uint8_t *pData, uint16_t Size);
/* Callback in non blocking modes (Interrupt and DMA) */
void HAL_PPP_TxCpltCallback(PPP_HandleTypeDef *hppp);
void HAL_PPP_RxCpltCallback(PPP_HandleTypeDef *hppp);
/**
* @}
*/
/** @addtogroup PPP_Exported_Functions_Group3 Peripheral Control functions
* @{
*/
/* Peripheral Control functions ***********************************************/
HAL_StatusTypeDef HAL_PPP_Ctl(PPP_HandleTypeDef *hppp, PPP_ControlTypeDef control, uint16_t *args);
/**
* @}
*/
/** @addtogroup PPP_Exported_Functions_Group4 Peripheral State functions
* @{
*/
/* Peripheral State and Error functions ***************************************/
HAL_PPP_StateTypeDef HAL_PPP_GetState(PPP_HandleTypeDef *hppp);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __STM32F0xx_HAL_PPP_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|