STM8S/A Standard Peripherals Drivers: CAN_Exported_Types

STM8S/A

STM8S/A Standard Peripherals Drivers
CAN_Exported_Types

Enumerations

enum  CAN_BitSeg1_TypeDef {
  CAN_BitSeg1_1TimeQuantum = ((uint8_t)0x00), CAN_BitSeg1_2TimeQuantum = ((uint8_t)0x01), CAN_BitSeg1_3TimeQuantum = ((uint8_t)0x02), CAN_BitSeg1_4TimeQuantum = ((uint8_t)0x03),
  CAN_BitSeg1_5TimeQuantum = ((uint8_t)0x04), CAN_BitSeg1_6TimeQuantum = ((uint8_t)0x05), CAN_BitSeg1_7TimeQuantum = ((uint8_t)0x06), CAN_BitSeg1_8TimeQuantum = ((uint8_t)0x07),
  CAN_BitSeg1_9TimeQuantum = ((uint8_t)0x08), CAN_BitSeg1_10TimeQuantum = ((uint8_t)0x09), CAN_BitSeg1_11TimeQuantum = ((uint8_t)0x0A), CAN_BitSeg1_12TimeQuantum = ((uint8_t)0x0B),
  CAN_BitSeg1_13TimeQuantum = ((uint8_t)0x0C), CAN_BitSeg1_14TimeQuantum = ((uint8_t)0x0D), CAN_BitSeg1_15TimeQuantum = ((uint8_t)0x0E), CAN_BitSeg1_16TimeQuantum = ((uint8_t)0x0F)
}
 time quantum in bit segment 1 More...
enum  CAN_BitSeg2_TypeDef {
  CAN_BitSeg2_1TimeQuantum = ((uint8_t)0x00), CAN_BitSeg2_2TimeQuantum = ((uint8_t)0x10), CAN_BitSeg2_3TimeQuantum = ((uint8_t)0x20), CAN_BitSeg2_4TimeQuantum = ((uint8_t)0x30),
  CAN_BitSeg2_5TimeQuantum = ((uint8_t)0x40), CAN_BitSeg2_6TimeQuantum = ((uint8_t)0x50), CAN_BitSeg2_7TimeQuantum = ((uint8_t)0x60), CAN_BitSeg2_8TimeQuantum = ((uint8_t)0x70)
}
 time quantum in bit segment 2 More...
enum  CAN_ErrorCode_TypeDef {
  CAN_ErrorCode_NoErr = ((uint8_t)0x00), CAN_ErrorCode_StuffErr = ((uint8_t)0x10), CAN_ErrorCode_FormErr = ((uint8_t)0x20), CAN_ErrorCode_ACKErr = ((uint8_t)0x30),
  CAN_ErrorCode_BitRecessiveErr = ((uint8_t)0x40), CAN_ErrorCode_BitDominantErr = ((uint8_t)0x50), CAN_ErrorCode_CRCErr = ((uint8_t)0x60), CAN_ErrorCode_SoftwareSetErr = ((uint8_t)0x70)
}
 CAN Error Code description. More...
enum  CAN_FilterMode_TypeDef { CAN_FilterMode_IdMask = ((uint8_t)0x00), CAN_FilterMode_IdMask_IdList = ((uint8_t)0x10), CAN_FilterMode_IdList_IdMask = ((uint8_t)0x11), CAN_FilterMode_IdList = ((uint8_t)0x01) }
 CAN filter mode. More...
enum  CAN_FilterNumber_TypeDef {
  CAN_FilterNumber_0 = ((uint8_t)0x00), CAN_FilterNumber_1 = ((uint8_t)0x01), CAN_FilterNumber_2 = ((uint8_t)0x02), CAN_FilterNumber_3 = ((uint8_t)0x03),
  CAN_FilterNumber_4 = ((uint8_t)0x04), CAN_FilterNumber_5 = ((uint8_t)0x05)
}
 CAN filter number. More...
enum  CAN_FilterScale_TypeDef { CAN_FilterScale_8Bit = ((uint8_t)0x00), CAN_FilterScale_16_8Bit = ((uint8_t)0x02), CAN_FilterScale_16Bit = ((uint8_t)0x04), CAN_FilterScale_32Bit = ((uint8_t)0x06) }
 CAN filter scale. More...
