/* CAN Filter Single Standard Frame w/RTR set Notes:  */
void can_filter_single_std_rtr(uint32_t canport, uint32_t id, uint32_t id_mask, uint8_t db1, uint8_t db1_mask, uint8_t db2, uint8_t db2_mask)
/* CAN Filter Single Standard Frame w/RTR set Notes:  */
void can_filter_single_std_rtr(uint32_t canport, uint32_t id, uint32_t id_mask, uint8_t db1, uint8_t db1_mask, uint8_t db2, uint8_t db2_mask)
{
	uint32_t word = ((id << 21) & CAN_ACR_SINGLE_STD_ID)
		| CAN_ACR_SINGLE_STD_RTR | ((db1 << 8) & CAN_ACR_SINGLE_STD_DB1)
		| ((db2 << 0) & CAN_ACR_SINGLE_STD_DB2);
	CAN_ACR(canport) = __builtin_bswap32(word);
	word = ((~id_mask << 21) & CAN_ACR_SINGLE_STD_ID)
		| ((~db1_mask << 8) & CAN_ACR_SINGLE_STD_DB1)
		| ((~db2_mask << 0) & CAN_ACR_SINGLE_STD_DB2);
	CAN_AMR(canport) = __builtin_bswap32(word);
	CAN_ISR_SR_CMR_MR_SET(canport, CAN_MR_AFM);
}