186#ifdef HAL_SMARTCARD_MODULE_ENABLED
202#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
316#if USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1
317 SMARTCARD_InitCallbacksToDefault(hsc);
319 if (hsc->MspInitCallback == NULL)
325 hsc->MspInitCallback(hsc);
346 CLEAR_BIT(hsc->
Instance->CR2, USART_CR2_LINEN);
347 CLEAR_BIT(hsc->
Instance->CR3, (USART_CR3_IREN | USART_CR3_HDSEL));
350 SET_BIT(hsc->
Instance->CR1, USART_CR1_PEIE);
353 SET_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
362 hsc->
Instance->CR3 |= (USART_CR3_SCEN);
395#if USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1
396 if (hsc->MspDeInitCallback == NULL)
401 hsc->MspDeInitCallback(hsc);
448#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
473 if (pCallback == NULL)
476 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
486 case HAL_SMARTCARD_TX_COMPLETE_CB_ID :
487 hsc->TxCpltCallback = pCallback;
490 case HAL_SMARTCARD_RX_COMPLETE_CB_ID :
491 hsc->RxCpltCallback = pCallback;
494 case HAL_SMARTCARD_ERROR_CB_ID :
495 hsc->ErrorCallback = pCallback;
498 case HAL_SMARTCARD_ABORT_COMPLETE_CB_ID :
499 hsc->AbortCpltCallback = pCallback;
502 case HAL_SMARTCARD_ABORT_TRANSMIT_COMPLETE_CB_ID :
503 hsc->AbortTransmitCpltCallback = pCallback;
506 case HAL_SMARTCARD_ABORT_RECEIVE_COMPLETE_CB_ID :
507 hsc->AbortReceiveCpltCallback = pCallback;
511 case HAL_SMARTCARD_MSPINIT_CB_ID :
512 hsc->MspInitCallback = pCallback;
515 case HAL_SMARTCARD_MSPDEINIT_CB_ID :
516 hsc->MspDeInitCallback = pCallback;
521 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
532 case HAL_SMARTCARD_MSPINIT_CB_ID :
533 hsc->MspInitCallback = pCallback;
536 case HAL_SMARTCARD_MSPDEINIT_CB_ID :
537 hsc->MspDeInitCallback = pCallback;
542 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
552 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
588 case HAL_SMARTCARD_TX_COMPLETE_CB_ID :
592 case HAL_SMARTCARD_RX_COMPLETE_CB_ID :
596 case HAL_SMARTCARD_ERROR_CB_ID :
600 case HAL_SMARTCARD_ABORT_COMPLETE_CB_ID :
604 case HAL_SMARTCARD_ABORT_TRANSMIT_COMPLETE_CB_ID :
608 case HAL_SMARTCARD_ABORT_RECEIVE_COMPLETE_CB_ID :
613 case HAL_SMARTCARD_MSPINIT_CB_ID :
617 case HAL_SMARTCARD_MSPDEINIT_CB_ID :
623 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
634 case HAL_SMARTCARD_MSPINIT_CB_ID :
638 case HAL_SMARTCARD_MSPDEINIT_CB_ID :
644 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
654 hsc->
ErrorCode |= HAL_SMARTCARD_ERROR_INVALID_CALLBACK;
756 const uint8_t *tmp = pData;
757 uint32_t tickstart = 0U;
761 if((pData == NULL) || (Size == 0U))
784 hsc->
Instance->DR = (uint8_t)(*tmp & 0xFFU);
818 uint8_t *tmp = pData;
819 uint32_t tickstart = 0U;
823 if((pData == NULL) || (Size == 0U))
848 *tmp = (uint8_t)(hsc->
Instance->DR & (uint8_t)0xFFU);
879 if((pData == NULL) || (Size == 0U))
898 SET_BIT(hsc->
Instance->CR1, USART_CR1_PEIE);
901 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
904 SET_BIT(hsc->
Instance->CR1, USART_CR1_TXEIE);
927 if((pData == NULL) || (Size == 0U))
946 SET_BIT(hsc->
Instance->CR1, USART_CR1_PEIE| USART_CR1_RXNEIE);
949 SET_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
974 if((pData == NULL) || (Size == 0U))
999 tmp = (
const uint32_t*)&pData;
1010 SET_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1036 if((pData == NULL) || (Size == 0U))
1060 tmp = (uint32_t*)&pData;
1070 SET_BIT(hsc->
Instance->CR1, USART_CR1_PEIE);
1073 SET_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1077 SET_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1102 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE | USART_CR1_TCIE));
1103 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1108 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1124 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1166 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_TXEIE | USART_CR1_TCIE));
1171 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1208 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
1209 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1214 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1252 uint32_t AbortCplt = 0x01U;
1255 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE | USART_CR1_TCIE));
1256 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1293 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1316 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1338 if(AbortCplt == 0x01U)
1352#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1354 hsc->AbortCpltCallback(hsc);
1380 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_TXEIE | USART_CR1_TCIE));
1385 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1410#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1412 hsc->AbortTransmitCpltCallback(hsc);
1428#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1430 hsc->AbortTransmitCpltCallback(hsc);
1457 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
1458 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1463 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1488#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1490 hsc->AbortReceiveCpltCallback(hsc);
1506#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1508 hsc->AbortReceiveCpltCallback(hsc);
1526 uint32_t isrflags = READ_REG(hsc->
Instance->SR);
1527 uint32_t cr1its = READ_REG(hsc->
Instance->CR1);
1528 uint32_t cr3its = READ_REG(hsc->
Instance->CR3);
1529 uint32_t dmarequest = 0x00U;
1530 uint32_t errorflags = 0x00U;
1533 errorflags = (isrflags & (uint32_t)(USART_SR_PE | USART_SR_FE | USART_SR_ORE | USART_SR_NE));
1534 if(errorflags == RESET)
1537 if(((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
1545 if((errorflags != RESET) && (((cr3its & USART_CR3_EIE) != RESET) || ((cr1its & (USART_CR1_RXNEIE | USART_CR1_PEIE)) != RESET)))
1548 if(((isrflags &
SMARTCARD_FLAG_PE) != RESET) && ((cr1its & USART_CR1_PEIE) != RESET))
1554 if(((isrflags &
SMARTCARD_FLAG_FE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
1560 if(((isrflags &
SMARTCARD_FLAG_NE) != RESET) && ((cr3its & USART_CR3_EIE) != RESET))
1566 if(((isrflags &
SMARTCARD_FLAG_ORE) != RESET) && (((cr1its & USART_CR1_RXNEIE) != RESET) || ((cr3its & USART_CR3_EIE) != RESET)))
1574 if(((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
1591 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1608#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1610 hsc->ErrorCallback(hsc);
1619#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1621 hsc->ErrorCallback(hsc);
1632#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1634 hsc->ErrorCallback(hsc);
1646 if(((isrflags &
SMARTCARD_FLAG_TXE) != RESET) && ((cr1its & USART_CR1_TXEIE) != RESET))
1653 if(((isrflags &
SMARTCARD_FLAG_TC) != RESET) && ((cr1its & USART_CR1_TCIE) != RESET))
1780 uint32_t temp1= 0x00U, temp2 = 0x00U;
1810#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1843 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAT);
1846 SET_BIT(hsc->
Instance->CR1, USART_CR1_TCIE);
1862 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
1863 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
1867 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_DMAR);
1872#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1874 hsc->RxCpltCallback(hsc);
1889 uint32_t dmarequest = 0x00U;
1909#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1911 hsc->ErrorCallback(hsc);
1937 if((Timeout == 0U)||((
HAL_GetTick() - Tickstart ) > Timeout))
1940 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_TXEIE);
1941 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_RXNEIE);
1968 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_TXEIE | USART_CR1_TCIE));
1984 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE));
1985 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
2006 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_TXEIE);
2009 SET_BIT(hsc->
Instance->CR1, USART_CR1_TCIE);
2029 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_TCIE);
2032 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
2037#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2039 hsc->TxCpltCallback(hsc);
2065 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_RXNEIE);
2068 CLEAR_BIT(hsc->
Instance->CR1, USART_CR1_PEIE);
2071 CLEAR_BIT(hsc->
Instance->CR3, USART_CR3_EIE);
2076#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2078 hsc->RxCpltCallback(hsc);
2106#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2108 hsc->ErrorCallback(hsc);
2149#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2151 hsc->AbortCpltCallback(hsc);
2192#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2194 hsc->AbortCpltCallback(hsc);
2218#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2220 hsc->AbortTransmitCpltCallback(hsc);
2244#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
2246 hsc->AbortReceiveCpltCallback(hsc);
2261 uint32_t tmpreg = 0x00U;
2278 CLEAR_BIT(hsc->
Instance->CR1, (USART_CR1_TE | USART_CR1_RE));
2283 tmpreg &= (uint32_t)~((uint32_t)(USART_CR2_CPHA | USART_CR2_CPOL | USART_CR2_CLKEN | USART_CR2_LBCL));
2292 WRITE_REG(hsc->
Instance->CR2, (uint32_t)tmpreg);
2297 tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP);
2303 WRITE_REG(hsc->
Instance->CR2, (uint32_t)tmpreg);
2309 tmpreg &= (uint32_t)~((uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | \
2319 WRITE_REG(hsc->
Instance->CR1, (uint32_t)tmpreg);
2323 CLEAR_BIT(hsc->
Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE));
HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
Aborts the DMA Transfer.
HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
Aborts the DMA Transfer in Interrupt mode.
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
Start the DMA Transfer with interrupt enabled.
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
uint32_t HAL_RCC_GetPCLK1Freq(void)
Returns the PCLK1 frequency.
uint32_t HAL_RCC_GetPCLK2Freq(void)
Returns the PCLK2 frequency.
#define HAL_SMARTCARD_ERROR_NONE
#define HAL_SMARTCARD_ERROR_NE
#define HAL_SMARTCARD_ERROR_DMA
#define HAL_SMARTCARD_ERROR_ORE
#define HAL_SMARTCARD_ERROR_FE
#define HAL_SMARTCARD_ERROR_PE
void HAL_SMARTCARD_MspInit(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD MSP Init.
HAL_StatusTypeDef HAL_SMARTCARD_DeInit(SMARTCARD_HandleTypeDef *hsc)
DeInitializes the USART SmartCard peripheral.
HAL_StatusTypeDef HAL_SMARTCARD_Init(SMARTCARD_HandleTypeDef *hsc)
Initializes the SmartCard mode according to the specified parameters in the SMARTCARD_InitTypeDef and...
void HAL_SMARTCARD_MspDeInit(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD MSP DeInit.
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit_IT(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing Transmit transfer (Interrupt mode).
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive_IT(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing Receive transfer (Interrupt mode).
void HAL_SMARTCARD_AbortCpltCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD Abort Complete callback.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA(SMARTCARD_HandleTypeDef *hsc, const uint8_t *pData, uint16_t Size)
Send an amount of data in non blocking mode.
void HAL_SMARTCARD_ErrorCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD error callback.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsc, const uint8_t *pData, uint16_t Size)
Send an amount of data in non blocking mode.
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing Transmit transfer (blocking mode).
void HAL_SMARTCARD_TxCpltCallback(SMARTCARD_HandleTypeDef *hsc)
Tx Transfer completed callbacks.
HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
Receive an amount of data in non blocking mode.
void HAL_SMARTCARD_IRQHandler(SMARTCARD_HandleTypeDef *hsc)
This function handles SMARTCARD interrupt request.
HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
Receive an amount of data in blocking mode.
void HAL_SMARTCARD_AbortReceiveCpltCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD Abort Receive Complete callback.
void HAL_SMARTCARD_AbortTransmitCpltCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD Abort Transmit Complete callback.
HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
Receive an amount of data in non blocking mode.
void HAL_SMARTCARD_RxCpltCallback(SMARTCARD_HandleTypeDef *hsc)
Rx Transfer completed callback.
HAL_StatusTypeDef HAL_SMARTCARD_Abort_IT(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing transfers (Interrupt mode).
HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Send an amount of data in blocking mode.
HAL_StatusTypeDef HAL_SMARTCARD_Abort(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing transfers (blocking mode).
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive(SMARTCARD_HandleTypeDef *hsc)
Abort ongoing Receive transfer (blocking mode).
uint32_t HAL_SMARTCARD_GetError(const SMARTCARD_HandleTypeDef *hsc)
Return the SMARTCARD error code.
HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState(const SMARTCARD_HandleTypeDef *hsc)
Return the SMARTCARD handle state.
#define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__)
Check whether the specified Smartcard flag is set or not.
#define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__)
Clear the SMARTCARD ORE pending flag.
#define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__)
Clear the specified Smartcard pending flags.
#define __HAL_SMARTCARD_ENABLE(__HANDLE__)
Enable the USART associated to the SMARTCARD Handle.
#define __HAL_SMARTCARD_DISABLE(__HANDLE__)
Disable the USART associated to the SMARTCARD Handle.
HAL_SMARTCARD_StateTypeDef
HAL SMARTCARD State structures definition.
@ HAL_SMARTCARD_STATE_BUSY
@ HAL_SMARTCARD_STATE_RESET
@ HAL_SMARTCARD_STATE_READY
@ HAL_SMARTCARD_STATE_BUSY_TX
@ HAL_SMARTCARD_STATE_BUSY_RX
static void SMARTCARD_DMAAbortOnError(DMA_HandleTypeDef *hdma)
DMA SMARTCARD communication abort callback, when initiated by HAL services on Error (To be called at ...
static HAL_StatusTypeDef SMARTCARD_WaitOnFlagUntilTimeout(SMARTCARD_HandleTypeDef *hsc, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout)
This function handles SMARTCARD Communication Timeout. It waits until a flag is no longer in the spec...
static void SMARTCARD_DMATxAbortCallback(DMA_HandleTypeDef *hdma)
DMA SMARTCARD Tx communication abort callback, when initiated by user (To be called at end of DMA Tx ...
static void SMARTCARD_EndRxTransfer(SMARTCARD_HandleTypeDef *hsc)
End ongoing Rx transfer on SMARTCARD peripheral (following error detection or Reception completion).
static void SMARTCARD_SetConfig(SMARTCARD_HandleTypeDef *hsc)
Configure the SMARTCARD peripheral.
static HAL_StatusTypeDef SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsc)
Send an amount of data in non blocking mode.
static void SMARTCARD_DMAError(DMA_HandleTypeDef *hdma)
DMA SMARTCARD communication error callback.
static void SMARTCARD_DMATxOnlyAbortCallback(DMA_HandleTypeDef *hdma)
DMA SMARTCARD Tx communication abort callback, when initiated by user by a call to HAL_SMARTCARD_Abor...
static void SMARTCARD_EndTxTransfer(SMARTCARD_HandleTypeDef *hsc)
End ongoing Tx transfer on SMARTCARD peripheral (following error detection or Transmit completion).
static HAL_StatusTypeDef SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsc)
Receive an amount of data in non blocking mode.
static void SMARTCARD_DMAReceiveCplt(DMA_HandleTypeDef *hdma)
DMA SMARTCARD receive process complete callback.
static void SMARTCARD_DMARxOnlyAbortCallback(DMA_HandleTypeDef *hdma)
DMA SMARTCARD Rx communication abort callback, when initiated by user by a call to HAL_SMARTCARD_Abor...
static HAL_StatusTypeDef SMARTCARD_EndTransmit_IT(SMARTCARD_HandleTypeDef *hsc)
Wraps up transmission in non blocking mode.
static void SMARTCARD_DMATransmitCplt(DMA_HandleTypeDef *hdma)
DMA SMARTCARD transmit process complete callback.
static void SMARTCARD_DMARxAbortCallback(DMA_HandleTypeDef *hdma)
DMA SMARTCARD Rx communication abort callback, when initiated by user (To be called at end of DMA Rx ...
#define IS_SMARTCARD_MODE(MODE)
#define IS_SMARTCARD_NACK_STATE(NACK)
#define IS_SMARTCARD_STOPBITS(STOPBITS)
#define SMARTCARD_BRR(__PCLK__, __BAUD__)
#define IS_SMARTCARD_LASTBIT(LASTBIT)
#define IS_SMARTCARD_BAUDRATE(BAUDRATE)
#define IS_SMARTCARD_PARITY(PARITY)
#define IS_SMARTCARD_WORD_LENGTH(LENGTH)
#define IS_SMARTCARD_POLARITY(CPOL)
#define IS_SMARTCARD_PHASE(CPHA)
#define SMARTCARD_FLAG_NE
#define SMARTCARD_FLAG_PE
#define SMARTCARD_FLAG_RXNE
#define SMARTCARD_FLAG_ORE
#define SMARTCARD_FLAG_TXE
#define SMARTCARD_FLAG_TC
#define SMARTCARD_FLAG_FE
#define assert_param(expr)
This file contains all the functions prototypes for the HAL module driver.
#define HAL_IS_BIT_SET(REG, BIT)
HAL_StatusTypeDef
HAL Status structures definition
#define __HAL_UNLOCK(__HANDLE__)
#define __HAL_LOCK(__HANDLE__)
DMA handle Structure definition.
void(* XferAbortCallback)(struct __DMA_HandleTypeDef *hdma)
void(* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma)
void(* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma)
SMARTCARD handle Structure definition.
SMARTCARD_InitTypeDef Init
DMA_HandleTypeDef * hdmarx
__IO uint16_t TxXferCount
__IO uint16_t RxXferCount
__IO HAL_SMARTCARD_StateTypeDef gState
const uint8_t * pTxBuffPtr
__IO HAL_SMARTCARD_StateTypeDef RxState
DMA_HandleTypeDef * hdmatx