enum  CAN_FLAG_TypeDef {
  CAN_FLAG_RQCP0 = ((uint16_t)0x3401), CAN_FLAG_RQCP1 = ((uint16_t)0x3402), CAN_FLAG_RQCP2 = ((uint16_t)0x3404), CAN_FLAG_FMP = ((uint16_t)0x1203),
  CAN_FLAG_FF = ((uint16_t)0x3208), CAN_FLAG_FOV = ((uint16_t)0x3210), CAN_FLAG_WKU = ((uint16_t)0x3108), CAN_FLAG_EWG = ((uint16_t)0x1001),
  CAN_FLAG_EPV = ((uint16_t)0x1002), CAN_FLAG_BOF = ((uint16_t)0x1004), CAN_FLAG_LEC = ((uint16_t)0x3070)
}
 CAN flags. More...
enum  CAN_Id_TypeDef { CAN_Id_Standard = ((uint8_t)0x00), CAN_Id_Extended = ((uint8_t)0x40) }
 CAN identifier type. More...
enum  CAN_InitStatus_TypeDef { CAN_InitStatus_Failed = 0, CAN_InitStatus_Success = ! CAN_InitStatus_Failed }
 CAN sleep constants. More...
enum  CAN_IT_TypeDef {
  CAN_IT_TME = ((uint16_t)0x0001), CAN_IT_FMP = ((uint16_t)0x0002), CAN_IT_FF = ((uint16_t)0x0004), CAN_IT_FOV = ((uint16_t)0x0008),
  CAN_IT_WKU = ((uint16_t)0x0080), CAN_IT_ERR = ((uint16_t)0x4000), CAN_IT_EWG = ((uint16_t)0x0100), CAN_IT_EPV = ((uint16_t)0x0200),
  CAN_IT_BOF = ((uint16_t)0x0400), CAN_IT_LEC = ((uint16_t)0x0800)
}
 CAN interrupts. More...
enum  CAN_MasterCtrl_TypeDef {
  CAN_MasterCtrl_AllDisabled = ((uint8_t)0x00), CAN_MasterCtrl_AllEnabled = ((uint8_t)0xFC), CAN_MasterCtrl_TimeTriggerCOMMode = ((uint8_t)0x80), CAN_MasterCtrl_AutoBusOffManagement = ((uint8_t)0x40),
  CAN_MasterCtrl_AutoWakeUpMode = ((uint8_t)0x20), CAN_MasterCtrl_NoAutoReTx = ((uint8_t)0x10), CAN_MasterCtrl_RxFifoLockedMode = ((uint8_t)0x08), CAN_MasterCtrl_TxFifoPriority = ((uint8_t)0x04)
}
 CAN Time Triggered Communication mode. More...
enum  CAN_Mode_TypeDef { CAN_Mode_Normal = ((uint8_t)0x00), CAN_Mode_LoopBack = ((uint8_t)0x01), CAN_Mode_Silent = ((uint8_t)0x02), CAN_Mode_Silent_LoopBack = ((uint8_t)0x03) }
 CAN mode options. More...
enum  CAN_ModeStatus_TypeDef { CAN_ModeStatus_Failed = ((uint8_t)0x00), CAN_ModeStatus_Success = ! CAN_ModeStatus_Failed }
 CAN operating mode status. More...
enum  CAN_NbrPendingMessage_TypeDef { CAN_NbrPendingMessage_0 = ((uint8_t)0x00), CAN_NbrPendingMessage_1 = ((uint8_t)0x01), CAN_NbrPendingMessage_2 = ((uint8_t)0x02), CAN_NbrPendingMessage_3 = ((uint8_t)0x03) }
 CAN Pending Messages number. More...
enum  CAN_OperatingMode_TypeDef { CAN_OperatingMode_Initialization = ((uint8_t)0x00), CAN_OperatingMode_Normal = ((uint8_t)0x01), CAN_OperatingMode_Sleep = ((uint8_t)0x02) }
 CAN operating mode. More...
enum  CAN_Page_TypeDef {
  CAN_Page_TxMailBox0 = ((uint8_t) 0), CAN_Page_TxMailBox1 = ((uint8_t) 1), CAN_Page_TxMailBox2 = ((uint8_t) 5), CAN_Page_Filter01 = ((uint8_t) 2),
  CAN_Page_Filter23 = ((uint8_t) 3), CAN_Page_Filter45 = ((uint8_t) 4), CAN_Page_Config = ((uint8_t) 6), CAN_Page_RxFifo = ((uint8_t) 7)
}
 CAN Page Mapping. More...
