ファームウェア関数一覧
CAN_FilterInit †
ヘッダ宣言 †
関数プロトタイプ †
void CAN_FilterInit(CAN_FilterInitTypeDef* CAN_FilterInitStruct)
動作 †
- CAN_FilterInitStruct構造体のパラメータに従ってCAN周辺回路を初期化します。
引数 †
|CAN_FilterMode Description
CAN_FilterMode_IdMask id/mask mode
CAN_FilterMode_IdList identifier list mode
- CAN_FilterMode
CAN_FilterScale Description
CAN_FilterScale_Two16bit Two 16-bit filters
CAN_FilterScale_One32bit One 32-bit filter
- CAN_FilterScale
CAN_FilterIdHigh is used to select the filter identification number (MSBs for a 32-bit configuration, first one for a 16-bit configuration).
0x0000 to 0xFFFF
- CAN_FilterIdHigh
CAN_FilterIdLow is used to select the filter identification number (LSBs for a 32-bit configuration, second one for a 16-bit configuration).
- CAN_FilterIdLow
0x0000 to 0xFFFF
- CAN_FilterMaskIdHigh
CAN_FilterMaskIdHigh is used to select the filter mask number or identification number,
according to the mode (MSBs for a 32-bit configuration, first one for a 16-bit configuration). It
ranges from 0x0000 to 0xFFFF.
- CAN_FilterMaskIdLow
CAN_FilterMaskIdLow
CAN_FilterMaskIdLow is used to select the filter mask number or identification number,
according to the mode (LSBs for a 32-bit configuration, second one for a 16-bit
configuration). It ranges from 0x0000 to 0xFFFF.
- CAN_FilterFIFOAssignment
CAN_FilterFIFO Description
CAN_FilterFIFO0 Filter FIFO 0 assignment for filter x
CAN_FilterFIFO1 Filter FIFO 1assignment for filter x
- FunctionalState CAN_FilterActivation
CAN_FilterActivation
CAN_FilterActivation enables or disables the filter. It can be set either to ENABLE or
DISABLE.
戻り値 †
場所 †
呼び出し関数 †
サンプル †
/* Initialize the CAN filter 2 */
CAN_FilterInitTypeDef CAN_FilterInitStructure;
CAN_FilterInitStructure.CAN_FilterNumber = 2;
CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask;
CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_One32bit;
CAN_FilterInitStructure.CAN_FilterIdHigh = 0x0F0F;
CAN_FilterInitStructure.CAN_FilterIdLow = 0xF0F0;
CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0xFF00;
CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0x00FF;
CAN_FilterInitStructure.CAN_FilterFIFO = CAN_FilterFIFO0;
CAN_FilterInitStructure.CAN_FilterActivation = ENABLE;
CAN_FilterInit(&CAN_InitStructure);
参照 †