39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_spi_master.h"
74 #define FIXED_FILTER_ADDRESS
82 #define MCP2518FD_FIFO_08TO15_IMPLEMENTED
83 #define MCP2518FD_FIFO_16TO31_IMPLEMENTED
91 #define MCP2518FD_FILT_08TO15_IMPLEMENTED
92 #define MCP2518FD_FILT_16TO31_IMPLEMENTED
100 #define CAN_INTERNAL_OSC_PRESENT
108 #define CAN_RESTRICTED_MODE_PRESENT
116 #define CAN_TXQUEUE_IMPLEMENTED
125 #define USERADDRESS_TIMES_FOUR
129 #define N_MCP2518_CTRL_REGS 5
132#define MCP2518FD_MAX_TXQUEUE_ATTEMPTS 50
133#define MCP2518FD_TX_REQUEST_ID 0x300
134#define MCP2518FD_TX_RESPONSE_ID 0x301
136#define MCP2518FD_CRCBASE 0xFFFF
137#define MCP2518FD_CRCUPPER 1
138#define MCP2518FD_DRV_CANFDSPI_INDEX_0 0
139#define MCP2518FD_SPI_DEFAULT_BUFFER_LENGTH 96
141#define MCP2518FD_ISO_CRC 1
143#define MCP2518FD_MAX_MSG_SIZE 76
145#define MCP2518FD_MAX_DATA_BYTES 64
147#define MCP2518FD_INS_RESET 0x00
148#define MCP2518FD_INS_READ 0x03
149#define MCP2518FD_INS_READ_CRC 0x0B
150#define MCP2518FD_INS_WRITE 0x02
151#define MCP2518FD_INS_WRITE_CRC 0x0A
152#define MCP2518FD_INS_WRITE_SAFE 0x0C
155#define MCP2518FD_FIFO_OFFSET ( 3 * 4 )
156#define MCP2518FD_FILTER_OFFSET ( 2 * 4 )
158#ifdef CAN_TXQUEUE_IMPLEMENTED
159 #define MCP2518FD_REG_CITXQCON 0x050
160 #define MCP2518FD_REG_CITXQSTA 0x054
161 #define MCP2518FD_REG_CITXQUA 0x058
164#ifdef FIXED_FILTER_ADDRESS
165 #define MCP2518FD_REG_CIFLTCON 0x1D0
166 #define MCP2518FD_REG_CIFLTOBJ 0x1F0
167 #define MCP2518FD_REG_CIMASK 0x1F4
169 #define MCP2518FD_REG_CIFLTCON ( MCP2518FD_REG_CIFIFOCON + ( MCP2518FD_FIFO_OFFSET * MCP2518FD_FIFO_TOTAL_CHANNELS ) )
170 #define MCP2518FD_REG_CIFLTOBJ ( MCP2518FD_REG_CIFLTCON + MCP2518FD_FIFO_TOTAL_CHANNELS )
171 #define MCP2518FD_REG_CIMASK ( MCP2518FD_REG_CIFLTOBJ + 4 )
174#define MCP2518FD_REG_OSC 0xE00
175#define MCP2518FD_REG_IOCON 0xE04
176#define MCP2518FD_REG_CRC 0xE08
177#define MCP2518FD_REG_ECCCON 0xE0C
178#define MCP2518FD_REG_ECCSTA 0xE10
180#define MCP2518FD_RAM_SIZE 2048
181#define MCP2518FD_RAMADDR_START 0x400
182#define MCP2518FD_RAMADDR_END ( MCP2518FD_RAMADDR_START + MCP2518FD_RAM_SIZE )
184#define MCP2518FD_LOW_POWER_MODE_EN 0x08
185#define MCP2518FD_LOW_POWER_MODE_DIS 0x00
186#define MCP2518FD_WAKEUP_INTERR_EN 0x40
188#define MCP2518FD_REG_CICON 0x000
189#define MCP2518FD_REG_CINBTCFG 0x004
190#define MCP2518FD_REG_CIDBTCFG 0x008
191#define MCP2518FD_REG_CITDC 0x00C
193#define MCP2518FD_REG_CITBC 0x010
194#define MCP2518FD_REG_CITSCON 0x014
195#define MCP2518FD_REG_CIVEC 0x018
196#define MCP2518FD_REG_CIINT 0x01C
197#define MCP2518FD_REG_CIINTFLAG MCP2518FD_REG_CIINT
198#define MCP2518FD_REG_CIINTENABLE ( MCP2518FD_REG_CIINT + 2 )
200#define MCP2518FD_REG_CIRXIF 0x020
201#define MCP2518FD_REG_CITXIF 0x024
202#define MCP2518FD_REG_CIRXOVIF 0x028
203#define MCP2518FD_REG_CITXATIF 0x02C
205#define MCP2518FD_REG_CITXREQ 0x030
206#define MCP2518FD_REG_CITREC 0x034
207#define MCP2518FD_REG_CIBDIAG0 0x038
208#define MCP2518FD_REG_CIBDIAG1 0x03C
210#define MCP2518FD_REG_CITEFCON 0x040
211#define MCP2518FD_REG_CITEFSTA 0x044
212#define MCP2518FD_REG_CITEFUA 0x048
213#define MCP2518FD_REG_CIFIFOBA 0x04C
215#define MCP2518FD_REG_CIFIFOCON 0x050
216#define MCP2518FD_REG_CIFIFOSTA 0x054
217#define MCP2518FD_REG_CIFIFOUA 0x058
250#define MCP2518FD_FIFO_CH0 0
251#define MCP2518FD_FIFO_CH1 1
252#define MCP2518FD_FIFO_CH2 2
253#define MCP2518FD_FIFO_CH3 3
254#define MCP2518FD_FIFO_CH4 4
255#define MCP2518FD_FIFO_CH5 5
256#define MCP2518FD_FIFO_CH6 6
257#define MCP2518FD_FIFO_CH7 7
259#ifdef MCP2518FD_FIFO_08TO15_IMPLEMENTED
260 #define MCP2518FD_FIFO_CH8 8
261 #define MCP2518FD_FIFO_CH9 9
262 #define MCP2518FD_FIFO_CH10 10
263 #define MCP2518FD_FIFO_CH11 11
264 #define MCP2518FD_FIFO_CH12 12
265 #define MCP2518FD_FIFO_CH13 13
266 #define MCP2518FD_FIFO_CH14 14
267 #define MCP2518FD_FIFO_CH15 15
270#ifdef MCP2518FD_FIFO_16TO31_IMPLEMENTED
271 #define MCP2518FD_FIFO_CH16 16
272 #define MCP2518FD_FIFO_CH17 17
273 #define MCP2518FD_FIFO_CH18 18
274 #define MCP2518FD_FIFO_CH19 19
275 #define MCP2518FD_FIFO_CH20 20
276 #define MCP2518FD_FIFO_CH21 21
277 #define MCP2518FD_FIFO_CH22 22
278 #define MCP2518FD_FIFO_CH23 23
279 #define MCP2518FD_FIFO_CH24 24
280 #define MCP2518FD_FIFO_CH25 25
281 #define MCP2518FD_FIFO_CH26 26
282 #define MCP2518FD_FIFO_CH27 27
283 #define MCP2518FD_FIFO_CH28 28
284 #define MCP2518FD_FIFO_CH29 29
285 #define MCP2518FD_FIFO_CH30 30
286 #define MCP2518FD_FIFO_CH31 31
290#define MCP2518FD_FIFO_TOTAL_CHANNELS 32
292#ifdef CAN_TXQUEUE_IMPLEMENTED
293 #define MCP2518FD_FIFO_FIRST_CHANNEL MCP2518FD_FIFO_CH1
294 #define CAN_TXQUEUE_CH0 MCP2518FD_FIFO_CH0
296 #define MCP2518FD_FIFO_FIRST_CHANNEL MCP2518FD_FIFO_CH0
303#define MCP2518FD_FILT0 0
304#define MCP2518FD_FILT1 1
305#define MCP2518FD_FILT2 2
306#define MCP2518FD_FILT3 3
307#define MCP2518FD_FILT4 4
308#define MCP2518FD_FILT5 5
309#define MCP2518FD_FILT6 6
310#define MCP2518FD_FILT7 7
312#ifdef MCP2518FD_FILT_08TO15_IMPLEMENTED
313 #define MCP2518FD_FILT8 8
314 #define MCP2518FD_FILT9 9
315 #define MCP2518FD_FILT10 10
316 #define MCP2518FD_FILT11 11
317 #define MCP2518FD_FILT12 12
318 #define MCP2518FD_FILT13 13
319 #define MCP2518FD_FILT14 14
320 #define MCP2518FD_FILT15 15
323#ifdef MCP2518FD_FILT_16TO31_IMPLEMENTED
324 #define MCP2518FD_FILT16 16
325 #define MCP2518FD_FILT17 17
326 #define MCP2518FD_FILT18 18
327 #define MCP2518FD_FILT19 19
328 #define MCP2518FD_FILT20 20
329 #define MCP2518FD_FILT21 21
330 #define MCP2518FD_FILT22 22
331 #define MCP2518FD_FILT23 23
332 #define MCP2518FD_FILT24 24
333 #define MCP2518FD_FILT25 25
334 #define MCP2518FD_FILT26 26
335 #define MCP2518FD_FILT27 27
336 #define MCP2518FD_FILT28 28
337 #define MCP2518FD_FILT29 29
338 #define MCP2518FD_FILT30 30
339 #define MCP2518FD_FILT31 31
342#define MCP2518FD_FILT_TOTAL 32
348#define MCP2518FD_NORMAL_MODE 0x00
349#define MCP2518FD_SLEEP_MODE 0x01
350#define MCP2518FD_INT_LOOP_MODE 0x02
351#define MCP2518FD_LISTEN_ONLY_MODE 0x03
352#define MCP2518FD_CONFIG_MODE 0x04
353#define MCP2518FD_EXT_LOOP_MODE 0x05
354#define MCP2518FD_CLASSIC_MODE 0x06
355#define MCP2518FD_RESTRICT_MODE 0x07
356#define MCP2518FD_INVALID_MODE 0xFF
362#define MCP2518FD_TXBWS_NO_DELAY 0
363#define MCP2518FD_TXBWS_2 1
364#define MCP2518FD_TXBWS_4 2
365#define MCP2518FD_TXBWS_8 3
366#define MCP2518FD_TXBWS_16 4
367#define MCP2518FD_TXBWS_32 5
368#define MCP2518FD_TXBWS_64 6
369#define MCP2518FD_TXBWS_128 7
370#define MCP2518FD_TXBWS_256 8
371#define MCP2518FD_TXBWS_512 9
372#define MCP2518FD_TXBWS_1024 10
373#define MCP2518FD_TXBWS_2048 11
374#define MCP2518FD_TXBWS_4096 12
380#define MCP2518FD_WFT00 0
381#define MCP2518FD_WFT01 1
382#define MCP2518FD_WFT10 2
383#define MCP2518FD_WFT11 3
389#define MCP2518FD_DNET_FILT_DISABLE 0
390#define MCP2518FD_DNET_FILT_SIZE_1_BIT 1
391#define MCP2518FD_DNET_FILT_SIZE_2_BIT 2
392#define MCP2518FD_DNET_FILT_SIZE_3_BIT 3
393#define MCP2518FD_DNET_FILT_SIZE_4_BIT 4
394#define MCP2518FD_DNET_FILT_SIZE_5_BIT 5
395#define MCP2518FD_DNET_FILT_SIZE_6_BIT 6
396#define MCP2518FD_DNET_FILT_SIZE_7_BIT 7
397#define MCP2518FD_DNET_FILT_SIZE_8_BIT 8
398#define MCP2518FD_DNET_FILT_SIZE_9_BIT 9
399#define MCP2518FD_DNET_FILT_SIZE_10_BIT 10
400#define MCP2518FD_DNET_FILT_SIZE_11_BIT 11
401#define MCP2518FD_DNET_FILT_SIZE_12_BIT 12
402#define MCP2518FD_DNET_FILT_SIZE_13_BIT 13
403#define MCP2518FD_DNET_FILT_SIZE_14_BIT 14
404#define MCP2518FD_DNET_FILT_SIZE_15_BIT 15
405#define MCP2518FD_DNET_FILT_SIZE_16_BIT 16
406#define MCP2518FD_DNET_FILT_SIZE_17_BIT 17
407#define MCP2518FD_DNET_FILT_SIZE_18_BIT 18
413#define MCP2518FD_PLSIZE_8 0
414#define MCP2518FD_PLSIZE_12 1
415#define MCP2518FD_PLSIZE_16 2
416#define MCP2518FD_PLSIZE_20 3
417#define MCP2518FD_PLSIZE_24 4
418#define MCP2518FD_PLSIZE_32 5
419#define MCP2518FD_PLSIZE_48 6
420#define MCP2518FD_PLSIZE_64 7
426#define MCP2518FD_DLC_0 0
427#define MCP2518FD_DLC_1 1
428#define MCP2518FD_DLC_2 2
429#define MCP2518FD_DLC_3 3
430#define MCP2518FD_DLC_4 4
431#define MCP2518FD_DLC_5 5
432#define MCP2518FD_DLC_6 6
433#define MCP2518FD_DLC_7 7
434#define MCP2518FD_DLC_8 8
435#define MCP2518FD_DLC_12 9
436#define MCP2518FD_DLC_16 10
437#define MCP2518FD_DLC_20 11
438#define MCP2518FD_DLC_24 12
439#define MCP2518FD_DLC_32 13
440#define MCP2518FD_DLC_48 14
441#define MCP2518FD_DLC_64 15
447#define MCP2518FD_RX_FIFO_EMPTY 0
448#define MCP2518FD_RX_FIFO_STATUS_MASK 0x0F
449#define MCP2518FD_RX_FIFO_NOT_EMPTY 0x01
450#define MCP2518FD_RX_FIFO_HALF_FULL 0x02
451#define MCP2518FD_RX_FIFO_FULL 0x04
452#define MCP2518FD_RX_FIFO_OVERFLOW 0x08
458#define MCP2518FD_TX_FIFO_FULL 0
459#define MCP2518FD_TX_FIFO_STATUS_MASK 0x1F7
460#define MCP2518FD_TX_FIFO_NOT_FULL 0x01
461#define MCP2518FD_TX_FIFO_HALF_FULL 0x02
462#define MCP2518FD_TX_FIFO_EMPTY 0x04
463#define MCP2518FD_TX_FIFO_ATTEMPTS_EXHAUSTED 0x10
464#define MCP2518FD_TX_FIFO_ERROR 0x20
465#define MCP2518FD_TX_FIFO_ARBITRATION_LOST 0x40
466#define MCP2518FD_TX_FIFO_ABORTED 0x80
467#define MCP2518FD_TX_FIFO_TRANSMITTING 0x100
473#define MCP2518FD_TEF_FIFO_EMPTY 0
474#define MCP2518FD_TEF_FIFO_STATUS_MASK 0x0F
475#define MCP2518FD_TEF_FIFO_NOT_EMPTY 0x01
476#define MCP2518FD_TEF_FIFO_HALF_FULL 0x02
477#define MCP2518FD_TEF_FIFO_FULL 0x04
478#define MCP2518FD_TEF_FIFO_OVERFLOW 0x08
484#define MCP2518FD_TX_FIFO_NO_EVENT 0
485#define MCP2518FD_TX_FIFO_ALL_EVENTS 0x17
486#define MCP2518FD_TX_FIFO_NOT_FULL_EVENT 0x01
487#define MCP2518FD_TX_FIFO_HALF_FULL_EVENT 0x02
488#define MCP2518FD_TX_FIFO_EMPTY_EVENT 0x04
489#define MCP2518FD_TX_FIFO_ATTEMPTS_EXHAUSTED_EVENT 0x10
491#define MCP2518FD_RX_FIFO_NO_EVENT 0
492#define MCP2518FD_RX_FIFO_ALL_EVENTS 0x0F
493#define MCP2518FD_RX_FIFO_NOT_EMPTY_EVENT 0x01
494#define MCP2518FD_RX_FIFO_HALF_FULL_EVENT 0x02
495#define MCP2518FD_RX_FIFO_FULL_EVENT 0x04
496#define MCP2518FD_RX_FIFO_OVERFLOW_EVENT 0x08
498#define MCP2518FD_TEF_FIFO_NO_EVENT 0
499#define MCP2518FD_TEF_FIFO_ALL_EVENTS 0x0F
500#define MCP2518FD_TEF_FIFO_NOT_EMPTY_EVENT 0x01
501#define MCP2518FD_TEF_FIFO_HALF_FULL_EVENT 0x02
502#define MCP2518FD_TEF_FIFO_FULL_EVENT 0x04
503#define MCP2518FD_TEF_FIFO_OVERFLOW_EVENT 0x08
505#define MCP2518FD_NO_EVENT 0
506#define MCP2518FD_ALL_EVENTS 0xFF1F
507#define MCP2518FD_TX_EVENT 0x0001
508#define MCP2518FD_RX_EVENT 0x0002
509#define MCP2518FD_TIME_BASE_COUNTER_EVENT 0x0004
510#define MCP2518FD_OPERATION_MODE_CHANGE_EVENT 0x0008
511#define MCP2518FD_TEF_EVENT 0x0010
513#define MCP2518FD_RAM_ECC_EVENT 0x0100
514#define MCP2518FD_SPI_CRC_EVENT 0x0200
515#define MCP2518FD_TX_ATTEMPTS_EVENT 0x0400
516#define MCP2518FD_RX_OVERFLOW_EVENT 0x0800
517#define MCP2518FD_SYSTEM_ERROR_EVENT 0x1000
518#define MCP2518FD_BUS_ERROR_EVENT 0x2000
519#define MCP2518FD_BUS_WAKEUP_EVENT 0x4000
520#define MCP2518FD_RX_INVALID_MESSAGE_EVENT 0x8000
522#define MCP2518FD_500K_1M 0
523#define MCP2518FD_500K_2M 1
524#define MCP2518FD_500K_3M 2
525#define MCP2518FD_500K_4M 3
526#define MCP2518FD_500K_5M 4
527#define MCP2518FD_500K_6M7 5
528#define MCP2518FD_500K_8M 6
529#define MCP2518FD_500K_10M 7
530#define MCP2518FD_250K_500K 8
531#define MCP2518FD_250K_833K 9
532#define MCP2518FD_250K_1M 10
533#define MCP2518FD_250K_1M5 11
534#define MCP2518FD_250K_2M 12
535#define MCP2518FD_250K_3M 13
536#define MCP2518FD_250K_4M 14
537#define MCP2518FD_1000K_4M 15
538#define MCP2518FD_1000K_8M 16
539#define MCP2518FD_125K_500K 17
541#define MCP2518FD_NBT_125K 0
542#define MCP2518FD_NBT_250K 1
543#define MCP2518FD_NBT_500K 2
544#define MCP2518FD_NBT_1M 3
546#define MCP2518FD_DBT_500K 0
547#define MCP2518FD_DBT_833K 1
548#define MCP2518FD_DBT_1M 2
549#define MCP2518FD_DBT_1M5 3
550#define MCP2518FD_DBT_2M 4
551#define MCP2518FD_DBT_3M 5
552#define MCP2518FD_DBT_4M 6
553#define MCP2518FD_DBT_5M 7
554#define MCP2518FD_DBT_6M7 8
555#define MCP2518FD_DBT_8M 9
556#define MCP2518FD_DBT_10M 10
558#define MCP2518FD_SSP_MODE_OFF 0
559#define MCP2518FD_SSP_MODE_MANUAL 1
560#define MCP2518FD_SSP_MODE_AUTO 2
562#define MCP2518FD_ERROR_FREE_STATE 0
563#define MCP2518FD_ERROR_ALL 0x3F
564#define MCP2518FD_TX_RX_WARNING_STATE 0x01
565#define MCP2518FD_RX_WARNING_STATE 0x02
566#define MCP2518FD_TX_WARNING_STATE 0x04
567#define MCP2518FD_RX_BUS_PASSIVE_STATE 0x08
568#define MCP2518FD_TX_BUS_PASSIVE_STATE 0x10
569#define MCP2518FD_TX_BUS_OFF_STATE 0x20
571#define MCP2518FD_TS_SOF 0x00
572#define MCP2518FD_TS_EOF 0x01
573#define MCP2518FD_TS_RES 0x02
575#define MCP2518_ECC_NO_EVENT 0x00
576#define MCP2518_ECC_ALL_EVENTS 0x06
577#define MCP2518_ECC_SEC_EVENT 0x02
578#define MCP2518_ECC_DED_EVENT 0x04
580#define MCP2518FD_CRC_NO_EVENT 0x00
581#define MCP2518FD_CRC_ALL_EVENTS 0x03
582#define MCP2518FD_CRC_CRCERR_EVENT 0x01
583#define MCP2518FD_CRC_FORMERR_EVENT 0x02
589#define MCP2518FD_PIN_0 0
590#define MCP2518FD_PIN_1 1
592#define MCP2518FD_PINMODE_INT 0
593#define MCP2518FD_PINMODE_GPIO 1
595#define MCP2518FD_PINOUT 0
596#define MCP2518FD_PININ 1
598#define MCP2518FD_PINLOW 0
599#define MCP2518FD_PINHIGH 1
601#define MCP2518FD_PUSHPULL 0
602#define MCP2518FD_OPENDRAIN 1
604#define MCP2518FD_CLKO_CLOCK 0
605#define MCP2518FD_CLKO_SOF 1
611#define MCP2518FD_TXREQ_CH0 0x00000001
612#define MCP2518FD_TXREQ_CH1 0x00000002
613#define MCP2518FD_TXREQ_CH2 0x00000004
614#define MCP2518FD_TXREQ_CH3 0x00000008
615#define MCP2518FD_TXREQ_CH4 0x00000010
616#define MCP2518FD_TXREQ_CH5 0x00000020
617#define MCP2518FD_TXREQ_CH6 0x00000040
618#define MCP2518FD_TXREQ_CH7 0x00000080
620#define MCP2518FD_TXREQ_CH8 0x00000100
621#define MCP2518FD_TXREQ_CH9 0x00000200
622#define MCP2518FD_TXREQ_CH10 0x00000400
623#define MCP2518FD_TXREQ_CH11 0x00000800
624#define MCP2518FD_TXREQ_CH12 0x00001000
625#define MCP2518FD_TXREQ_CH13 0x00002000
626#define MCP2518FD_TXREQ_CH14 0x00004000
627#define MCP2518FD_TXREQ_CH15 0x00008000
629#define MCP2518FD_TXREQ_CH16 0x00010000
630#define MCP2518FD_TXREQ_CH17 0x00020000
631#define MCP2518FD_TXREQ_CH18 0x00040000
632#define MCP2518FD_TXREQ_CH19 0x00080000
633#define MCP2518FD_TXREQ_CH20 0x00100000
634#define MCP2518FD_TXREQ_CH21 0x00200000
635#define MCP2518FD_TXREQ_CH22 0x00400000
636#define MCP2518FD_TXREQ_CH23 0x00800000
638#define MCP2518FD_TXREQ_CH24 0x01000000
639#define MCP2518FD_TXREQ_CH25 0x02000000
640#define MCP2518FD_TXREQ_CH26 0x04000000
641#define MCP2518FD_TXREQ_CH27 0x08000000
642#define MCP2518FD_TXREQ_CH28 0x10000000
643#define MCP2518FD_TXREQ_CH29 0x20000000
644#define MCP2518FD_TXREQ_CH30 0x40000000
645#define MCP2518FD_TXREQ_CH31 0x80000000
651#define MCP2518FD_ICODE_FIFO_CH0 0
652#define MCP2518FD_ICODE_FIFO_CH1 1
653#define MCP2518FD_ICODE_FIFO_CH2 2
654#define MCP2518FD_ICODE_FIFO_CH3 3
655#define MCP2518FD_ICODE_FIFO_CH4 4
656#define MCP2518FD_ICODE_FIFO_CH5 5
657#define MCP2518FD_ICODE_FIFO_CH6 6
658#define MCP2518FD_ICODE_FIFO_CH7 7
660#ifdef MCP2518FD_FIFO_08TO15_IMPLEMENTED
661 #define MCP2518FD_ICODE_FIFO_CH8 8
662 #define MCP2518FD_ICODE_FIFO_CH9 9
663 #define MCP2518FD_ICODE_FIFO_CH10 10
664 #define MCP2518FD_ICODE_FIFO_CH11 11
665 #define MCP2518FD_ICODE_FIFO_CH12 12
666 #define MCP2518FD_ICODE_FIFO_CH13 13
667 #define MCP2518FD_ICODE_FIFO_CH14 14
668 #define MCP2518FD_ICODE_FIFO_CH15 15
671#ifdef MCP2518FD_FIFO_16TO31_IMPLEMENTED
672 #define MCP2518FD_ICODE_FIFO_CH16 16
673 #define MCP2518FD_ICODE_FIFO_CH17 17
674 #define MCP2518FD_ICODE_FIFO_CH18 18
675 #define MCP2518FD_ICODE_FIFO_CH19 19
676 #define MCP2518FD_ICODE_FIFO_CH20 20
677 #define MCP2518FD_ICODE_FIFO_CH21 21
678 #define MCP2518FD_ICODE_FIFO_CH22 22
679 #define MCP2518FD_ICODE_FIFO_CH23 23
680 #define MCP2518FD_ICODE_FIFO_CH24 24
681 #define MCP2518FD_ICODE_FIFO_CH25 25
682 #define MCP2518FD_ICODE_FIFO_CH26 26
683 #define MCP2518FD_ICODE_FIFO_CH27 27
684 #define MCP2518FD_ICODE_FIFO_CH28 28
685 #define MCP2518FD_ICODE_FIFO_CH29 29
686 #define MCP2518FD_ICODE_FIFO_CH30 30
687 #define MCP2518FD_ICODE_FIFO_CH31 31
690#define MCP2518FD_ICODE_TOTAL_CHANNELS 32
691#define MCP2518FD_ICODE_NO_INT 64
692#define MCP2518FD_ICODE_CERRIF 65
693#define MCP2518FD_ICODE_WAKIF 66
694#define MCP2518FD_ICODE_RXOVIF 67
695#define MCP2518FD_ICODE_ADDRERR_SERRIF 68
696#define MCP2518FD_ICODE_MABOV_SERRIF 69
697#define MCP2518FD_ICODE_TBCIF 70
698#define MCP2518FD_ICODE_MODIF 71
699#define MCP2518FD_ICODE_IVMIF 72
700#define MCP2518FD_ICODE_TEFIF 73
701#define MCP2518FD_ICODE_TXATIF 74
702#define MCP2518FD_ICODE_RESERVED 75
708#define MCP2518FD_RXCODE_FIFO_CH0 0
709#define MCP2518FD_RXCODE_FIFO_CH1 1
710#define MCP2518FD_RXCODE_FIFO_CH2 2
711#define MCP2518FD_RXCODE_FIFO_CH3 3
712#define MCP2518FD_RXCODE_FIFO_CH4 4
713#define MCP2518FD_RXCODE_FIFO_CH5 5
714#define MCP2518FD_RXCODE_FIFO_CH6 6
715#define MCP2518FD_RXCODE_FIFO_CH7 7
717#ifdef MCP2518FD_FIFO_08TO15_IMPLEMENTED
718 #define MCP2518FD_RXCODE_FIFO_CH8 8
719 #define MCP2518FD_RXCODE_FIFO_CH9 9
720 #define MCP2518FD_RXCODE_FIFO_CH10 10
721 #define MCP2518FD_RXCODE_FIFO_CH11 11
722 #define MCP2518FD_RXCODE_FIFO_CH12 12
723 #define MCP2518FD_RXCODE_FIFO_CH13 13
724 #define MCP2518FD_RXCODE_FIFO_CH14 14
725 #define MCP2518FD_RXCODE_FIFO_CH15 15
728#ifdef MCP2518FD_FIFO_16TO31_IMPLEMENTED
729 #define MCP2518FD_RXCODE_FIFO_CH16 16
730 #define MCP2518FD_RXCODE_FIFO_CH17 17
731 #define MCP2518FD_RXCODE_FIFO_CH18 18
732 #define MCP2518FD_RXCODE_FIFO_CH19 19
733 #define MCP2518FD_RXCODE_FIFO_CH20 20
734 #define MCP2518FD_RXCODE_FIFO_CH21 21
735 #define MCP2518FD_RXCODE_FIFO_CH22 22
736 #define MCP2518FD_RXCODE_FIFO_CH23 23
737 #define MCP2518FD_RXCODE_FIFO_CH24 24
738 #define MCP2518FD_RXCODE_FIFO_CH25 25
739 #define MCP2518FD_RXCODE_FIFO_CH26 26
740 #define MCP2518FD_RXCODE_FIFO_CH27 27
741 #define MCP2518FD_RXCODE_FIFO_CH28 28
742 #define MCP2518FD_RXCODE_FIFO_CH29 29
743 #define MCP2518FD_RXCODE_FIFO_CH30 30
744 #define MCP2518FD_RXCODE_FIFO_CH31 31
747#define MCP2518FD_RXCODE_TOTAL_CHANNELS 32
748#define MCP2518FD_RXCODE_NO_INT 64
749#define MCP2518FD_RXCODE_RESERVED 65
755#define MCP2518FD_TXCODE_FIFO_CH0 0
756#define MCP2518FD_TXCODE_FIFO_CH1 1
757#define MCP2518FD_TXCODE_FIFO_CH2 2
758#define MCP2518FD_TXCODE_FIFO_CH3 3
759#define MCP2518FD_TXCODE_FIFO_CH4 4
760#define MCP2518FD_TXCODE_FIFO_CH5 5
761#define MCP2518FD_TXCODE_FIFO_CH6 6
762#define MCP2518FD_TXCODE_FIFO_CH7 7
764#ifdef MCP2518FD_FIFO_08TO15_IMPLEMENTED
765 #define MCP2518FD_TXCODE_FIFO_CH8 8
766 #define MCP2518FD_TXCODE_FIFO_CH9 9
767 #define MCP2518FD_TXCODE_FIFO_CH10 10
768 #define MCP2518FD_TXCODE_FIFO_CH11 11
769 #define MCP2518FD_TXCODE_FIFO_CH12 12
770 #define MCP2518FD_TXCODE_FIFO_CH13 13
771 #define MCP2518FD_TXCODE_FIFO_CH14 14
772 #define MCP2518FD_TXCODE_FIFO_CH15 15
775#ifdef MCP2518FD_FIFO_16TO31_IMPLEMENTED
776 #define MCP2518FD_TXCODE_FIFO_CH16 16
777 #define MCP2518FD_TXCODE_FIFO_CH17 17
778 #define MCP2518FD_TXCODE_FIFO_CH18 18
779 #define MCP2518FD_TXCODE_FIFO_CH19 19
780 #define MCP2518FD_TXCODE_FIFO_CH20 20
781 #define MCP2518FD_TXCODE_FIFO_CH21 21
782 #define MCP2518FD_TXCODE_FIFO_CH22 22
783 #define MCP2518FD_TXCODE_FIFO_CH23 23
784 #define MCP2518FD_TXCODE_FIFO_CH24 24
785 #define MCP2518FD_TXCODE_FIFO_CH25 25
786 #define MCP2518FD_TXCODE_FIFO_CH26 26
787 #define MCP2518FD_TXCODE_FIFO_CH27 27
788 #define MCP2518FD_TXCODE_FIFO_CH28 28
789 #define MCP2518FD_TXCODE_FIFO_CH29 29
790 #define MCP2518FD_TXCODE_FIFO_CH30 30
791 #define MCP2518FD_TXCODE_FIFO_CH31 31
794#define MCP2518FD_TXCODE_TOTAL_CHANNELS 32
795#define MCP2518FD_TXCODE_NO_INT 64
796#define MCP2518FD_TXCODE_RESERVED 65
802#define MCP2518FD_SYSCLK_40M 0
803#define MCP2518FD_SYSCLK_20M 1
804#define MCP2518FD_SYSCLK_10M 2
810#define MCP2518FD_CLKO_DIV1 0
811#define MCP2518FD_CLKO_DIV2 1
812#define MCP2518FD_CLKO_DIV4 2
813#define MCP2518FD_CLKO_DIV10 3
815#define N_MCP2518FD_FIFO_REGS ( MCP2518FD_FIFO_TOTAL_CHANNELS * MCP2518FD_FIFO_OFFSET )
816#define N_MCP2518FD_FILT_CTRL_REGS ( MCP2518FD_FILT_TOTAL / 4 )
817#define N_MCP2518FD_FILT_OBJ_REGS ( MCP2518FD_FILT_TOTAL * MCP2518FD_FILTER_OFFSET )
827#define MCP2518FD_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
828#define MCP2518FD_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
846#define MCP2518FD_MAP_MIKROBUS( cfg, mikrobus ) \
847 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
848 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
849 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
850 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
851 cfg.stby = MIKROBUS( mikrobus, MIKROBUS_AN ); \
852 cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
853 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
1182 uint32_t unimplemented1 : 1;
1184 uint32_t unimplemented2 : 1;
1186 uint32_t tx_enable : 1;
1189 uint32_t freset : 1;
1190 uint32_t unimplemented3 : 5;
1193 uint32_t unimplemented4 : 1;
1194 uint32_t fifo_size : 5;
1195 uint32_t pay_load_size : 3;
1666 uint32_t unimplemented1 : 1;
1671 uint32_t fifo_index : 5;
1672 uint32_t unimplemented2 : 19;
err_t mcp2518fd_filter_object_configure(mcp2518fd_t *ctx, uint8_t filter, mcp2518fd_filt_obj_id_t *id)
Filter Object Configuration.
err_t mcp2518fd_bit_time_configure(mcp2518fd_t *ctx, uint8_t bit_time, uint8_t clk)
Configure Bit Time registers (based on CAN clock speed).
err_t mcp2518fd_ecc_event_disable(mcp2518fd_t *ctx, uint8_t flags)
ECC Event Disable.
err_t mcp2518fd_tef_message_get(mcp2518fd_t *ctx, mcp2518fd_tef_msg_obj_t *tef_obj)
Get Transmit Event FIFO Message.
err_t mcp2518fd_operation_mode_get(mcp2518fd_t *ctx)
Get Operation Mode.
err_t mcp2518fd_transmit_channel_index_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *idx)
Transmit FIFO Index Get.
err_t mcp2518fd_time_stamp_set(mcp2518fd_t *ctx, uint32_t ts)
Time Stamp Set.
err_t mcp2518fd_transmit_band_width_sharing_set(mcp2518fd_t *ctx, uint8_t tx_bws)
Set Transmit Bandwidth Sharing Delay.
err_t mcp2518fd_module_event_enable(mcp2518fd_t *ctx, uint16_t flags)
Module Event Enable.
err_t mcp2518fd_crc_event_disable(mcp2518fd_t *ctx, uint8_t flags)
CRC Event Disnable.
err_t mcp2518fd_gpio_mode_configure(mcp2518fd_t *ctx, uint8_t gpio0, uint8_t gpio1)
Initialize GPIO Mode.
err_t mcp2518fd_read_byte_array(mcp2518fd_t *ctx, uint16_t address, uint8_t *data_out, uint16_t n_bytes)
SPI Read Byte Array.
err_t mcp2518fd_filter_to_fifo_link(mcp2518fd_t *ctx, uint8_t filter, uint8_t channel, bool enable)
Link Filter to FIFO.
err_t mcp2518fd_write_word_array(mcp2518fd_t *ctx, uint16_t address, uint32_t *data_in, uint16_t n_words)
SPI Write Word Array.
err_t mcp2518fd_configure(mcp2518fd_t *ctx, mcp2518fd_can_cfg_t *config)
CAN Control register configuration.
err_t mcp2518fd_time_stamp_get(mcp2518fd_t *ctx, uint32_t *time_stamp)
Time Stamp Get.
err_t mcp2518fd_transmit_channel_event_attempt_clear(mcp2518fd_t *ctx, uint8_t channel)
Transmit FIFO Event Clear.
err_t mcp2518fd_transmit_message(mcp2518fd_t *ctx, uint8_t *data_in, uint16_t data_len)
Message Transmit function.
err_t mcp2518fd_filter_disable(mcp2518fd_t *ctx, uint8_t filter)
Filter Disable.
err_t mcp2518fd_transmit_channel_load(mcp2518fd_t *ctx, uint8_t channel, mcp2518fd_tx_msg_obj_t *tx_obj, bool flush)
TX Channel Load.
err_t mcp2518fd_receive_channel_event_disable(mcp2518fd_t *ctx, uint8_t channel, uint8_t flags)
Receive FIFO Event Disable.
uint16_t mcp2518fd_calculate_crc16(uint8_t *data_pointer, uint16_t size)
Calculate CRC16.
err_t mcp2518fd_ecc_parity_get(mcp2518fd_t *ctx, uint8_t *parity)
Get ECC Parity.
err_t mcp2518fd_ecc_enable(mcp2518fd_t *ctx)
Enable ECC.
err_t mcp2518fd_tef_event_overflow_clear(mcp2518fd_t *ctx)
Transmit Event FIFO Event Clear.
err_t mcp2518fd_gpio_pin_read(mcp2518fd_t *ctx, uint8_t pos, uint8_t *state)
Input Pin Read.
err_t mcp2518fd_error_count_state_get(mcp2518fd_t *ctx, uint8_t *tec, uint8_t *rec, uint8_t *flags)
Error Counts and Error State Get.
err_t mcp2518fd_time_stamp_enable(mcp2518fd_t *ctx)
Time Stamp Enable.
err_t mcp2518fd_receive_channel_update(mcp2518fd_t *ctx, uint8_t channel)
Receive FIFO Update.
err_t mcp2518fd_module_event_disable(mcp2518fd_t *ctx, uint16_t flags)
Module Event Disable.
uint8_t mcp2518fd_data_bytes_to_dlc(uint8_t num)
Data bytes to DLC conversion.
err_t mcp2518fd_transmit_channel_event_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *flags)
Transmit FIFO Event Get.
err_t mcp2518fd_filter_mask_configure(mcp2518fd_t *ctx, uint8_t filter, mcp2518fd_mask_obj_id_t *mask)
Filter Mask Configuration.
err_t mcp2518fd_transmit_abort_all(mcp2518fd_t *ctx)
Abort All transmissions.
err_t mcp2518fd_transmit_channel_flush(mcp2518fd_t *ctx, uint8_t channel)
TX Channel Flush.
err_t mcp2518fd_gpio_standby_control_enable(mcp2518fd_t *ctx)
Enable Transceiver Standby Control.
err_t mcp2518fd_bit_time_configure_nominal_10_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Nominal bit time for 10MHz system clock.
void mcp2518fd_transmit_queue_configure_object_reset(mcp2518fd_tx_que_cfg_t *config)
Reset Transmit Queue Configure object to reset values.
err_t mcp2518fd_bit_time_configure_nominal_20_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Nominal bit time for 20MHz system clock.
err_t mcp2518fd_bit_time_configure_nominal_40_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Nominal bit time for 40MHz system clock.
err_t mcp2518fd_ecc_event_enable(mcp2518fd_t *ctx, uint8_t flags)
ECC Event Enable.
void mcp2518fd_receive_channel_configure_object_reset(mcp2518fd_rx_fifo_cfg_t *config)
Reset Receive Channel Configure object to reset value.
err_t mcp2518fd_module_event_get(mcp2518fd_t *ctx, uint16_t *flags)
Module Event Get.
err_t mcp2518fd_error_count_transmit_get(mcp2518fd_t *ctx, uint8_t *tec)
Transmit Error Count Get.
err_t mcp2518fd_tef_event_disable(mcp2518fd_t *ctx, uint8_t flags)
Transmit Event FIFO Event Disable.
err_t mcp2518fd_transmit_channel_abort(mcp2518fd_t *ctx, uint8_t channel)
Abort transmission of single FIFO.
err_t mcp2518fd_receive_message_get(mcp2518fd_t *ctx, uint8_t channel, mcp2518fd_rx_msg_obj_t *rx_obj)
Get Received Message.
err_t mcp2518fd_module_event_tx_code_get(mcp2518fd_t *ctx, uint8_t *tx_code)
Get TX Code.
void mcp2518fd_oscillator_control_object_reset(mcp2518fd_div_ctl_t *ctrl)
Reset Oscillator Control.
err_t mcp2518fd_fifo_index_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *data_out)
FIFO Index Get.
err_t mcp2518fd_bus_diagnostics_clear(mcp2518fd_t *ctx)
Clear Bus Diagnostic Registers.
err_t mcp2518fd_tef_status_get(mcp2518fd_t *ctx, uint8_t *status)
Transmit Event FIFO Status Get.
err_t mcp2518fd_tef_configure(mcp2518fd_t *ctx, mcp2518fd_tef_cfg_t *config)
Configure Transmit Event FIFO.
void mcp2518fd_cfg_setup(mcp2518fd_cfg_t *cfg)
MCP2518FD configuration object setup function.
err_t mcp2518fd_write_half_word(mcp2518fd_t *ctx, uint16_t address, uint16_t data_in)
SPI Write Half Word.
err_t mcp2518fd_module_event_filter_hit_get(mcp2518fd_t *ctx, uint8_t *filter_hit)
Get Filter Hit.
err_t mcp2518fd_ecc_parity_set(mcp2518fd_t *ctx, uint8_t parity)
Set ECC Parity.
err_t mcp2518fd_gpio_transmit_pin_open_drain_configure(mcp2518fd_t *ctx, uint8_t mode)
Configure Open Drain TXCAN.
err_t mcp2518fd_gpio_pin_set(mcp2518fd_t *ctx, uint8_t pos, uint8_t latch)
GPIO Output Pin Set.
err_t mcp2518fd_write_word(mcp2518fd_t *ctx, uint16_t address, uint32_t data_in)
SPI Write Word.
err_t mcp2518fd_time_stamp_prescaler_set(mcp2518fd_t *ctx, uint16_t time_stamp)
Time Stamp Prescaler Set.
err_t mcp2518fd_oscillator_status_get(mcp2518fd_t *ctx, mcp2518fd_osc_sta_t *status)
Get Oscillator Status.
err_t mcp2518fd_generic_write(mcp2518fd_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
MCP2518FD data writing function.
err_t mcp2518fd_time_stamp_mode_configure(mcp2518fd_t *ctx, uint8_t mode)
Time Stamp Mode Configure.
err_t mcp2518fd_generic_read(mcp2518fd_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
MCP2518FD data reading function.
void mcp2518fd_configure_object_reset(mcp2518fd_can_cfg_t *config)
Reset Configure object to reset values.
err_t mcp2518fd_ecc_event_clear(mcp2518fd_t *ctx, uint8_t flags)
ECC Event Clear.
uint32_t mcp2518fd_dlc_to_data_bytes(uint8_t dlc)
DLC to number of actual data_bytes conversion.
err_t mcp2518fd_transmit_event_attempt_get(mcp2518fd_t *ctx, uint32_t *txatif)
Get pending TXATIF of all transmit FIFOs.
err_t mcp2518fd_reset(mcp2518fd_t *ctx)
Reset function.
err_t mcp2518fd_init(mcp2518fd_t *ctx, mcp2518fd_cfg_t *cfg)
MCP2518FD initialization function.
err_t mcp2518fd_device_net_filter_count_set(mcp2518fd_t *ctx, uint8_t dnfc)
Set Device Net Filter Count.
err_t mcp2518fd_receive_channel_status_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *status)
Receive Channel Status Get.
err_t mcp2518fd_receive_event_overflow_get(mcp2518fd_t *ctx, uint32_t *rxovif)
Get pending RXOVIF of all receive FIFOs.
err_t mcp2518fd_transmit_channel_event_enable(mcp2518fd_t *ctx, uint8_t channel, uint8_t flags)
Transmit FIFO Event Enable.
err_t mcp2518fd_write_byte(mcp2518fd_t *ctx, uint16_t address, uint8_t data_in)
SPI Write Byte.
err_t mcp2518fd_tef_event_get(mcp2518fd_t *ctx, uint8_t *flags)
Transmit Event FIFO Event Get.
err_t mcp2518fd_write_byte_array_with_crc(mcp2518fd_t *ctx, bool from_ram)
SPI Write Byte Array with CRC.
void mcp2518fd_transmit_channel_configure_object_reset(mcp2518fd_tx_fifo_cfg_t *config)
Reset Transmit Channel Configure object to reset values.
err_t mcp2518fd_transmit_channel_event_disable(mcp2518fd_t *ctx, uint8_t channel, uint8_t flags)
Transmit FIFO Event Disable.
err_t mcp2518fd_crc_event_get(mcp2518fd_t *ctx, uint8_t *flags)
CRC Event Get.
err_t mcp2518fd_write_byte_array(mcp2518fd_t *ctx, uint16_t address, uint8_t *data_in, uint16_t n_bytes)
SPI Write Byte Array.
err_t mcp2518fd_bus_diagnostics_get(mcp2518fd_t *ctx, mcp2518fd_bus_diag_t *bus_diag)
Get Bus Diagnostic Registers: all data_ at once, since we want to keep them in synch.
err_t mcp2518fd_ecc_disable(mcp2518fd_t *ctx)
Disable ECC.
err_t mcp2518fd_read_word_array(mcp2518fd_t *ctx, uint16_t address, uint32_t *data_out, uint16_t n_words)
SPI Read Word Array.
err_t mcp2518fd_write_word_safe(mcp2518fd_t *ctx, uint16_t address, uint32_t data_in)
SPI RAM Write Word Safe.
err_t mcp2518fd_module_event_clear(mcp2518fd_t *ctx, uint16_t flags)
Module Event Clear.
err_t mcp2518fd_read_byte_array_with_crc(mcp2518fd_t *ctx, bool from_ram, bool *crc_is_correct)
SPI Read Byte Array with CRC.
err_t mcp2518fd_transmit_queue_configure(mcp2518fd_t *ctx, mcp2518fd_tx_que_cfg_t *config)
Configure Transmit Queue.
err_t mcp2518fd_receive_channel_index_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *idx)
Receive FIFO Index Get.
err_t mcp2518fd_default_cfg(mcp2518fd_t *ctx)
MCP2518FD default configuration function.
err_t mcp2518fd_read_half_word(mcp2518fd_t *ctx, uint16_t address, uint16_t *data_out)
SPI Read Half Word.
err_t mcp2518fd_ram_init(mcp2518fd_t *ctx, uint8_t rx_data)
Initialize RAM.
err_t mcp2518fd_receive_channel_event_overflow_clear(mcp2518fd_t *ctx, uint8_t channel)
Receive FIFO Event Clear.
err_t mcp2518fd_transmit_channel_reset(mcp2518fd_t *ctx, uint8_t channel)
Transmit FIFO Reset.
err_t mcp2518fd_time_stamp_disable(mcp2518fd_t *ctx)
Time Stamp Disable.
err_t mcp2518fd_ecc_event_get(mcp2518fd_t *ctx, uint8_t *flags)
ECC Event Get.
err_t mcp2518fd_transmit_request_get(mcp2518fd_t *ctx, uint32_t *tx_req)
Get TXREQ register.
err_t mcp2518fd_read_byte(mcp2518fd_t *ctx, uint16_t address, uint8_t *data_out)
SPI Read Byte function.
err_t mcp2518fd_crc_value_get(mcp2518fd_t *ctx, uint16_t *crc)
Get CRC Value from device.
err_t mcp2518fd_write_byte_safe(mcp2518fd_t *ctx, uint16_t address, uint8_t data_in)
SPI SFR Write Byte Safe.
err_t mcp2518fd_crc_event_enable(mcp2518fd_t *ctx, uint8_t flags)
CRC Event Enable.
err_t mcp2518fd_bit_time_configure_data_10_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Data bit time for 10MHz system clock.
err_t mcp2518fd_bit_time_configure_data_20_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Nominal bit time for 20MHz system clock.
err_t mcp2518fd_gpio_interrupt_pins_open_drain_configure(mcp2518fd_t *ctx, uint8_t mode)
Configure Open Drain Interrupts.
err_t mcp2518fd_ecc_error_address_get(mcp2518fd_t *ctx, uint16_t *address)
Get ECC Error Address.
err_t mcp2518fd_crc_event_clear(mcp2518fd_t *ctx, uint8_t flags)
CRC Event Clear.
err_t mcp2518fd_receive_channel_event_get(mcp2518fd_t *ctx, uint8_t channel, uint8_t *flags)
Receive FIFO Event Get.
err_t mcp2518fd_oscillator_control_set(mcp2518fd_t *ctx, mcp2518fd_div_ctl_t ctrl)
Set Oscillator Control.
err_t mcp2518fd_receive_message(mcp2518fd_t *ctx, uint8_t *data_out, uint16_t *data_len)
Message Receive function.
err_t mcp2518fd_transmit_request_set(mcp2518fd_t *ctx, uint32_t tx_req)
Request transmissions using TXREQ register.
err_t mcp2518fd_read_word(mcp2518fd_t *ctx, uint16_t address, uint32_t *data_out)
SPI Read Word.
void mcp2518fd_tef_configure_object_reset(mcp2518fd_tef_cfg_t *config)
Reset TefConfigure object to reset value.
err_t mcp2518fd_filter_enable(mcp2518fd_t *ctx, uint8_t filter)
Filter Enable.
err_t mcp2518fd_gpio_direction_configure(mcp2518fd_t *ctx, uint8_t gpio0, uint8_t gpio1)
Initialize GPIO Direction.
err_t mcp2518fd_module_event_rx_code_get(mcp2518fd_t *ctx, uint8_t *rx_code)
Get RX Code.
err_t mcp2518fd_error_state_get(mcp2518fd_t *ctx, uint8_t *flags)
Error State Get.
err_t mcp2518fd_receive_channel_event_enable(mcp2518fd_t *ctx, uint8_t channel, uint8_t flags)
Receive FIFO Event Enable.
err_t mcp2518fd_transmit_event_get(mcp2518fd_t *ctx, uint32_t *txif)
Get pending interrupts of all transmit FIFOs.
err_t mcp2518fd_error_count_receive_get(mcp2518fd_t *ctx, uint8_t *rec)
Receive Error Count Get.
err_t mcp2518fd_gpio_clock_output_configure(mcp2518fd_t *ctx, uint8_t mode)
Configure CLKO Pin.
err_t mcp2518fd_transmit_channel_update(mcp2518fd_t *ctx, uint8_t channel, bool flush)
Transmit FIFO Update.
err_t mcp2518fd_receive_channel_reset(mcp2518fd_t *ctx, uint8_t channel)
Receive FIFO Reset.
err_t mcp2518fd_operation_mode_select(mcp2518fd_t *ctx, uint8_t op_mode)
Select Operation Mode.
err_t mcp2518fd_module_event_icode_get(mcp2518fd_t *ctx, uint8_t *icode)
Get ICODE.
err_t mcp2518fd_transmit_channel_configure(mcp2518fd_t *ctx, uint8_t channel, mcp2518fd_tx_fifo_cfg_t *config)
Configure Transmit FIFO.
err_t mcp2518fd_tef_reset(mcp2518fd_t *ctx)
Transmit Event FIFO Reset.
err_t mcp2518fd_receive_event_get(mcp2518fd_t *ctx, uint32_t *rxif)
Get pending interrupts of all receive FIFOs.
err_t mcp2518fd_receive_channel_configure(mcp2518fd_t *ctx, uint8_t channel, mcp2518fd_rx_fifo_cfg_t *config)
Configure Receive FIFO.
err_t mcp2518fd_oscillator_enable(mcp2518fd_t *ctx)
Enable oscillator to wake-up from sleep.
err_t mcp2518fd_bit_time_configure_data_40_mhz(mcp2518fd_t *ctx, uint8_t bit_time)
Configure Data bit time for 40MHz system clock.
err_t mcp2518fd_transmit_channel_status_get(mcp2518fd_t *ctx, uint8_t channel, uint16_t *status)
Transmit Channel Status Get.
err_t mcp2518fd_tef_update(mcp2518fd_t *ctx)
Transmit Event FIFO Update.
err_t mcp2518fd_tef_event_enable(mcp2518fd_t *ctx, uint8_t flags)
Transmit Event FIFO Event Enable.
err_t mcp2518fd_gpio_standby_control_disable(mcp2518fd_t *ctx)
Disable Transceiver Standby Control.
uint32_t mcp2518fd_msg_time_stamp_t
MCP2518FD Click CAN Message Time Stamp.
Definition mcp2518fd.h:912
mcp2518fd_return_value_t
MCP2518FD Click return value data.
Definition mcp2518fd.h:1923
@ MCP2518FD_ERROR
Definition mcp2518fd.h:1925
@ MCP2518FD_OK
Definition mcp2518fd.h:1924
uint8_t mcp2518fd_id_t
MCP2518FD Click Module ID.
Definition mcp2518fd.h:906
This file contains SPI specific macros, functions, etc.
MCP2518FD Click CAN Configure.
Definition mcp2518fd.h:1314
uint32_t iso_crc_enable
Definition mcp2518fd.h:1316
uint32_t bit_rate_switch_disable
Definition mcp2518fd.h:1320
uint32_t protocol_expection_event_disable
Definition mcp2518fd.h:1317
uint32_t wake_up_filter_enable
Definition mcp2518fd.h:1318
uint32_t esi_in_gateway_mode
Definition mcp2518fd.h:1322
uint32_t wake_up_filter_time
Definition mcp2518fd.h:1319
uint32_t txq_enable
Definition mcp2518fd.h:1325
uint32_t store_in_tef
Definition mcp2518fd.h:1324
uint32_t system_error_to_listen_only
Definition mcp2518fd.h:1323
uint32_t d_net_filter_count
Definition mcp2518fd.h:1315
uint32_t tx_band_width_sharing
Definition mcp2518fd.h:1326
uint32_t restrict_re_tx_attempts
Definition mcp2518fd.h:1321
MCP2518FD Click CAN Bus Diagnostic flags.
Definition mcp2518fd.h:1735
uint32_t d_crc_err
Definition mcp2518fd.h:1749
uint32_t n_form_err
Definition mcp2518fd.h:1739
uint32_t d_stuff_err
Definition mcp2518fd.h:1748
uint32_t n_ack_err
Definition mcp2518fd.h:1738
uint32_t unimplemented1
Definition mcp2518fd.h:1742
uint32_t d_bit0_err
Definition mcp2518fd.h:1744
uint32_t d_form_err
Definition mcp2518fd.h:1747
uint32_t n_bit0_err
Definition mcp2518fd.h:1736
uint32_t txbo_err
Definition mcp2518fd.h:1743
uint32_t n_bit1_err
Definition mcp2518fd.h:1737
uint32_t dlc_mismatch
Definition mcp2518fd.h:1751
uint32_t n_stuff_err
Definition mcp2518fd.h:1740
uint32_t n_crc_err
Definition mcp2518fd.h:1741
uint32_t d_bit1_err
Definition mcp2518fd.h:1745
uint32_t unimplemented2
Definition mcp2518fd.h:1746
uint32_t esi
Definition mcp2518fd.h:1750
MCP2518FD Click CAN Bus Diagnostic Error Counts.
Definition mcp2518fd.h:1760
uint8_t d_rec
Definition mcp2518fd.h:1763
uint8_t d_tec
Definition mcp2518fd.h:1764
uint8_t n_tec
Definition mcp2518fd.h:1762
uint8_t n_rec
Definition mcp2518fd.h:1761
MCP2518FD Click CAN Configure.
Definition mcp2518fd.h:863
uint32_t iso_crc_enable
Definition mcp2518fd.h:865
uint32_t bit_rate_switch_disable
Definition mcp2518fd.h:869
uint32_t protocol_expection_event_disable
Definition mcp2518fd.h:866
uint32_t wake_up_filter_enable
Definition mcp2518fd.h:867
uint32_t esi_in_gateway_mode
Definition mcp2518fd.h:871
uint32_t wake_up_filter_time
Definition mcp2518fd.h:868
uint32_t txq_enable
Definition mcp2518fd.h:874
uint32_t store_in_tef
Definition mcp2518fd.h:873
uint32_t system_error_to_listen_only
Definition mcp2518fd.h:872
uint32_t d_net_filter_count
Definition mcp2518fd.h:864
uint32_t tx_band_width_sharing
Definition mcp2518fd.h:875
uint32_t restrict_re_tx_attempts
Definition mcp2518fd.h:870
MCP2518FD Click configuration object.
Definition mcp2518fd.h:1899
pin_name_t clk
Definition mcp2518fd.h:1908
pin_name_t stby
Definition mcp2518fd.h:1907
spi_master_chip_select_polarity_t cs_polarity
Definition mcp2518fd.h:1914
pin_name_t sck
Definition mcp2518fd.h:1903
spi_master_mode_t spi_mode
Definition mcp2518fd.h:1913
pin_name_t mosi
Definition mcp2518fd.h:1902
uint32_t spi_speed
Definition mcp2518fd.h:1912
pin_name_t int_pin
Definition mcp2518fd.h:1909
pin_name_t miso
Definition mcp2518fd.h:1901
pin_name_t cs
Definition mcp2518fd.h:1904
MCP2518FD Click CAN Message Configuration.
Definition mcp2518fd.h:884
uint16_t standard_id
Definition mcp2518fd.h:892
uint8_t seq
Definition mcp2518fd.h:898
uint8_t tx_fifo_size
Definition mcp2518fd.h:887
uint8_t switch_bit_rate
Definition mcp2518fd.h:895
uint8_t fd_frame
Definition mcp2518fd.h:894
uint8_t rx_pay_load_size
Definition mcp2518fd.h:891
uint8_t rx_fifo_size
Definition mcp2518fd.h:890
uint8_t ide
Definition mcp2518fd.h:896
uint8_t tx_pay_load_size
Definition mcp2518fd.h:888
uint8_t remote_frame_req
Definition mcp2518fd.h:897
uint8_t iso_crc_enable
Definition mcp2518fd.h:885
uint8_t tx_priority
Definition mcp2518fd.h:889
uint32_t extended_id
Definition mcp2518fd.h:893
uint8_t store_in_tef
Definition mcp2518fd.h:886
MCP2518FD Click CAN message configuration.
Definition mcp2518fd.h:1850
uint8_t error_flags
Definition mcp2518fd.h:1854
uint8_t tx_flags
Definition mcp2518fd.h:1852
uint8_t rx_flags
Definition mcp2518fd.h:1853
mcp2518fd_tx_msg_obj_t tx_obj
Definition mcp2518fd.h:1863
mcp2518fd_can_cfg_t config
Definition mcp2518fd.h:1860
mcp2518fd_bus_diag_t bus_diagnostics
Definition mcp2518fd.h:1867
uint8_t selected_bit_time
Definition mcp2518fd.h:1851
mcp2518fd_rx_fifo_cfg_t rx_config
Definition mcp2518fd.h:1862
uint32_t tx_id
Definition mcp2518fd.h:1858
uint8_t tec
Definition mcp2518fd.h:1855
mcp2518fd_filt_obj_t f_obj
Definition mcp2518fd.h:1865
mcp2518fd_mask_obj_t m_obj
Definition mcp2518fd.h:1866
uint8_t rec
Definition mcp2518fd.h:1856
mcp2518fd_rx_msg_obj_t rx_obj
Definition mcp2518fd.h:1864
mcp2518fd_tx_fifo_cfg_t tx_config
Definition mcp2518fd.h:1861
uint8_t op_mode
Definition mcp2518fd.h:1857
MCP2518FD Click Oscillator Control.
Definition mcp2518fd.h:1248
uint32_t pll_enable
Definition mcp2518fd.h:1249
uint32_t clk_out_divide
Definition mcp2518fd.h:1252
uint32_t osc_disable
Definition mcp2518fd.h:1250
uint32_t sclk_divide
Definition mcp2518fd.h:1251
MCP2518FD Click CAN Filter Object ID.
Definition mcp2518fd.h:1015
uint32_t sid11
Definition mcp2518fd.h:1018
uint32_t eid
Definition mcp2518fd.h:1017
uint32_t unimplemented1
Definition mcp2518fd.h:1020
uint32_t exide
Definition mcp2518fd.h:1019
uint32_t sid
Definition mcp2518fd.h:1016
MCP2518FD Click CAN message configuration.
Definition mcp2518fd.h:1836
uint32_t txd_num_bytes
Definition mcp2518fd.h:1841
uint8_t * rxd
Definition mcp2518fd.h:1838
uint16_t n_bytes
Definition mcp2518fd.h:1839
uint16_t address
Definition mcp2518fd.h:1837
uint8_t * txd
Definition mcp2518fd.h:1840
MCP2518FD Click Interrupt Enables.
Definition mcp2518fd.h:1480
uint32_t txatie
Definition mcp2518fd.h:1490
uint32_t tbcie
Definition mcp2518fd.h:1483
uint32_t eccie
Definition mcp2518fd.h:1488
uint32_t modie
Definition mcp2518fd.h:1484
uint32_t rxie
Definition mcp2518fd.h:1482
uint32_t txie
Definition mcp2518fd.h:1481
uint32_t wakie
Definition mcp2518fd.h:1494
uint32_t ivmie
Definition mcp2518fd.h:1495
uint32_t serrie
Definition mcp2518fd.h:1492
uint32_t rxovie
Definition mcp2518fd.h:1491
uint32_t spicrcie
Definition mcp2518fd.h:1489
uint32_t tefie
Definition mcp2518fd.h:1485
uint32_t unimplemented2
Definition mcp2518fd.h:1486
uint32_t cerrie
Definition mcp2518fd.h:1493
MCP2518FD Click Interrupt Flags.
Definition mcp2518fd.h:1537
uint32_t IVMIF
Definition mcp2518fd.h:1552
uint32_t TBCIF
Definition mcp2518fd.h:1540
uint32_t WAKIF
Definition mcp2518fd.h:1551
uint32_t unimplemented1
Definition mcp2518fd.h:1543
uint32_t TXIF
Definition mcp2518fd.h:1538
uint32_t ECCIF
Definition mcp2518fd.h:1545
uint32_t RXOVIF
Definition mcp2518fd.h:1548
uint32_t RXIF
Definition mcp2518fd.h:1539
uint32_t SERRIF
Definition mcp2518fd.h:1549
uint32_t TEFIF
Definition mcp2518fd.h:1542
uint32_t MODIF
Definition mcp2518fd.h:1541
uint32_t SPICRCIF
Definition mcp2518fd.h:1546
uint32_t CERRIF
Definition mcp2518fd.h:1550
uint32_t TXATIF
Definition mcp2518fd.h:1547
MCP2518FD Click CAN Mask Object ID.
Definition mcp2518fd.h:1041
uint32_t msid
Definition mcp2518fd.h:1042
uint32_t mide
Definition mcp2518fd.h:1045
uint32_t unimplemented1
Definition mcp2518fd.h:1046
uint32_t msid11
Definition mcp2518fd.h:1044
uint32_t meid
Definition mcp2518fd.h:1043
MCP2518FD Click CAN Message Object ID.
Definition mcp2518fd.h:919
uint32_t sid11
Definition mcp2518fd.h:922
uint32_t eid
Definition mcp2518fd.h:921
uint32_t unimplemented1
Definition mcp2518fd.h:923
uint32_t sid
Definition mcp2518fd.h:920
MCP2518FD Click Oscillator Status.
Definition mcp2518fd.h:1723
uint32_t osc_ready
Definition mcp2518fd.h:1725
uint32_t pll_ready
Definition mcp2518fd.h:1724
uint32_t sclk_ready
Definition mcp2518fd.h:1726
MCP2518FD Click CAN Receive Channel Configure.
Definition mcp2518fd.h:1362
uint32_t pay_load_size
Definition mcp2518fd.h:1365
uint32_t rx_time_stamp_enable
Definition mcp2518fd.h:1363
uint32_t fifo_size
Definition mcp2518fd.h:1364
MCP2518FD Click CAN RX Message Object Control.
Definition mcp2518fd.h:965
uint32_t ide
Definition mcp2518fd.h:967
uint32_t rtr
Definition mcp2518fd.h:968
uint32_t brs
Definition mcp2518fd.h:969
uint32_t unimplemented1
Definition mcp2518fd.h:972
uint32_t fdf
Definition mcp2518fd.h:970
uint32_t dlc
Definition mcp2518fd.h:966
uint32_t unimplemented2
Definition mcp2518fd.h:974
uint32_t filter_hit
Definition mcp2518fd.h:973
uint32_t esi
Definition mcp2518fd.h:971
MCP2518FD Click context object.
Definition mcp2518fd.h:1876
mcp2518fd_func_data_t func_data
Definition mcp2518fd.h:1890
spi_master_t spi
Definition mcp2518fd.h:1885
mcp2518fd_data_t glb_data
Definition mcp2518fd.h:1889
digital_in_t int_pin
Definition mcp2518fd.h:1882
digital_out_t stby
Definition mcp2518fd.h:1878
pin_name_t chip_select
Definition mcp2518fd.h:1887
digital_in_t clk
Definition mcp2518fd.h:1881
MCP2518FD Click CAN Transmit Event FIFO Configure.
Definition mcp2518fd.h:1390
uint32_t time_stamp_enable
Definition mcp2518fd.h:1391
uint32_t fifo_size
Definition mcp2518fd.h:1392
MCP2518FD Click CAN Transmit Channel Configure.
Definition mcp2518fd.h:1335
uint32_t pay_load_size
Definition mcp2518fd.h:1340
uint32_t tx_priority
Definition mcp2518fd.h:1337
uint32_t rtr_enable
Definition mcp2518fd.h:1336
uint32_t fifo_size
Definition mcp2518fd.h:1339
uint32_t tx_attempts
Definition mcp2518fd.h:1338
MCP2518FD Click CAN TX Message Object Control.
Definition mcp2518fd.h:932
uint32_t ide
Definition mcp2518fd.h:934
uint32_t rtr
Definition mcp2518fd.h:935
uint32_t brs
Definition mcp2518fd.h:936
uint32_t unimplemented1
Definition mcp2518fd.h:940
uint32_t fdf
Definition mcp2518fd.h:937
uint32_t dlc
Definition mcp2518fd.h:933
uint32_t seq
Definition mcp2518fd.h:939
uint32_t esi
Definition mcp2518fd.h:938
MCP2518FD Click CAN Transmit Queue Configure.
Definition mcp2518fd.h:1349
uint32_t pay_load_size
Definition mcp2518fd.h:1353
uint32_t tx_priority
Definition mcp2518fd.h:1350
uint32_t fifo_size
Definition mcp2518fd.h:1352
uint32_t tx_attempts
Definition mcp2518fd.h:1351
MCP2518FD Click Diagnostic register 0.
Definition mcp2518fd.h:1789
uint32_t d_tx_error_count
Definition mcp2518fd.h:1794
uint32_t word
Definition mcp2518fd.h:1796
uint32_t n_tx_error_count
Definition mcp2518fd.h:1792
uint32_t d_rx_error_count
Definition mcp2518fd.h:1793
uint32_t n_rx_error_count
Definition mcp2518fd.h:1791
MCP2518FD Click Diagnostic register 1.
Definition mcp2518fd.h:1806
uint32_t error_free_msg_count
Definition mcp2518fd.h:1808
uint32_t n_bit0_error
Definition mcp2518fd.h:1809
uint32_t d_stuff_error
Definition mcp2518fd.h:1821
uint32_t n_form_error
Definition mcp2518fd.h:1812
uint32_t d_form_error
Definition mcp2518fd.h:1820
uint32_t d_crc_error
Definition mcp2518fd.h:1822
uint32_t d_ack_error
Definition mcp2518fd.h:1819
uint32_t word
Definition mcp2518fd.h:1826
uint32_t unimplemented1
Definition mcp2518fd.h:1815
uint32_t d_bit1_error
Definition mcp2518fd.h:1818
uint32_t n_bit1_error
Definition mcp2518fd.h:1810
uint32_t n_ack_error
Definition mcp2518fd.h:1811
uint32_t d_bit0_error
Definition mcp2518fd.h:1817
uint32_t n_stuff_error
Definition mcp2518fd.h:1813
uint32_t n_crc_error
Definition mcp2518fd.h:1814
uint32_t unimplemented2
Definition mcp2518fd.h:1824
uint32_t esi
Definition mcp2518fd.h:1823
uint32_t txbo_error
Definition mcp2518fd.h:1816
MCP2518FD Click CAN BUS DIAGNOSTICS.
Definition mcp2518fd.h:1773
mcp2518fd_bus_error_count_t error_count
Definition mcp2518fd.h:1775
mcp2518fd_bus_diag_flags_t flag
Definition mcp2518fd.h:1777
uint16_t error_free_msg_count
Definition mcp2518fd.h:1776
MCP2518FD Click CRC Regsiter.
Definition mcp2518fd.h:1684
uint32_t crcerrif
Definition mcp2518fd.h:1687
uint32_t word
Definition mcp2518fd.h:1694
uint32_t unimplemented1
Definition mcp2518fd.h:1689
uint32_t ferrie
Definition mcp2518fd.h:1691
uint32_t crc
Definition mcp2518fd.h:1686
uint32_t crcerrie
Definition mcp2518fd.h:1690
uint32_t ferrif
Definition mcp2518fd.h:1688
uint32_t unimplemented2
Definition mcp2518fd.h:1692
MCP2518FD Click CAN Control Register.
Definition mcp2518fd.h:1074
uint32_t iso_crc_enable
Definition mcp2518fd.h:1077
uint32_t bit_rate_switch_disable
Definition mcp2518fd.h:1083
uint32_t word
Definition mcp2518fd.h:1095
uint32_t unimplemented1
Definition mcp2518fd.h:1079
uint32_t wake_up_filter_enable
Definition mcp2518fd.h:1080
uint32_t esi_in_gateway_mode
Definition mcp2518fd.h:1086
uint32_t wake_up_filter_time
Definition mcp2518fd.h:1081
uint32_t txq_enable
Definition mcp2518fd.h:1089
uint32_t protocol_exception_event_disable
Definition mcp2518fd.h:1078
uint32_t store_in_tef
Definition mcp2518fd.h:1088
uint32_t system_error_to_listen_only
Definition mcp2518fd.h:1087
uint32_t d_net_filter_count
Definition mcp2518fd.h:1076
uint32_t unimplemented2
Definition mcp2518fd.h:1082
uint32_t op_mode
Definition mcp2518fd.h:1090
uint32_t request_op_mode
Definition mcp2518fd.h:1091
uint32_t abort_all_tx
Definition mcp2518fd.h:1092
uint32_t tx_band_width_sharing
Definition mcp2518fd.h:1093
uint32_t unimplemented3
Definition mcp2518fd.h:1084
uint32_t restrict_re_tx_attempts
Definition mcp2518fd.h:1085
MCP2518FD Click Data Bit Time Configuration Register.
Definition mcp2518fd.h:1420
uint32_t brp
Definition mcp2518fd.h:1428
uint32_t swj
Definition mcp2518fd.h:1422
uint32_t word
Definition mcp2518fd.h:1430
uint32_t unimplemented1
Definition mcp2518fd.h:1423
uint32_t tseg1
Definition mcp2518fd.h:1426
uint32_t tseg2
Definition mcp2518fd.h:1424
uint32_t unimplemented2
Definition mcp2518fd.h:1425
uint32_t unimplemented3
Definition mcp2518fd.h:1427
MCP2518FD Click ECC Control Register.
Definition mcp2518fd.h:1295
uint32_t word
Definition mcp2518fd.h:1304
uint32_t unimplemented1
Definition mcp2518fd.h:1300
uint32_t secie
Definition mcp2518fd.h:1298
uint32_t parity
Definition mcp2518fd.h:1301
uint32_t ecc_en
Definition mcp2518fd.h:1297
uint32_t unimplemented2
Definition mcp2518fd.h:1302
uint32_t dedie
Definition mcp2518fd.h:1299
MCP2518FD Click ECC Status Register.
Definition mcp2518fd.h:1704
uint32_t error_address
Definition mcp2518fd.h:1710
uint32_t word
Definition mcp2518fd.h:1713
uint32_t unimplemented1
Definition mcp2518fd.h:1706
uint32_t dedif
Definition mcp2518fd.h:1708
uint32_t secif
Definition mcp2518fd.h:1707
uint32_t unimplemented2
Definition mcp2518fd.h:1709
uint32_t unimplemented3
Definition mcp2518fd.h:1711
MCP2518FD Click FIFO Control Register.
Definition mcp2518fd.h:1160
uint32_t unimplemented4
Definition mcp2518fd.h:1173
uint32_t word
Definition mcp2518fd.h:1197
uint32_t pay_load_size
Definition mcp2518fd.h:1175
uint32_t unimplemented1
Definition mcp2518fd.h:1166
uint32_t rx_over_flow_ie
Definition mcp2518fd.h:1165
uint32_t uinc
Definition mcp2518fd.h:1170
uint32_t tx_not_full_ie
Definition mcp2518fd.h:1179
uint32_t tx_priority
Definition mcp2518fd.h:1191
uint32_t rtr_enable
Definition mcp2518fd.h:1185
uint32_t tx_attempt_ie
Definition mcp2518fd.h:1183
uint32_t rx_time_stamp_enable
Definition mcp2518fd.h:1167
uint32_t fifo_size
Definition mcp2518fd.h:1174
uint32_t unimplemented2
Definition mcp2518fd.h:1168
uint32_t tx_empty_ie
Definition mcp2518fd.h:1181
uint32_t tx_attempts
Definition mcp2518fd.h:1192
uint32_t rx_not_empty_ie
Definition mcp2518fd.h:1162
uint32_t tx_request
Definition mcp2518fd.h:1188
uint32_t tx_enable
Definition mcp2518fd.h:1169
uint32_t tx_half_full_ie
Definition mcp2518fd.h:1180
uint32_t rx_full_ie
Definition mcp2518fd.h:1164
uint32_t freset
Definition mcp2518fd.h:1172
uint32_t unimplemented3
Definition mcp2518fd.h:1171
uint32_t rx_half_full_ie
Definition mcp2518fd.h:1163
MCP2518FD Click FIFO Status Register.
Definition mcp2518fd.h:1651
uint32_t fifo_index
Definition mcp2518fd.h:1658
uint32_t tx_not_full_if
Definition mcp2518fd.h:1663
uint32_t tx_error
Definition mcp2518fd.h:1668
uint32_t word
Definition mcp2518fd.h:1674
uint32_t rx_full_if
Definition mcp2518fd.h:1655
uint32_t unimplemented1
Definition mcp2518fd.h:1657
uint32_t tx_half_full_if
Definition mcp2518fd.h:1664
uint32_t tx_attempt_if
Definition mcp2518fd.h:1667
uint32_t rx_not_empty_if
Definition mcp2518fd.h:1653
uint32_t tx_empty_if
Definition mcp2518fd.h:1665
uint32_t unimplemented2
Definition mcp2518fd.h:1659
uint32_t tx_lost_arbitration
Definition mcp2518fd.h:1669
uint32_t rx_half_full_if
Definition mcp2518fd.h:1654
uint32_t tx_aborted
Definition mcp2518fd.h:1670
uint32_t rx_over_flow_if
Definition mcp2518fd.h:1656
MCP2518FD Click FIFO User Address Register.
Definition mcp2518fd.h:1375
uint32_t user_address
Definition mcp2518fd.h:1377
uint32_t word
Definition mcp2518fd.h:1380
uint32_t unimplemented1
Definition mcp2518fd.h:1378
MCP2518FD Click Filter Control Register.
Definition mcp2518fd.h:1207
uint32_t enable
Definition mcp2518fd.h:1211
uint32_t buffer_pointer
Definition mcp2518fd.h:1209
uint32_t unimplemented1
Definition mcp2518fd.h:1210
uint8_t byte
Definition mcp2518fd.h:1213
MCP2518FD Click Filter Object Register.
Definition mcp2518fd.h:1029
uint32_t word
Definition mcp2518fd.h:1031
mcp2518fd_filt_obj_id_t bf
Definition mcp2518fd.h:1030
MCP2518FD Click Interrupt Configuration.
Definition mcp2518fd.h:1504
mcp2518fd_int_en_t ie
Definition mcp2518fd.h:1505
uint16_t word
Definition mcp2518fd.h:1506
MCP2518FD Click Interrupt Flag Register.
Definition mcp2518fd.h:1561
mcp2518fd_int_flags_stat_t if_stat
Definition mcp2518fd.h:1562
uint16_t word
Definition mcp2518fd.h:1563
MCP2518FD Click Interrupt Register.
Definition mcp2518fd.h:1573
mcp2518fd_int_en_t ie
Definition mcp2518fd.h:1576
uint32_t word
Definition mcp2518fd.h:1578
mcp2518fd_int_flags_stat_t if_stat
Definition mcp2518fd.h:1575
MCP2518FD Click Interrupt Vector Register.
Definition mcp2518fd.h:1516
uint32_t tx_code
Definition mcp2518fd.h:1522
uint32_t icode
Definition mcp2518fd.h:1518
uint32_t unimplemented4
Definition mcp2518fd.h:1525
uint32_t word
Definition mcp2518fd.h:1527
uint32_t unimplemented1
Definition mcp2518fd.h:1519
uint32_t unimplemented2
Definition mcp2518fd.h:1521
uint32_t rx_code
Definition mcp2518fd.h:1524
uint32_t filter_hit
Definition mcp2518fd.h:1520
uint32_t unimplemented3
Definition mcp2518fd.h:1523
MCP2518FD Click I/O Control Register.
Definition mcp2518fd.h:1261
uint32_t pin_mode1
Definition mcp2518fd.h:1278
uint32_t tris1
Definition mcp2518fd.h:1264
uint32_t unimplemented5
Definition mcp2518fd.h:1279
uint32_t pin_mode0
Definition mcp2518fd.h:1277
uint32_t tris0
Definition mcp2518fd.h:1263
uint32_t clear_auto_sleep_on_match
Definition mcp2518fd.h:1266
uint32_t unimplemented4
Definition mcp2518fd.h:1276
uint32_t unimplemented6
Definition mcp2518fd.h:1283
uint32_t word
Definition mcp2518fd.h:1285
uint32_t unimplemented1
Definition mcp2518fd.h:1265
uint32_t tx_can_open_drain
Definition mcp2518fd.h:1280
uint32_t int_pin_open_drain
Definition mcp2518fd.h:1282
uint32_t auto_sleep_enable
Definition mcp2518fd.h:1267
uint32_t sof_output_enable
Definition mcp2518fd.h:1281
uint32_t lat1
Definition mcp2518fd.h:1271
uint32_t xcr_stby_enable
Definition mcp2518fd.h:1268
uint32_t gpio0
Definition mcp2518fd.h:1274
uint32_t gpio1
Definition mcp2518fd.h:1275
uint32_t unimplemented2
Definition mcp2518fd.h:1269
uint32_t hvdetsel
Definition mcp2518fd.h:1273
uint32_t unimplemented3
Definition mcp2518fd.h:1272
uint32_t lat0
Definition mcp2518fd.h:1270
MCP2518FD Click Mask Object Register.
Definition mcp2518fd.h:1055
uint32_t word
Definition mcp2518fd.h:1057
mcp2518fd_mask_obj_id_t bf
Definition mcp2518fd.h:1056
MCP2518FD Click Nominal Bit Time Configuration Register.
Definition mcp2518fd.h:1401
uint32_t brp
Definition mcp2518fd.h:1408
uint32_t swj
Definition mcp2518fd.h:1403
uint32_t word
Definition mcp2518fd.h:1410
uint32_t unimplemented1
Definition mcp2518fd.h:1404
uint32_t tseg1
Definition mcp2518fd.h:1407
uint32_t tseg2
Definition mcp2518fd.h:1405
uint32_t unimplemented2
Definition mcp2518fd.h:1406
MCP2518FD Click Oscillator Control Register.
Definition mcp2518fd.h:1222
uint32_t osc_ready
Definition mcp2518fd.h:1233
uint32_t pll_enable
Definition mcp2518fd.h:1224
uint32_t unimplemented5
Definition mcp2518fd.h:1234
uint32_t unimplemented4
Definition mcp2518fd.h:1232
uint32_t unimplemented6
Definition mcp2518fd.h:1236
uint32_t word
Definition mcp2518fd.h:1238
uint32_t unimplemented1
Definition mcp2518fd.h:1225
uint32_t pll_ready
Definition mcp2518fd.h:1231
uint32_t clk_out_divide
Definition mcp2518fd.h:1229
uint32_t unimplemented2
Definition mcp2518fd.h:1227
uint32_t sclk_ready
Definition mcp2518fd.h:1235
uint32_t osc_disable
Definition mcp2518fd.h:1226
uint32_t unimplemented3
Definition mcp2518fd.h:1230
uint32_t sclk_divide
Definition mcp2518fd.h:1228
Definition mcp2518fd.h:1063
uint32_t word
Definition mcp2518fd.h:1065
MCP2518FD Click CAN RX Message Object.
Definition mcp2518fd.h:983
mcp2518fd_msg_time_stamp_t time_stamp
Definition mcp2518fd.h:987
mcp2518fd_msg_obj_id_t id
Definition mcp2518fd.h:985
mcp2518fd_rx_msg_obj_ctl_t ctrl
Definition mcp2518fd.h:986
MCP2518FD Click Transmitter Delay Compensation Register.
Definition mcp2518fd.h:1440
uint32_t tdc_offset
Definition mcp2518fd.h:1444
uint32_t unimplemented4
Definition mcp2518fd.h:1450
uint32_t tdc_value
Definition mcp2518fd.h:1442
uint32_t word
Definition mcp2518fd.h:1452
uint32_t unimplemented1
Definition mcp2518fd.h:1443
uint32_t sid11_enable
Definition mcp2518fd.h:1448
uint32_t edge_filter_enable
Definition mcp2518fd.h:1449
uint32_t tdc_mode
Definition mcp2518fd.h:1446
uint32_t unimplemented2
Definition mcp2518fd.h:1445
uint32_t unimplemented3
Definition mcp2518fd.h:1447
MCP2518FD Click Transmit Event FIFO Control Register.
Definition mcp2518fd.h:1134
uint32_t tefovie
Definition mcp2518fd.h:1139
uint32_t unimplemented5
Definition mcp2518fd.h:1148
uint32_t unimplemented4
Definition mcp2518fd.h:1146
uint32_t word
Definition mcp2518fd.h:1150
uint32_t unimplemented1
Definition mcp2518fd.h:1140
uint32_t uinc
Definition mcp2518fd.h:1143
uint32_t time_stamp_enable
Definition mcp2518fd.h:1141
uint32_t teffulie
Definition mcp2518fd.h:1138
uint32_t fifo_size
Definition mcp2518fd.h:1147
uint32_t unimplemented2
Definition mcp2518fd.h:1142
uint32_t tefneie
Definition mcp2518fd.h:1136
uint32_t freset
Definition mcp2518fd.h:1145
uint32_t unimplemented3
Definition mcp2518fd.h:1144
uint32_t tefhfie
Definition mcp2518fd.h:1137
MCP2518FD Click CAN TEF Message Object.
Definition mcp2518fd.h:999
mcp2518fd_msg_time_stamp_t time_stamp
Definition mcp2518fd.h:1003
mcp2518fd_msg_obj_id_t id
Definition mcp2518fd.h:1001
mcp2518fd_tx_msg_obj_ctl_t ctrl
Definition mcp2518fd.h:1002
MCP2518FD Click Transmit Event FIFO Status Register.
Definition mcp2518fd.h:1610
uint32_t tef_full_if
Definition mcp2518fd.h:1614
uint32_t word
Definition mcp2518fd.h:1618
uint32_t unimplemented1
Definition mcp2518fd.h:1616
uint32_t tef_not_empty_if
Definition mcp2518fd.h:1612
uint32_t tef_ov_if
Definition mcp2518fd.h:1615
uint32_t tef_half_full_if
Definition mcp2518fd.h:1613
MCP2518FD Click Transmit/Receive Error Count Register.
Definition mcp2518fd.h:1588
uint32_t word
Definition mcp2518fd.h:1600
uint32_t tx_error_state_bus_off
Definition mcp2518fd.h:1597
uint32_t unimplemented1
Definition mcp2518fd.h:1598
uint32_t rx_error_state_passive
Definition mcp2518fd.h:1595
uint32_t tx_error_count
Definition mcp2518fd.h:1591
uint32_t tx_error_state_warning
Definition mcp2518fd.h:1594
uint32_t error_state_warning
Definition mcp2518fd.h:1592
uint32_t rx_error_count
Definition mcp2518fd.h:1590
uint32_t rx_error_state_warning
Definition mcp2518fd.h:1593
uint32_t tx_error_state_passive
Definition mcp2518fd.h:1596
MCP2518FD Click Time Stamp Configuration Register.
Definition mcp2518fd.h:1462
uint32_t tbc_enable
Definition mcp2518fd.h:1466
uint32_t word
Definition mcp2518fd.h:1470
uint32_t unimplemented1
Definition mcp2518fd.h:1465
uint32_t tbc_prescaler
Definition mcp2518fd.h:1464
uint32_t unimplemented2
Definition mcp2518fd.h:1468
uint32_t time_stamp_eof
Definition mcp2518fd.h:1467
MCP2518FD Click CAN TX Message Object.
Definition mcp2518fd.h:949
mcp2518fd_msg_time_stamp_t time_stamp
Definition mcp2518fd.h:953
mcp2518fd_msg_obj_id_t id
Definition mcp2518fd.h:951
mcp2518fd_tx_msg_obj_ctl_t ctrl
Definition mcp2518fd.h:952
MCP2518FD Click Transmit Queue Control Register.
Definition mcp2518fd.h:1105
uint32_t unimplemented5
Definition mcp2518fd.h:1120
uint32_t unimplemented4
Definition mcp2518fd.h:1117
uint32_t word
Definition mcp2518fd.h:1124
uint32_t pay_load_size
Definition mcp2518fd.h:1122
uint32_t unimplemented1
Definition mcp2518fd.h:1108
uint32_t uinc
Definition mcp2518fd.h:1114
uint32_t tx_not_full_ie
Definition mcp2518fd.h:1107
uint32_t tx_priority
Definition mcp2518fd.h:1118
uint32_t tx_attempt_ie
Definition mcp2518fd.h:1111
uint32_t fifo_size
Definition mcp2518fd.h:1121
uint32_t unimplemented2
Definition mcp2518fd.h:1110
uint32_t tx_empty_ie
Definition mcp2518fd.h:1109
uint32_t tx_attempts
Definition mcp2518fd.h:1119
uint32_t tx_request
Definition mcp2518fd.h:1115
uint32_t tx_enable
Definition mcp2518fd.h:1113
uint32_t freset
Definition mcp2518fd.h:1116
uint32_t unimplemented3
Definition mcp2518fd.h:1112
MCP2518FD Click Transmit Queue Status Register.
Definition mcp2518fd.h:1628
uint32_t fifo_index
Definition mcp2518fd.h:1638
uint32_t tx_not_full_if
Definition mcp2518fd.h:1630
uint32_t tx_error
Definition mcp2518fd.h:1635
uint32_t word
Definition mcp2518fd.h:1641
uint32_t unimplemented1
Definition mcp2518fd.h:1631
uint32_t tx_attempt_if
Definition mcp2518fd.h:1634
uint32_t tx_empty_if
Definition mcp2518fd.h:1632
uint32_t unimplemented2
Definition mcp2518fd.h:1633
uint32_t tx_lost_arbitration
Definition mcp2518fd.h:1636
uint32_t unimplemented3
Definition mcp2518fd.h:1639
uint32_t tx_aborted
Definition mcp2518fd.h:1637