enum  CAN_RTR_TypeDef { CAN_RTR_Data = ((uint8_t)0x00), CAN_RTR_Remote = ((uint8_t)0x20) }
 CAN remote transmission request. More...
enum  CAN_Sleep_TypeDef { CAN_Sleep_Failed = ((uint8_t)0x00), CAN_Sleep_Ok = ((uint8_t)0x01) }
 CAN sleep Status. More...
enum  CAN_ST7Compatibility_TypeDef { CAN_ST7Compatibility_Enable = ((uint8_t)0x00), CAN_ST7Compatibility_Disable = ((uint8_t)0x10) }
 CAN ST7 Compatibility. More...
enum  CAN_SynJumpWidth_TypeDef { CAN_SynJumpWidth_1TimeQuantum = ((uint8_t)0x00), CAN_SynJumpWidth_2TimeQuantum = ((uint8_t)0x40), CAN_SynJumpWidth_3TimeQuantum = ((uint8_t)0x80), CAN_SynJumpWidth_4TimeQuantum = ((uint8_t)0xC0) }
 CAN synchronisation jump width (SJW) More...
enum  CAN_TransmitMailBox_TypeDef { CAN_TransmitMailBox_0 = ((uint8_t) 0x00), CAN_TransmitMailBox_1 = ((uint8_t) 0x01), CAN_TransmitMailBox_2 = ((uint8_t) 0x05) }
 CAN Tx mailboxes. More...
enum  CAN_TxStatus_TypeDef {
  CAN_TxStatus_Failed = ((uint8_t)0xF0), CAN_TxStatus_Ok = ((uint8_t)0xF1), CAN_TxStatus_Pending = ((uint8_t)0xF2), CAN_TxStatus_NoMailBox = ((uint8_t)0xF4),
  CAN_TxStatus_MailBoxEmpty = ((uint8_t)0xF5), CAN_TxStatus_MailBox0Ok = ((uint8_t)0x00), CAN_TxStatus_MailBox1Ok = ((uint8_t)0x01), CAN_TxStatus_MailBox2Ok = ((uint8_t)0x05)
}
 CAN transmit Status. More...
enum  CAN_WakeUp_TypeDef { CAN_WakeUp_Failed = ((uint8_t)0x00), CAN_WakeUp_Ok = ((uint8_t)0x01) }
 CAN wake up status. More...

Enumeration Type Documentation

time quantum in bit segment 1

Enumerator:
CAN_BitSeg1_1TimeQuantum 

1 time quantum

CAN_BitSeg1_2TimeQuantum 

2 time quantum

CAN_BitSeg1_3TimeQuantum 

3 time quantum

CAN_BitSeg1_4TimeQuantum 

4 time quantum

CAN_BitSeg1_5TimeQuantum 

5 time quantum

CAN_BitSeg1_6TimeQuantum 

6 time quantum

CAN_BitSeg1_7TimeQuantum 

7 time quantum

CAN_BitSeg1_8TimeQuantum 

8 time quantum

CAN_BitSeg1_9TimeQuantum 

9 time quantum

CAN_BitSeg1_10TimeQuantum 

10 time quantum

CAN_BitSeg1_11TimeQuantum 

11 time quantum

CAN_BitSeg1_12TimeQuantum 

12 time quantum

CAN_BitSeg1_13TimeQuantum 

13 time quantum

CAN_BitSeg1_14TimeQuantum 

14 time quantum

CAN_BitSeg1_15TimeQuantum 

15 time quantum

CAN_BitSeg1_16TimeQuantum 

16 time quantum

Definition at line 126 of file stm8s_can.h.

time quantum in bit segment 2

Enumerator:
CAN_BitSeg2_1TimeQuantum 

1 time quantum

CAN_BitSeg2_2TimeQuantum 

2 time quantum

CAN_BitSeg2_3TimeQuantum 

3 time quantum

CAN_BitSeg2_4TimeQuantum 

4 time quantum

CAN_BitSeg2_5TimeQuantum 

5 time quantum

CAN_BitSeg2_6TimeQuantum 

6 time quantum

CAN_BitSeg2_7TimeQuantum 

7 time quantum

CAN_BitSeg2_8TimeQuantum 

8 time quantum

Definition at line 148 of file stm8s_can.h.

CAN Error Code description.

Enumerator:
CAN_ErrorCode_NoErr 

No Error

CAN_ErrorCode_StuffErr 

Stuff Error

