Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************/
- /* */
- /* SD host Interface */
- /* */
- /******************************************************************************/
- /****************** Bit definition for SDIO_POWER register ******************/
- #define SDIO_POWER_PWRCTRL ((uint8_t)0x03) /*!< PWRCTRL[1:0] bits (Power supply control bits) */
- #define SDIO_POWER_PWRCTRL_0 ((uint8_t)0x01) /*!< Bit 0 */
- #define SDIO_POWER_PWRCTRL_1 ((uint8_t)0x02) /*!< Bit 1 */
- /****************** Bit definition for SDIO_CLKCR register ******************/
- #define SDIO_CLKCR_CLKDIV ((uint16_t)0x00FF) /*!< Clock divide factor */
- #define SDIO_CLKCR_CLKEN ((uint16_t)0x0100) /*!< Clock enable bit */
- #define SDIO_CLKCR_PWRSAV ((uint16_t)0x0200) /*!< Power saving configuration bit */
- #define SDIO_CLKCR_BYPASS ((uint16_t)0x0400) /*!< Clock divider bypass enable bit */
- #define SDIO_CLKCR_WIDBUS ((uint16_t)0x1800) /*!< WIDBUS[1:0] bits (Wide bus mode enable bit) */
- #define SDIO_CLKCR_WIDBUS_0 ((uint16_t)0x0800) /*!< Bit 0 */
- #define SDIO_CLKCR_WIDBUS_1 ((uint16_t)0x1000) /*!< Bit 1 */
- #define SDIO_CLKCR_NEGEDGE ((uint16_t)0x2000) /*!< SDIO_CK dephasing selection bit */
- #define SDIO_CLKCR_HWFC_EN ((uint16_t)0x4000) /*!< HW Flow Control enable */
- /******************* Bit definition for SDIO_ARG register *******************/
- #define SDIO_ARG_CMDARG ((uint32_t)0xFFFFFFFF) /*!< Command argument */
- /******************* Bit definition for SDIO_CMD register *******************/
- #define SDIO_CMD_CMDINDEX ((uint16_t)0x003F) /*!< Command Index */
- #define SDIO_CMD_WAITRESP ((uint16_t)0x00C0) /*!< WAITRESP[1:0] bits (Wait for response bits) */
- #define SDIO_CMD_WAITRESP_0 ((uint16_t)0x0040) /*!< Bit 0 */
- #define SDIO_CMD_WAITRESP_1 ((uint16_t)0x0080) /*!< Bit 1 */
- #define SDIO_CMD_WAITINT ((uint16_t)0x0100) /*!< CPSM Waits for Interrupt Request */
- #define SDIO_CMD_WAITPEND ((uint16_t)0x0200) /*!< CPSM Waits for ends of data transfer (CmdPend internal signal) */
- #define SDIO_CMD_CPSMEN ((uint16_t)0x0400) /*!< Command path state machine (CPSM) Enable bit */
- #define SDIO_CMD_SDIOSUSPEND ((uint16_t)0x0800) /*!< SD I/O suspend command */
- #define SDIO_CMD_ENCMDCOMPL ((uint16_t)0x1000) /*!< Enable CMD completion */
- #define SDIO_CMD_NIEN ((uint16_t)0x2000) /*!< Not Interrupt Enable */
- #define SDIO_CMD_CEATACMD ((uint16_t)0x4000) /*!< CE-ATA command */
- /***************** Bit definition for SDIO_RESPCMD register *****************/
- #define SDIO_RESPCMD_RESPCMD ((uint8_t)0x3F) /*!< Response command index */
- /****************** Bit definition for SDIO_RESP0 register ******************/
- #define SDIO_RESP0_CARDSTATUS0 ((uint32_t)0xFFFFFFFF) /*!< Card Status */
- /****************** Bit definition for SDIO_RESP1 register ******************/
- #define SDIO_RESP1_CARDSTATUS1 ((uint32_t)0xFFFFFFFF) /*!< Card Status */
- /****************** Bit definition for SDIO_RESP2 register ******************/
- #define SDIO_RESP2_CARDSTATUS2 ((uint32_t)0xFFFFFFFF) /*!< Card Status */
- /****************** Bit definition for SDIO_RESP3 register ******************/
- #define SDIO_RESP3_CARDSTATUS3 ((uint32_t)0xFFFFFFFF) /*!< Card Status */
- /****************** Bit definition for SDIO_RESP4 register ******************/
- #define SDIO_RESP4_CARDSTATUS4 ((uint32_t)0xFFFFFFFF) /*!< Card Status */
- /****************** Bit definition for SDIO_DTIMER register *****************/
- #define SDIO_DTIMER_DATATIME ((uint32_t)0xFFFFFFFF) /*!< Data timeout period. */
- /****************** Bit definition for SDIO_DLEN register *******************/
- #define SDIO_DLEN_DATALENGTH ((uint32_t)0x01FFFFFF) /*!< Data length value */
- /****************** Bit definition for SDIO_DCTRL register ******************/
- #define SDIO_DCTRL_DTEN ((uint16_t)0x0001) /*!< Data transfer enabled bit */
- #define SDIO_DCTRL_DTDIR ((uint16_t)0x0002) /*!< Data transfer direction selection */
- #define SDIO_DCTRL_DTMODE ((uint16_t)0x0004) /*!< Data transfer mode selection */
- #define SDIO_DCTRL_DMAEN ((uint16_t)0x0008) /*!< DMA enabled bit */
- #define SDIO_DCTRL_DBLOCKSIZE ((uint16_t)0x00F0) /*!< DBLOCKSIZE[3:0] bits (Data block size) */
- #define SDIO_DCTRL_DBLOCKSIZE_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define SDIO_DCTRL_DBLOCKSIZE_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define SDIO_DCTRL_DBLOCKSIZE_2 ((uint16_t)0x0040) /*!< Bit 2 */
- #define SDIO_DCTRL_DBLOCKSIZE_3 ((uint16_t)0x0080) /*!< Bit 3 */
- #define SDIO_DCTRL_RWSTART ((uint16_t)0x0100) /*!< Read wait start */
- #define SDIO_DCTRL_RWSTOP ((uint16_t)0x0200) /*!< Read wait stop */
- #define SDIO_DCTRL_RWMOD ((uint16_t)0x0400) /*!< Read wait mode */
- #define SDIO_DCTRL_SDIOEN ((uint16_t)0x0800) /*!< SD I/O enable functions */
- /****************** Bit definition for SDIO_DCOUNT register *****************/
- #define SDIO_DCOUNT_DATACOUNT ((uint32_t)0x01FFFFFF) /*!< Data count value */
- /****************** Bit definition for SDIO_STA register ********************/
- #define SDIO_STA_CCRCFAIL ((uint32_t)0x00000001) /*!< Command response received (CRC check failed) */
- #define SDIO_STA_DCRCFAIL ((uint32_t)0x00000002) /*!< Data block sent/received (CRC check failed) */
- #define SDIO_STA_CTIMEOUT ((uint32_t)0x00000004) /*!< Command response timeout */
- #define SDIO_STA_DTIMEOUT ((uint32_t)0x00000008) /*!< Data timeout */
- #define SDIO_STA_TXUNDERR ((uint32_t)0x00000010) /*!< Transmit FIFO underrun error */
- #define SDIO_STA_RXOVERR ((uint32_t)0x00000020) /*!< Received FIFO overrun error */
- #define SDIO_STA_CMDREND ((uint32_t)0x00000040) /*!< Command response received (CRC check passed) */
- #define SDIO_STA_CMDSENT ((uint32_t)0x00000080) /*!< Command sent (no response required) */
- #define SDIO_STA_DATAEND ((uint32_t)0x00000100) /*!< Data end (data counter, SDIDCOUNT, is zero) */
- #define SDIO_STA_STBITERR ((uint32_t)0x00000200) /*!< Start bit not detected on all data signals in wide bus mode */
- #define SDIO_STA_DBCKEND ((uint32_t)0x00000400) /*!< Data block sent/received (CRC check passed) */
- #define SDIO_STA_CMDACT ((uint32_t)0x00000800) /*!< Command transfer in progress */
- #define SDIO_STA_TXACT ((uint32_t)0x00001000) /*!< Data transmit in progress */
- #define SDIO_STA_RXACT ((uint32_t)0x00002000) /*!< Data receive in progress */
- #define SDIO_STA_TXFIFOHE ((uint32_t)0x00004000) /*!< Transmit FIFO Half Empty: at least 8 words can be written into the FIFO */
- #define SDIO_STA_RXFIFOHF ((uint32_t)0x00008000) /*!< Receive FIFO Half Full: there are at least 8 words in the FIFO */
- #define SDIO_STA_TXFIFOF ((uint32_t)0x00010000) /*!< Transmit FIFO full */
- #define SDIO_STA_RXFIFOF ((uint32_t)0x00020000) /*!< Receive FIFO full */
- #define SDIO_STA_TXFIFOE ((uint32_t)0x00040000) /*!< Transmit FIFO empty */
- #define SDIO_STA_RXFIFOE ((uint32_t)0x00080000) /*!< Receive FIFO empty */
- #define SDIO_STA_TXDAVL ((uint32_t)0x00100000) /*!< Data available in transmit FIFO */
- #define SDIO_STA_RXDAVL ((uint32_t)0x00200000) /*!< Data available in receive FIFO */
- #define SDIO_STA_SDIOIT ((uint32_t)0x00400000) /*!< SDIO interrupt received */
- #define SDIO_STA_CEATAEND ((uint32_t)0x00800000) /*!< CE-ATA command completion signal received for CMD61 */
- /******************* Bit definition for SDIO_ICR register *******************/
- #define SDIO_ICR_CCRCFAILC ((uint32_t)0x00000001) /*!< CCRCFAIL flag clear bit */
- #define SDIO_ICR_DCRCFAILC ((uint32_t)0x00000002) /*!< DCRCFAIL flag clear bit */
- #define SDIO_ICR_CTIMEOUTC ((uint32_t)0x00000004) /*!< CTIMEOUT flag clear bit */
- #define SDIO_ICR_DTIMEOUTC ((uint32_t)0x00000008) /*!< DTIMEOUT flag clear bit */
- #define SDIO_ICR_TXUNDERRC ((uint32_t)0x00000010) /*!< TXUNDERR flag clear bit */
- #define SDIO_ICR_RXOVERRC ((uint32_t)0x00000020) /*!< RXOVERR flag clear bit */
- #define SDIO_ICR_CMDRENDC ((uint32_t)0x00000040) /*!< CMDREND flag clear bit */
- #define SDIO_ICR_CMDSENTC ((uint32_t)0x00000080) /*!< CMDSENT flag clear bit */
- #define SDIO_ICR_DATAENDC ((uint32_t)0x00000100) /*!< DATAEND flag clear bit */
- #define SDIO_ICR_STBITERRC ((uint32_t)0x00000200) /*!< STBITERR flag clear bit */
- #define SDIO_ICR_DBCKENDC ((uint32_t)0x00000400) /*!< DBCKEND flag clear bit */
- #define SDIO_ICR_SDIOITC ((uint32_t)0x00400000) /*!< SDIOIT flag clear bit */
- #define SDIO_ICR_CEATAENDC ((uint32_t)0x00800000) /*!< CEATAEND flag clear bit */
- /****************** Bit definition for SDIO_MASK register *******************/
- #define SDIO_MASK_CCRCFAILIE ((uint32_t)0x00000001) /*!< Command CRC Fail Interrupt Enable */
- #define SDIO_MASK_DCRCFAILIE ((uint32_t)0x00000002) /*!< Data CRC Fail Interrupt Enable */
- #define SDIO_MASK_CTIMEOUTIE ((uint32_t)0x00000004) /*!< Command TimeOut Interrupt Enable */
- #define SDIO_MASK_DTIMEOUTIE ((uint32_t)0x00000008) /*!< Data TimeOut Interrupt Enable */
- #define SDIO_MASK_TXUNDERRIE ((uint32_t)0x00000010) /*!< Tx FIFO UnderRun Error Interrupt Enable */
- #define SDIO_MASK_RXOVERRIE ((uint32_t)0x00000020) /*!< Rx FIFO OverRun Error Interrupt Enable */
- #define SDIO_MASK_CMDRENDIE ((uint32_t)0x00000040) /*!< Command Response Received Interrupt Enable */
- #define SDIO_MASK_CMDSENTIE ((uint32_t)0x00000080) /*!< Command Sent Interrupt Enable */
- #define SDIO_MASK_DATAENDIE ((uint32_t)0x00000100) /*!< Data End Interrupt Enable */
- #define SDIO_MASK_STBITERRIE ((uint32_t)0x00000200) /*!< Start Bit Error Interrupt Enable */
- #define SDIO_MASK_DBCKENDIE ((uint32_t)0x00000400) /*!< Data Block End Interrupt Enable */
- #define SDIO_MASK_CMDACTIE ((uint32_t)0x00000800) /*!< Command Acting Interrupt Enable */
- #define SDIO_MASK_TXACTIE ((uint32_t)0x00001000) /*!< Data Transmit Acting Interrupt Enable */
- #define SDIO_MASK_RXACTIE ((uint32_t)0x00002000) /*!< Data receive acting interrupt enabled */
- #define SDIO_MASK_TXFIFOHEIE ((uint32_t)0x00004000) /*!< Tx FIFO Half Empty interrupt Enable */
- #define SDIO_MASK_RXFIFOHFIE ((uint32_t)0x00008000) /*!< Rx FIFO Half Full interrupt Enable */
- #define SDIO_MASK_TXFIFOFIE ((uint32_t)0x00010000) /*!< Tx FIFO Full interrupt Enable */
- #define SDIO_MASK_RXFIFOFIE ((uint32_t)0x00020000) /*!< Rx FIFO Full interrupt Enable */
- #define SDIO_MASK_TXFIFOEIE ((uint32_t)0x00040000) /*!< Tx FIFO Empty interrupt Enable */
- #define SDIO_MASK_RXFIFOEIE ((uint32_t)0x00080000) /*!< Rx FIFO Empty interrupt Enable */
- #define SDIO_MASK_TXDAVLIE ((uint32_t)0x00100000) /*!< Data available in Tx FIFO interrupt Enable */
- #define SDIO_MASK_RXDAVLIE ((uint32_t)0x00200000) /*!< Data available in Rx FIFO interrupt Enable */
- #define SDIO_MASK_SDIOITIE ((uint32_t)0x00400000) /*!< SDIO Mode Interrupt Received interrupt Enable */
- #define SDIO_MASK_CEATAENDIE ((uint32_t)0x00800000) /*!< CE-ATA command completion signal received Interrupt Enable */
- /***************** Bit definition for SDIO_FIFOCNT register *****************/
- #define SDIO_FIFOCNT_FIFOCOUNT ((uint32_t)0x00FFFFFF) /*!< Remaining number of words to be written to or read from the FIFO */
- /****************** Bit definition for SDIO_FIFO register *******************/
- #define SDIO_FIFO_FIFODATA ((uint32_t)0xFFFFFFFF) /*!< Receive and transmit FIFO data */
- /******************************************************************************/
- /* */
- /* USB Device FS */
- /* */
- /******************************************************************************/
- /*!< Endpoint-specific registers */
- /******************* Bit definition for USB_EP0R register *******************/
- #define USB_EP0R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP0R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP0R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP0R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP0R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP0R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP0R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP0R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP0R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP0R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP0R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP0R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP0R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP0R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP0R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP0R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP1R register *******************/
- #define USB_EP1R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP1R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP1R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP1R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP1R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP1R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP1R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP1R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP1R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP1R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP1R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP1R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP1R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP1R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP1R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP1R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP2R register *******************/
- #define USB_EP2R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP2R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP2R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP2R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP2R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP2R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP2R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP2R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP2R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP2R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP2R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP2R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP2R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP2R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP2R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP2R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP3R register *******************/
- #define USB_EP3R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP3R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP3R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP3R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP3R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP3R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP3R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP3R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP3R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP3R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP3R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP3R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP3R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP3R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP3R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP3R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP4R register *******************/
- #define USB_EP4R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP4R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP4R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP4R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP4R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP4R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP4R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP4R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP4R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP4R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP4R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP4R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP4R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP4R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP4R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP4R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP5R register *******************/
- #define USB_EP5R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP5R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP5R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP5R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP5R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP5R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP5R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP5R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP5R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP5R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP5R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP5R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP5R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP5R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP5R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP5R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP6R register *******************/
- #define USB_EP6R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP6R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP6R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP6R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP6R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP6R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP6R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP6R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP6R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP6R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP6R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP6R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP6R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP6R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP6R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP6R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /******************* Bit definition for USB_EP7R register *******************/
- #define USB_EP7R_EA ((uint16_t)0x000F) /*!< Endpoint Address */
- #define USB_EP7R_STAT_TX ((uint16_t)0x0030) /*!< STAT_TX[1:0] bits (Status bits, for transmission transfers) */
- #define USB_EP7R_STAT_TX_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define USB_EP7R_STAT_TX_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define USB_EP7R_DTOG_TX ((uint16_t)0x0040) /*!< Data Toggle, for transmission transfers */
- #define USB_EP7R_CTR_TX ((uint16_t)0x0080) /*!< Correct Transfer for transmission */
- #define USB_EP7R_EP_KIND ((uint16_t)0x0100) /*!< Endpoint Kind */
- #define USB_EP7R_EP_TYPE ((uint16_t)0x0600) /*!< EP_TYPE[1:0] bits (Endpoint type) */
- #define USB_EP7R_EP_TYPE_0 ((uint16_t)0x0200) /*!< Bit 0 */
- #define USB_EP7R_EP_TYPE_1 ((uint16_t)0x0400) /*!< Bit 1 */
- #define USB_EP7R_SETUP ((uint16_t)0x0800) /*!< Setup transaction completed */
- #define USB_EP7R_STAT_RX ((uint16_t)0x3000) /*!< STAT_RX[1:0] bits (Status bits, for reception transfers) */
- #define USB_EP7R_STAT_RX_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USB_EP7R_STAT_RX_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USB_EP7R_DTOG_RX ((uint16_t)0x4000) /*!< Data Toggle, for reception transfers */
- #define USB_EP7R_CTR_RX ((uint16_t)0x8000) /*!< Correct Transfer for reception */
- /*!< Common registers */
- /******************* Bit definition for USB_CNTR register *******************/
- #define USB_CNTR_FRES ((uint16_t)0x0001) /*!< Force USB Reset */
- #define USB_CNTR_PDWN ((uint16_t)0x0002) /*!< Power down */
- #define USB_CNTR_LP_MODE ((uint16_t)0x0004) /*!< Low-power mode */
- #define USB_CNTR_FSUSP ((uint16_t)0x0008) /*!< Force suspend */
- #define USB_CNTR_RESUME ((uint16_t)0x0010) /*!< Resume request */
- #define USB_CNTR_ESOFM ((uint16_t)0x0100) /*!< Expected Start Of Frame Interrupt Mask */
- #define USB_CNTR_SOFM ((uint16_t)0x0200) /*!< Start Of Frame Interrupt Mask */
- #define USB_CNTR_RESETM ((uint16_t)0x0400) /*!< RESET Interrupt Mask */
- #define USB_CNTR_SUSPM ((uint16_t)0x0800) /*!< Suspend mode Interrupt Mask */
- #define USB_CNTR_WKUPM ((uint16_t)0x1000) /*!< Wakeup Interrupt Mask */
- #define USB_CNTR_ERRM ((uint16_t)0x2000) /*!< Error Interrupt Mask */
- #define USB_CNTR_PMAOVRM ((uint16_t)0x4000) /*!< Packet Memory Area Over / Underrun Interrupt Mask */
- #define USB_CNTR_CTRM ((uint16_t)0x8000) /*!< Correct Transfer Interrupt Mask */
- /******************* Bit definition for USB_ISTR register *******************/
- #define USB_ISTR_EP_ID ((uint16_t)0x000F) /*!< Endpoint Identifier */
- #define USB_ISTR_DIR ((uint16_t)0x0010) /*!< Direction of transaction */
- #define USB_ISTR_ESOF ((uint16_t)0x0100) /*!< Expected Start Of Frame */
- #define USB_ISTR_SOF ((uint16_t)0x0200) /*!< Start Of Frame */
- #define USB_ISTR_RESET ((uint16_t)0x0400) /*!< USB RESET request */
- #define USB_ISTR_SUSP ((uint16_t)0x0800) /*!< Suspend mode request */
- #define USB_ISTR_WKUP ((uint16_t)0x1000) /*!< Wake up */
- #define USB_ISTR_ERR ((uint16_t)0x2000) /*!< Error */
- #define USB_ISTR_PMAOVR ((uint16_t)0x4000) /*!< Packet Memory Area Over / Underrun */
- #define USB_ISTR_CTR ((uint16_t)0x8000) /*!< Correct Transfer */
- /******************* Bit definition for USB_FNR register ********************/
- #define USB_FNR_FN ((uint16_t)0x07FF) /*!< Frame Number */
- #define USB_FNR_LSOF ((uint16_t)0x1800) /*!< Lost SOF */
- #define USB_FNR_LCK ((uint16_t)0x2000) /*!< Locked */
- #define USB_FNR_RXDM ((uint16_t)0x4000) /*!< Receive Data - Line Status */
- #define USB_FNR_RXDP ((uint16_t)0x8000) /*!< Receive Data + Line Status */
- /****************** Bit definition for USB_DADDR register *******************/
- #define USB_DADDR_ADD ((uint8_t)0x7F) /*!< ADD[6:0] bits (Device Address) */
- #define USB_DADDR_ADD0 ((uint8_t)0x01) /*!< Bit 0 */
- #define USB_DADDR_ADD1 ((uint8_t)0x02) /*!< Bit 1 */
- #define USB_DADDR_ADD2 ((uint8_t)0x04) /*!< Bit 2 */
- #define USB_DADDR_ADD3 ((uint8_t)0x08) /*!< Bit 3 */
- #define USB_DADDR_ADD4 ((uint8_t)0x10) /*!< Bit 4 */
- #define USB_DADDR_ADD5 ((uint8_t)0x20) /*!< Bit 5 */
- #define USB_DADDR_ADD6 ((uint8_t)0x40) /*!< Bit 6 */
- #define USB_DADDR_EF ((uint8_t)0x80) /*!< Enable Function */
- /****************** Bit definition for USB_BTABLE register ******************/
- #define USB_BTABLE_BTABLE ((uint16_t)0xFFF8) /*!< Buffer Table */
- /*!< Buffer descriptor table */
- /***************** Bit definition for USB_ADDR0_TX register *****************/
- #define USB_ADDR0_TX_ADDR0_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 0 */
- /***************** Bit definition for USB_ADDR1_TX register *****************/
- #define USB_ADDR1_TX_ADDR1_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 1 */
- /***************** Bit definition for USB_ADDR2_TX register *****************/
- #define USB_ADDR2_TX_ADDR2_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 2 */
- /***************** Bit definition for USB_ADDR3_TX register *****************/
- #define USB_ADDR3_TX_ADDR3_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 3 */
- /***************** Bit definition for USB_ADDR4_TX register *****************/
- #define USB_ADDR4_TX_ADDR4_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 4 */
- /***************** Bit definition for USB_ADDR5_TX register *****************/
- #define USB_ADDR5_TX_ADDR5_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 5 */
- /***************** Bit definition for USB_ADDR6_TX register *****************/
- #define USB_ADDR6_TX_ADDR6_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 6 */
- /***************** Bit definition for USB_ADDR7_TX register *****************/
- #define USB_ADDR7_TX_ADDR7_TX ((uint16_t)0xFFFE) /*!< Transmission Buffer Address 7 */
- /*----------------------------------------------------------------------------*/
- /***************** Bit definition for USB_COUNT0_TX register ****************/
- #define USB_COUNT0_TX_COUNT0_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 0 */
- /***************** Bit definition for USB_COUNT1_TX register ****************/
- #define USB_COUNT1_TX_COUNT1_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 1 */
- /***************** Bit definition for USB_COUNT2_TX register ****************/
- #define USB_COUNT2_TX_COUNT2_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 2 */
- /***************** Bit definition for USB_COUNT3_TX register ****************/
- #define USB_COUNT3_TX_COUNT3_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 3 */
- /***************** Bit definition for USB_COUNT4_TX register ****************/
- #define USB_COUNT4_TX_COUNT4_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 4 */
- /***************** Bit definition for USB_COUNT5_TX register ****************/
- #define USB_COUNT5_TX_COUNT5_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 5 */
- /***************** Bit definition for USB_COUNT6_TX register ****************/
- #define USB_COUNT6_TX_COUNT6_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 6 */
- /***************** Bit definition for USB_COUNT7_TX register ****************/
- #define USB_COUNT7_TX_COUNT7_TX ((uint16_t)0x03FF) /*!< Transmission Byte Count 7 */
- /*----------------------------------------------------------------------------*/
- /**************** Bit definition for USB_COUNT0_TX_0 register ***************/
- #define USB_COUNT0_TX_0_COUNT0_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 0 (low) */
- /**************** Bit definition for USB_COUNT0_TX_1 register ***************/
- #define USB_COUNT0_TX_1_COUNT0_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 0 (high) */
- /**************** Bit definition for USB_COUNT1_TX_0 register ***************/
- #define USB_COUNT1_TX_0_COUNT1_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 1 (low) */
- /**************** Bit definition for USB_COUNT1_TX_1 register ***************/
- #define USB_COUNT1_TX_1_COUNT1_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 1 (high) */
- /**************** Bit definition for USB_COUNT2_TX_0 register ***************/
- #define USB_COUNT2_TX_0_COUNT2_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 2 (low) */
- /**************** Bit definition for USB_COUNT2_TX_1 register ***************/
- #define USB_COUNT2_TX_1_COUNT2_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 2 (high) */
- /**************** Bit definition for USB_COUNT3_TX_0 register ***************/
- #define USB_COUNT3_TX_0_COUNT3_TX_0 ((uint16_t)0x000003FF) /*!< Transmission Byte Count 3 (low) */
- /**************** Bit definition for USB_COUNT3_TX_1 register ***************/
- #define USB_COUNT3_TX_1_COUNT3_TX_1 ((uint16_t)0x03FF0000) /*!< Transmission Byte Count 3 (high) */
- /**************** Bit definition for USB_COUNT4_TX_0 register ***************/
- #define USB_COUNT4_TX_0_COUNT4_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 4 (low) */
- /**************** Bit definition for USB_COUNT4_TX_1 register ***************/
- #define USB_COUNT4_TX_1_COUNT4_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 4 (high) */
- /**************** Bit definition for USB_COUNT5_TX_0 register ***************/
- #define USB_COUNT5_TX_0_COUNT5_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 5 (low) */
- /**************** Bit definition for USB_COUNT5_TX_1 register ***************/
- #define USB_COUNT5_TX_1_COUNT5_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 5 (high) */
- /**************** Bit definition for USB_COUNT6_TX_0 register ***************/
- #define USB_COUNT6_TX_0_COUNT6_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 6 (low) */
- /**************** Bit definition for USB_COUNT6_TX_1 register ***************/
- #define USB_COUNT6_TX_1_COUNT6_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 6 (high) */
- /**************** Bit definition for USB_COUNT7_TX_0 register ***************/
- #define USB_COUNT7_TX_0_COUNT7_TX_0 ((uint32_t)0x000003FF) /*!< Transmission Byte Count 7 (low) */
- /**************** Bit definition for USB_COUNT7_TX_1 register ***************/
- #define USB_COUNT7_TX_1_COUNT7_TX_1 ((uint32_t)0x03FF0000) /*!< Transmission Byte Count 7 (high) */
- /*----------------------------------------------------------------------------*/
- /***************** Bit definition for USB_ADDR0_RX register *****************/
- #define USB_ADDR0_RX_ADDR0_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 0 */
- /***************** Bit definition for USB_ADDR1_RX register *****************/
- #define USB_ADDR1_RX_ADDR1_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 1 */
- /***************** Bit definition for USB_ADDR2_RX register *****************/
- #define USB_ADDR2_RX_ADDR2_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 2 */
- /***************** Bit definition for USB_ADDR3_RX register *****************/
- #define USB_ADDR3_RX_ADDR3_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 3 */
- /***************** Bit definition for USB_ADDR4_RX register *****************/
- #define USB_ADDR4_RX_ADDR4_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 4 */
- /***************** Bit definition for USB_ADDR5_RX register *****************/
- #define USB_ADDR5_RX_ADDR5_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 5 */
- /***************** Bit definition for USB_ADDR6_RX register *****************/
- #define USB_ADDR6_RX_ADDR6_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 6 */
- /***************** Bit definition for USB_ADDR7_RX register *****************/
- #define USB_ADDR7_RX_ADDR7_RX ((uint16_t)0xFFFE) /*!< Reception Buffer Address 7 */
- /*----------------------------------------------------------------------------*/
- /***************** Bit definition for USB_COUNT0_RX register ****************/
- #define USB_COUNT0_RX_COUNT0_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT0_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT0_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT0_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT0_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT0_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT0_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT0_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT1_RX register ****************/
- #define USB_COUNT1_RX_COUNT1_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT1_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT1_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT1_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT1_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT1_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT1_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT1_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT2_RX register ****************/
- #define USB_COUNT2_RX_COUNT2_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT2_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT2_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT2_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT2_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT2_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT2_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT2_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT3_RX register ****************/
- #define USB_COUNT3_RX_COUNT3_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT3_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT3_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT3_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT3_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT3_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT3_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT3_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT4_RX register ****************/
- #define USB_COUNT4_RX_COUNT4_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT4_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT4_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT4_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT4_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT4_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT4_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT4_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT5_RX register ****************/
- #define USB_COUNT5_RX_COUNT5_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT5_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT5_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT5_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT5_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT5_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT5_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT5_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT6_RX register ****************/
- #define USB_COUNT6_RX_COUNT6_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT6_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT6_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT6_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT6_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT6_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT6_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT6_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /***************** Bit definition for USB_COUNT7_RX register ****************/
- #define USB_COUNT7_RX_COUNT7_RX ((uint16_t)0x03FF) /*!< Reception Byte Count */
- #define USB_COUNT7_RX_NUM_BLOCK ((uint16_t)0x7C00) /*!< NUM_BLOCK[4:0] bits (Number of blocks) */
- #define USB_COUNT7_RX_NUM_BLOCK_0 ((uint16_t)0x0400) /*!< Bit 0 */
- #define USB_COUNT7_RX_NUM_BLOCK_1 ((uint16_t)0x0800) /*!< Bit 1 */
- #define USB_COUNT7_RX_NUM_BLOCK_2 ((uint16_t)0x1000) /*!< Bit 2 */
- #define USB_COUNT7_RX_NUM_BLOCK_3 ((uint16_t)0x2000) /*!< Bit 3 */
- #define USB_COUNT7_RX_NUM_BLOCK_4 ((uint16_t)0x4000) /*!< Bit 4 */
- #define USB_COUNT7_RX_BLSIZE ((uint16_t)0x8000) /*!< BLock SIZE */
- /*----------------------------------------------------------------------------*/
- /**************** Bit definition for USB_COUNT0_RX_0 register ***************/
- #define USB_COUNT0_RX_0_COUNT0_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT0_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT0_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT0_RX_1 register ***************/
- #define USB_COUNT0_RX_1_COUNT0_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 1 */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT0_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT0_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /**************** Bit definition for USB_COUNT1_RX_0 register ***************/
- #define USB_COUNT1_RX_0_COUNT1_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT1_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT1_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT1_RX_1 register ***************/
- #define USB_COUNT1_RX_1_COUNT1_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT1_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT1_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /**************** Bit definition for USB_COUNT2_RX_0 register ***************/
- #define USB_COUNT2_RX_0_COUNT2_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT2_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT2_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT2_RX_1 register ***************/
- #define USB_COUNT2_RX_1_COUNT2_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT2_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT2_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /**************** Bit definition for USB_COUNT3_RX_0 register ***************/
- #define USB_COUNT3_RX_0_COUNT3_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT3_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT3_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT3_RX_1 register ***************/
- #define USB_COUNT3_RX_1_COUNT3_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT3_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT3_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /**************** Bit definition for USB_COUNT4_RX_0 register ***************/
- #define USB_COUNT4_RX_0_COUNT4_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT4_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT4_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT4_RX_1 register ***************/
- #define USB_COUNT4_RX_1_COUNT4_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT4_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT4_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /**************** Bit definition for USB_COUNT5_RX_0 register ***************/
- #define USB_COUNT5_RX_0_COUNT5_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT5_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT5_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT5_RX_1 register ***************/
- #define USB_COUNT5_RX_1_COUNT5_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT5_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT5_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /*************** Bit definition for USB_COUNT6_RX_0 register ***************/
- #define USB_COUNT6_RX_0_COUNT6_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT6_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT6_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /**************** Bit definition for USB_COUNT6_RX_1 register ***************/
- #define USB_COUNT6_RX_1_COUNT6_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT6_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT6_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /*************** Bit definition for USB_COUNT7_RX_0 register ****************/
- #define USB_COUNT7_RX_0_COUNT7_RX_0 ((uint32_t)0x000003FF) /*!< Reception Byte Count (low) */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0 ((uint32_t)0x00007C00) /*!< NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0_0 ((uint32_t)0x00000400) /*!< Bit 0 */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0_1 ((uint32_t)0x00000800) /*!< Bit 1 */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0_2 ((uint32_t)0x00001000) /*!< Bit 2 */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0_3 ((uint32_t)0x00002000) /*!< Bit 3 */
- #define USB_COUNT7_RX_0_NUM_BLOCK_0_4 ((uint32_t)0x00004000) /*!< Bit 4 */
- #define USB_COUNT7_RX_0_BLSIZE_0 ((uint32_t)0x00008000) /*!< BLock SIZE (low) */
- /*************** Bit definition for USB_COUNT7_RX_1 register ****************/
- #define USB_COUNT7_RX_1_COUNT7_RX_1 ((uint32_t)0x03FF0000) /*!< Reception Byte Count (high) */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1 ((uint32_t)0x7C000000) /*!< NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1_0 ((uint32_t)0x04000000) /*!< Bit 0 */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1_1 ((uint32_t)0x08000000) /*!< Bit 1 */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1_2 ((uint32_t)0x10000000) /*!< Bit 2 */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1_3 ((uint32_t)0x20000000) /*!< Bit 3 */
- #define USB_COUNT7_RX_1_NUM_BLOCK_1_4 ((uint32_t)0x40000000) /*!< Bit 4 */
- #define USB_COUNT7_RX_1_BLSIZE_1 ((uint32_t)0x80000000) /*!< BLock SIZE (high) */
- /******************************************************************************/
- /* */
- /* Controller Area Network */
- /* */
- /******************************************************************************/
- /*!< CAN control and status registers */
- /******************* Bit definition for CAN_MCR register ********************/
- #define CAN_MCR_INRQ ((uint16_t)0x0001) /*!< Initialization Request */
- #define CAN_MCR_SLEEP ((uint16_t)0x0002) /*!< Sleep Mode Request */
- #define CAN_MCR_TXFP ((uint16_t)0x0004) /*!< Transmit FIFO Priority */
- #define CAN_MCR_RFLM ((uint16_t)0x0008) /*!< Receive FIFO Locked Mode */
- #define CAN_MCR_NART ((uint16_t)0x0010) /*!< No Automatic Retransmission */
- #define CAN_MCR_AWUM ((uint16_t)0x0020) /*!< Automatic Wakeup Mode */
- #define CAN_MCR_ABOM ((uint16_t)0x0040) /*!< Automatic Bus-Off Management */
- #define CAN_MCR_TTCM ((uint16_t)0x0080) /*!< Time Triggered Communication Mode */
- #define CAN_MCR_RESET ((uint16_t)0x8000) /*!< CAN software master reset */
- /******************* Bit definition for CAN_MSR register ********************/
- #define CAN_MSR_INAK ((uint16_t)0x0001) /*!< Initialization Acknowledge */
- #define CAN_MSR_SLAK ((uint16_t)0x0002) /*!< Sleep Acknowledge */
- #define CAN_MSR_ERRI ((uint16_t)0x0004) /*!< Error Interrupt */
- #define CAN_MSR_WKUI ((uint16_t)0x0008) /*!< Wakeup Interrupt */
- #define CAN_MSR_SLAKI ((uint16_t)0x0010) /*!< Sleep Acknowledge Interrupt */
- #define CAN_MSR_TXM ((uint16_t)0x0100) /*!< Transmit Mode */
- #define CAN_MSR_RXM ((uint16_t)0x0200) /*!< Receive Mode */
- #define CAN_MSR_SAMP ((uint16_t)0x0400) /*!< Last Sample Point */
- #define CAN_MSR_RX ((uint16_t)0x0800) /*!< CAN Rx Signal */
- /******************* Bit definition for CAN_TSR register ********************/
- #define CAN_TSR_RQCP0 ((uint32_t)0x00000001) /*!< Request Completed Mailbox0 */
- #define CAN_TSR_TXOK0 ((uint32_t)0x00000002) /*!< Transmission OK of Mailbox0 */
- #define CAN_TSR_ALST0 ((uint32_t)0x00000004) /*!< Arbitration Lost for Mailbox0 */
- #define CAN_TSR_TERR0 ((uint32_t)0x00000008) /*!< Transmission Error of Mailbox0 */
- #define CAN_TSR_ABRQ0 ((uint32_t)0x00000080) /*!< Abort Request for Mailbox0 */
- #define CAN_TSR_RQCP1 ((uint32_t)0x00000100) /*!< Request Completed Mailbox1 */
- #define CAN_TSR_TXOK1 ((uint32_t)0x00000200) /*!< Transmission OK of Mailbox1 */
- #define CAN_TSR_ALST1 ((uint32_t)0x00000400) /*!< Arbitration Lost for Mailbox1 */
- #define CAN_TSR_TERR1 ((uint32_t)0x00000800) /*!< Transmission Error of Mailbox1 */
- #define CAN_TSR_ABRQ1 ((uint32_t)0x00008000) /*!< Abort Request for Mailbox 1 */
- #define CAN_TSR_RQCP2 ((uint32_t)0x00010000) /*!< Request Completed Mailbox2 */
- #define CAN_TSR_TXOK2 ((uint32_t)0x00020000) /*!< Transmission OK of Mailbox 2 */
- #define CAN_TSR_ALST2 ((uint32_t)0x00040000) /*!< Arbitration Lost for mailbox 2 */
- #define CAN_TSR_TERR2 ((uint32_t)0x00080000) /*!< Transmission Error of Mailbox 2 */
- #define CAN_TSR_ABRQ2 ((uint32_t)0x00800000) /*!< Abort Request for Mailbox 2 */
- #define CAN_TSR_CODE ((uint32_t)0x03000000) /*!< Mailbox Code */
- #define CAN_TSR_TME ((uint32_t)0x1C000000) /*!< TME[2:0] bits */
- #define CAN_TSR_TME0 ((uint32_t)0x04000000) /*!< Transmit Mailbox 0 Empty */
- #define CAN_TSR_TME1 ((uint32_t)0x08000000) /*!< Transmit Mailbox 1 Empty */
- #define CAN_TSR_TME2 ((uint32_t)0x10000000) /*!< Transmit Mailbox 2 Empty */
- #define CAN_TSR_LOW ((uint32_t)0xE0000000) /*!< LOW[2:0] bits */
- #define CAN_TSR_LOW0 ((uint32_t)0x20000000) /*!< Lowest Priority Flag for Mailbox 0 */
- #define CAN_TSR_LOW1 ((uint32_t)0x40000000) /*!< Lowest Priority Flag for Mailbox 1 */
- #define CAN_TSR_LOW2 ((uint32_t)0x80000000) /*!< Lowest Priority Flag for Mailbox 2 */
- /******************* Bit definition for CAN_RF0R register *******************/
- #define CAN_RF0R_FMP0 ((uint8_t)0x03) /*!< FIFO 0 Message Pending */
- #define CAN_RF0R_FULL0 ((uint8_t)0x08) /*!< FIFO 0 Full */
- #define CAN_RF0R_FOVR0 ((uint8_t)0x10) /*!< FIFO 0 Overrun */
- #define CAN_RF0R_RFOM0 ((uint8_t)0x20) /*!< Release FIFO 0 Output Mailbox */
- /******************* Bit definition for CAN_RF1R register *******************/
- #define CAN_RF1R_FMP1 ((uint8_t)0x03) /*!< FIFO 1 Message Pending */
- #define CAN_RF1R_FULL1 ((uint8_t)0x08) /*!< FIFO 1 Full */
- #define CAN_RF1R_FOVR1 ((uint8_t)0x10) /*!< FIFO 1 Overrun */
- #define CAN_RF1R_RFOM1 ((uint8_t)0x20) /*!< Release FIFO 1 Output Mailbox */
- /******************** Bit definition for CAN_IER register *******************/
- #define CAN_IER_TMEIE ((uint32_t)0x00000001) /*!< Transmit Mailbox Empty Interrupt Enable */
- #define CAN_IER_FMPIE0 ((uint32_t)0x00000002) /*!< FIFO Message Pending Interrupt Enable */
- #define CAN_IER_FFIE0 ((uint32_t)0x00000004) /*!< FIFO Full Interrupt Enable */
- #define CAN_IER_FOVIE0 ((uint32_t)0x00000008) /*!< FIFO Overrun Interrupt Enable */
- #define CAN_IER_FMPIE1 ((uint32_t)0x00000010) /*!< FIFO Message Pending Interrupt Enable */
- #define CAN_IER_FFIE1 ((uint32_t)0x00000020) /*!< FIFO Full Interrupt Enable */
- #define CAN_IER_FOVIE1 ((uint32_t)0x00000040) /*!< FIFO Overrun Interrupt Enable */
- #define CAN_IER_EWGIE ((uint32_t)0x00000100) /*!< Error Warning Interrupt Enable */
- #define CAN_IER_EPVIE ((uint32_t)0x00000200) /*!< Error Passive Interrupt Enable */
- #define CAN_IER_BOFIE ((uint32_t)0x00000400) /*!< Bus-Off Interrupt Enable */
- #define CAN_IER_LECIE ((uint32_t)0x00000800) /*!< Last Error Code Interrupt Enable */
- #define CAN_IER_ERRIE ((uint32_t)0x00008000) /*!< Error Interrupt Enable */
- #define CAN_IER_WKUIE ((uint32_t)0x00010000) /*!< Wakeup Interrupt Enable */
- #define CAN_IER_SLKIE ((uint32_t)0x00020000) /*!< Sleep Interrupt Enable */
- /******************** Bit definition for CAN_ESR register *******************/
- #define CAN_ESR_EWGF ((uint32_t)0x00000001) /*!< Error Warning Flag */
- #define CAN_ESR_EPVF ((uint32_t)0x00000002) /*!< Error Passive Flag */
- #define CAN_ESR_BOFF ((uint32_t)0x00000004) /*!< Bus-Off Flag */
- #define CAN_ESR_LEC ((uint32_t)0x00000070) /*!< LEC[2:0] bits (Last Error Code) */
- #define CAN_ESR_LEC_0 ((uint32_t)0x00000010) /*!< Bit 0 */
- #define CAN_ESR_LEC_1 ((uint32_t)0x00000020) /*!< Bit 1 */
- #define CAN_ESR_LEC_2 ((uint32_t)0x00000040) /*!< Bit 2 */
- #define CAN_ESR_TEC ((uint32_t)0x00FF0000) /*!< Least significant byte of the 9-bit Transmit Error Counter */
- #define CAN_ESR_REC ((uint32_t)0xFF000000) /*!< Receive Error Counter */
- /******************* Bit definition for CAN_BTR register ********************/
- #define CAN_BTR_BRP ((uint32_t)0x000003FF) /*!< Baud Rate Prescaler */
- #define CAN_BTR_TS1 ((uint32_t)0x000F0000) /*!< Time Segment 1 */
- #define CAN_BTR_TS2 ((uint32_t)0x00700000) /*!< Time Segment 2 */
- #define CAN_BTR_SJW ((uint32_t)0x03000000) /*!< Resynchronization Jump Width */
- #define CAN_BTR_LBKM ((uint32_t)0x40000000) /*!< Loop Back Mode (Debug) */
- #define CAN_BTR_SILM ((uint32_t)0x80000000) /*!< Silent Mode */
- /*!< Mailbox registers */
- /****************** Bit definition for CAN_TI0R register ********************/
- #define CAN_TI0R_TXRQ ((uint32_t)0x00000001) /*!< Transmit Mailbox Request */
- #define CAN_TI0R_RTR ((uint32_t)0x00000002) /*!< Remote Transmission Request */
- #define CAN_TI0R_IDE ((uint32_t)0x00000004) /*!< Identifier Extension */
- #define CAN_TI0R_EXID ((uint32_t)0x001FFFF8) /*!< Extended Identifier */
- #define CAN_TI0R_STID ((uint32_t)0xFFE00000) /*!< Standard Identifier or Extended Identifier */
- /****************** Bit definition for CAN_TDT0R register *******************/
- #define CAN_TDT0R_DLC ((uint32_t)0x0000000F) /*!< Data Length Code */
- #define CAN_TDT0R_TGT ((uint32_t)0x00000100) /*!< Transmit Global Time */
- #define CAN_TDT0R_TIME ((uint32_t)0xFFFF0000) /*!< Message Time Stamp */
- /****************** Bit definition for CAN_TDL0R register *******************/
- #define CAN_TDL0R_DATA0 ((uint32_t)0x000000FF) /*!< Data byte 0 */
- #define CAN_TDL0R_DATA1 ((uint32_t)0x0000FF00) /*!< Data byte 1 */
- #define CAN_TDL0R_DATA2 ((uint32_t)0x00FF0000) /*!< Data byte 2 */
- #define CAN_TDL0R_DATA3 ((uint32_t)0xFF000000) /*!< Data byte 3 */
- /****************** Bit definition for CAN_TDH0R register *******************/
- #define CAN_TDH0R_DATA4 ((uint32_t)0x000000FF) /*!< Data byte 4 */
- #define CAN_TDH0R_DATA5 ((uint32_t)0x0000FF00) /*!< Data byte 5 */
- #define CAN_TDH0R_DATA6 ((uint32_t)0x00FF0000) /*!< Data byte 6 */
- #define CAN_TDH0R_DATA7 ((uint32_t)0xFF000000) /*!< Data byte 7 */
- /******************* Bit definition for CAN_TI1R register *******************/
- #define CAN_TI1R_TXRQ ((uint32_t)0x00000001) /*!< Transmit Mailbox Request */
- #define CAN_TI1R_RTR ((uint32_t)0x00000002) /*!< Remote Transmission Request */
- #define CAN_TI1R_IDE ((uint32_t)0x00000004) /*!< Identifier Extension */
- #define CAN_TI1R_EXID ((uint32_t)0x001FFFF8) /*!< Extended Identifier */
- #define CAN_TI1R_STID ((uint32_t)0xFFE00000) /*!< Standard Identifier or Extended Identifier */
- /******************* Bit definition for CAN_TDT1R register ******************/
- #define CAN_TDT1R_DLC ((uint32_t)0x0000000F) /*!< Data Length Code */
- #define CAN_TDT1R_TGT ((uint32_t)0x00000100) /*!< Transmit Global Time */
- #define CAN_TDT1R_TIME ((uint32_t)0xFFFF0000) /*!< Message Time Stamp */
- /******************* Bit definition for CAN_TDL1R register ******************/
- #define CAN_TDL1R_DATA0 ((uint32_t)0x000000FF) /*!< Data byte 0 */
- #define CAN_TDL1R_DATA1 ((uint32_t)0x0000FF00) /*!< Data byte 1 */
- #define CAN_TDL1R_DATA2 ((uint32_t)0x00FF0000) /*!< Data byte 2 */
- #define CAN_TDL1R_DATA3 ((uint32_t)0xFF000000) /*!< Data byte 3 */
- /******************* Bit definition for CAN_TDH1R register ******************/
- #define CAN_TDH1R_DATA4 ((uint32_t)0x000000FF) /*!< Data byte 4 */
- #define CAN_TDH1R_DATA5 ((uint32_t)0x0000FF00) /*!< Data byte 5 */
- #define CAN_TDH1R_DATA6 ((uint32_t)0x00FF0000) /*!< Data byte 6 */
- #define CAN_TDH1R_DATA7 ((uint32_t)0xFF000000) /*!< Data byte 7 */
- /******************* Bit definition for CAN_TI2R register *******************/
- #define CAN_TI2R_TXRQ ((uint32_t)0x00000001) /*!< Transmit Mailbox Request */
- #define CAN_TI2R_RTR ((uint32_t)0x00000002) /*!< Remote Transmission Request */
- #define CAN_TI2R_IDE ((uint32_t)0x00000004) /*!< Identifier Extension */
- #define CAN_TI2R_EXID ((uint32_t)0x001FFFF8) /*!< Extended identifier */
- #define CAN_TI2R_STID ((uint32_t)0xFFE00000) /*!< Standard Identifier or Extended Identifier */
- /******************* Bit definition for CAN_TDT2R register ******************/
- #define CAN_TDT2R_DLC ((uint32_t)0x0000000F) /*!< Data Length Code */
- #define CAN_TDT2R_TGT ((uint32_t)0x00000100) /*!< Transmit Global Time */
- #define CAN_TDT2R_TIME ((uint32_t)0xFFFF0000) /*!< Message Time Stamp */
- /******************* Bit definition for CAN_TDL2R register ******************/
- #define CAN_TDL2R_DATA0 ((uint32_t)0x000000FF) /*!< Data byte 0 */
- #define CAN_TDL2R_DATA1 ((uint32_t)0x0000FF00) /*!< Data byte 1 */
- #define CAN_TDL2R_DATA2 ((uint32_t)0x00FF0000) /*!< Data byte 2 */
- #define CAN_TDL2R_DATA3 ((uint32_t)0xFF000000) /*!< Data byte 3 */
- /******************* Bit definition for CAN_TDH2R register ******************/
- #define CAN_TDH2R_DATA4 ((uint32_t)0x000000FF) /*!< Data byte 4 */
- #define CAN_TDH2R_DATA5 ((uint32_t)0x0000FF00) /*!< Data byte 5 */
- #define CAN_TDH2R_DATA6 ((uint32_t)0x00FF0000) /*!< Data byte 6 */
- #define CAN_TDH2R_DATA7 ((uint32_t)0xFF000000) /*!< Data byte 7 */
- /******************* Bit definition for CAN_RI0R register *******************/
- #define CAN_RI0R_RTR ((uint32_t)0x00000002) /*!< Remote Transmission Request */
- #define CAN_RI0R_IDE ((uint32_t)0x00000004) /*!< Identifier Extension */
- #define CAN_RI0R_EXID ((uint32_t)0x001FFFF8) /*!< Extended Identifier */
- #define CAN_RI0R_STID ((uint32_t)0xFFE00000) /*!< Standard Identifier or Extended Identifier */
- /******************* Bit definition for CAN_RDT0R register ******************/
- #define CAN_RDT0R_DLC ((uint32_t)0x0000000F) /*!< Data Length Code */
- #define CAN_RDT0R_FMI ((uint32_t)0x0000FF00) /*!< Filter Match Index */
- #define CAN_RDT0R_TIME ((uint32_t)0xFFFF0000) /*!< Message Time Stamp */
- /******************* Bit definition for CAN_RDL0R register ******************/
- #define CAN_RDL0R_DATA0 ((uint32_t)0x000000FF) /*!< Data byte 0 */
- #define CAN_RDL0R_DATA1 ((uint32_t)0x0000FF00) /*!< Data byte 1 */
- #define CAN_RDL0R_DATA2 ((uint32_t)0x00FF0000) /*!< Data byte 2 */
- #define CAN_RDL0R_DATA3 ((uint32_t)0xFF000000) /*!< Data byte 3 */
- /******************* Bit definition for CAN_RDH0R register ******************/
- #define CAN_RDH0R_DATA4 ((uint32_t)0x000000FF) /*!< Data byte 4 */
- #define CAN_RDH0R_DATA5 ((uint32_t)0x0000FF00) /*!< Data byte 5 */
- #define CAN_RDH0R_DATA6 ((uint32_t)0x00FF0000) /*!< Data byte 6 */
- #define CAN_RDH0R_DATA7 ((uint32_t)0xFF000000) /*!< Data byte 7 */
- /******************* Bit definition for CAN_RI1R register *******************/
- #define CAN_RI1R_RTR ((uint32_t)0x00000002) /*!< Remote Transmission Request */
- #define CAN_RI1R_IDE ((uint32_t)0x00000004) /*!< Identifier Extension */
- #define CAN_RI1R_EXID ((uint32_t)0x001FFFF8) /*!< Extended identifier */
- #define CAN_RI1R_STID ((uint32_t)0xFFE00000) /*!< Standard Identifier or Extended Identifier */
- /******************* Bit definition for CAN_RDT1R register ******************/
- #define CAN_RDT1R_DLC ((uint32_t)0x0000000F) /*!< Data Length Code */
- #define CAN_RDT1R_FMI ((uint32_t)0x0000FF00) /*!< Filter Match Index */
- #define CAN_RDT1R_TIME ((uint32_t)0xFFFF0000) /*!< Message Time Stamp */
- /******************* Bit definition for CAN_RDL1R register ******************/
- #define CAN_RDL1R_DATA0 ((uint32_t)0x000000FF) /*!< Data byte 0 */
- #define CAN_RDL1R_DATA1 ((uint32_t)0x0000FF00) /*!< Data byte 1 */
- #define CAN_RDL1R_DATA2 ((uint32_t)0x00FF0000) /*!< Data byte 2 */
- #define CAN_RDL1R_DATA3 ((uint32_t)0xFF000000) /*!< Data byte 3 */
- /******************* Bit definition for CAN_RDH1R register ******************/
- #define CAN_RDH1R_DATA4 ((uint32_t)0x000000FF) /*!< Data byte 4 */
- #define CAN_RDH1R_DATA5 ((uint32_t)0x0000FF00) /*!< Data byte 5 */
- #define CAN_RDH1R_DATA6 ((uint32_t)0x00FF0000) /*!< Data byte 6 */
- #define CAN_RDH1R_DATA7 ((uint32_t)0xFF000000) /*!< Data byte 7 */
- /*!< CAN filter registers */
- /******************* Bit definition for CAN_FMR register ********************/
- #define CAN_FMR_FINIT ((uint8_t)0x01) /*!< Filter Init Mode */
- /******************* Bit definition for CAN_FM1R register *******************/
- #define CAN_FM1R_FBM ((uint16_t)0x3FFF) /*!< Filter Mode */
- #define CAN_FM1R_FBM0 ((uint16_t)0x0001) /*!< Filter Init Mode bit 0 */
- #define CAN_FM1R_FBM1 ((uint16_t)0x0002) /*!< Filter Init Mode bit 1 */
- #define CAN_FM1R_FBM2 ((uint16_t)0x0004) /*!< Filter Init Mode bit 2 */
- #define CAN_FM1R_FBM3 ((uint16_t)0x0008) /*!< Filter Init Mode bit 3 */
- #define CAN_FM1R_FBM4 ((uint16_t)0x0010) /*!< Filter Init Mode bit 4 */
- #define CAN_FM1R_FBM5 ((uint16_t)0x0020) /*!< Filter Init Mode bit 5 */
- #define CAN_FM1R_FBM6 ((uint16_t)0x0040) /*!< Filter Init Mode bit 6 */
- #define CAN_FM1R_FBM7 ((uint16_t)0x0080) /*!< Filter Init Mode bit 7 */
- #define CAN_FM1R_FBM8 ((uint16_t)0x0100) /*!< Filter Init Mode bit 8 */
- #define CAN_FM1R_FBM9 ((uint16_t)0x0200) /*!< Filter Init Mode bit 9 */
- #define CAN_FM1R_FBM10 ((uint16_t)0x0400) /*!< Filter Init Mode bit 10 */
- #define CAN_FM1R_FBM11 ((uint16_t)0x0800) /*!< Filter Init Mode bit 11 */
- #define CAN_FM1R_FBM12 ((uint16_t)0x1000) /*!< Filter Init Mode bit 12 */
- #define CAN_FM1R_FBM13 ((uint16_t)0x2000) /*!< Filter Init Mode bit 13 */
- /******************* Bit definition for CAN_FS1R register *******************/
- #define CAN_FS1R_FSC ((uint16_t)0x3FFF) /*!< Filter Scale Configuration */
- #define CAN_FS1R_FSC0 ((uint16_t)0x0001) /*!< Filter Scale Configuration bit 0 */
- #define CAN_FS1R_FSC1 ((uint16_t)0x0002) /*!< Filter Scale Configuration bit 1 */
- #define CAN_FS1R_FSC2 ((uint16_t)0x0004) /*!< Filter Scale Configuration bit 2 */
- #define CAN_FS1R_FSC3 ((uint16_t)0x0008) /*!< Filter Scale Configuration bit 3 */
- #define CAN_FS1R_FSC4 ((uint16_t)0x0010) /*!< Filter Scale Configuration bit 4 */
- #define CAN_FS1R_FSC5 ((uint16_t)0x0020) /*!< Filter Scale Configuration bit 5 */
- #define CAN_FS1R_FSC6 ((uint16_t)0x0040) /*!< Filter Scale Configuration bit 6 */
- #define CAN_FS1R_FSC7 ((uint16_t)0x0080) /*!< Filter Scale Configuration bit 7 */
- #define CAN_FS1R_FSC8 ((uint16_t)0x0100) /*!< Filter Scale Configuration bit 8 */
- #define CAN_FS1R_FSC9 ((uint16_t)0x0200) /*!< Filter Scale Configuration bit 9 */
- #define CAN_FS1R_FSC10 ((uint16_t)0x0400) /*!< Filter Scale Configuration bit 10 */
- #define CAN_FS1R_FSC11 ((uint16_t)0x0800) /*!< Filter Scale Configuration bit 11 */
- #define CAN_FS1R_FSC12 ((uint16_t)0x1000) /*!< Filter Scale Configuration bit 12 */
- #define CAN_FS1R_FSC13 ((uint16_t)0x2000) /*!< Filter Scale Configuration bit 13 */
- /****************** Bit definition for CAN_FFA1R register *******************/
- #define CAN_FFA1R_FFA ((uint16_t)0x3FFF) /*!< Filter FIFO Assignment */
- #define CAN_FFA1R_FFA0 ((uint16_t)0x0001) /*!< Filter FIFO Assignment for Filter 0 */
- #define CAN_FFA1R_FFA1 ((uint16_t)0x0002) /*!< Filter FIFO Assignment for Filter 1 */
- #define CAN_FFA1R_FFA2 ((uint16_t)0x0004) /*!< Filter FIFO Assignment for Filter 2 */
- #define CAN_FFA1R_FFA3 ((uint16_t)0x0008) /*!< Filter FIFO Assignment for Filter 3 */
- #define CAN_FFA1R_FFA4 ((uint16_t)0x0010) /*!< Filter FIFO Assignment for Filter 4 */
- #define CAN_FFA1R_FFA5 ((uint16_t)0x0020) /*!< Filter FIFO Assignment for Filter 5 */
- #define CAN_FFA1R_FFA6 ((uint16_t)0x0040) /*!< Filter FIFO Assignment for Filter 6 */
- #define CAN_FFA1R_FFA7 ((uint16_t)0x0080) /*!< Filter FIFO Assignment for Filter 7 */
- #define CAN_FFA1R_FFA8 ((uint16_t)0x0100) /*!< Filter FIFO Assignment for Filter 8 */
- #define CAN_FFA1R_FFA9 ((uint16_t)0x0200) /*!< Filter FIFO Assignment for Filter 9 */
- #define CAN_FFA1R_FFA10 ((uint16_t)0x0400) /*!< Filter FIFO Assignment for Filter 10 */
- #define CAN_FFA1R_FFA11 ((uint16_t)0x0800) /*!< Filter FIFO Assignment for Filter 11 */
- #define CAN_FFA1R_FFA12 ((uint16_t)0x1000) /*!< Filter FIFO Assignment for Filter 12 */
- #define CAN_FFA1R_FFA13 ((uint16_t)0x2000) /*!< Filter FIFO Assignment for Filter 13 */
- /******************* Bit definition for CAN_FA1R register *******************/
- #define CAN_FA1R_FACT ((uint16_t)0x3FFF) /*!< Filter Active */
- #define CAN_FA1R_FACT0 ((uint16_t)0x0001) /*!< Filter 0 Active */
- #define CAN_FA1R_FACT1 ((uint16_t)0x0002) /*!< Filter 1 Active */
- #define CAN_FA1R_FACT2 ((uint16_t)0x0004) /*!< Filter 2 Active */
- #define CAN_FA1R_FACT3 ((uint16_t)0x0008) /*!< Filter 3 Active */
- #define CAN_FA1R_FACT4 ((uint16_t)0x0010) /*!< Filter 4 Active */
- #define CAN_FA1R_FACT5 ((uint16_t)0x0020) /*!< Filter 5 Active */
- #define CAN_FA1R_FACT6 ((uint16_t)0x0040) /*!< Filter 6 Active */
- #define CAN_FA1R_FACT7 ((uint16_t)0x0080) /*!< Filter 7 Active */
- #define CAN_FA1R_FACT8 ((uint16_t)0x0100) /*!< Filter 8 Active */
- #define CAN_FA1R_FACT9 ((uint16_t)0x0200) /*!< Filter 9 Active */
- #define CAN_FA1R_FACT10 ((uint16_t)0x0400) /*!< Filter 10 Active */
- #define CAN_FA1R_FACT11 ((uint16_t)0x0800) /*!< Filter 11 Active */
- #define CAN_FA1R_FACT12 ((uint16_t)0x1000) /*!< Filter 12 Active */
- #define CAN_FA1R_FACT13 ((uint16_t)0x2000) /*!< Filter 13 Active */
- /******************* Bit definition for CAN_F0R1 register *******************/
- #define CAN_F0R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F0R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F0R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F0R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F0R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F0R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F0R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F0R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F0R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F0R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F0R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F0R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F0R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F0R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F0R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F0R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F0R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F0R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F0R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F0R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F0R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F0R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F0R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F0R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F0R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F0R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F0R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F0R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F0R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F0R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F0R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F0R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F1R1 register *******************/
- #define CAN_F1R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F1R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F1R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F1R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F1R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F1R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F1R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F1R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F1R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F1R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F1R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F1R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F1R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F1R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F1R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F1R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F1R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F1R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F1R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F1R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F1R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F1R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F1R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F1R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F1R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F1R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F1R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F1R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F1R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F1R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F1R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F1R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F2R1 register *******************/
- #define CAN_F2R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F2R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F2R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F2R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F2R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F2R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F2R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F2R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F2R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F2R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F2R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F2R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F2R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F2R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F2R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F2R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F2R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F2R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F2R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F2R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F2R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F2R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F2R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F2R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F2R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F2R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F2R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F2R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F2R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F2R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F2R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F2R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F3R1 register *******************/
- #define CAN_F3R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F3R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F3R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F3R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F3R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F3R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F3R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F3R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F3R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F3R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F3R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F3R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F3R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F3R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F3R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F3R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F3R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F3R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F3R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F3R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F3R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F3R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F3R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F3R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F3R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F3R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F3R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F3R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F3R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F3R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F3R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F3R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F4R1 register *******************/
- #define CAN_F4R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F4R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F4R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F4R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F4R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F4R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F4R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F4R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F4R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F4R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F4R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F4R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F4R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F4R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F4R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F4R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F4R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F4R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F4R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F4R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F4R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F4R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F4R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F4R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F4R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F4R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F4R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F4R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F4R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F4R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F4R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F4R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F5R1 register *******************/
- #define CAN_F5R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F5R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F5R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F5R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F5R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F5R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F5R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F5R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F5R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F5R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F5R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F5R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F5R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F5R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F5R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F5R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F5R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F5R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F5R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F5R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F5R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F5R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F5R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F5R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F5R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F5R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F5R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F5R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F5R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F5R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F5R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F5R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F6R1 register *******************/
- #define CAN_F6R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F6R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F6R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F6R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F6R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F6R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F6R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F6R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F6R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F6R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F6R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F6R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F6R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F6R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F6R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F6R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F6R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F6R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F6R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F6R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F6R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F6R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F6R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F6R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F6R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F6R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F6R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F6R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F6R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F6R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F6R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F6R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F7R1 register *******************/
- #define CAN_F7R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F7R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F7R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F7R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F7R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F7R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F7R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F7R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F7R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F7R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F7R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F7R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F7R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F7R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F7R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F7R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F7R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F7R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F7R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F7R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F7R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F7R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F7R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F7R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F7R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F7R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F7R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F7R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F7R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F7R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F7R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F7R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F8R1 register *******************/
- #define CAN_F8R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F8R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F8R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F8R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F8R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F8R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F8R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F8R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F8R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F8R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F8R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F8R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F8R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F8R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F8R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F8R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F8R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F8R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F8R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F8R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F8R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F8R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F8R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F8R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F8R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F8R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F8R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F8R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F8R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F8R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F8R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F8R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F9R1 register *******************/
- #define CAN_F9R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F9R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F9R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F9R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F9R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F9R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F9R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F9R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F9R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F9R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F9R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F9R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F9R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F9R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F9R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F9R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F9R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F9R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F9R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F9R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F9R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F9R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F9R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F9R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F9R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F9R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F9R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F9R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F9R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F9R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F9R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F9R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F10R1 register ******************/
- #define CAN_F10R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F10R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F10R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F10R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F10R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F10R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F10R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F10R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F10R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F10R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F10R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F10R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F10R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F10R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F10R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F10R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F10R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F10R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F10R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F10R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F10R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F10R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F10R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F10R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F10R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F10R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F10R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F10R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F10R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F10R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F10R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F10R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F11R1 register ******************/
- #define CAN_F11R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F11R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F11R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F11R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F11R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F11R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F11R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F11R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F11R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F11R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F11R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F11R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F11R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F11R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F11R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F11R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F11R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F11R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F11R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F11R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F11R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F11R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F11R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F11R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F11R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F11R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F11R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F11R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F11R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F11R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F11R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F11R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F12R1 register ******************/
- #define CAN_F12R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F12R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F12R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F12R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F12R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F12R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F12R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F12R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F12R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F12R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F12R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F12R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F12R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F12R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F12R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F12R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F12R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F12R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F12R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F12R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F12R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F12R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F12R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F12R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F12R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F12R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F12R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F12R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F12R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F12R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F12R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F12R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F13R1 register ******************/
- #define CAN_F13R1_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F13R1_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F13R1_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F13R1_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F13R1_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F13R1_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F13R1_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F13R1_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F13R1_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F13R1_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F13R1_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F13R1_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F13R1_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F13R1_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F13R1_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F13R1_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F13R1_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F13R1_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F13R1_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F13R1_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F13R1_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F13R1_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F13R1_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F13R1_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F13R1_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F13R1_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F13R1_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F13R1_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F13R1_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F13R1_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F13R1_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F13R1_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F0R2 register *******************/
- #define CAN_F0R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F0R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F0R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F0R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F0R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F0R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F0R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F0R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F0R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F0R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F0R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F0R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F0R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F0R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F0R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F0R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F0R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F0R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F0R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F0R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F0R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F0R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F0R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F0R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F0R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F0R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F0R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F0R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F0R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F0R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F0R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F0R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F1R2 register *******************/
- #define CAN_F1R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F1R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F1R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F1R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F1R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F1R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F1R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F1R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F1R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F1R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F1R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F1R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F1R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F1R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F1R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F1R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F1R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F1R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F1R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F1R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F1R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F1R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F1R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F1R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F1R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F1R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F1R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F1R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F1R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F1R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F1R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F1R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F2R2 register *******************/
- #define CAN_F2R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F2R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F2R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F2R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F2R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F2R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F2R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F2R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F2R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F2R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F2R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F2R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F2R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F2R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F2R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F2R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F2R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F2R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F2R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F2R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F2R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F2R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F2R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F2R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F2R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F2R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F2R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F2R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F2R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F2R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F2R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F2R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F3R2 register *******************/
- #define CAN_F3R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F3R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F3R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F3R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F3R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F3R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F3R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F3R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F3R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F3R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F3R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F3R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F3R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F3R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F3R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F3R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F3R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F3R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F3R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F3R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F3R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F3R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F3R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F3R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F3R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F3R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F3R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F3R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F3R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F3R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F3R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F3R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F4R2 register *******************/
- #define CAN_F4R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F4R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F4R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F4R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F4R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F4R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F4R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F4R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F4R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F4R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F4R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F4R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F4R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F4R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F4R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F4R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F4R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F4R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F4R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F4R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F4R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F4R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F4R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F4R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F4R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F4R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F4R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F4R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F4R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F4R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F4R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F4R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F5R2 register *******************/
- #define CAN_F5R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F5R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F5R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F5R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F5R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F5R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F5R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F5R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F5R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F5R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F5R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F5R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F5R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F5R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F5R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F5R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F5R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F5R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F5R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F5R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F5R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F5R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F5R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F5R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F5R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F5R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F5R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F5R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F5R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F5R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F5R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F5R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F6R2 register *******************/
- #define CAN_F6R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F6R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F6R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F6R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F6R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F6R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F6R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F6R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F6R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F6R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F6R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F6R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F6R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F6R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F6R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F6R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F6R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F6R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F6R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F6R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F6R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F6R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F6R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F6R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F6R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F6R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F6R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F6R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F6R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F6R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F6R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F6R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F7R2 register *******************/
- #define CAN_F7R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F7R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F7R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F7R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F7R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F7R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F7R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F7R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F7R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F7R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F7R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F7R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F7R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F7R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F7R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F7R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F7R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F7R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F7R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F7R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F7R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F7R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F7R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F7R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F7R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F7R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F7R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F7R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F7R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F7R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F7R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F7R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F8R2 register *******************/
- #define CAN_F8R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F8R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F8R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F8R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F8R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F8R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F8R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F8R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F8R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F8R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F8R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F8R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F8R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F8R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F8R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F8R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F8R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F8R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F8R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F8R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F8R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F8R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F8R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F8R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F8R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F8R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F8R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F8R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F8R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F8R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F8R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F8R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F9R2 register *******************/
- #define CAN_F9R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F9R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F9R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F9R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F9R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F9R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F9R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F9R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F9R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F9R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F9R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F9R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F9R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F9R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F9R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F9R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F9R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F9R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F9R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F9R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F9R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F9R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F9R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F9R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F9R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F9R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F9R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F9R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F9R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F9R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F9R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F9R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F10R2 register ******************/
- #define CAN_F10R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F10R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F10R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F10R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F10R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F10R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F10R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F10R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F10R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F10R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F10R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F10R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F10R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F10R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F10R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F10R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F10R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F10R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F10R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F10R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F10R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F10R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F10R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F10R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F10R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F10R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F10R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F10R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F10R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F10R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F10R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F10R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F11R2 register ******************/
- #define CAN_F11R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F11R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F11R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F11R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F11R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F11R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F11R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F11R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F11R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F11R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F11R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F11R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F11R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F11R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F11R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F11R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F11R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F11R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F11R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F11R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F11R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F11R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F11R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F11R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F11R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F11R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F11R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F11R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F11R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F11R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F11R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F11R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F12R2 register ******************/
- #define CAN_F12R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F12R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F12R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F12R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F12R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F12R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F12R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F12R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F12R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F12R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F12R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F12R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F12R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F12R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F12R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F12R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F12R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F12R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F12R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F12R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F12R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F12R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F12R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F12R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F12R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F12R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F12R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F12R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F12R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F12R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F12R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F12R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************* Bit definition for CAN_F13R2 register ******************/
- #define CAN_F13R2_FB0 ((uint32_t)0x00000001) /*!< Filter bit 0 */
- #define CAN_F13R2_FB1 ((uint32_t)0x00000002) /*!< Filter bit 1 */
- #define CAN_F13R2_FB2 ((uint32_t)0x00000004) /*!< Filter bit 2 */
- #define CAN_F13R2_FB3 ((uint32_t)0x00000008) /*!< Filter bit 3 */
- #define CAN_F13R2_FB4 ((uint32_t)0x00000010) /*!< Filter bit 4 */
- #define CAN_F13R2_FB5 ((uint32_t)0x00000020) /*!< Filter bit 5 */
- #define CAN_F13R2_FB6 ((uint32_t)0x00000040) /*!< Filter bit 6 */
- #define CAN_F13R2_FB7 ((uint32_t)0x00000080) /*!< Filter bit 7 */
- #define CAN_F13R2_FB8 ((uint32_t)0x00000100) /*!< Filter bit 8 */
- #define CAN_F13R2_FB9 ((uint32_t)0x00000200) /*!< Filter bit 9 */
- #define CAN_F13R2_FB10 ((uint32_t)0x00000400) /*!< Filter bit 10 */
- #define CAN_F13R2_FB11 ((uint32_t)0x00000800) /*!< Filter bit 11 */
- #define CAN_F13R2_FB12 ((uint32_t)0x00001000) /*!< Filter bit 12 */
- #define CAN_F13R2_FB13 ((uint32_t)0x00002000) /*!< Filter bit 13 */
- #define CAN_F13R2_FB14 ((uint32_t)0x00004000) /*!< Filter bit 14 */
- #define CAN_F13R2_FB15 ((uint32_t)0x00008000) /*!< Filter bit 15 */
- #define CAN_F13R2_FB16 ((uint32_t)0x00010000) /*!< Filter bit 16 */
- #define CAN_F13R2_FB17 ((uint32_t)0x00020000) /*!< Filter bit 17 */
- #define CAN_F13R2_FB18 ((uint32_t)0x00040000) /*!< Filter bit 18 */
- #define CAN_F13R2_FB19 ((uint32_t)0x00080000) /*!< Filter bit 19 */
- #define CAN_F13R2_FB20 ((uint32_t)0x00100000) /*!< Filter bit 20 */
- #define CAN_F13R2_FB21 ((uint32_t)0x00200000) /*!< Filter bit 21 */
- #define CAN_F13R2_FB22 ((uint32_t)0x00400000) /*!< Filter bit 22 */
- #define CAN_F13R2_FB23 ((uint32_t)0x00800000) /*!< Filter bit 23 */
- #define CAN_F13R2_FB24 ((uint32_t)0x01000000) /*!< Filter bit 24 */
- #define CAN_F13R2_FB25 ((uint32_t)0x02000000) /*!< Filter bit 25 */
- #define CAN_F13R2_FB26 ((uint32_t)0x04000000) /*!< Filter bit 26 */
- #define CAN_F13R2_FB27 ((uint32_t)0x08000000) /*!< Filter bit 27 */
- #define CAN_F13R2_FB28 ((uint32_t)0x10000000) /*!< Filter bit 28 */
- #define CAN_F13R2_FB29 ((uint32_t)0x20000000) /*!< Filter bit 29 */
- #define CAN_F13R2_FB30 ((uint32_t)0x40000000) /*!< Filter bit 30 */
- #define CAN_F13R2_FB31 ((uint32_t)0x80000000) /*!< Filter bit 31 */
- /******************************************************************************/
- /* */
- /* Serial Peripheral Interface */
- /* */
- /******************************************************************************/
- /******************* Bit definition for SPI_CR1 register ********************/
- #define SPI_CR1_CPHA ((uint16_t)0x0001) /*!< Clock Phase */
- #define SPI_CR1_CPOL ((uint16_t)0x0002) /*!< Clock Polarity */
- #define SPI_CR1_MSTR ((uint16_t)0x0004) /*!< Master Selection */
- #define SPI_CR1_BR ((uint16_t)0x0038) /*!< BR[2:0] bits (Baud Rate Control) */
- #define SPI_CR1_BR_0 ((uint16_t)0x0008) /*!< Bit 0 */
- #define SPI_CR1_BR_1 ((uint16_t)0x0010) /*!< Bit 1 */
- #define SPI_CR1_BR_2 ((uint16_t)0x0020) /*!< Bit 2 */
- #define SPI_CR1_SPE ((uint16_t)0x0040) /*!< SPI Enable */
- #define SPI_CR1_LSBFIRST ((uint16_t)0x0080) /*!< Frame Format */
- #define SPI_CR1_SSI ((uint16_t)0x0100) /*!< Internal slave select */
- #define SPI_CR1_SSM ((uint16_t)0x0200) /*!< Software slave management */
- #define SPI_CR1_RXONLY ((uint16_t)0x0400) /*!< Receive only */
- #define SPI_CR1_DFF ((uint16_t)0x0800) /*!< Data Frame Format */
- #define SPI_CR1_CRCNEXT ((uint16_t)0x1000) /*!< Transmit CRC next */
- #define SPI_CR1_CRCEN ((uint16_t)0x2000) /*!< Hardware CRC calculation enable */
- #define SPI_CR1_BIDIOE ((uint16_t)0x4000) /*!< Output enable in bidirectional mode */
- #define SPI_CR1_BIDIMODE ((uint16_t)0x8000) /*!< Bidirectional data mode enable */
- /******************* Bit definition for SPI_CR2 register ********************/
- #define SPI_CR2_RXDMAEN ((uint8_t)0x01) /*!< Rx Buffer DMA Enable */
- #define SPI_CR2_TXDMAEN ((uint8_t)0x02) /*!< Tx Buffer DMA Enable */
- #define SPI_CR2_SSOE ((uint8_t)0x04) /*!< SS Output Enable */
- #define SPI_CR2_ERRIE ((uint8_t)0x20) /*!< Error Interrupt Enable */
- #define SPI_CR2_RXNEIE ((uint8_t)0x40) /*!< RX buffer Not Empty Interrupt Enable */
- #define SPI_CR2_TXEIE ((uint8_t)0x80) /*!< Tx buffer Empty Interrupt Enable */
- /******************** Bit definition for SPI_SR register ********************/
- #define SPI_SR_RXNE ((uint8_t)0x01) /*!< Receive buffer Not Empty */
- #define SPI_SR_TXE ((uint8_t)0x02) /*!< Transmit buffer Empty */
- #define SPI_SR_CHSIDE ((uint8_t)0x04) /*!< Channel side */
- #define SPI_SR_UDR ((uint8_t)0x08) /*!< Underrun flag */
- #define SPI_SR_CRCERR ((uint8_t)0x10) /*!< CRC Error flag */
- #define SPI_SR_MODF ((uint8_t)0x20) /*!< Mode fault */
- #define SPI_SR_OVR ((uint8_t)0x40) /*!< Overrun flag */
- #define SPI_SR_BSY ((uint8_t)0x80) /*!< Busy flag */
- /******************** Bit definition for SPI_DR register ********************/
- #define SPI_DR_DR ((uint16_t)0xFFFF) /*!< Data Register */
- /******************* Bit definition for SPI_CRCPR register ******************/
- #define SPI_CRCPR_CRCPOLY ((uint16_t)0xFFFF) /*!< CRC polynomial register */
- /****************** Bit definition for SPI_RXCRCR register ******************/
- #define SPI_RXCRCR_RXCRC ((uint16_t)0xFFFF) /*!< Rx CRC Register */
- /****************** Bit definition for SPI_TXCRCR register ******************/
- #define SPI_TXCRCR_TXCRC ((uint16_t)0xFFFF) /*!< Tx CRC Register */
- /****************** Bit definition for SPI_I2SCFGR register *****************/
- #define SPI_I2SCFGR_CHLEN ((uint16_t)0x0001) /*!< Channel length (number of bits per audio channel) */
- #define SPI_I2SCFGR_DATLEN ((uint16_t)0x0006) /*!< DATLEN[1:0] bits (Data length to be transferred) */
- #define SPI_I2SCFGR_DATLEN_0 ((uint16_t)0x0002) /*!< Bit 0 */
- #define SPI_I2SCFGR_DATLEN_1 ((uint16_t)0x0004) /*!< Bit 1 */
- #define SPI_I2SCFGR_CKPOL ((uint16_t)0x0008) /*!< steady state clock polarity */
- #define SPI_I2SCFGR_I2SSTD ((uint16_t)0x0030) /*!< I2SSTD[1:0] bits (I2S standard selection) */
- #define SPI_I2SCFGR_I2SSTD_0 ((uint16_t)0x0010) /*!< Bit 0 */
- #define SPI_I2SCFGR_I2SSTD_1 ((uint16_t)0x0020) /*!< Bit 1 */
- #define SPI_I2SCFGR_PCMSYNC ((uint16_t)0x0080) /*!< PCM frame synchronization */
- #define SPI_I2SCFGR_I2SCFG ((uint16_t)0x0300) /*!< I2SCFG[1:0] bits (I2S configuration mode) */
- #define SPI_I2SCFGR_I2SCFG_0 ((uint16_t)0x0100) /*!< Bit 0 */
- #define SPI_I2SCFGR_I2SCFG_1 ((uint16_t)0x0200) /*!< Bit 1 */
- #define SPI_I2SCFGR_I2SE ((uint16_t)0x0400) /*!< I2S Enable */
- #define SPI_I2SCFGR_I2SMOD ((uint16_t)0x0800) /*!< I2S mode selection */
- /****************** Bit definition for SPI_I2SPR register *******************/
- #define SPI_I2SPR_I2SDIV ((uint16_t)0x00FF) /*!< I2S Linear prescaler */
- #define SPI_I2SPR_ODD ((uint16_t)0x0100) /*!< Odd factor for the prescaler */
- #define SPI_I2SPR_MCKOE ((uint16_t)0x0200) /*!< Master Clock Output Enable */
- /******************************************************************************/
- /* */
- /* Inter-integrated Circuit Interface */
- /* */
- /******************************************************************************/
- /******************* Bit definition for I2C_CR1 register ********************/
- #define I2C_CR1_PE ((uint16_t)0x0001) /*!< Peripheral Enable */
- #define I2C_CR1_SMBUS ((uint16_t)0x0002) /*!< SMBus Mode */
- #define I2C_CR1_SMBTYPE ((uint16_t)0x0008) /*!< SMBus Type */
- #define I2C_CR1_ENARP ((uint16_t)0x0010) /*!< ARP Enable */
- #define I2C_CR1_ENPEC ((uint16_t)0x0020) /*!< PEC Enable */
- #define I2C_CR1_ENGC ((uint16_t)0x0040) /*!< General Call Enable */
- #define I2C_CR1_NOSTRETCH ((uint16_t)0x0080) /*!< Clock Stretching Disable (Slave mode) */
- #define I2C_CR1_START ((uint16_t)0x0100) /*!< Start Generation */
- #define I2C_CR1_STOP ((uint16_t)0x0200) /*!< Stop Generation */
- #define I2C_CR1_ACK ((uint16_t)0x0400) /*!< Acknowledge Enable */
- #define I2C_CR1_POS ((uint16_t)0x0800) /*!< Acknowledge/PEC Position (for data reception) */
- #define I2C_CR1_PEC ((uint16_t)0x1000) /*!< Packet Error Checking */
- #define I2C_CR1_ALERT ((uint16_t)0x2000) /*!< SMBus Alert */
- #define I2C_CR1_SWRST ((uint16_t)0x8000) /*!< Software Reset */
- /******************* Bit definition for I2C_CR2 register ********************/
- #define I2C_CR2_FREQ ((uint16_t)0x003F) /*!< FREQ[5:0] bits (Peripheral Clock Frequency) */
- #define I2C_CR2_FREQ_0 ((uint16_t)0x0001) /*!< Bit 0 */
- #define I2C_CR2_FREQ_1 ((uint16_t)0x0002) /*!< Bit 1 */
- #define I2C_CR2_FREQ_2 ((uint16_t)0x0004) /*!< Bit 2 */
- #define I2C_CR2_FREQ_3 ((uint16_t)0x0008) /*!< Bit 3 */
- #define I2C_CR2_FREQ_4 ((uint16_t)0x0010) /*!< Bit 4 */
- #define I2C_CR2_FREQ_5 ((uint16_t)0x0020) /*!< Bit 5 */
- #define I2C_CR2_ITERREN ((uint16_t)0x0100) /*!< Error Interrupt Enable */
- #define I2C_CR2_ITEVTEN ((uint16_t)0x0200) /*!< Event Interrupt Enable */
- #define I2C_CR2_ITBUFEN ((uint16_t)0x0400) /*!< Buffer Interrupt Enable */
- #define I2C_CR2_DMAEN ((uint16_t)0x0800) /*!< DMA Requests Enable */
- #define I2C_CR2_LAST ((uint16_t)0x1000) /*!< DMA Last Transfer */
- /******************* Bit definition for I2C_OAR1 register *******************/
- #define I2C_OAR1_ADD1_7 ((uint16_t)0x00FE) /*!< Interface Address */
- #define I2C_OAR1_ADD8_9 ((uint16_t)0x0300) /*!< Interface Address */
- #define I2C_OAR1_ADD0 ((uint16_t)0x0001) /*!< Bit 0 */
- #define I2C_OAR1_ADD1 ((uint16_t)0x0002) /*!< Bit 1 */
- #define I2C_OAR1_ADD2 ((uint16_t)0x0004) /*!< Bit 2 */
- #define I2C_OAR1_ADD3 ((uint16_t)0x0008) /*!< Bit 3 */
- #define I2C_OAR1_ADD4 ((uint16_t)0x0010) /*!< Bit 4 */
- #define I2C_OAR1_ADD5 ((uint16_t)0x0020) /*!< Bit 5 */
- #define I2C_OAR1_ADD6 ((uint16_t)0x0040) /*!< Bit 6 */
- #define I2C_OAR1_ADD7 ((uint16_t)0x0080) /*!< Bit 7 */
- #define I2C_OAR1_ADD8 ((uint16_t)0x0100) /*!< Bit 8 */
- #define I2C_OAR1_ADD9 ((uint16_t)0x0200) /*!< Bit 9 */
- #define I2C_OAR1_ADDMODE ((uint16_t)0x8000) /*!< Addressing Mode (Slave mode) */
- /******************* Bit definition for I2C_OAR2 register *******************/
- #define I2C_OAR2_ENDUAL ((uint8_t)0x01) /*!< Dual addressing mode enable */
- #define I2C_OAR2_ADD2 ((uint8_t)0xFE) /*!< Interface address */
- /******************** Bit definition for I2C_DR register ********************/
- #define I2C_DR_DR ((uint8_t)0xFF) /*!< 8-bit Data Register */
- /******************* Bit definition for I2C_SR1 register ********************/
- #define I2C_SR1_SB ((uint16_t)0x0001) /*!< Start Bit (Master mode) */
- #define I2C_SR1_ADDR ((uint16_t)0x0002) /*!< Address sent (master mode)/matched (slave mode) */
- #define I2C_SR1_BTF ((uint16_t)0x0004) /*!< Byte Transfer Finished */
- #define I2C_SR1_ADD10 ((uint16_t)0x0008) /*!< 10-bit header sent (Master mode) */
- #define I2C_SR1_STOPF ((uint16_t)0x0010) /*!< Stop detection (Slave mode) */
- #define I2C_SR1_RXNE ((uint16_t)0x0040) /*!< Data Register not Empty (receivers) */
- #define I2C_SR1_TXE ((uint16_t)0x0080) /*!< Data Register Empty (transmitters) */
- #define I2C_SR1_BERR ((uint16_t)0x0100) /*!< Bus Error */
- #define I2C_SR1_ARLO ((uint16_t)0x0200) /*!< Arbitration Lost (master mode) */
- #define I2C_SR1_AF ((uint16_t)0x0400) /*!< Acknowledge Failure */
- #define I2C_SR1_OVR ((uint16_t)0x0800) /*!< Overrun/Underrun */
- #define I2C_SR1_PECERR ((uint16_t)0x1000) /*!< PEC Error in reception */
- #define I2C_SR1_TIMEOUT ((uint16_t)0x4000) /*!< Timeout or Tlow Error */
- #define I2C_SR1_SMBALERT ((uint16_t)0x8000) /*!< SMBus Alert */
- /******************* Bit definition for I2C_SR2 register ********************/
- #define I2C_SR2_MSL ((uint16_t)0x0001) /*!< Master/Slave */
- #define I2C_SR2_BUSY ((uint16_t)0x0002) /*!< Bus Busy */
- #define I2C_SR2_TRA ((uint16_t)0x0004) /*!< Transmitter/Receiver */
- #define I2C_SR2_GENCALL ((uint16_t)0x0010) /*!< General Call Address (Slave mode) */
- #define I2C_SR2_SMBDEFAULT ((uint16_t)0x0020) /*!< SMBus Device Default Address (Slave mode) */
- #define I2C_SR2_SMBHOST ((uint16_t)0x0040) /*!< SMBus Host Header (Slave mode) */
- #define I2C_SR2_DUALF ((uint16_t)0x0080) /*!< Dual Flag (Slave mode) */
- #define I2C_SR2_PEC ((uint16_t)0xFF00) /*!< Packet Error Checking Register */
- /******************* Bit definition for I2C_CCR register ********************/
- #define I2C_CCR_CCR ((uint16_t)0x0FFF) /*!< Clock Control Register in Fast/Standard mode (Master mode) */
- #define I2C_CCR_DUTY ((uint16_t)0x4000) /*!< Fast Mode Duty Cycle */
- #define I2C_CCR_FS ((uint16_t)0x8000) /*!< I2C Master Mode Selection */
- /****************** Bit definition for I2C_TRISE register *******************/
- #define I2C_TRISE_TRISE ((uint8_t)0x3F) /*!< Maximum Rise Time in Fast/Standard mode (Master mode) */
- /******************************************************************************/
- /* */
- /* Universal Synchronous Asynchronous Receiver Transmitter */
- /* */
- /******************************************************************************/
- /******************* Bit definition for USART_SR register *******************/
- #define USART_SR_PE ((uint16_t)0x0001) /*!< Parity Error */
- #define USART_SR_FE ((uint16_t)0x0002) /*!< Framing Error */
- #define USART_SR_NE ((uint16_t)0x0004) /*!< Noise Error Flag */
- #define USART_SR_ORE ((uint16_t)0x0008) /*!< OverRun Error */
- #define USART_SR_IDLE ((uint16_t)0x0010) /*!< IDLE line detected */
- #define USART_SR_RXNE ((uint16_t)0x0020) /*!< Read Data Register Not Empty */
- #define USART_SR_TC ((uint16_t)0x0040) /*!< Transmission Complete */
- #define USART_SR_TXE ((uint16_t)0x0080) /*!< Transmit Data Register Empty */
- #define USART_SR_LBD ((uint16_t)0x0100) /*!< LIN Break Detection Flag */
- #define USART_SR_CTS ((uint16_t)0x0200) /*!< CTS Flag */
- /******************* Bit definition for USART_DR register *******************/
- #define USART_DR_DR ((uint16_t)0x01FF) /*!< Data value */
- /****************** Bit definition for USART_BRR register *******************/
- #define USART_BRR_DIV_Fraction ((uint16_t)0x000F) /*!< Fraction of USARTDIV */
- #define USART_BRR_DIV_Mantissa ((uint16_t)0xFFF0) /*!< Mantissa of USARTDIV */
- /****************** Bit definition for USART_CR1 register *******************/
- #define USART_CR1_SBK ((uint16_t)0x0001) /*!< Send Break */
- #define USART_CR1_RWU ((uint16_t)0x0002) /*!< Receiver wakeup */
- #define USART_CR1_RE ((uint16_t)0x0004) /*!< Receiver Enable */
- #define USART_CR1_TE ((uint16_t)0x0008) /*!< Transmitter Enable */
- #define USART_CR1_IDLEIE ((uint16_t)0x0010) /*!< IDLE Interrupt Enable */
- #define USART_CR1_RXNEIE ((uint16_t)0x0020) /*!< RXNE Interrupt Enable */
- #define USART_CR1_TCIE ((uint16_t)0x0040) /*!< Transmission Complete Interrupt Enable */
- #define USART_CR1_TXEIE ((uint16_t)0x0080) /*!< PE Interrupt Enable */
- #define USART_CR1_PEIE ((uint16_t)0x0100) /*!< PE Interrupt Enable */
- #define USART_CR1_PS ((uint16_t)0x0200) /*!< Parity Selection */
- #define USART_CR1_PCE ((uint16_t)0x0400) /*!< Parity Control Enable */
- #define USART_CR1_WAKE ((uint16_t)0x0800) /*!< Wakeup method */
- #define USART_CR1_M ((uint16_t)0x1000) /*!< Word length */
- #define USART_CR1_UE ((uint16_t)0x2000) /*!< USART Enable */
- #define USART_CR1_OVER8 ((uint16_t)0x8000) /*!< USART Oversmapling 8-bits */
- /****************** Bit definition for USART_CR2 register *******************/
- #define USART_CR2_ADD ((uint16_t)0x000F) /*!< Address of the USART node */
- #define USART_CR2_LBDL ((uint16_t)0x0020) /*!< LIN Break Detection Length */
- #define USART_CR2_LBDIE ((uint16_t)0x0040) /*!< LIN Break Detection Interrupt Enable */
- #define USART_CR2_LBCL ((uint16_t)0x0100) /*!< Last Bit Clock pulse */
- #define USART_CR2_CPHA ((uint16_t)0x0200) /*!< Clock Phase */
- #define USART_CR2_CPOL ((uint16_t)0x0400) /*!< Clock Polarity */
- #define USART_CR2_CLKEN ((uint16_t)0x0800) /*!< Clock Enable */
- #define USART_CR2_STOP ((uint16_t)0x3000) /*!< STOP[1:0] bits (STOP bits) */
- #define USART_CR2_STOP_0 ((uint16_t)0x1000) /*!< Bit 0 */
- #define USART_CR2_STOP_1 ((uint16_t)0x2000) /*!< Bit 1 */
- #define USART_CR2_LINEN ((uint16_t)0x4000) /*!< LIN mode enable */
- /****************** Bit definition for USART_CR3 register *******************/
- #define USART_CR3_EIE ((uint16_t)0x0001) /*!< Error Interrupt Enable */
- #define USART_CR3_IREN ((uint16_t)0x0002) /*!< IrDA mode Enable */
- #define USART_CR3_IRLP ((uint16_t)0x0004) /*!< IrDA Low-Power */
- #define USART_CR3_HDSEL ((uint16_t)0x0008) /*!< Half-Duplex Selection */
- #define USART_CR3_NACK ((uint16_t)0x0010) /*!< Smartcard NACK enable */
- #define USART_CR3_SCEN ((uint16_t)0x0020) /*!< Smartcard mode enable */
- #define USART_CR3_DMAR ((uint16_t)0x0040) /*!< DMA Enable Receiver */
- #define USART_CR3_DMAT ((uint16_t)0x0080) /*!< DMA Enable Transmitter */
- #define USART_CR3_RTSE ((uint16_t)0x0100) /*!< RTS Enable */
- #define USART_CR3_CTSE ((uint16_t)0x0200) /*!< CTS Enable */
- #define USART_CR3_CTSIE ((uint16_t)0x0400) /*!< CTS Interrupt Enable */
- #define USART_CR3_ONEBIT ((uint16_t)0x0800) /*!< One Bit method */
- /****************** Bit definition for USART_GTPR register ******************/
- #define USART_GTPR_PSC ((uint16_t)0x00FF) /*!< PSC[7:0] bits (Prescaler value) */
- #define USART_GTPR_PSC_0 ((uint16_t)0x0001) /*!< Bit 0 */
- #define USART_GTPR_PSC_1 ((uint16_t)0x0002) /*!< Bit 1 */
- #define USART_GTPR_PSC_2 ((uint16_t)0x0004) /*!< Bit 2 */
- #define USART_GTPR_PSC_3 ((uint16_t)0x0008) /*!< Bit 3 */
- #define USART_GTPR_PSC_4 ((uint16_t)0x0010) /*!< Bit 4 */
- #define USART_GTPR_PSC_5 ((uint16_t)0x0020) /*!< Bit 5 */
- #define USART_GTPR_PSC_6 ((uint16_t)0x0040) /*!< Bit 6 */
- #define USART_GTPR_PSC_7 ((uint16_t)0x0080) /*!< Bit 7 */
- #define USART_GTPR_GT ((uint16_t)0xFF00) /*!< Guard time value */
- /******************************************************************************/
- /* */
- /* Debug MCU */
- /* */
- /******************************************************************************/
- /**************** Bit definition for DBGMCU_IDCODE register *****************/
- #define DBGMCU_IDCODE_DEV_ID ((uint32_t)0x00000FFF) /*!< Device Identifier */
- #define DBGMCU_IDCODE_REV_ID ((uint32_t)0xFFFF0000) /*!< REV_ID[15:0] bits (Revision Identifier) */
- #define DBGMCU_IDCODE_REV_ID_0 ((uint32_t)0x00010000) /*!< Bit 0 */
- #define DBGMCU_IDCODE_REV_ID_1 ((uint32_t)0x00020000) /*!< Bit 1 */
- #define DBGMCU_IDCODE_REV_ID_2 ((uint32_t)0x00040000) /*!< Bit 2 */
- #define DBGMCU_IDCODE_REV_ID_3 ((uint32_t)0x00080000) /*!< Bit 3 */
- #define DBGMCU_IDCODE_REV_ID_4 ((uint32_t)0x00100000) /*!< Bit 4 */
- #define DBGMCU_IDCODE_REV_ID_5 ((uint32_t)0x00200000) /*!< Bit 5 */
- #define DBGMCU_IDCODE_REV_ID_6 ((uint32_t)0x00400000) /*!< Bit 6 */
- #define DBGMCU_IDCODE_REV_ID_7 ((uint32_t)0x00800000) /*!< Bit 7 */
- #define DBGMCU_IDCODE_REV_ID_8 ((uint32_t)0x01000000) /*!< Bit 8 */
- #define DBGMCU_IDCODE_REV_ID_9 ((uint32_t)0x02000000) /*!< Bit 9 */
- #define DBGMCU_IDCODE_REV_ID_10 ((uint32_t)0x04000000) /*!< Bit 10 */
- #define DBGMCU_IDCODE_REV_ID_11 ((uint32_t)0x08000000) /*!< Bit 11 */
- #define DBGMCU_IDCODE_REV_ID_12 ((uint32_t)0x10000000) /*!< Bit 12 */
- #define DBGMCU_IDCODE_REV_ID_13 ((uint32_t)0x20000000) /*!< Bit 13 */
- #define DBGMCU_IDCODE_REV_ID_14 ((uint32_t)0x40000000) /*!< Bit 14 */
- #define DBGMCU_IDCODE_REV_ID_15 ((uint32_t)0x80000000) /*!< Bit 15 */
- /****************** Bit definition for DBGMCU_CR register *******************/
- #define DBGMCU_CR_DBG_SLEEP ((uint32_t)0x00000001) /*!< Debug Sleep Mode */
- #define DBGMCU_CR_DBG_STOP ((uint32_t)0x00000002) /*!< Debug Stop Mode */
- #define DBGMCU_CR_DBG_STANDBY ((uint32_t)0x00000004) /*!< Debug Standby mode */
- #define DBGMCU_CR_TRACE_IOEN ((uint32_t)0x00000020) /*!< Trace Pin Assignment Control */
- #define DBGMCU_CR_TRACE_MODE ((uint32_t)0x000000C0) /*!< TRACE_MODE[1:0] bits (Trace Pin Assignment Control) */
- #define DBGMCU_CR_TRACE_MODE_0 ((uint32_t)0x00000040) /*!< Bit 0 */
- #define DBGMCU_CR_TRACE_MODE_1 ((uint32_t)0x00000080) /*!< Bit 1 */
- #define DBGMCU_CR_DBG_IWDG_STOP ((uint32_t)0x00000100) /*!< Debug Independent Watchdog stopped when Core is halted */
- #define DBGMCU_CR_DBG_WWDG_STOP ((uint32_t)0x00000200) /*!< Debug Window Watchdog stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM1_STOP ((uint32_t)0x00000400) /*!< TIM1 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM2_STOP ((uint32_t)0x00000800) /*!< TIM2 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM3_STOP ((uint32_t)0x00001000) /*!< TIM3 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM4_STOP ((uint32_t)0x00002000) /*!< TIM4 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_CAN1_STOP ((uint32_t)0x00004000) /*!< Debug CAN1 stopped when Core is halted */
- #define DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00008000) /*!< SMBUS timeout mode stopped when Core is halted */
- #define DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00010000) /*!< SMBUS timeout mode stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM8_STOP ((uint32_t)0x00020000) /*!< TIM8 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM5_STOP ((uint32_t)0x00040000) /*!< TIM5 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM6_STOP ((uint32_t)0x00080000) /*!< TIM6 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_TIM7_STOP ((uint32_t)0x00100000) /*!< TIM7 counter stopped when core is halted */
- #define DBGMCU_CR_DBG_CAN2_STOP ((uint32_t)0x00200000) /*!< Debug CAN2 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM15_STOP ((uint32_t)0x00400000) /*!< Debug TIM15 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM16_STOP ((uint32_t)0x00800000) /*!< Debug TIM16 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM17_STOP ((uint32_t)0x01000000) /*!< Debug TIM17 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM12_STOP ((uint32_t)0x02000000) /*!< Debug TIM12 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM13_STOP ((uint32_t)0x04000000) /*!< Debug TIM13 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM14_STOP ((uint32_t)0x08000000) /*!< Debug TIM14 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM9_STOP ((uint32_t)0x10000000) /*!< Debug TIM9 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM10_STOP ((uint32_t)0x20000000) /*!< Debug TIM10 stopped when Core is halted */
- #define DBGMCU_CR_DBG_TIM11_STOP ((uint32_t)0x40000000) /*!< Debug TIM11 stopped when Core is halted */
- /******************************************************************************/
- /* */
- /* FLASH and Option Bytes Registers */
- /* */
- /******************************************************************************/
- /******************* Bit definition for FLASH_ACR register ******************/
- #define FLASH_ACR_LATENCY ((uint8_t)0x03) /*!< LATENCY[2:0] bits (Latency) */
- #define FLASH_ACR_LATENCY_0 ((uint8_t)0x00) /*!< Bit 0 */
- #define FLASH_ACR_LATENCY_1 ((uint8_t)0x01) /*!< Bit 0 */
- #define FLASH_ACR_LATENCY_2 ((uint8_t)0x02) /*!< Bit 1 */
- #define FLASH_ACR_HLFCYA ((uint8_t)0x08) /*!< Flash Half Cycle Access Enable */
- #define FLASH_ACR_PRFTBE ((uint8_t)0x10) /*!< Prefetch Buffer Enable */
- #define FLASH_ACR_PRFTBS ((uint8_t)0x20) /*!< Prefetch Buffer Status */
- /****************** Bit definition for FLASH_KEYR register ******************/
- #define FLASH_KEYR_FKEYR ((uint32_t)0xFFFFFFFF) /*!< FPEC Key */
- /****************** FLASH Keys **********************************************/
- #define RDP_Key ((uint16_t)0x00A5)
- #define FLASH_KEY1 ((uint32_t)0x45670123)
- #define FLASH_KEY2 ((uint32_t)0xCDEF89AB)
- /***************** Bit definition for FLASH_OPTKEYR register ****************/
- #define FLASH_OPTKEYR_OPTKEYR ((uint32_t)0xFFFFFFFF) /*!< Option Byte Key */
- /****************** Bit definition for FLASH_SR register *******************/
- #define FLASH_SR_BSY ((uint8_t)0x01) /*!< Busy */
- #define FLASH_SR_PGERR ((uint8_t)0x04) /*!< Programming Error */
- #define FLASH_SR_WRPRTERR ((uint8_t)0x10) /*!< Write Protection Error */
- #define FLASH_SR_EOP ((uint8_t)0x20) /*!< End of operation */
- /******************* Bit definition for FLASH_CR register *******************/
- #define FLASH_CR_PG ((uint16_t)0x0001) /*!< Programming */
- #define FLASH_CR_PER ((uint16_t)0x0002) /*!< Page Erase */
- #define FLASH_CR_MER ((uint16_t)0x0004) /*!< Mass Erase */
- #define FLASH_CR_OPTPG ((uint16_t)0x0010) /*!< Option Byte Programming */
- #define FLASH_CR_OPTER ((uint16_t)0x0020) /*!< Option Byte Erase */
- #define FLASH_CR_STRT ((uint16_t)0x0040) /*!< Start */
- #define FLASH_CR_LOCK ((uint16_t)0x0080) /*!< Lock */
- #define FLASH_CR_OPTWRE ((uint16_t)0x0200) /*!< Option Bytes Write Enable */
- #define FLASH_CR_ERRIE ((uint16_t)0x0400) /*!< Error Interrupt Enable */
- #define FLASH_CR_EOPIE ((uint16_t)0x1000) /*!< End of operation interrupt enable */
- /******************* Bit definition for FLASH_AR register *******************/
- #define FLASH_AR_FAR ((uint32_t)0xFFFFFFFF) /*!< Flash Address */
- /****************** Bit definition for FLASH_OBR register *******************/
- #define FLASH_OBR_OPTERR ((uint16_t)0x0001) /*!< Option Byte Error */
- #define FLASH_OBR_RDPRT ((uint16_t)0x0002) /*!< Read protection */
- #define FLASH_OBR_USER ((uint16_t)0x03FC) /*!< User Option Bytes */
- #define FLASH_OBR_WDG_SW ((uint16_t)0x0004) /*!< WDG_SW */
- #define FLASH_OBR_nRST_STOP ((uint16_t)0x0008) /*!< nRST_STOP */
- #define FLASH_OBR_nRST_STDBY ((uint16_t)0x0010) /*!< nRST_STDBY */
- #define FLASH_OBR_BFB2 ((uint16_t)0x0020) /*!< BFB2 */
- /****************** Bit definition for FLASH_WRPR register ******************/
- #define FLASH_WRPR_WRP ((uint32_t)0xFFFFFFFF) /*!< Write Protect */
- /*----------------------------------------------------------------------------*/
- /****************** Bit definition for FLASH_RDP register *******************/
- #define FLASH_RDP_RDP ((uint32_t)0x000000FF) /*!< Read protection option byte */
- #define FLASH_RDP_nRDP ((uint32_t)0x0000FF00) /*!< Read protection complemented option byte */
- /****************** Bit definition for FLASH_USER register ******************/
- #define FLASH_USER_USER ((uint32_t)0x00FF0000) /*!< User option byte */
- #define FLASH_USER_nUSER ((uint32_t)0xFF000000) /*!< User complemented option byte */
- /****************** Bit definition for FLASH_Data0 register *****************/
- #define FLASH_Data0_Data0 ((uint32_t)0x000000FF) /*!< User data storage option byte */
- #define FLASH_Data0_nData0 ((uint32_t)0x0000FF00) /*!< User data storage complemented option byte */
- /****************** Bit definition for FLASH_Data1 register *****************/
- #define FLASH_Data1_Data1 ((uint32_t)0x00FF0000) /*!< User data storage option byte */
- #define FLASH_Data1_nData1 ((uint32_t)0xFF000000) /*!< User data storage complemented option byte */
- /****************** Bit definition for FLASH_WRP0 register ******************/
- #define FLASH_WRP0_WRP0 ((uint32_t)0x000000FF) /*!< Flash memory write protection option bytes */
- #define FLASH_WRP0_nWRP0 ((uint32_t)0x0000FF00) /*!< Flash memory write protection complemented option bytes */
- /****************** Bit definition for FLASH_WRP1 register ******************/
- #define FLASH_WRP1_WRP1 ((uint32_t)0x00FF0000) /*!< Flash memory write protection option bytes */
- #define FLASH_WRP1_nWRP1 ((uint32_t)0xFF000000) /*!< Flash memory write protection complemented option bytes */
- /****************** Bit definition for FLASH_WRP2 register ******************/
- #define FLASH_WRP2_WRP2 ((uint32_t)0x000000FF) /*!< Flash memory write protection option bytes */
- #define FLASH_WRP2_nWRP2 ((uint32_t)0x0000FF00) /*!< Flash memory write protection complemented option bytes */
- /****************** Bit definition for FLASH_WRP3 register ******************/
- #define FLASH_WRP3_WRP3 ((uint32_t)0x00FF0000) /*!< Flash memory write protection option bytes */
- #define FLASH_WRP3_nWRP3 ((uint32_t)0xFF000000) /*!< Flash memory write protection complemented option bytes */
- #ifdef STM32F10X_CL
- /******************************************************************************/
- /* Ethernet MAC Registers bits definitions */
- /******************************************************************************/
- /* Bit definition for Ethernet MAC Control Register register */
- #define ETH_MACCR_WD ((uint32_t)0x00800000) /* Watchdog disable */
- #define ETH_MACCR_JD ((uint32_t)0x00400000) /* Jabber disable */
- #define ETH_MACCR_IFG ((uint32_t)0x000E0000) /* Inter-frame gap */
- #define ETH_MACCR_IFG_96Bit ((uint32_t)0x00000000) /* Minimum IFG between frames during transmission is 96Bit */
- #define ETH_MACCR_IFG_88Bit ((uint32_t)0x00020000) /* Minimum IFG between frames during transmission is 88Bit */
- #define ETH_MACCR_IFG_80Bit ((uint32_t)0x00040000) /* Minimum IFG between frames during transmission is 80Bit */
- #define ETH_MACCR_IFG_72Bit ((uint32_t)0x00060000) /* Minimum IFG between frames during transmission is 72Bit */
- #define ETH_MACCR_IFG_64Bit ((uint32_t)0x00080000) /* Minimum IFG between frames during transmission is 64Bit */
- #define ETH_MACCR_IFG_56Bit ((uint32_t)0x000A0000) /* Minimum IFG between frames during transmission is 56Bit */
- #define ETH_MACCR_IFG_48Bit ((uint32_t)0x000C0000) /* Minimum IFG between frames during transmission is 48Bit */
- #define ETH_MACCR_IFG_40Bit ((uint32_t)0x000E0000) /* Minimum IFG between frames during transmission is 40Bit */
- #define ETH_MACCR_CSD ((uint32_t)0x00010000) /* Carrier sense disable (during transmission) */
- #define ETH_MACCR_FES ((uint32_t)0x00004000) /* Fast ethernet speed */
- #define ETH_MACCR_ROD ((uint32_t)0x00002000) /* Receive own disable */
- #define ETH_MACCR_LM ((uint32_t)0x00001000) /* loopback mode */
- #define ETH_MACCR_DM ((uint32_t)0x00000800) /* Duplex mode */
- #define ETH_MACCR_IPCO ((uint32_t)0x00000400) /* IP Checksum offload */
- #define ETH_MACCR_RD ((uint32_t)0x00000200) /* Retry disable */
- #define ETH_MACCR_APCS ((uint32_t)0x00000080) /* Automatic Pad/CRC stripping */
- #define ETH_MACCR_BL ((uint32_t)0x00000060) /* Back-off limit: random integer number (r) of slot time delays before rescheduling
- a transmission attempt during retries after a collision: 0 =< r <2^k */
- #define ETH_MACCR_BL_10 ((uint32_t)0x00000000) /* k = min (n, 10) */
- #define ETH_MACCR_BL_8 ((uint32_t)0x00000020) /* k = min (n, 8) */
- #define ETH_MACCR_BL_4 ((uint32_t)0x00000040) /* k = min (n, 4) */
- #define ETH_MACCR_BL_1 ((uint32_t)0x00000060) /* k = min (n, 1) */
- #define ETH_MACCR_DC ((uint32_t)0x00000010) /* Defferal check */
- #define ETH_MACCR_TE ((uint32_t)0x00000008) /* Transmitter enable */
- #define ETH_MACCR_RE ((uint32_t)0x00000004) /* Receiver enable */
- /* Bit definition for Ethernet MAC Frame Filter Register */
- #define ETH_MACFFR_RA ((uint32_t)0x80000000) /* Receive all */
- #define ETH_MACFFR_HPF ((uint32_t)0x00000400) /* Hash or perfect filter */
- #define ETH_MACFFR_SAF ((uint32_t)0x00000200) /* Source address filter enable */
- #define ETH_MACFFR_SAIF ((uint32_t)0x00000100) /* SA inverse filtering */
- #define ETH_MACFFR_PCF ((uint32_t)0x000000C0) /* Pass control frames: 3 cases */
- #define ETH_MACFFR_PCF_BlockAll ((uint32_t)0x00000040) /* MAC filters all control frames from reaching the application */
- #define ETH_MACFFR_PCF_ForwardAll ((uint32_t)0x00000080) /* MAC forwards all control frames to application even if they fail the Address Filter */
- #define ETH_MACFFR_PCF_ForwardPassedAddrFilter ((uint32_t)0x000000C0) /* MAC forwards control frames that pass the Address Filter. */
- #define ETH_MACFFR_BFD ((uint32_t)0x00000020) /* Broadcast frame disable */
- #define ETH_MACFFR_PAM ((uint32_t)0x00000010) /* Pass all mutlicast */
- #define ETH_MACFFR_DAIF ((uint32_t)0x00000008) /* DA Inverse filtering */
- #define ETH_MACFFR_HM ((uint32_t)0x00000004) /* Hash multicast */
- #define ETH_MACFFR_HU ((uint32_t)0x00000002) /* Hash unicast */
- #define ETH_MACFFR_PM ((uint32_t)0x00000001) /* Promiscuous mode */
- /* Bit definition for Ethernet MAC Hash Table High Register */
- #define ETH_MACHTHR_HTH ((uint32_t)0xFFFFFFFF) /* Hash table high */
- /* Bit definition for Ethernet MAC Hash Table Low Register */
- #define ETH_MACHTLR_HTL ((uint32_t)0xFFFFFFFF) /* Hash table low */
- /* Bit definition for Ethernet MAC MII Address Register */
- #define ETH_MACMIIAR_PA ((uint32_t)0x0000F800) /* Physical layer address */
- #define ETH_MACMIIAR_MR ((uint32_t)0x000007C0) /* MII register in the selected PHY */
- #define ETH_MACMIIAR_CR ((uint32_t)0x0000001C) /* CR clock range: 6 cases */
- #define ETH_MACMIIAR_CR_Div42 ((uint32_t)0x00000000) /* HCLK:60-72 MHz; MDC clock= HCLK/42 */
- #define ETH_MACMIIAR_CR_Div16 ((uint32_t)0x00000008) /* HCLK:20-35 MHz; MDC clock= HCLK/16 */
- #define ETH_MACMIIAR_CR_Div26 ((uint32_t)0x0000000C) /* HCLK:35-60 MHz; MDC clock= HCLK/26 */
- #define ETH_MACMIIAR_MW ((uint32_t)0x00000002) /* MII write */
- #define ETH_MACMIIAR_MB ((uint32_t)0x00000001) /* MII busy */
- /* Bit definition for Ethernet MAC MII Data Register */
- #define ETH_MACMIIDR_MD ((uint32_t)0x0000FFFF) /* MII data: read/write data from/to PHY */
- /* Bit definition for Ethernet MAC Flow Control Register */
- #define ETH_MACFCR_PT ((uint32_t)0xFFFF0000) /* Pause time */
- #define ETH_MACFCR_ZQPD ((uint32_t)0x00000080) /* Zero-quanta pause disable */
- #define ETH_MACFCR_PLT ((uint32_t)0x00000030) /* Pause low threshold: 4 cases */
- #define ETH_MACFCR_PLT_Minus4 ((uint32_t)0x00000000) /* Pause time minus 4 slot times */
- #define ETH_MACFCR_PLT_Minus28 ((uint32_t)0x00000010) /* Pause time minus 28 slot times */
- #define ETH_MACFCR_PLT_Minus144 ((uint32_t)0x00000020) /* Pause time minus 144 slot times */
- #define ETH_MACFCR_PLT_Minus256 ((uint32_t)0x00000030) /* Pause time minus 256 slot times */
- #define ETH_MACFCR_UPFD ((uint32_t)0x00000008) /* Unicast pause frame detect */
- #define ETH_MACFCR_RFCE ((uint32_t)0x00000004) /* Receive flow control enable */
- #define ETH_MACFCR_TFCE ((uint32_t)0x00000002) /* Transmit flow control enable */
- #define ETH_MACFCR_FCBBPA ((uint32_t)0x00000001) /* Flow control busy/backpressure activate */
- /* Bit definition for Ethernet MAC VLAN Tag Register */
- #define ETH_MACVLANTR_VLANTC ((uint32_t)0x00010000) /* 12-bit VLAN tag comparison */
- #define ETH_MACVLANTR_VLANTI ((uint32_t)0x0000FFFF) /* VLAN tag identifier (for receive frames) */
- /* Bit definition for Ethernet MAC Remote Wake-UpFrame Filter Register */
- #define ETH_MACRWUFFR_D ((uint32_t)0xFFFFFFFF) /* Wake-up frame filter register data */
- /* Eight sequential Writes to this address (offset 0x28) will write all Wake-UpFrame Filter Registers.
- Eight sequential Reads from this address (offset 0x28) will read all Wake-UpFrame Filter Registers. */
- /* Wake-UpFrame Filter Reg0 : Filter 0 Byte Mask
- Wake-UpFrame Filter Reg1 : Filter 1 Byte Mask
- Wake-UpFrame Filter Reg2 : Filter 2 Byte Mask
- Wake-UpFrame Filter Reg3 : Filter 3 Byte Mask
- Wake-UpFrame Filter Reg4 : RSVD - Filter3 Command - RSVD - Filter2 Command -
- RSVD - Filter1 Command - RSVD - Filter0 Command
- Wake-UpFrame Filter Re5 : Filter3 Offset - Filter2 Offset - Filter1 Offset - Filter0 Offset
- Wake-UpFrame Filter Re6 : Filter1 CRC16 - Filter0 CRC16
- Wake-UpFrame Filter Re7 : Filter3 CRC16 - Filter2 CRC16 */
- /* Bit definition for Ethernet MAC PMT Control and Status Register */
- #define ETH_MACPMTCSR_WFFRPR ((uint32_t)0x80000000) /* Wake-Up Frame Filter Register Pointer Reset */
- #define ETH_MACPMTCSR_GU ((uint32_t)0x00000200) /* Global Unicast */
- #define ETH_MACPMTCSR_WFR ((uint32_t)0x00000040) /* Wake-Up Frame Received */
- #define ETH_MACPMTCSR_MPR ((uint32_t)0x00000020) /* Magic Packet Received */
- #define ETH_MACPMTCSR_WFE ((uint32_t)0x00000004) /* Wake-Up Frame Enable */
- #define ETH_MACPMTCSR_MPE ((uint32_t)0x00000002) /* Magic Packet Enable */
- #define ETH_MACPMTCSR_PD ((uint32_t)0x00000001) /* Power Down */
- /* Bit definition for Ethernet MAC Status Register */
- #define ETH_MACSR_TSTS ((uint32_t)0x00000200) /* Time stamp trigger status */
- #define ETH_MACSR_MMCTS ((uint32_t)0x00000040) /* MMC transmit status */
- #define ETH_MACSR_MMMCRS ((uint32_t)0x00000020) /* MMC receive status */
- #define ETH_MACSR_MMCS ((uint32_t)0x00000010) /* MMC status */
- #define ETH_MACSR_PMTS ((uint32_t)0x00000008) /* PMT status */
- /* Bit definition for Ethernet MAC Interrupt Mask Register */
- #define ETH_MACIMR_TSTIM ((uint32_t)0x00000200) /* Time stamp trigger interrupt mask */
- #define ETH_MACIMR_PMTIM ((uint32_t)0x00000008) /* PMT interrupt mask */
- /* Bit definition for Ethernet MAC Address0 High Register */
- #define ETH_MACA0HR_MACA0H ((uint32_t)0x0000FFFF) /* MAC address0 high */
- /* Bit definition for Ethernet MAC Address0 Low Register */
- #define ETH_MACA0LR_MACA0L ((uint32_t)0xFFFFFFFF) /* MAC address0 low */
- /* Bit definition for Ethernet MAC Address1 High Register */
- #define ETH_MACA1HR_AE ((uint32_t)0x80000000) /* Address enable */
- #define ETH_MACA1HR_SA ((uint32_t)0x40000000) /* Source address */
- #define ETH_MACA1HR_MBC ((uint32_t)0x3F000000) /* Mask byte control: bits to mask for comparison of the MAC Address bytes */
- #define ETH_MACA1HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */
- #define ETH_MACA1HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */
- #define ETH_MACA1HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */
- #define ETH_MACA1HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */
- #define ETH_MACA1HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */
- #define ETH_MACA1HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [7:0] */
- #define ETH_MACA1HR_MACA1H ((uint32_t)0x0000FFFF) /* MAC address1 high */
- /* Bit definition for Ethernet MAC Address1 Low Register */
- #define ETH_MACA1LR_MACA1L ((uint32_t)0xFFFFFFFF) /* MAC address1 low */
- /* Bit definition for Ethernet MAC Address2 High Register */
- #define ETH_MACA2HR_AE ((uint32_t)0x80000000) /* Address enable */
- #define ETH_MACA2HR_SA ((uint32_t)0x40000000) /* Source address */
- #define ETH_MACA2HR_MBC ((uint32_t)0x3F000000) /* Mask byte control */
- #define ETH_MACA2HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */
- #define ETH_MACA2HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */
- #define ETH_MACA2HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */
- #define ETH_MACA2HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */
- #define ETH_MACA2HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */
- #define ETH_MACA2HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [70] */
- #define ETH_MACA2HR_MACA2H ((uint32_t)0x0000FFFF) /* MAC address1 high */
- /* Bit definition for Ethernet MAC Address2 Low Register */
- #define ETH_MACA2LR_MACA2L ((uint32_t)0xFFFFFFFF) /* MAC address2 low */
- /* Bit definition for Ethernet MAC Address3 High Register */
- #define ETH_MACA3HR_AE ((uint32_t)0x80000000) /* Address enable */
- #define ETH_MACA3HR_SA ((uint32_t)0x40000000) /* Source address */
- #define ETH_MACA3HR_MBC ((uint32_t)0x3F000000) /* Mask byte control */
- #define ETH_MACA3HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */
- #define ETH_MACA3HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */
- #define ETH_MACA3HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */
- #define ETH_MACA3HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */
- #define ETH_MACA3HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */
- #define ETH_MACA3HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [70] */
- #define ETH_MACA3HR_MACA3H ((uint32_t)0x0000FFFF) /* MAC address3 high */
- /* Bit definition for Ethernet MAC Address3 Low Register */
- #define ETH_MACA3LR_MACA3L ((uint32_t)0xFFFFFFFF) /* MAC address3 low */
- /******************************************************************************/
- /* Ethernet MMC Registers bits definition */
- /******************************************************************************/
- /* Bit definition for Ethernet MMC Contol Register */
- #define ETH_MMCCR_MCF ((uint32_t)0x00000008) /* MMC Counter Freeze */
- #define ETH_MMCCR_ROR ((uint32_t)0x00000004) /* Reset on Read */
- #define ETH_MMCCR_CSR ((uint32_t)0x00000002) /* Counter Stop Rollover */
- #define ETH_MMCCR_CR ((uint32_t)0x00000001) /* Counters Reset */
- /* Bit definition for Ethernet MMC Receive Interrupt Register */
- #define ETH_MMCRIR_RGUFS ((uint32_t)0x00020000) /* Set when Rx good unicast frames counter reaches half the maximum value */
- #define ETH_MMCRIR_RFAES ((uint32_t)0x00000040) /* Set when Rx alignment error counter reaches half the maximum value */
- #define ETH_MMCRIR_RFCES ((uint32_t)0x00000020) /* Set when Rx crc error counter reaches half the maximum value */
- /* Bit definition for Ethernet MMC Transmit Interrupt Register */
- #define ETH_MMCTIR_TGFS ((uint32_t)0x00200000) /* Set when Tx good frame count counter reaches half the maximum value */
- #define ETH_MMCTIR_TGFMSCS ((uint32_t)0x00008000) /* Set when Tx good multi col counter reaches half the maximum value */
- #define ETH_MMCTIR_TGFSCS ((uint32_t)0x00004000) /* Set when Tx good single col counter reaches half the maximum value */
- /* Bit definition for Ethernet MMC Receive Interrupt Mask Register */
- #define ETH_MMCRIMR_RGUFM ((uint32_t)0x00020000) /* Mask the interrupt when Rx good unicast frames counter reaches half the maximum value */
- #define ETH_MMCRIMR_RFAEM ((uint32_t)0x00000040) /* Mask the interrupt when when Rx alignment error counter reaches half the maximum value */
- #define ETH_MMCRIMR_RFCEM ((uint32_t)0x00000020) /* Mask the interrupt when Rx crc error counter reaches half the maximum value */
- /* Bit definition for Ethernet MMC Transmit Interrupt Mask Register */
- #define ETH_MMCTIMR_TGFM ((uint32_t)0x00200000) /* Mask the interrupt when Tx good frame count counter reaches half the maximum value */
- #define ETH_MMCTIMR_TGFMSCM ((uint32_t)0x00008000) /* Mask the interrupt when Tx good multi col counter reaches half the maximum value */
- #define ETH_MMCTIMR_TGFSCM ((uint32_t)0x00004000) /* Mask the interrupt when Tx good single col counter reaches half the maximum value */
- /* Bit definition for Ethernet MMC Transmitted Good Frames after Single Collision Counter Register */
- #define ETH_MMCTGFSCCR_TGFSCC ((uint32_t)0xFFFFFFFF) /* Number of successfully transmitted frames after a single collision in Half-duplex mode. */
- /* Bit definition for Ethernet MMC Transmitted Good Frames after More than a Single Collision Counter Register */
- #define ETH_MMCTGFMSCCR_TGFMSCC ((uint32_t)0xFFFFFFFF) /* Number of successfully transmitted frames after more than a single collision in Half-duplex mode. */
- /* Bit definition for Ethernet MMC Transmitted Good Frames Counter Register */
- #define ETH_MMCTGFCR_TGFC ((uint32_t)0xFFFFFFFF) /* Number of good frames transmitted. */
- /* Bit definition for Ethernet MMC Received Frames with CRC Error Counter Register */
- #define ETH_MMCRFCECR_RFCEC ((uint32_t)0xFFFFFFFF) /* Number of frames received with CRC error. */
- /* Bit definition for Ethernet MMC Received Frames with Alignement Error Counter Register */
- #define ETH_MMCRFAECR_RFAEC ((uint32_t)0xFFFFFFFF) /* Number of frames received with alignment (dribble) error */
- /* Bit definition for Ethernet MMC Received Good Unicast Frames Counter Register */
- #define ETH_MMCRGUFCR_RGUFC ((uint32_t)0xFFFFFFFF) /* Number of good unicast frames received. */
- /******************************************************************************/
- /* Ethernet PTP Registers bits definition */
- /******************************************************************************/
- /* Bit definition for Ethernet PTP Time Stamp Contol Register */
- #define ETH_PTPTSCR_TSARU ((uint32_t)0x00000020) /* Addend register update */
- #define ETH_PTPTSCR_TSITE ((uint32_t)0x00000010) /* Time stamp interrupt trigger enable */
- #define ETH_PTPTSCR_TSSTU ((uint32_t)0x00000008) /* Time stamp update */
- #define ETH_PTPTSCR_TSSTI ((uint32_t)0x00000004) /* Time stamp initialize */
- #define ETH_PTPTSCR_TSFCU ((uint32_t)0x00000002) /* Time stamp fine or coarse update */
- #define ETH_PTPTSCR_TSE ((uint32_t)0x00000001) /* Time stamp enable */
- /* Bit definition for Ethernet PTP Sub-Second Increment Register */
- #define ETH_PTPSSIR_STSSI ((uint32_t)0x000000FF) /* System time Sub-second increment value */
- /* Bit definition for Ethernet PTP Time Stamp High Register */
- #define ETH_PTPTSHR_STS ((uint32_t)0xFFFFFFFF) /* System Time second */
- /* Bit definition for Ethernet PTP Time Stamp Low Register */
- #define ETH_PTPTSLR_STPNS ((uint32_t)0x80000000) /* System Time Positive or negative time */
- #define ETH_PTPTSLR_STSS ((uint32_t)0x7FFFFFFF) /* System Time sub-seconds */
- /* Bit definition for Ethernet PTP Time Stamp High Update Register */
- #define ETH_PTPTSHUR_TSUS ((uint32_t)0xFFFFFFFF) /* Time stamp update seconds */
- /* Bit definition for Ethernet PTP Time Stamp Low Update Register */
- #define ETH_PTPTSLUR_TSUPNS ((uint32_t)0x80000000) /* Time stamp update Positive or negative time */
- #define ETH_PTPTSLUR_TSUSS ((uint32_t)0x7FFFFFFF) /* Time stamp update sub-seconds */
- /* Bit definition for Ethernet PTP Time Stamp Addend Register */
- #define ETH_PTPTSAR_TSA ((uint32_t)0xFFFFFFFF) /* Time stamp addend */
- /* Bit definition for Ethernet PTP Target Time High Register */
- #define ETH_PTPTTHR_TTSH ((uint32_t)0xFFFFFFFF) /* Target time stamp high */
- /* Bit definition for Ethernet PTP Target Time Low Register */
- #define ETH_PTPTTLR_TTSL ((uint32_t)0xFFFFFFFF) /* Target time stamp low */
- /******************************************************************************/
- /* Ethernet DMA Registers bits definition */
- /******************************************************************************/
- /* Bit definition for Ethernet DMA Bus Mode Register */
- #define ETH_DMABMR_AAB ((uint32_t)0x02000000) /* Address-Aligned beats */
- #define ETH_DMABMR_FPM ((uint32_t)0x01000000) /* 4xPBL mode */
- #define ETH_DMABMR_USP ((uint32_t)0x00800000) /* Use separate PBL */
- #define ETH_DMABMR_RDP ((uint32_t)0x007E0000) /* RxDMA PBL */
- #define ETH_DMABMR_RDP_1Beat ((uint32_t)0x00020000) /* maximum number of beats to be transferred in one RxDMA transaction is 1 */
- #define ETH_DMABMR_RDP_2Beat ((uint32_t)0x00040000) /* maximum number of beats to be transferred in one RxDMA transaction is 2 */
- #define ETH_DMABMR_RDP_4Beat ((uint32_t)0x00080000) /* maximum number of beats to be transferred in one RxDMA transaction is 4 */
- #define ETH_DMABMR_RDP_8Beat ((uint32_t)0x00100000) /* maximum number of beats to be transferred in one RxDMA transaction is 8 */
- #define ETH_DMABMR_RDP_16Beat ((uint32_t)0x00200000) /* maximum number of beats to be transferred in one RxDMA transaction is 16 */
- #define ETH_DMABMR_RDP_32Beat ((uint32_t)0x00400000) /* maximum number of beats to be transferred in one RxDMA transaction is 32 */
- #define ETH_DMABMR_RDP_4xPBL_4Beat ((uint32_t)0x01020000) /* maximum number of beats to be transferred in one RxDMA transaction is 4 */
- #define ETH_DMABMR_RDP_4xPBL_8Beat ((uint32_t)0x01040000) /* maximum number of beats to be transferred in one RxDMA transaction is 8 */
- #define ETH_DMABMR_RDP_4xPBL_16Beat ((uint32_t)0x01080000) /* maximum number of beats to be transferred in one RxDMA transaction is 16 */
- #define ETH_DMABMR_RDP_4xPBL_32Beat ((uint32_t)0x01100000) /* maximum number of beats to be transferred in one RxDMA transaction is 32 */
- #define ETH_DMABMR_RDP_4xPBL_64Beat ((uint32_t)0x01200000) /* maximum number of beats to be transferred in one RxDMA transaction is 64 */
- #define ETH_DMABMR_RDP_4xPBL_128Beat ((uint32_t)0x01400000) /* maximum number of beats to be transferred in one RxDMA transaction is 128 */
- #define ETH_DMABMR_FB ((uint32_t)0x00010000) /* Fixed Burst */
- #define ETH_DMABMR_RTPR ((uint32_t)0x0000C000) /* Rx Tx priority ratio */
- #define ETH_DMABMR_RTPR_1_1 ((uint32_t)0x00000000) /* Rx Tx priority ratio */
- #define ETH_DMABMR_RTPR_2_1 ((uint32_t)0x00004000) /* Rx Tx priority ratio */
- #define ETH_DMABMR_RTPR_3_1 ((uint32_t)0x00008000) /* Rx Tx priority ratio */
- #define ETH_DMABMR_RTPR_4_1 ((uint32_t)0x0000C000) /* Rx Tx priority ratio */
- #define ETH_DMABMR_PBL ((uint32_t)0x00003F00) /* Programmable burst length */
- #define ETH_DMABMR_PBL_1Beat ((uint32_t)0x00000100) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */
- #define ETH_DMABMR_PBL_2Beat ((uint32_t)0x00000200) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */
- #define ETH_DMABMR_PBL_4Beat ((uint32_t)0x00000400) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */
- #define ETH_DMABMR_PBL_8Beat ((uint32_t)0x00000800) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */
- #define ETH_DMABMR_PBL_16Beat ((uint32_t)0x00001000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */
- #define ETH_DMABMR_PBL_32Beat ((uint32_t)0x00002000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */
- #define ETH_DMABMR_PBL_4xPBL_4Beat ((uint32_t)0x01000100) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */
- #define ETH_DMABMR_PBL_4xPBL_8Beat ((uint32_t)0x01000200) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */
- #define ETH_DMABMR_PBL_4xPBL_16Beat ((uint32_t)0x01000400) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */
- #define ETH_DMABMR_PBL_4xPBL_32Beat ((uint32_t)0x01000800) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */
- #define ETH_DMABMR_PBL_4xPBL_64Beat ((uint32_t)0x01001000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */
- #define ETH_DMABMR_PBL_4xPBL_128Beat ((uint32_t)0x01002000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */
- #define ETH_DMABMR_DSL ((uint32_t)0x0000007C) /* Descriptor Skip Length */
- #define ETH_DMABMR_DA ((uint32_t)0x00000002) /* DMA arbitration scheme */
- #define ETH_DMABMR_SR ((uint32_t)0x00000001) /* Software reset */
- /* Bit definition for Ethernet DMA Transmit Poll Demand Register */
- #define ETH_DMATPDR_TPD ((uint32_t)0xFFFFFFFF) /* Transmit poll demand */
- /* Bit definition for Ethernet DMA Receive Poll Demand Register */
- #define ETH_DMARPDR_RPD ((uint32_t)0xFFFFFFFF) /* Receive poll demand */
- /* Bit definition for Ethernet DMA Receive Descriptor List Address Register */
- #define ETH_DMARDLAR_SRL ((uint32_t)0xFFFFFFFF) /* Start of receive list */
- /* Bit definition for Ethernet DMA Transmit Descriptor List Address Register */
- #define ETH_DMATDLAR_STL ((uint32_t)0xFFFFFFFF) /* Start of transmit list */
- /* Bit definition for Ethernet DMA Status Register */
- #define ETH_DMASR_TSTS ((uint32_t)0x20000000) /* Time-stamp trigger status */
- #define ETH_DMASR_PMTS ((uint32_t)0x10000000) /* PMT status */
- #define ETH_DMASR_MMCS ((uint32_t)0x08000000) /* MMC status */
- #define ETH_DMASR_EBS ((uint32_t)0x03800000) /* Error bits status */
- /* combination with EBS[2:0] for GetFlagStatus function */
- #define ETH_DMASR_EBS_DescAccess ((uint32_t)0x02000000) /* Error bits 0-data buffer, 1-desc. access */
- #define ETH_DMASR_EBS_ReadTransf ((uint32_t)0x01000000) /* Error bits 0-write trnsf, 1-read transfr */
- #define ETH_DMASR_EBS_DataTransfTx ((uint32_t)0x00800000) /* Error bits 0-Rx DMA, 1-Tx DMA */
- #define ETH_DMASR_TPS ((uint32_t)0x00700000) /* Transmit process state */
- #define ETH_DMASR_TPS_Stopped ((uint32_t)0x00000000) /* Stopped - Reset or Stop Tx Command issued */
- #define ETH_DMASR_TPS_Fetching ((uint32_t)0x00100000) /* Running - fetching the Tx descriptor */
- #define ETH_DMASR_TPS_Waiting ((uint32_t)0x00200000) /* Running - waiting for status */
- #define ETH_DMASR_TPS_Reading ((uint32_t)0x00300000) /* Running - reading the data from host memory */
- #define ETH_DMASR_TPS_Suspended ((uint32_t)0x00600000) /* Suspended - Tx Descriptor unavailabe */
- #define ETH_DMASR_TPS_Closing ((uint32_t)0x00700000) /* Running - closing Rx descriptor */
- #define ETH_DMASR_RPS ((uint32_t)0x000E0000) /* Receive process state */
- #define ETH_DMASR_RPS_Stopped ((uint32_t)0x00000000) /* Stopped - Reset or Stop Rx Command issued */
- #define ETH_DMASR_RPS_Fetching ((uint32_t)0x00020000) /* Running - fetching the Rx descriptor */
- #define ETH_DMASR_RPS_Waiting ((uint32_t)0x00060000) /* Running - waiting for packet */
- #define ETH_DMASR_RPS_Suspended ((uint32_t)0x00080000) /* Suspended - Rx Descriptor unavailable */
- #define ETH_DMASR_RPS_Closing ((uint32_t)0x000A0000) /* Running - closing descriptor */
- #define ETH_DMASR_RPS_Queuing ((uint32_t)0x000E0000) /* Running - queuing the recieve frame into host memory */
- #define ETH_DMASR_NIS ((uint32_t)0x00010000) /* Normal interrupt summary */
- #define ETH_DMASR_AIS ((uint32_t)0x00008000) /* Abnormal interrupt summary */
- #define ETH_DMASR_ERS ((uint32_t)0x00004000) /* Early receive status */
- #define ETH_DMASR_FBES ((uint32_t)0x00002000) /* Fatal bus error status */
- #define ETH_DMASR_ETS ((uint32_t)0x00000400) /* Early transmit status */
- #define ETH_DMASR_RWTS ((uint32_t)0x00000200) /* Receive watchdog timeout status */
- #define ETH_DMASR_RPSS ((uint32_t)0x00000100) /* Receive process stopped status */
- #define ETH_DMASR_RBUS ((uint32_t)0x00000080) /* Receive buffer unavailable status */
- #define ETH_DMASR_RS ((uint32_t)0x00000040) /* Receive status */
- #define ETH_DMASR_TUS ((uint32_t)0x00000020) /* Transmit underflow status */
- #define ETH_DMASR_ROS ((uint32_t)0x00000010) /* Receive overflow status */
- #define ETH_DMASR_TJTS ((uint32_t)0x00000008) /* Transmit jabber timeout status */
- #define ETH_DMASR_TBUS ((uint32_t)0x00000004) /* Transmit buffer unavailable status */
- #define ETH_DMASR_TPSS ((uint32_t)0x00000002) /* Transmit process stopped status */
- #define ETH_DMASR_TS ((uint32_t)0x00000001) /* Transmit status */
- /* Bit definition for Ethernet DMA Operation Mode Register */
- #define ETH_DMAOMR_DTCEFD ((uint32_t)0x04000000) /* Disable Dropping of TCP/IP checksum error frames */
- #define ETH_DMAOMR_RSF ((uint32_t)0x02000000) /* Receive store and forward */
- #define ETH_DMAOMR_DFRF ((uint32_t)0x01000000) /* Disable flushing of received frames */
- #define ETH_DMAOMR_TSF ((uint32_t)0x00200000) /* Transmit store and forward */
- #define ETH_DMAOMR_FTF ((uint32_t)0x00100000) /* Flush transmit FIFO */
- #define ETH_DMAOMR_TTC ((uint32_t)0x0001C000) /* Transmit threshold control */
- #define ETH_DMAOMR_TTC_64Bytes ((uint32_t)0x00000000) /* threshold level of the MTL Transmit FIFO is 64 Bytes */
- #define ETH_DMAOMR_TTC_128Bytes ((uint32_t)0x00004000) /* threshold level of the MTL Transmit FIFO is 128 Bytes */
- #define ETH_DMAOMR_TTC_192Bytes ((uint32_t)0x00008000) /* threshold level of the MTL Transmit FIFO is 192 Bytes */
- #define ETH_DMAOMR_TTC_256Bytes ((uint32_t)0x0000C000) /* threshold level of the MTL Transmit FIFO is 256 Bytes */
- #define ETH_DMAOMR_TTC_40Bytes ((uint32_t)0x00010000) /* threshold level of the MTL Transmit FIFO is 40 Bytes */
- #define ETH_DMAOMR_TTC_32Bytes ((uint32_t)0x00014000) /* threshold level of the MTL Transmit FIFO is 32 Bytes */
- #define ETH_DMAOMR_TTC_24Bytes ((uint32_t)0x00018000) /* threshold level of the MTL Transmit FIFO is 24 Bytes */
- #define ETH_DMAOMR_TTC_16Bytes ((uint32_t)0x0001C000) /* threshold level of the MTL Transmit FIFO is 16 Bytes */
- #define ETH_DMAOMR_ST ((uint32_t)0x00002000) /* Start/stop transmission command */
- #define ETH_DMAOMR_FEF ((uint32_t)0x00000080) /* Forward error frames */
- #define ETH_DMAOMR_FUGF ((uint32_t)0x00000040) /* Forward undersized good frames */
- #define ETH_DMAOMR_RTC ((uint32_t)0x00000018) /* receive threshold control */
- #define ETH_DMAOMR_RTC_64Bytes ((uint32_t)0x00000000) /* threshold level of the MTL Receive FIFO is 64 Bytes */
- #define ETH_DMAOMR_RTC_32Bytes ((uint32_t)0x00000008) /* threshold level of the MTL Receive FIFO is 32 Bytes */
- #define ETH_DMAOMR_RTC_96Bytes ((uint32_t)0x00000010) /* threshold level of the MTL Receive FIFO is 96 Bytes */
- #define ETH_DMAOMR_RTC_128Bytes ((uint32_t)0x00000018) /* threshold level of the MTL Receive FIFO is 128 Bytes */
- #define ETH_DMAOMR_OSF ((uint32_t)0x00000004) /* operate on second frame */
- #define ETH_DMAOMR_SR ((uint32_t)0x00000002) /* Start/stop receive */
- /* Bit definition for Ethernet DMA Interrupt Enable Register */
- #define ETH_DMAIER_NISE ((uint32_t)0x00010000) /* Normal interrupt summary enable */
- #define ETH_DMAIER_AISE ((uint32_t)0x00008000) /* Abnormal interrupt summary enable */
- #define ETH_DMAIER_ERIE ((uint32_t)0x00004000) /* Early receive interrupt enable */
- #define ETH_DMAIER_FBEIE ((uint32_t)0x00002000) /* Fatal bus error interrupt enable */
- #define ETH_DMAIER_ETIE ((uint32_t)0x00000400) /* Early transmit interrupt enable */
- #define ETH_DMAIER_RWTIE ((uint32_t)0x00000200) /* Receive watchdog timeout interrupt enable */
- #define ETH_DMAIER_RPSIE ((uint32_t)0x00000100) /* Receive process stopped interrupt enable */
- #define ETH_DMAIER_RBUIE ((uint32_t)0x00000080) /* Receive buffer unavailable interrupt enable */
- #define ETH_DMAIER_RIE ((uint32_t)0x00000040) /* Receive interrupt enable */
- #define ETH_DMAIER_TUIE ((uint32_t)0x00000020) /* Transmit Underflow interrupt enable */
- #define ETH_DMAIER_ROIE ((uint32_t)0x00000010) /* Receive Overflow interrupt enable */
- #define ETH_DMAIER_TJTIE ((uint32_t)0x00000008) /* Transmit jabber timeout interrupt enable */
- #define ETH_DMAIER_TBUIE ((uint32_t)0x00000004) /* Transmit buffer unavailable interrupt enable */
- #define ETH_DMAIER_TPSIE ((uint32_t)0x00000002) /* Transmit process stopped interrupt enable */
- #define ETH_DMAIER_TIE ((uint32_t)0x00000001) /* Transmit interrupt enable */
- /* Bit definition for Ethernet DMA Missed Frame and Buffer Overflow Counter Register */
- #define ETH_DMAMFBOCR_OFOC ((uint32_t)0x10000000) /* Overflow bit for FIFO overflow counter */
- #define ETH_DMAMFBOCR_MFA ((uint32_t)0x0FFE0000) /* Number of frames missed by the application */
- #define ETH_DMAMFBOCR_OMFC ((uint32_t)0x00010000) /* Overflow bit for missed frame counter */
- #define ETH_DMAMFBOCR_MFC ((uint32_t)0x0000FFFF) /* Number of frames missed by the controller */
- /* Bit definition for Ethernet DMA Current Host Transmit Descriptor Register */
- #define ETH_DMACHTDR_HTDAP ((uint32_t)0xFFFFFFFF) /* Host transmit descriptor address pointer */
- /* Bit definition for Ethernet DMA Current Host Receive Descriptor Register */
- #define ETH_DMACHRDR_HRDAP ((uint32_t)0xFFFFFFFF) /* Host receive descriptor address pointer */
- /* Bit definition for Ethernet DMA Current Host Transmit Buffer Address Register */
- #define ETH_DMACHTBAR_HTBAP ((uint32_t)0xFFFFFFFF) /* Host transmit buffer address pointer */
- /* Bit definition for Ethernet DMA Current Host Receive Buffer Address Register */
- #define ETH_DMACHRBAR_HRBAP ((uint32_t)0xFFFFFFFF) /* Host receive buffer address pointer */
- #endif /* STM32F10X_CL */
- /**
- * @}
- */
- /**
- * @}
- */
- #ifdef USE_STDPERIPH_DRIVER
- #include "stm32f10x_conf.h"
- #endif
- /** @addtogroup Exported_macro
- * @{
- */
- #define SET_BIT(REG, BIT) ((REG) |= (BIT))
- #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
- #define READ_BIT(REG, BIT) ((REG) & (BIT))
- #define CLEAR_REG(REG) ((REG) = (0x0))
- #define WRITE_REG(REG, VAL) ((REG) = (VAL))
- #define READ_REG(REG) ((REG))
- #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
- #endif /* __STM32F10x_H */
- /**
- * @}
- */
- /**
- * @}
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement