RTEMS CAN/CAN FD Stack
Loading...
Searching...
No Matches
Macros | Functions
sja1000.h File Reference

This header file contains the implementation of SJA1000 controller. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RTEMS_SJA1000_HW_REG_SPAN_MASK   ( 3 )
 SJA1000 chip register mapping specification.
 
#define RTEMS_SJA1000_HW_REG_SPAN_1   ( 0 )
 SJA1000 chip register mapping one byte each.
 
#define RTEMS_SJA1000_HW_REG_SPAN_2   ( 1 )
 SJA1000 chip register mapping with span 2 bytes.
 
#define RTEMS_SJA1000_HW_REG_SPAN_4   ( 2 )
 SJA1000 chip register mapping with span 4 bytes.
 
#define RTEMS_SJA1000_HW_REG_IO_PORT   ( 0x100 )
 SJA1000 chip register mapping into CPU I/O space.
 

Functions

struct rtems_can_chiprtems_can_sja1000_initialize (uintptr_t addr, unsigned int hw_options, rtems_vector_number irq, rtems_task_priority worker_priority, rtems_option irq_option, unsigned long can_clk_rate)
 This function initializes the SJA1000 controller.
 

Detailed Description

This header file contains the implementation of SJA1000 controller.

Function Documentation

◆ rtems_can_sja1000_initialize()

struct rtems_can_chip * rtems_can_sja1000_initialize ( uintptr_t  addr,
unsigned int  hw_options,
rtems_vector_number  irq,
rtems_task_priority  worker_priority,
rtems_option  irq_option,
unsigned long  can_clk_rate 
)

This function initializes the SJA1000 controller.

This is an entry point for SJA1000 controller initialization. This function allocates generic CAN and SJA1000 related structures, sets default values and initializes the resources (interrupt handler, semaphore. worker thread).

Parameters
addrSJA1000 controller base address.
hw_optionsSJA1000 controller hardware options for register mapping.
irqInterrupt number.
worker_priotiryThe priority of TX/RX worker thread.
irq_optionRTEMS_INTERRUPT_SHARED or RTEMS_INTERRUPT_UNIQUE.
can_clk_rateCAN clock rate.
Returns
Pointer to CAN chip structure on success, NULL otherwise.