CAN_ErrorCode_FormErr 

Form Error

CAN_ErrorCode_ACKErr 

Acknowledgment Error

CAN_ErrorCode_BitRecessiveErr 

Bit Recessive Error

CAN_ErrorCode_BitDominantErr 

Bit Dominant Error

CAN_ErrorCode_CRCErr 

CRC Error

CAN_ErrorCode_SoftwareSetErr 

Software Set Error

Definition at line 311 of file stm8s_can.h.

CAN filter mode.

Enumerator:
CAN_FilterMode_IdMask 

id/mask mode

CAN_FilterMode_IdMask_IdList 

Id/Mask mode First and IdList mode second

CAN_FilterMode_IdList_IdMask 

IdList mode First and IdMask mode second

CAN_FilterMode_IdList 

identifier list mode

Definition at line 175 of file stm8s_can.h.

CAN filter number.

Enumerator:
CAN_FilterNumber_0 

Filter number 0

CAN_FilterNumber_1 

Filter number 1

CAN_FilterNumber_2 

Filter number 2

CAN_FilterNumber_3 

Filter number 3

CAN_FilterNumber_4 

Filter number 4

CAN_FilterNumber_5 

Filter number 5

Definition at line 163 of file stm8s_can.h.

CAN filter scale.

Enumerator:
CAN_FilterScale_8Bit 

8-bit filter scale

CAN_FilterScale_16_8Bit 

16/8-bit filter scale

CAN_FilterScale_16Bit 

16-bit filter scale

CAN_FilterScale_32Bit 

32-bit filter scale

Definition at line 185 of file stm8s_can.h.

CAN flags.

Enumerator:
CAN_FLAG_RQCP0 

Request MailBox0 Flag

CAN_FLAG_RQCP1 

Request MailBox1 Flag

CAN_FLAG_RQCP2 

Request MailBox2 Flag

CAN_FLAG_FMP 

FIFO Message Pending Flag

CAN_FLAG_FF 

FIFO Full Flag

CAN_FLAG_FOV 

FIFO Overrun Flag

CAN_FLAG_WKU 

wake up Flag

CAN_FLAG_EWG 

Error Warning Flag

CAN_FLAG_EPV 

Error Passive Flag

CAN_FLAG_BOF 

Bus-Off Flag

CAN_FLAG_LEC 

Last error code Flag

Definition at line 260 of file stm8s_can.h.

CAN identifier type.

Enumerator:
CAN_Id_Standard 

Standard Id

CAN_Id_Extended 

Extended Id

Definition at line 215 of file stm8s_can.h.

CAN sleep constants.

Enumerator:
CAN_InitStatus_Failed 

CAN initialization failed

CAN_InitStatus_Success 

CAN initialization OK

Definition at line 66 of file stm8s_can.h.

CAN interrupts.

Enumerator:
CAN_IT_TME 

Transmit mailbox empty interrupt

CAN_IT_FMP 

FIFO message pending interrupt

CAN_IT_FF 

FIFO full interrupt

CAN_IT_FOV 

FIFO overrun interrupt

CAN_IT_WKU 

Wake-up interrupt

CAN_IT_ERR 

Genaral Error interrupt

CAN_IT_EWG 

Error warning interrupt

CAN_IT_EPV 

Error passive interrupt

CAN_IT_BOF 

Bus-off interrupt

CAN_IT_LEC 

Last error code interrupt

Definition at line 283 of file stm8s_can.h.

CAN Time Triggered Communication mode.

Enumerator:
CAN_MasterCtrl_AllDisabled 

CAN ALL Master Control Option are DISABLED

CAN_MasterCtrl_AllEnabled 

CAN ALL Master Control Option are DISABLED

CAN_MasterCtrl_TimeTriggerCOMMode 

CAN Time Triggered Communication mode ENABLED

CAN_MasterCtrl_AutoBusOffManagement 

CAN Auto Bus Off Management ENABLED

CAN_MasterCtrl_AutoWakeUpMode 

CAN Automatic WakeUp Mode ENABLED , sleep mode is left automatically by hardware

CAN_MasterCtrl_NoAutoReTx 

CAN Non Automatic Retransmission ENABLED, MSG will be transmitted only once

CAN_MasterCtrl_RxFifoLockedMode 

CAN Receive FIFO Locked against overrun ENABLED

CAN_MasterCtrl_TxFifoPriority 

CAN Transmit FIFO Priority driven by the request order (not by the identifier of the MSG)

