![]() |
STM32F1 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F1 Standard Peripheral Library
|
Functions | |
| void | CAN_DeInit (CAN_TypeDef *CANx) |
| Deinitializes the CAN peripheral registers to their default reset values. More... | |
| uint8_t | CAN_Init (CAN_TypeDef *CANx, CAN_InitTypeDef *CAN_InitStruct) |
| Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct. More... | |
| void | CAN_FilterInit (CAN_FilterInitTypeDef *CAN_FilterInitStruct) |
| Initializes the CAN peripheral according to the specified parameters in the CAN_FilterInitStruct. More... | |
| void | CAN_StructInit (CAN_InitTypeDef *CAN_InitStruct) |
| Fills each CAN_InitStruct member with its default value. More... | |
| void | CAN_SlaveStartBank (uint8_t CAN_BankNumber) |
| Select the start bank filter for slave CAN. More... | |
| void | CAN_ITConfig (CAN_TypeDef *CANx, uint32_t CAN_IT, FunctionalState NewState) |
| Enables or disables the specified CAN interrupts. More... | |
| uint8_t | CAN_Transmit (CAN_TypeDef *CANx, CanTxMsg *TxMessage) |
| Initiates the transmission of a message. More... | |
| uint8_t | CAN_TransmitStatus (CAN_TypeDef *CANx, uint8_t TransmitMailbox) |
| Checks the transmission of a message. More... | |
| void | CAN_CancelTransmit (CAN_TypeDef *CANx, uint8_t Mailbox) |
| Cancels a transmit request. More... | |
| void | CAN_FIFORelease (CAN_TypeDef *CANx, uint8_t FIFONumber) |
| Releases a FIFO. More... | |
| uint8_t | CAN_MessagePending (CAN_TypeDef *CANx, uint8_t FIFONumber) |
| Returns the number of pending messages. More... | |
| void | CAN_Receive (CAN_TypeDef *CANx, uint8_t FIFONumber, CanRxMsg *RxMessage) |
| Receives a message. More... | |
| void | CAN_DBGFreeze (CAN_TypeDef *CANx, FunctionalState NewState) |
| Enables or disables the DBG Freeze for CAN. More... | |
| uint8_t | CAN_Sleep (CAN_TypeDef *CANx) |
| Enters the low power mode. More... | |
| uint8_t | CAN_WakeUp (CAN_TypeDef *CANx) |
| Wakes the CAN up. More... | |
| FlagStatus | CAN_GetFlagStatus (CAN_TypeDef *CANx, uint32_t CAN_FLAG) |
| Checks whether the specified CAN flag is set or not. More... | |
| void | CAN_ClearFlag (CAN_TypeDef *CANx, uint32_t CAN_FLAG) |
| Clears the CAN's pending flags. More... | |
| ITStatus | CAN_GetITStatus (CAN_TypeDef *CANx, uint32_t CAN_IT) |
| Checks whether the specified CAN interrupt has occurred or not. More... | |
| void | CAN_ClearITPendingBit (CAN_TypeDef *CANx, uint32_t CAN_IT) |
| Clears the CAN’s interrupt pending bits. More... | |
| void CAN_CancelTransmit | ( | CAN_TypeDef * | CANx, |
| uint8_t | Mailbox | ||
| ) |
Cancels a transmit request.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| Mailbox,: | Mailbox number. |
| None. |
| void CAN_ClearFlag | ( | CAN_TypeDef * | CANx, |
| uint32_t | CAN_FLAG | ||
| ) |
Clears the CAN's pending flags.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_FLAG,: | specifies the flag to clear. |
| None. |
| void CAN_ClearITPendingBit | ( | CAN_TypeDef * | CANx, |
| uint32_t | CAN_IT | ||
| ) |
Clears the CAN’s interrupt pending bits.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_IT,: | specifies the interrupt pending bit to clear. |
| None. |
| void CAN_DBGFreeze | ( | CAN_TypeDef * | CANx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the DBG Freeze for CAN.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| NewState,: | new state of the CAN peripheral. This parameter can be: ENABLE or DISABLE. |
| None. |
| void CAN_DeInit | ( | CAN_TypeDef * | CANx | ) |
Deinitializes the CAN peripheral registers to their default reset values.
| CANx,: | where x can be 1 or 2 to select the CAN peripheral. |
| None. |
| void CAN_FIFORelease | ( | CAN_TypeDef * | CANx, |
| uint8_t | FIFONumber | ||
| ) |
Releases a FIFO.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| FIFONumber,: | FIFO to release, CAN_FIFO0 or CAN_FIFO1. |
| None. |
| void CAN_FilterInit | ( | CAN_FilterInitTypeDef * | CAN_FilterInitStruct | ) |
Initializes the CAN peripheral according to the specified parameters in the CAN_FilterInitStruct.
| CAN_FilterInitStruct,: | pointer to a CAN_FilterInitTypeDef structure that contains the configuration information. |
| None. |
| FlagStatus CAN_GetFlagStatus | ( | CAN_TypeDef * | CANx, |
| uint32_t | CAN_FLAG | ||
| ) |
Checks whether the specified CAN flag is set or not.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_FLAG,: | specifies the flag to check. This parameter can be: CAN_FLAG_EWG, CAN_FLAG_EPV or CAN_FLAG_BOF. |
| The | new state of CAN_FLAG (SET or RESET). |
| ITStatus CAN_GetITStatus | ( | CAN_TypeDef * | CANx, |
| uint32_t | CAN_IT | ||
| ) |
Checks whether the specified CAN interrupt has occurred or not.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_IT,: | specifies the CAN interrupt source to check. This parameter can be: CAN_IT_RQCP0, CAN_IT_RQCP1, CAN_IT_RQCP2, CAN_IT_FF0, CAN_IT_FOV0, CAN_IT_FF1, CAN_IT_FOV1, CAN_IT_EWG, CAN_IT_EPV, CAN_IT_BOF, CAN_IT_WKU or CAN_IT_SLK. |
| The | new state of CAN_IT (SET or RESET). |
| uint8_t CAN_Init | ( | CAN_TypeDef * | CANx, |
| CAN_InitTypeDef * | CAN_InitStruct | ||
| ) |
Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_InitStruct,: | pointer to a CAN_InitTypeDef structure that contains the configuration information for the CAN peripheral. |
| Constant | indicates initialization succeed which will be CANINITFAILED or CANINITOK. |
| void CAN_ITConfig | ( | CAN_TypeDef * | CANx, |
| uint32_t | CAN_IT, | ||
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified CAN interrupts.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CAN_IT,: | specifies the CAN interrupt sources to be enabled or disabled. This parameter can be: CAN_IT_TME, CAN_IT_FMP0, CAN_IT_FF0, CAN_IT_FOV0, CAN_IT_FMP1, CAN_IT_FF1, CAN_IT_FOV1, CAN_IT_EWG, CAN_IT_EPV, CAN_IT_LEC, CAN_IT_ERR, CAN_IT_WKU or CAN_IT_SLK. |
| NewState,: | new state of the CAN interrupts. This parameter can be: ENABLE or DISABLE. |
| None. |
| uint8_t CAN_MessagePending | ( | CAN_TypeDef * | CANx, |
| uint8_t | FIFONumber | ||
| ) |
Returns the number of pending messages.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| FIFONumber,: | Receive FIFO number, CAN_FIFO0 or CAN_FIFO1. |
| NbMessage | which is the number of pending message. |
| void CAN_Receive | ( | CAN_TypeDef * | CANx, |
| uint8_t | FIFONumber, | ||
| CanRxMsg * | RxMessage | ||
| ) |
Receives a message.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| FIFONumber,: | Receive FIFO number, CAN_FIFO0 or CAN_FIFO1. |
| RxMessage,: | pointer to a structure receive message which contains CAN Id, CAN DLC, CAN datas and FMI number. |
| None. |
| void CAN_SlaveStartBank | ( | uint8_t | CAN_BankNumber | ) |
Select the start bank filter for slave CAN.
| CAN_BankNumber,: | Select the start slave bank filter from 1..27. |
| None. |
| uint8_t CAN_Sleep | ( | CAN_TypeDef * | CANx | ) |
Enters the low power mode.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CANSLEEPOK | if sleep entered, CANSLEEPFAILED in an other case. |
| void CAN_StructInit | ( | CAN_InitTypeDef * | CAN_InitStruct | ) |
Fills each CAN_InitStruct member with its default value.
| CAN_InitStruct,: | pointer to a CAN_InitTypeDef structure which will be initialized. |
| None. |
| uint8_t CAN_Transmit | ( | CAN_TypeDef * | CANx, |
| CanTxMsg * | TxMessage | ||
| ) |
Initiates the transmission of a message.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| TxMessage,: | pointer to a structure which contains CAN Id, CAN DLC and CAN datas. |
| The | number of the mailbox that is used for transmission or CAN_NO_MB if there is no empty mailbox. |
| uint8_t CAN_TransmitStatus | ( | CAN_TypeDef * | CANx, |
| uint8_t | TransmitMailbox | ||
| ) |
Checks the transmission of a message.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| TransmitMailbox,: | the number of the mailbox that is used for transmission. |
| CANTXOK | if the CAN driver transmits the message, CANTXFAILED in an other case. |
| uint8_t CAN_WakeUp | ( | CAN_TypeDef * | CANx | ) |
Wakes the CAN up.
| CANx,: | where x can be 1 or 2 to to select the CAN peripheral. |
| CANWAKEUPOK | if sleep mode left, CANWAKEUPFAILED in an other case. |