mcp251863 2.0.0.0
|
API for configuring and manipulating MCP251863 Click driver. More...
Topics | |
MCP251863 Registers List | |
List of registers of MCP251863 Click driver. | |
MCP251863 Registers Settings | |
MCP251863 description register. | |
MCP251863 MikroBUS Map | |
MikroBUS pin mapping of MCP251863 Click driver. | |
Functions | |
void | mcp251863_cfg_setup (mcp251863_cfg_t *cfg) |
MCP251863 configuration object setup function. | |
err_t | mcp251863_init (mcp251863_t *ctx, mcp251863_cfg_t *cfg) |
MCP251863 initialization function. | |
err_t | mcp251863_default_cfg (mcp251863_t *ctx) |
MCP251863 default configuration function. | |
err_t | mcp251863_generic_write (mcp251863_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
MCP251863 data writing function. | |
err_t | mcp251863_generic_read (mcp251863_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
MCP251863 data reading function. | |
err_t | mcp251863_transmit_message (mcp251863_t *ctx, uint8_t *data_in, uint16_t data_len) |
Message Transmit function. | |
err_t | mcp251863_receive_message (mcp251863_t *ctx, uint8_t *data_out, uint16_t *data_len) |
Message Receive function. | |
err_t | mcp251863_reset (mcp251863_t *ctx) |
Reset function. | |
err_t | mcp251863_read_byte (mcp251863_t *ctx, uint16_t address, uint8_t *data_out) |
SPI Read Byte function. | |
err_t | mcp251863_write_byte (mcp251863_t *ctx, uint16_t address, uint8_t data_in) |
SPI Write Byte. | |
err_t | mcp251863_read_word (mcp251863_t *ctx, uint16_t address, uint32_t *data_out) |
SPI Read Word. | |
err_t | mcp251863_write_word (mcp251863_t *ctx, uint16_t address, uint32_t data_in) |
SPI Write Word. | |
err_t | mcp251863_read_half_word (mcp251863_t *ctx, uint16_t address, uint16_t *data_out) |
SPI Read Half Word. | |
err_t | mcp251863_write_half_word (mcp251863_t *ctx, uint16_t address, uint16_t data_in) |
SPI Write Half Word. | |
err_t | mcp251863_write_byte_safe (mcp251863_t *ctx, uint16_t address, uint8_t data_in) |
SPI SFR Write Byte Safe. | |
err_t | mcp251863_write_word_safe (mcp251863_t *ctx, uint16_t address, uint32_t data_in) |
SPI RAM Write Word Safe. | |
err_t | mcp251863_read_byte_array (mcp251863_t *ctx, uint16_t address, uint8_t *data_out, uint16_t n_bytes) |
SPI Read Byte Array. | |
err_t | mcp251863_read_byte_array_with_crc (mcp251863_t *ctx, bool from_ram, bool *crc_is_correct) |
SPI Read Byte Array with CRC. | |
err_t | mcp251863_write_byte_array (mcp251863_t *ctx, uint16_t address, uint8_t *data_in, uint16_t n_bytes) |
SPI Write Byte Array. | |
err_t | mcp251863_write_byte_array_with_crc (mcp251863_t *ctx, bool from_ram) |
SPI Write Byte Array with CRC. | |
err_t | mcp251863_read_word_array (mcp251863_t *ctx, uint16_t address, uint32_t *data_out, uint16_t n_words) |
SPI Read Word Array. | |
err_t | mcp251863_write_word_array (mcp251863_t *ctx, uint16_t address, uint32_t *data_in, uint16_t n_words) |
SPI Write Word Array. | |
err_t | mcp251863_configure (mcp251863_t *ctx, mcp251863_can_cfg_t *config) |
CAN Control register configuration. | |
void | mcp251863_configure_object_reset (mcp251863_can_cfg_t *config) |
Reset Configure object to reset values. | |
err_t | mcp251863_operation_mode_select (mcp251863_t *ctx, uint8_t op_mode) |
Select Operation Mode. | |
err_t | mcp251863_operation_mode_get (mcp251863_t *ctx) |
Get Operation Mode. | |
err_t | mcp251863_transmit_channel_configure (mcp251863_t *ctx, uint8_t channel, mcp251863_tx_fifo_cfg_t *config) |
Configure Transmit FIFO. | |
void | mcp251863_transmit_channel_configure_object_reset (mcp251863_tx_fifo_cfg_t *config) |
Reset Transmit Channel Configure object to reset values. | |
err_t | mcp251863_transmit_queue_configure (mcp251863_t *ctx, mcp251863_tx_que_cfg_t *config) |
Configure Transmit Queue. | |
void | mcp251863_transmit_queue_configure_object_reset (mcp251863_tx_que_cfg_t *config) |
Reset Transmit Queue Configure object to reset values. | |
err_t | mcp251863_transmit_channel_load (mcp251863_t *ctx, uint8_t channel, mcp251863_tx_msg_obj_t *tx_obj, bool flush) |
TX Channel Load. | |
err_t | mcp251863_transmit_channel_flush (mcp251863_t *ctx, uint8_t channel) |
TX Channel Flush. | |
err_t | mcp251863_transmit_channel_status_get (mcp251863_t *ctx, uint8_t channel, uint16_t *status) |
Transmit Channel Status Get. | |
int8_t | mcp251863_transmit_channel_reset (mcp251863_t *ctx, uint8_t channel) |
Transmit FIFO Reset. | |
err_t | mcp251863_transmit_channel_update (mcp251863_t *ctx, uint8_t channel, bool flush) |
Transmit FIFO Update. | |
err_t | mcp251863_transmit_request_set (mcp251863_t *ctx, uint32_t tx_req) |
Request transmissions using TXREQ register. | |
err_t | mcp251863_transmit_request_get (mcp251863_t *ctx, uint32_t *tx_req) |
Get TXREQ register. | |
err_t | mcp251863_transmit_channel_abort (mcp251863_t *ctx, uint8_t channel) |
Abort transmission of single FIFO. | |
err_t | mcp251863_transmit_abort_all (mcp251863_t *ctx) |
Abort All transmissions. | |
err_t | mcp251863_transmit_band_width_sharing_set (mcp251863_t *ctx, uint8_t tx_bws) |
Set Transmit Bandwidth Sharing Delay. | |
err_t | mcp251863_filter_object_configure (mcp251863_t *ctx, uint8_t filter, mcp251863_filt_obj_id_t *id) |
Filter Object Configuration. | |
err_t | mcp251863_filter_mask_configure (mcp251863_t *ctx, uint8_t filter, mcp251863_mask_obj_id_t *mask) |
Filter Mask Configuration. | |
err_t | mcp251863_filter_to_fifo_link (mcp251863_t *ctx, uint8_t filter, uint8_t channel, bool enable) |
Link Filter to FIFO. | |
err_t | mcp251863_filter_enable (mcp251863_t *ctx, uint8_t filter) |
Filter Enable. | |
err_t | mcp251863_filter_disable (mcp251863_t *ctx, uint8_t filter) |
Filter Disable. | |
err_t | mcp251863_device_net_filter_count_set (mcp251863_t *ctx, uint8_t dnfc) |
Set Device Net Filter Count. | |
err_t | mcp251863_receive_channel_configure (mcp251863_t *ctx, uint8_t channel, mcp251863_rx_fifo_cfg_t *config) |
Configure Receive FIFO. | |
void | mcp251863_receive_channel_configure_object_reset (mcp251863_rx_fifo_cfg_t *config) |
Reset Receive Channel Configure object to reset value. | |
err_t | mcp251863_receive_channel_status_get (mcp251863_t *ctx, uint8_t channel, uint8_t *status) |
Receive Channel Status Get. | |
err_t | mcp251863_receive_message_get (mcp251863_t *ctx, uint8_t channel, mcp251863_rx_msg_obj_t *rx_obj) |
Get Received Message. | |
err_t | mcp251863_receive_channel_reset (mcp251863_t *ctx, uint8_t channel) |
Receive FIFO Reset. | |
err_t | mcp251863_receive_channel_update (mcp251863_t *ctx, uint8_t channel) |
Receive FIFO Update. | |
err_t | mcp251863_tef_status_get (mcp251863_t *ctx, uint8_t *status) |
Transmit Event FIFO Status Get. | |
err_t | mcp251863_tef_message_get (mcp251863_t *ctx, mcp251863_tef_msg_obj_t *tef_obj) |
Get Transmit Event FIFO Message. | |
err_t | mcp251863_tef_reset (mcp251863_t *ctx) |
Transmit Event FIFO Reset. | |
err_t | mcp251863_tef_update (mcp251863_t *ctx) |
Transmit Event FIFO Update. | |
err_t | mcp251863_tef_configure (mcp251863_t *ctx, mcp251863_tef_cfg_t *config) |
Configure Transmit Event FIFO. | |
void | mcp251863_tef_configure_object_reset (mcp251863_tef_cfg_t *config) |
Reset TefConfigure object to reset value. | |
err_t | mcp251863_module_event_get (mcp251863_t *ctx, uint16_t *flags) |
Module Event Get. | |
err_t | mcp251863_module_event_enable (mcp251863_t *ctx, uint16_t flags) |
Module Event Enable. | |
err_t | mcp251863_module_event_disable (mcp251863_t *ctx, uint16_t flags) |
Module Event Disable. | |
err_t | mcp251863_module_event_clear (mcp251863_t *ctx, uint16_t flags) |
Module Event Clear. | |
err_t | mcp251863_module_event_rx_code_get (mcp251863_t *ctx, uint8_t *rx_code) |
Get RX Code. | |
err_t | mcp251863_module_event_tx_code_get (mcp251863_t *ctx, uint8_t *tx_code) |
Get TX Code. | |
err_t | mcp251863_module_event_filter_hit_get (mcp251863_t *ctx, uint8_t *filter_hit) |
Get Filter Hit. | |
err_t | mcp251863_module_event_icode_get (mcp251863_t *ctx, uint8_t *icode) |
Get ICODE. | |
err_t | mcp251863_transmit_channel_event_get (mcp251863_t *ctx, uint8_t channel, uint8_t *flags) |
Transmit FIFO Event Get. | |
err_t | mcp251863_transmit_event_get (mcp251863_t *ctx, uint32_t *txif) |
Get pending interrupts of all transmit FIFOs. | |
err_t | mcp251863_transmit_event_attempt_get (mcp251863_t *ctx, uint32_t *txatif) |
Get pending TXATIF of all transmit FIFOs. | |
err_t | mcp251863_transmit_channel_index_get (mcp251863_t *ctx, uint8_t channel, uint8_t *idx) |
Transmit FIFO Index Get. | |
err_t | mcp251863_transmit_channel_event_enable (mcp251863_t *ctx, uint8_t channel, uint8_t flags) |
Transmit FIFO Event Enable. | |
err_t | mcp251863_transmit_channel_event_disable (mcp251863_t *ctx, uint8_t channel, uint8_t flags) |
Transmit FIFO Event Disable. | |
err_t | mcp251863_transmit_channel_event_attempt_clear (mcp251863_t *ctx, uint8_t channel) |
Transmit FIFO Event Clear. | |
err_t | mcp251863_receive_channel_event_get (mcp251863_t *ctx, uint8_t channel, uint8_t *flags) |
Receive FIFO Event Get. | |
err_t | mcp251863_receive_event_get (mcp251863_t *ctx, uint32_t *rxif) |
Get pending interrupts of all receive FIFOs. | |
err_t | mcp251863_receive_event_overflow_get (mcp251863_t *ctx, uint32_t *rxovif) |
Get pending RXOVIF of all receive FIFOs. | |
int8_t | mcp251863_receive_channel_index_get (mcp251863_t *ctx, uint8_t channel, uint8_t *idx) |
Receive FIFO Index Get. | |
err_t | mcp251863_receive_channel_event_enable (mcp251863_t *ctx, uint8_t channel, uint8_t flags) |
Receive FIFO Event Enable. | |
err_t | mcp251863_receive_channel_event_disable (mcp251863_t *ctx, uint8_t channel, uint8_t flags) |
Receive FIFO Event Disable. | |
err_t | mcp251863_receive_channel_event_overflow_clear (mcp251863_t *ctx, uint8_t channel) |
Receive FIFO Event Clear. | |
err_t | mcp251863_tef_event_get (mcp251863_t *ctx, uint8_t *flags) |
Transmit Event FIFO Event Get. | |
err_t | mcp251863_tef_event_enable (mcp251863_t *ctx, uint8_t flags) |
Transmit Event FIFO Event Enable. | |
err_t | mcp251863_tef_event_disable (mcp251863_t *ctx, uint8_t flags) |
Transmit Event FIFO Event Disable. | |
err_t | mcp251863_tef_event_overflow_clear (mcp251863_t *ctx) |
Transmit Event FIFO Event Clear. | |
err_t | mcp251863_error_count_transmit_get (mcp251863_t *ctx, uint8_t *tec) |
Transmit Error Count Get. | |
err_t | mcp251863_error_count_receive_get (mcp251863_t *ctx, uint8_t *rec) |
Receive Error Count Get. | |
err_t | mcp251863_error_state_get (mcp251863_t *ctx, uint8_t *flags) |
Error State Get. | |
err_t | mcp251863_error_count_state_get (mcp251863_t *ctx, uint8_t *tec, uint8_t *rec, uint8_t *flags) |
Error Counts and Error State Get. | |
err_t | mcp251863_bus_diagnostics_get (mcp251863_t *ctx, mcp251863_bus_diag_t *bus_diag) |
Get Bus Diagnostic Registers: all data_ at once, since we want to keep them in synch. | |
err_t | mcp251863_bus_diagnostics_clear (mcp251863_t *ctx) |
Clear Bus Diagnostic Registers. | |
err_t | mcp251863_ecc_enable (mcp251863_t *ctx) |
Enable ECC. | |
err_t | mcp251863_ecc_disable (mcp251863_t *ctx) |
Disable ECC. | |
err_t | mcp251863_ecc_event_get (mcp251863_t *ctx, uint8_t *flags) |
ECC Event Get. | |
err_t | mcp251863_ecc_parity_set (mcp251863_t *ctx, uint8_t parity) |
Set ECC Parity. | |
err_t | mcp251863_ecc_parity_get (mcp251863_t *ctx, uint8_t *parity) |
Get ECC Parity. | |
err_t | mcp251863_ecc_error_address_get (mcp251863_t *ctx, uint16_t *address) |
Get ECC Error Address. | |
err_t | mcp251863_ecc_event_enable (mcp251863_t *ctx, uint8_t flags) |
ECC Event Enable. | |
err_t | mcp251863_ecc_event_disable (mcp251863_t *ctx, uint8_t flags) |
ECC Event Disable. | |
err_t | mcp251863_ecc_event_clear (mcp251863_t *ctx, uint8_t flags) |
ECC Event Clear. | |
err_t | mcp251863_crc_event_enable (mcp251863_t *ctx, uint8_t flags) |
CRC Event Enable. | |
err_t | mcp251863_crc_event_disable (mcp251863_t *ctx, uint8_t flags) |
CRC Event Disnable. | |
err_t | mcp251863_crc_event_clear (mcp251863_t *ctx, uint8_t flags) |
CRC Event Clear. | |
err_t | mcp251863_crc_event_get (mcp251863_t *ctx, uint8_t *flags) |
CRC Event Get. | |
err_t | mcp251863_crc_value_get (mcp251863_t *ctx, uint16_t *crc) |
Get CRC Value from device. | |
err_t | mcp251863_ram_init (mcp251863_t *ctx, uint8_t rx_data) |
Initialize RAM. | |
err_t | mcp251863_time_stamp_enable (mcp251863_t *ctx) |
Time Stamp Enable. | |
err_t | mcp251863_time_stamp_disable (mcp251863_t *ctx) |
Time Stamp Disable. | |
err_t | mcp251863_time_stamp_get (mcp251863_t *ctx, uint32_t *time_stamp) |
Time Stamp Get. | |
err_t | mcp251863_time_stamp_set (mcp251863_t *ctx, uint32_t ts) |
Time Stamp Set. | |
err_t | mcp251863_time_stamp_mode_configure (mcp251863_t *ctx, uint8_t mode) |
Time Stamp Mode Configure. | |
err_t | mcp251863_time_stamp_prescaler_set (mcp251863_t *ctx, uint16_t time_stamp) |
Time Stamp Prescaler Set. | |
err_t | mcp251863_oscillator_enable (mcp251863_t *ctx) |
Enable oscillator to wake-up from sleep. | |
err_t | mcp251863_oscillator_control_set (mcp251863_t *ctx, mcp251863_div_ctl_t ctrl) |
Set Oscillator Control. | |
void | mcp251863_oscillator_control_object_reset (mcp251863_div_ctl_t *ctrl) |
Reset Oscillator Control. | |
err_t | mcp251863_oscillator_status_get (mcp251863_t *ctx, mcp251863_osc_sta_t *status) |
Get Oscillator Status. | |
err_t | mcp251863_bit_time_configure (mcp251863_t *ctx, uint8_t bit_time, uint8_t clk) |
Configure Bit Time registers (based on CAN clock speed). | |
err_t | mcp251863_bit_time_configure_nominal_40_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Nominal bit time for 40MHz system clock. | |
err_t | mcp251863_bit_time_configure_data_40_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Data bit time for 40MHz system clock. | |
err_t | mcp251863_bit_time_configure_nominal_20_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Nominal bit time for 20MHz system clock. | |
err_t | mcp251863_bit_time_configure_data_20_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Nominal bit time for 20MHz system clock. | |
err_t | mcp251863_bit_time_configure_nominal_10_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Nominal bit time for 10MHz system clock. | |
err_t | mcp251863_bit_time_configure_data_10_mhz (mcp251863_t *ctx, uint8_t bit_time) |
Configure Data bit time for 10MHz system clock. | |
err_t | mcp251863_gpio_mode_configure (mcp251863_t *ctx, uint8_t gpio0, uint8_t gpio1) |
Initialize GPIO Mode. | |
err_t | mcp251863_gpio_direction_configure (mcp251863_t *ctx, uint8_t gpio0, uint8_t gpio1) |
Initialize GPIO Direction. | |
err_t | mcp251863_gpio_standby_control_enable (mcp251863_t *ctx) |
Enable Transceiver Standby Control. | |
err_t | mcp251863_gpio_standby_control_disable (mcp251863_t *ctx) |
Disable Transceiver Standby Control. | |
err_t | mcp251863_gpio_interrupt_pins_open_drain_configure (mcp251863_t *ctx, uint8_t mode) |
Configure Open Drain Interrupts. | |
err_t | mcp251863_gpio_transmit_pin_open_drain_configure (mcp251863_t *ctx, uint8_t mode) |
Configure Open Drain TXCAN. | |
err_t | mcp251863_gpio_pin_set (mcp251863_t *ctx, uint8_t pos, uint8_t latch) |
GPIO Output Pin Set. | |
err_t | mcp251863_gpio_pin_read (mcp251863_t *ctx, uint8_t pos, uint8_t *state) |
Input Pin Read. | |
err_t | mcp251863_gpio_clock_output_configure (mcp251863_t *ctx, int8_t mode) |
Configure CLKO Pin. | |
uint32_t | mcp251863_dlc_to_data_bytes (uint8_t dlc) |
DLC to number of actual data_bytes conversion. | |
err_t | mcp251863_fifo_index_get (mcp251863_t *ctx, uint8_t channel, uint8_t *data_out) |
FIFO Index Get. | |
uint16_t | mcp251863_calculate_crc16 (uint8_t *data_pointer, uint16_t size) |
Calculate CRC16. | |
uint8_t | mcp251863_data_bytes_to_dlc (uint8_t num) |
Data bytes to DLC conversion. | |
API for configuring and manipulating MCP251863 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
#define CAN_RESTRICTED_MODE_PRESENT |
MCP251863 Internal oscillator implemented.
Specified setting for Internal oscillator implemented of MCP251863 Click driver.
MCP251863 Restricted Operation Mode implemented.
Specified setting for restricted operation mode implemented of MCP251863 Click driver.
#define CAN_TXQUEUE_IMPLEMENTED |
MCP251863 Transmit Queue.
Specified setting for transmit queue of MCP251863 Click driver.
#define MCP251863 |
#define MCP251863_CRCBASE 0xFFFF |
#define MCP251863_CRCUPPER 1 |
#define MCP251863_DRV_CANFDSPI_INDEX_0 0 |
#define MCP251863_FIFO_08TO15_IMPLEMENTED |
MCP251863 Number of implemented FIFOs.
Specified setting for number of implemented FIFOs of MCP251863 Click driver.
#define MCP251863_FIFO_16TO31_IMPLEMENTED |
#define MCP251863_FIFO_OFFSET ( 3 * 4 ) |
#define MCP251863_FILT_08TO15_IMPLEMENTED |
MCP251863 Number of implemented Filters.
Specified setting for number of implemented Filters of MCP251863 Click driver.
#define MCP251863_FILT_16TO31_IMPLEMENTED |
#define MCP251863_FILTER_OFFSET ( 2 * 4 ) |
#define MCP251863_INS_READ 0x03 |
#define MCP251863_INS_READ_CRC 0x0B |
#define MCP251863_INS_RESET 0x00 |
#define MCP251863_INS_WRITE 0x02 |
#define MCP251863_INS_WRITE_CRC 0x0A |
#define MCP251863_INS_WRITE_SAFE 0x0C |
#define MCP251863_ISO_CRC 1 |
#define MCP251863_LOW_POWER_MODE_DIS 0x00 |
#define MCP251863_LOW_POWER_MODE_EN 0x08 |
#define MCP251863_MAX_DATA_BYTES 64 |
#define MCP251863_MAX_MSG_SIZE 76 |
#define MCP251863_MAX_TXQUEUE_ATTEMPTS 50 |
#define MCP251863_RAM_SIZE 2048 |
#define MCP251863_RAMADDR_END ( MCP251863_RAMADDR_START + MCP251863_RAM_SIZE ) |
#define MCP251863_RAMADDR_START 0x400 |
#define MCP251863_REG_CIBDIAG0 0x038 |
#define MCP251863_REG_CIBDIAG1 0x03C |
#define MCP251863_REG_CICON 0x000 |
#define MCP251863_REG_CIDBTCFG 0x008 |
#define MCP251863_REG_CIFIFOBA 0x04C |
#define MCP251863_REG_CIFIFOCON 0x050 |
#define MCP251863_REG_CIFIFOSTA 0x054 |
#define MCP251863_REG_CIFIFOUA 0x058 |
#define MCP251863_REG_CIFLTCON ( MCP251863_REG_CIFIFOCON + ( MCP251863_FIFO_OFFSET * MCP251863_FIFO_TOTAL_CHANNELS ) ) |
#define MCP251863_REG_CIFLTOBJ ( MCP251863_REG_CIFLTCON + MCP251863_FIFO_TOTAL_CHANNELS ) |
#define MCP251863_REG_CIINT 0x01C |
#define MCP251863_REG_CIINTENABLE ( MCP251863_REG_CIINT + 2 ) |
#define MCP251863_REG_CIINTFLAG MCP251863_REG_CIINT |
#define MCP251863_REG_CIMASK ( MCP251863_REG_CIFLTOBJ + 4 ) |
#define MCP251863_REG_CINBTCFG 0x004 |
#define MCP251863_REG_CIRXIF 0x020 |
#define MCP251863_REG_CIRXOVIF 0x028 |
#define MCP251863_REG_CITBC 0x010 |
#define MCP251863_REG_CITDC 0x00C |
#define MCP251863_REG_CITEFCON 0x040 |
#define MCP251863_REG_CITEFSTA 0x044 |
#define MCP251863_REG_CITEFUA 0x048 |
#define MCP251863_REG_CITREC 0x034 |
#define MCP251863_REG_CITSCON 0x014 |
#define MCP251863_REG_CITXATIF 0x02C |
#define MCP251863_REG_CITXIF 0x024 |
#define MCP251863_REG_CITXQCON 0x050 |
#define MCP251863_REG_CITXQSTA 0x054 |
#define MCP251863_REG_CITXQUA 0x058 |
#define MCP251863_REG_CITXREQ 0x030 |
#define MCP251863_REG_CIVEC 0x018 |
#define MCP251863_REG_CRC 0xE08 |
#define MCP251863_REG_ECCCON 0xE0C |
#define MCP251863_REG_ECCSTA 0xE10 |
#define MCP251863_REG_IOCON 0xE04 |
#define MCP251863_REG_OSC 0xE00 |
#define MCP251863_SPI_DEFAULT_BUFFER_LENGTH 96 |
#define MCP251863_TX_REQUEST_ID 0x300 |
#define MCP251863_TX_RESPONSE_ID 0x301 |
#define MCP251863_WAKEUP_INTERR_EN 0x40 |
#define N_MCP2518_CTRL_REGS 5 |
MCP251863 Up to A1 silicon we had to multiply user address by 4.
Specified setting for Up to A1 silicon we had to multiply user address by 4 of MCP251863 Click driver.
#define REV_B |
MCP251863 Revision.
Specified setting for Revision of MCP251863 Click driver.
err_t mcp251863_bit_time_configure | ( | mcp251863_t * | ctx, |
uint8_t | bit_time, | ||
uint8_t | clk ) |
Configure Bit Time registers (based on CAN clock speed).
Function for configuring Bit Time registers ( based on CAN clock speed ).
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
[in] | clk | : Decode clk. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_data_10_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Data bit time for 10MHz system clock.
Function for configuring Data bit time for 10MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_data_20_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Nominal bit time for 20MHz system clock.
Function for configuring Nominal bit time for 20MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_data_40_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Data bit time for 40MHz system clock.
Function for configuring Data bit time for 40MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_nominal_10_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Nominal bit time for 10MHz system clock.
Function for configuring Nominal bit time for 10MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_nominal_20_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Nominal bit time for 20MHz system clock.
Function for configuring Nominal bit time for 20MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bit_time_configure_nominal_40_mhz | ( | mcp251863_t * | ctx, |
uint8_t | bit_time ) |
Configure Nominal bit time for 40MHz system clock.
Function for configuring Nominal bit time for 40MHz system clock.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | bit_time | : Bit time. |
0
- Success, -1
- Error.err_t mcp251863_bus_diagnostics_clear | ( | mcp251863_t * | ctx | ) |
Clear Bus Diagnostic Registers.
Function for clearing Bus Diagnostic Registers.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_bus_diagnostics_get | ( | mcp251863_t * | ctx, |
mcp251863_bus_diag_t * | bus_diag ) |
Get Bus Diagnostic Registers: all data_ at once, since we want to keep them in synch.
Function for getting Bus Diagnostic Registers: all data_ at once, since we want to keep them in synch
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
bus_diag | : Bus diag object. |
0
- Success, -1
- Error.uint16_t mcp251863_calculate_crc16 | ( | uint8_t * | data_pointer, |
uint16_t | size ) |
Calculate CRC16.
Function for calculate CRC16.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | data_pointer | : Data pointer. |
[in] | size | : Size of array ( table for CRC calculation ). |
void mcp251863_cfg_setup | ( | mcp251863_cfg_t * | cfg | ) |
MCP251863 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See mcp251863_cfg_t object definition for detailed explanation. |
err_t mcp251863_configure | ( | mcp251863_t * | ctx, |
mcp251863_can_cfg_t * | config ) |
CAN Control register configuration.
Function for CAN control register configuration.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | config | : CAN config object. |
0
- Success, -1
- Error.void mcp251863_configure_object_reset | ( | mcp251863_can_cfg_t * | config | ) |
Reset Configure object to reset values.
Function for reset configure object.
[in] | config | : CAN config object. |
err_t mcp251863_crc_event_clear | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
CRC Event Clear.
Function for clearing CRC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt flags of CRC Register |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_crc_event_disable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
CRC Event Disnable.
Function for disabling CRC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt control bits of CRC Register. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_crc_event_enable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
CRC Event Enable.
Function for enabling CRC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
flags | : Interrupt control bits of CRC Register. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_crc_event_get | ( | mcp251863_t * | ctx, |
uint8_t * | flags ) |
CRC Event Get.
Function for getting CRC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | flags | : Interrupt flags of CRC Register |
0
- Success, -1
- Error.err_t mcp251863_crc_value_get | ( | mcp251863_t * | ctx, |
uint16_t * | crc ) |
Get CRC Value from device.
Function for getting CRC Value from device.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | crc | : CRC value from CRC Register. |
0
- Success, -1
- Error.uint8_t mcp251863_data_bytes_to_dlc | ( | uint8_t | num | ) |
Data bytes to DLC conversion.
Function for conversion Data bytes to DLC
[in] | num | : Number of bytes |
err_t mcp251863_default_cfg | ( | mcp251863_t * | ctx | ) |
MCP251863 default configuration function.
This function executes a default configuration of MCP251863 click board.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_device_net_filter_count_set | ( | mcp251863_t * | ctx, |
uint8_t | dnfc ) |
Set Device Net Filter Count.
Function for setting device net filter count.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | dnfc | : Device Net Filter Count |
0
- Success, -1
- Read error, -2
- Write error.uint32_t mcp251863_dlc_to_data_bytes | ( | uint8_t | dlc | ) |
DLC to number of actual data_bytes conversion.
Function for conversion DLC to number of actual data bytes.
[in] | dlc | : DLC |
err_t mcp251863_ecc_disable | ( | mcp251863_t * | ctx | ) |
Disable ECC.
Function for disabling ECC.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_enable | ( | mcp251863_t * | ctx | ) |
Enable ECC.
Function for enabling ECC.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_error_address_get | ( | mcp251863_t * | ctx, |
uint16_t * | address ) |
Get ECC Error Address.
Function for getting ECC Error Address.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Adress to be read. |
0
- Success, -1
- Error.err_t mcp251863_ecc_event_clear | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
ECC Event Clear.
Function for clearing ECC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
flags | : ECC status. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_event_disable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
ECC Event Disable.
Function for disabling ECC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
flags | : ECC interrupt. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_event_enable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
ECC Event Enable.
Function for enabling ECC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
flags | : ECC interrupt. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_event_get | ( | mcp251863_t * | ctx, |
uint8_t * | flags ) |
ECC Event Get.
Function for getting ECC Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
flags | : Interrupt flags. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_ecc_parity_get | ( | mcp251863_t * | ctx, |
uint8_t * | parity ) |
Get ECC Parity.
Function for getting ECC Parity.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
parity | : Data to be read. |
0
- Success, -1
- Error.err_t mcp251863_ecc_parity_set | ( | mcp251863_t * | ctx, |
uint8_t | parity ) |
Set ECC Parity.
Function for setting ECC Parity.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
parity | : Write command. |
0
- Success, -1
- Error.err_t mcp251863_error_count_receive_get | ( | mcp251863_t * | ctx, |
uint8_t * | rec ) |
Receive Error Count Get.
Function for getting Receive Error Count.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | rec | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_error_count_state_get | ( | mcp251863_t * | ctx, |
uint8_t * | tec, | ||
uint8_t * | rec, | ||
uint8_t * | flags ) |
Error Counts and Error State Get.
Returns content of complete CITREC.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | tec | : Buffer to be read. |
[out] | rec | : Buffer to be read. |
[out] | flags | : Interrupt flags. |
0
- Success, -1
- Error.err_t mcp251863_error_count_transmit_get | ( | mcp251863_t * | ctx, |
uint8_t * | tec ) |
Transmit Error Count Get.
Function for clearing Transmit Event FIFO Event.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
tec | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_error_state_get | ( | mcp251863_t * | ctx, |
uint8_t * | flags ) |
Error State Get.
Function for getting Error State.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | flags | : Interrupt flags. |
0
- Success, -1
- Error.err_t mcp251863_fifo_index_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | data_out ) |
FIFO Index Get.
Function for getting FIFO Index.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | channel | : Channel. |
[in] | data_out | : Buffer for status register to be read |
0
- Success, -1
- Error.err_t mcp251863_filter_disable | ( | mcp251863_t * | ctx, |
uint8_t | filter ) |
Filter Disable.
Function for disabling specific filter.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | filter | : Filter. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_filter_enable | ( | mcp251863_t * | ctx, |
uint8_t | filter ) |
Filter Enable.
Function for enabling specific filter.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | filter | : Filter. |
0
- Success, -1
- Error.err_t mcp251863_filter_mask_configure | ( | mcp251863_t * | ctx, |
uint8_t | filter, | ||
mcp251863_mask_obj_id_t * | mask ) |
Filter Mask Configuration.
Configures Mask of filter object.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | filter | : Filter. |
[in] | mask | : Filter mask id |
0
- Success, -1
- Error.err_t mcp251863_filter_object_configure | ( | mcp251863_t * | ctx, |
uint8_t | filter, | ||
mcp251863_filt_obj_id_t * | id ) |
Filter Object Configuration.
Configures ID of filter object.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | filter | : Filter. |
[in] | id | : Filter object id. |
0
- Success, -1
- Error.err_t mcp251863_filter_to_fifo_link | ( | mcp251863_t * | ctx, |
uint8_t | filter, | ||
uint8_t | channel, | ||
bool | enable ) |
Link Filter to FIFO.
Initializes the Pointer from Filter to FIFO. Enables or disables the Filter.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | filter | : Filter. |
[in | channel : Channel. | |
[in] | enable | : If TRUE - sets 1 on enable field ( of filter ctl object ) |
0
- Success, -1
- Error.err_t mcp251863_generic_read | ( | mcp251863_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
MCP251863 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t mcp251863_generic_write | ( | mcp251863_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
MCP251863 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t mcp251863_gpio_clock_output_configure | ( | mcp251863_t * | ctx, |
int8_t | mode ) |
Configure CLKO Pin.
Function for configuring CLKO Pin.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | mode | : Mode. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_direction_configure | ( | mcp251863_t * | ctx, |
uint8_t | gpio0, | ||
uint8_t | gpio1 ) |
Initialize GPIO Direction.
Function for initialising GPIO Direction.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | gpio0 | : GPIO 0. |
[in] | gpio1 | : GPIO 1. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_interrupt_pins_open_drain_configure | ( | mcp251863_t * | ctx, |
uint8_t | mode ) |
Configure Open Drain Interrupts.
Function for configuring Open Drain Interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | mode | : Mode. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_mode_configure | ( | mcp251863_t * | ctx, |
uint8_t | gpio0, | ||
uint8_t | gpio1 ) |
Initialize GPIO Mode.
Function for initialising GPIO Mode.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | gpio0 | : GPIO 0. |
[in] | gpio1 | : GPIO 1. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_pin_read | ( | mcp251863_t * | ctx, |
uint8_t | pos, | ||
uint8_t * | state ) |
Input Pin Read.
Function for reading GPIO Input Pin Read.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | pos | : Pin flag. |
[in] | state | : State to be read. |
0
- Success, -1
- Error.err_t mcp251863_gpio_pin_set | ( | mcp251863_t * | ctx, |
uint8_t | pos, | ||
uint8_t | latch ) |
GPIO Output Pin Set.
Function for setting GPIO Output Pin.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | pos | : Pin flag. |
[in] | latch | : Pin latch. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_standby_control_disable | ( | mcp251863_t * | ctx | ) |
Disable Transceiver Standby Control.
Function for disabling Transceiver Standby Control.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_standby_control_enable | ( | mcp251863_t * | ctx | ) |
Enable Transceiver Standby Control.
Function for enabling Transceiver Standby Control.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_gpio_transmit_pin_open_drain_configure | ( | mcp251863_t * | ctx, |
uint8_t | mode ) |
Configure Open Drain TXCAN.
Function for configuring Open Drain TXCAN.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | mode | : Mode. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_init | ( | mcp251863_t * | ctx, |
mcp251863_cfg_t * | cfg ) |
MCP251863 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See mcp251863_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_module_event_clear | ( | mcp251863_t * | ctx, |
uint16_t | flags ) |
Module Event Clear.
Clears interrupt Flags.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt clears to be read. |
0
- Success, -1
- Error, -2
- Write half word error.err_t mcp251863_module_event_disable | ( | mcp251863_t * | ctx, |
uint16_t | flags ) |
Module Event Disable.
Disables interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt disables to be read. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_module_event_enable | ( | mcp251863_t * | ctx, |
uint16_t | flags ) |
Module Event Enable.
Enables interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt disables to be read. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_module_event_filter_hit_get | ( | mcp251863_t * | ctx, |
uint8_t * | filter_hit ) |
Get Filter Hit.
Function for getting Filter Hit.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | filter_hit | : Filter hit. |
0
- Success, -1
- Error.err_t mcp251863_module_event_get | ( | mcp251863_t * | ctx, |
uint16_t * | flags ) |
Module Event Get.
Reads interrupt Flags
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt disables to be read. |
0
- Success, -1
- Error.err_t mcp251863_module_event_icode_get | ( | mcp251863_t * | ctx, |
uint8_t * | icode ) |
Get ICODE.
Function for getting ICODE.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | icode | : Decode. |
0
- Success, -1
- Error.err_t mcp251863_module_event_rx_code_get | ( | mcp251863_t * | ctx, |
uint8_t * | rx_code ) |
Get RX Code.
Function for getting RX Code.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | rx_code | : Decode data_pointer. |
0
- Success, -1
- Error.err_t mcp251863_module_event_tx_code_get | ( | mcp251863_t * | ctx, |
uint8_t * | tx_code ) |
Get TX Code.
Function for getting TX Code.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | tx_code | : Decode data_pointer. |
0
- Success, -1
- Error.err_t mcp251863_operation_mode_get | ( | mcp251863_t * | ctx | ) |
Get Operation Mode.
Function for get operation mode.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
err_t mcp251863_operation_mode_select | ( | mcp251863_t * | ctx, |
uint8_t | op_mode ) |
Select Operation Mode.
Function for select operation mode.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | op_mode | : Operation mode. |
0
- Success, -1
- Read error. -2
- Writte error.void mcp251863_oscillator_control_object_reset | ( | mcp251863_div_ctl_t * | ctrl | ) |
Reset Oscillator Control.
Function for resetting Oscillator Control.
[in] | ctrl | : Div ctrl object. |
err_t mcp251863_oscillator_control_set | ( | mcp251863_t * | ctx, |
mcp251863_div_ctl_t | ctrl ) |
Set Oscillator Control.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
ctrl | : Div ctl object. |
0
- Success, -1
- Error.Function for setting Oscillator Control
err_t mcp251863_oscillator_enable | ( | mcp251863_t * | ctx | ) |
Enable oscillator to wake-up from sleep.
Function for enabling oscillator to wake-up from sleep.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_oscillator_status_get | ( | mcp251863_t * | ctx, |
mcp251863_osc_sta_t * | status ) |
Get Oscillator Status.
Function for gettting Oscillator Status.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | status | : Oscillator status object. |
0
- Success, -1
- Error.err_t mcp251863_ram_init | ( | mcp251863_t * | ctx, |
uint8_t | rx_data ) |
Initialize RAM.
Function for initialising RAM.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | rx_data | : Data_pointer. |
0
- Success, -1
- Error.err_t mcp251863_read_byte | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out ) |
SPI Read Byte function.
Function for read byte.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[out] | data_out | : Buffer where data will be read. |
0
- Success, -1
- Error.err_t mcp251863_read_byte_array | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint16_t | n_bytes ) |
SPI Read Byte Array.
Function for read byte array.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[out] | data_out | : Buffer where data will be read. |
[in] | n_bytes | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t mcp251863_read_byte_array_with_crc | ( | mcp251863_t * | ctx, |
bool | from_ram, | ||
bool * | crc_is_correct ) |
SPI Read Byte Array with CRC.
Function for read byte with CRC.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | from_ram | : Byte for array size. |
[in] | crc_is_correct | : Compare CRC readings ( true - if equal, false - if not ). |
0
- Success, -1
- Error.err_t mcp251863_read_half_word | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint16_t * | data_out ) |
SPI Read Half Word.
Function for read half word.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[out] | data_out | : Buffer where data will be read. |
0
- Success, -1
- Error.err_t mcp251863_read_word | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint32_t * | data_out ) |
SPI Read Word.
Function for read word.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[out] | data_out | : Buffer where data will be read. |
0
- Success, -1
- Error.err_t mcp251863_read_word_array | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint32_t * | data_out, | ||
uint16_t | n_words ) |
SPI Read Word Array.
Function for read word array.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[out] | data_out | : Buffer where data will be read. |
[in] | n_words | : Number of words to be read. |
0
- Success, -1
- Error.err_t mcp251863_receive_channel_configure | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
mcp251863_rx_fifo_cfg_t * | config ) |
Configure Receive FIFO.
Function for configuring recive FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | config | : Rx FIFO cfg object. |
0
- Success, -1
- Error.void mcp251863_receive_channel_configure_object_reset | ( | mcp251863_rx_fifo_cfg_t * | config | ) |
Reset Receive Channel Configure object to reset value.
Function for resetting Receive Channel Configure object to reset value.
[in] | config | : Rx FIFO cfg object. |
err_t mcp251863_receive_channel_event_disable | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t | flags ) |
Receive FIFO Event Disable.
Disables Receive FIFO interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt Disables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_receive_channel_event_enable | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t | flags ) |
Receive FIFO Event Enable.
Enables Receive FIFO interrupts
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt Enables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_receive_channel_event_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | flags ) |
Receive FIFO Event Get.
Reads Receive FIFO interrupt Flags.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt Enables. |
0
- Success, -1
- Error.err_t mcp251863_receive_channel_event_overflow_clear | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Receive FIFO Event Clear.
Clears Receive FIFO Overflow interrupt Flag.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
cannel | : Channel. |
0
- Success, -1
- Read error, -2
- Write error.int8_t mcp251863_receive_channel_index_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | idx ) |
Receive FIFO Index Get.
Function for getting Receive FIFO Index.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
idx | : Transmit Channel Index to be read. |
err_t mcp251863_receive_channel_reset | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Receive FIFO Reset.
Function for resetting Receive FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Error.err_t mcp251863_receive_channel_status_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | status ) |
Receive Channel Status Get.
Function for getting Receive Channel Status.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[out] | status | : Status. |
0
- Success, -1
- Error.err_t mcp251863_receive_channel_update | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Receive FIFO Update.
Sets UINC of the receive channel.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Error.err_t mcp251863_receive_event_get | ( | mcp251863_t * | ctx, |
uint32_t * | rxif ) |
Get pending interrupts of all receive FIFOs.
Function for get pending interrupts of all receive FIFOs.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | rxif | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_receive_event_overflow_get | ( | mcp251863_t * | ctx, |
uint32_t * | rxovif ) |
Get pending RXOVIF of all receive FIFOs.
Function for get pending RXOVIF of all receive FIFOs.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | rxovif | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_receive_message | ( | mcp251863_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t * | data_len ) |
Message Receive function.
Receives the message and checks is message successfully received.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | data_out | : Buffer where message be received |
[out] | data_len | : Number of data bytes read. |
0
- Success, -1
- Error.err_t mcp251863_receive_message_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
mcp251863_rx_msg_obj_t * | rx_obj ) |
Get Received Message.
Reads Received message from channel.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[out] | rx_obj | : Rx Message object. |
0
- Success, -1
- Read error, -2
- Write error, -3
- Read byte array error, -4
- Receiver channel update.err_t mcp251863_reset | ( | mcp251863_t * | ctx | ) |
Reset function.
Function for reset using generic transfer
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_tef_configure | ( | mcp251863_t * | ctx, |
mcp251863_tef_cfg_t * | config ) |
Configure Transmit Event FIFO.
Function for configuring Transmit Event FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | config | : TEF configure object. |
0
- Success, -1
- Error.void mcp251863_tef_configure_object_reset | ( | mcp251863_tef_cfg_t * | config | ) |
Reset TefConfigure object to reset value.
Function for resetting value of TEF configure object.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | config | : TEF configure object. |
err_t mcp251863_tef_event_disable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
Transmit Event FIFO Event Disable.
Disables Transmit Event FIFO interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt disables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_tef_event_enable | ( | mcp251863_t * | ctx, |
uint8_t | flags ) |
Transmit Event FIFO Event Enable.
Enables Transmit Event FIFO interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | flags | : Interrupt enables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_tef_event_get | ( | mcp251863_t * | ctx, |
uint8_t * | flags ) |
Transmit Event FIFO Event Get.
Reads Transmit Event FIFO interrupt Flags.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | flags | : Interrupt flags. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_tef_event_overflow_clear | ( | mcp251863_t * | ctx | ) |
Transmit Event FIFO Event Clear.
Clears Transmit Event FIFO Overflow interrupt Flag.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | flags | : Interrupt flags. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_tef_message_get | ( | mcp251863_t * | ctx, |
mcp251863_tef_msg_obj_t * | tef_obj ) |
Get Transmit Event FIFO Message.
Reads Transmit Event FIFO message
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | tef_obj | : TEF Message object. |
0
- Success, -1
- Read error, -2
- Write error, -3
- Update error.err_t mcp251863_tef_reset | ( | mcp251863_t * | ctx | ) |
Transmit Event FIFO Reset.
Function for resetting Transmit Event FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error,err_t mcp251863_tef_status_get | ( | mcp251863_t * | ctx, |
uint8_t * | status ) |
Transmit Event FIFO Status Get.
Function for getting Transmit Event FIFO Status.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | status | : Status. |
0
- Success, -1
- Read error.err_t mcp251863_tef_update | ( | mcp251863_t * | ctx | ) |
Transmit Event FIFO Update.
Sets UINC of the TEF.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_time_stamp_disable | ( | mcp251863_t * | ctx | ) |
Time Stamp Disable.
Function for disabling Time Stamp.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_time_stamp_enable | ( | mcp251863_t * | ctx | ) |
Time Stamp Enable.
Function for enabling Time Stamp.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_time_stamp_get | ( | mcp251863_t * | ctx, |
uint32_t * | time_stamp ) |
Time Stamp Get.
Function for getting Time Stamp.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[out] | time_stamp | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_time_stamp_mode_configure | ( | mcp251863_t * | ctx, |
uint8_t | mode ) |
Time Stamp Mode Configure.
Function for configuring Time Stamp Mode.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | mode | : Mode. data to be write. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_time_stamp_prescaler_set | ( | mcp251863_t * | ctx, |
uint16_t | time_stamp ) |
Time Stamp Prescaler Set.
Function for setting Time Stamp Prescaler.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | time_stamp | : Time stamp prescaler. |
0
- Success, -1
- Error.err_t mcp251863_time_stamp_set | ( | mcp251863_t * | ctx, |
uint32_t | ts ) |
Time Stamp Set.
Function for setting Time Stamp.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | time_stamp | : Time stamp data to be write. |
0
- Success, -1
- Error.err_t mcp251863_transmit_abort_all | ( | mcp251863_t * | ctx | ) |
Abort All transmissions.
Function for aborting all transmission.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t mcp251863_transmit_band_width_sharing_set | ( | mcp251863_t * | ctx, |
uint8_t | tx_bws ) |
Set Transmit Bandwidth Sharing Delay.
Function for setting transmit bandwidth sharing delay.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
tx_bws | : Transmit Bandwidth to be set. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_abort | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Abort transmission of single FIFO.
Function for aborting transmission of single FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_configure | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
mcp251863_tx_fifo_cfg_t * | config ) |
Configure Transmit FIFO.
Function for configuring transmit FIFO.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | config | : Tx QUEUE config object. |
0
- Success, -1
- Error.void mcp251863_transmit_channel_configure_object_reset | ( | mcp251863_tx_fifo_cfg_t * | config | ) |
Reset Transmit Channel Configure object to reset values.
Function for reseting values of Transmit channel configure object.
[in] | config | : Tx QUEUE config object. |
err_t mcp251863_transmit_channel_event_attempt_clear | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Transmit FIFO Event Clear.
Clears Transmit FIFO Attempts Exhausted interrupt Flag.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_transmit_channel_event_disable | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t | flags ) |
Transmit FIFO Event Disable.
Disables Transmit FIFO interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt Enables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_transmit_channel_event_enable | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t | flags ) |
Transmit FIFO Event Enable.
Enables Transmit FIFO interrupts.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt Enables. |
0
- Success, -1
- Read error, -2
- Write error.err_t mcp251863_transmit_channel_event_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | flags ) |
Transmit FIFO Event Get.
Reads Transmit FIFO interrupt Flags.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flags | : Interrupt flags. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_flush | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
TX Channel Flush.
Set TXREG of one channel.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_index_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint8_t * | idx ) |
Transmit FIFO Index Get.
Reads Transmit FIFO Index.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | idx | : Update data. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_load | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
mcp251863_tx_msg_obj_t * | tx_obj, | ||
bool | flush ) |
TX Channel Load.
Loads data into Transmit channel.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | tx_obj | : Tx Message object. |
[in] | flush | : If TRUE - Requests transmission |
0
- Success, -1
- Error.int8_t mcp251863_transmit_channel_reset | ( | mcp251863_t * | ctx, |
uint8_t | channel ) |
Transmit FIFO Reset.
Function for resetting FIFO Transmit.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_status_get | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
uint16_t * | status ) |
Transmit Channel Status Get.
Function for getting Transmit Channel Status.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | status | : Status to be read. |
0
- Success, -1
- Error.err_t mcp251863_transmit_channel_update | ( | mcp251863_t * | ctx, |
uint8_t | channel, | ||
bool | flush ) |
Transmit FIFO Update.
Sets UINC of the transmit channel. Keeps TXREQ unchanged.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | cannel | : Channel. |
[in] | flush | : If TRUE - Requests transmission |
0
- Success, -1
- Error.err_t mcp251863_transmit_event_attempt_get | ( | mcp251863_t * | ctx, |
uint32_t * | txatif ) |
Get pending TXATIF of all transmit FIFOs.
Function for gettingg pending TXATIF of all transmit FIFOs.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | txatif | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_transmit_event_get | ( | mcp251863_t * | ctx, |
uint32_t * | txif ) |
Get pending interrupts of all transmit FIFOs.
Function for gettingg pending interrupts of all transmit FIFOs.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | txif | : Buffer to be read. |
0
- Success, -1
- Error.err_t mcp251863_transmit_message | ( | mcp251863_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | data_len ) |
Message Transmit function.
Transmits the desired message and checks is message successfully sent.
[in] | ctx | : Click object. See mcp251863_t object definition for detailed explanation. |
[in] | data_in | : Message to be sent. |
[in] | data_len | : Determines the length of message. |
0
- Success, -1
- Error.err_t mcp251863_transmit_queue_configure | ( | mcp251863_t * | ctx, |
mcp251863_tx_que_cfg_t * | config ) |
Configure Transmit Queue.
Function for configuring transmit Queue.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | config | : Tx QUEUE config object. |
0
- Success, -1
- Error.void mcp251863_transmit_queue_configure_object_reset | ( | mcp251863_tx_que_cfg_t * | config | ) |
Reset Transmit Queue Configure object to reset values.
Function for reseting values of Transmit Queue Configure object.
[in] | config | : Tx QUEUE config object. |
err_t mcp251863_transmit_request_get | ( | mcp251863_t * | ctx, |
uint32_t * | tx_req ) |
Get TXREQ register.
Function for getting TXREQ register.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | tx_req | : TXREQ register to be read. |
0
- Success, -1
- Error.err_t mcp251863_transmit_request_set | ( | mcp251863_t * | ctx, |
uint32_t | tx_req ) |
Request transmissions using TXREQ register.
Function for requesting transmissions using TXREQ register.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | tx_req | : TXREQ register to be written. |
0
- Success, -1
- Error.err_t mcp251863_write_byte | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint8_t | data_in ) |
SPI Write Byte.
Function for write byte.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t mcp251863_write_byte_array | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint16_t | n_bytes ) |
SPI Write Byte Array.
Function for write byte array.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
data_in | : Buffer of data to be written. | |
n_bytes | : Number of bytes to be write. |
0
- Success, -1
- Error.err_t mcp251863_write_byte_array_with_crc | ( | mcp251863_t * | ctx, |
bool | from_ram ) |
SPI Write Byte Array with CRC.
Function for write byte array with CRC.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | from_ram | : Byte for array size. |
0
- Success, -1
- Error.err_t mcp251863_write_byte_safe | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint8_t | data_in ) |
SPI SFR Write Byte Safe.
Writes Byte to SFR at address using SPI CRC. Byte gets only written if CRC matches.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t mcp251863_write_half_word | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint16_t | data_in ) |
SPI Write Half Word.
Function for write half word.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t mcp251863_write_word | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint32_t | data_in ) |
SPI Write Word.
Function for write word.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t mcp251863_write_word_array | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint32_t * | data_in, | ||
uint16_t | n_words ) |
SPI Write Word Array.
Function for write word array.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Buffer of data to be written. |
[in] | n_words | : Number of words to be read. |
0
- Success, -1
- Error.err_t mcp251863_write_word_safe | ( | mcp251863_t * | ctx, |
uint16_t | address, | ||
uint32_t | data_in ) |
SPI RAM Write Word Safe.
Writes Word to RAM at address using SPI CRC. Word gets only written if CRC matches.
[in] | ctx | : Click context object. See mcp251863_t object definition for detailed explanation. |
[in] | address | : Register adress. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.