Definition at line 92 of file stm8s_can.h.

CAN mode options.

Enumerator:
CAN_Mode_Normal 

normal mode

CAN_Mode_LoopBack 

loopback mode

CAN_Mode_Silent 

silent mode

CAN_Mode_Silent_LoopBack 

loopback combined with silent mode

Definition at line 106 of file stm8s_can.h.

CAN operating mode status.

Enumerator:
CAN_ModeStatus_Failed 

CAN entering the specific mode failed

CAN_ModeStatus_Success 

CAN entering the specific mode Succeed

Definition at line 83 of file stm8s_can.h.

CAN Pending Messages number.

Enumerator:
CAN_NbrPendingMessage_0 

No Msg Pending

CAN_NbrPendingMessage_1 

1 Msg Pending

CAN_NbrPendingMessage_2 

2 Msg Pending

CAN_NbrPendingMessage_3 

3 Msg Pending

Definition at line 205 of file stm8s_can.h.

CAN operating mode.

Enumerator:
CAN_OperatingMode_Initialization 

Initialization mode

CAN_OperatingMode_Normal 

Normal mode

CAN_OperatingMode_Sleep 

sleep mode

Definition at line 74 of file stm8s_can.h.

CAN Page Mapping.

Enumerator:
CAN_Page_TxMailBox0 

CAN TX mailbox 0 reg page

CAN_Page_TxMailBox1 

CAN TX mailbox 1 reg page

CAN_Page_TxMailBox2 

CAN TX mailbox 2 reg page

CAN_Page_Filter01 

CAN Filters 0 & 1 reg page

CAN_Page_Filter23 

CAN Filters 2 & 3 reg page

CAN_Page_Filter45 

CAN Filters 4 & 5 reg page

CAN_Page_Config 

CAN Configuration control/status reg page

CAN_Page_RxFifo 

CAN RX FIFO registers page

Definition at line 49 of file stm8s_can.h.

CAN remote transmission request.

Enumerator:
CAN_RTR_Data 

Data frame

CAN_RTR_Remote 

Remote frame

Definition at line 223 of file stm8s_can.h.

CAN sleep Status.

Enumerator:
CAN_Sleep_Failed 

CAN did not enter the sleep mode

CAN_Sleep_Ok 

CAN entered the sleep mode

Definition at line 245 of file stm8s_can.h.

CAN ST7 Compatibility.

Enumerator:
CAN_ST7Compatibility_Enable 

CAN is compatible with ST7 beCAN (only 2 mailboxes are available)

CAN_ST7Compatibility_Disable 

CAN is not compatible with ST7 beCAN ( 3 mailboxes are available)

Definition at line 303 of file stm8s_can.h.

CAN synchronisation jump width (SJW)

Enumerator:
CAN_SynJumpWidth_1TimeQuantum 

1 time quantum

CAN_SynJumpWidth_2TimeQuantum 

2 time quantum

CAN_SynJumpWidth_3TimeQuantum 

3 time quantum

CAN_SynJumpWidth_4TimeQuantum 

4 time quantum

Definition at line 116 of file stm8s_can.h.

CAN Tx mailboxes.

Enumerator:
CAN_TransmitMailBox_0 

CAN TX mailbox 0 reg page

CAN_TransmitMailBox_1 

CAN TX mailbox 1 reg page

CAN_TransmitMailBox_2 

CAN TX mailbox 2 reg page

Definition at line 196 of file stm8s_can.h.

CAN transmit Status.

Enumerator:
CAN_TxStatus_Failed 

CAN transmission failed

CAN_TxStatus_Ok 

CAN transmission succeeded

CAN_TxStatus_Pending 

CAN transmission pending

CAN_TxStatus_NoMailBox 

CAN cell did not provide an empty mailbox

CAN_TxStatus_MailBoxEmpty 

CAN Tx mailbox is Empty

CAN_TxStatus_MailBox0Ok 

CAN transmission succeeded by mail box 1

CAN_TxStatus_MailBox1Ok 

CAN transmission succeeded by mail box 2

CAN_TxStatus_MailBox2Ok 

CAN transmission succeeded by mail box 3

Definition at line 231 of file stm8s_can.h.

CAN wake up status.

Enumerator:
CAN_WakeUp_Failed 

CAN did not leave the sleep mode

CAN_WakeUp_Ok 

CAN leaved the sleep mode

Definition at line 252 of file stm8s_can.h.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com