SAM USART LIN Quick Start.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <string.h>
#include <conf_lin.h>
Macros | |
#define | LIN_DATA_LEN 5 |
[lin_id] More... | |
#define | LIN_ID_FIELD_VALUE 0x64 |
[module_inst] More... | |
Functions | |
static void | configure_usart_cdc (void) |
[lin_buffer] More... | |
static void | configure_usart_lin (void) |
static void | lin_read_callback (struct usart_module *const usart_module) |
[CDC_setup] More... | |
static void | lin_read_error_callback (struct usart_module *const usart_module) |
int | main (void) |
[lin_setup] More... | |
Variables | |
static struct usart_module cdc_instance | lin_instance |
[module_var] More... | |
static uint8_t | rx_buffer [LIN_DATA_LEN] ={0} |
static const uint8_t | tx_buffer [LIN_DATA_LEN] ={0x4a,0x55,0x93,0xe5,0xe6} |
#define LIN_DATA_LEN 5 |
#define LIN_ID_FIELD_VALUE 0x64 |
|
static |
[lin_buffer]
[module_var] [setup] [CDC_setup]
References usart_config::baudrate, cdc_instance, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, usart_enable(), and usart_get_config_defaults().
Referenced by main().
|
static |
References usart_config::baudrate, port_config::direction, lin_instance, usart_config::lin_node, lin_read_callback(), lin_read_error_callback(), usart_config::lin_slave_enable, LIN_SLAVE_NODE, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), port_pin_set_output_level(), usart_config::receiver_enable, usart_config::sample_rate, STATUS_OK, system_interrupt_enable_global(), usart_config::transfer_mode, usart_config::transmitter_enable, USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_ERROR, usart_enable(), usart_enable_callback(), usart_get_config_defaults(), usart_init(), usart_register_callback(), USART_SAMPLE_RATE_16X_FRACTIONAL, and USART_TRANSFER_ASYNCHRONOUSLY.
Referenced by main().
|
static |
[CDC_setup]
[lin_setup]
References i, LIN_DATA_LEN, LIN_ID_FIELD_VALUE, lin_instance, LIN_MASTER_NODE, LIN_SLAVE_NODE, rx_buffer, tx_buffer, usart_enable_transceiver(), USART_TRANSCEIVER_TX, and usart_write_buffer_job().
Referenced by configure_usart_lin().
|
static |
Referenced by configure_usart_lin().
int main | ( | void | ) |
[lin_setup]
[setup]
[setup_init]
[setup_init]
[main_setup] [configure_lin]
[configure_lin]
[lin_master_cmd]
[lin_master_cmd]
[main_setup]
References configure_usart_cdc(), configure_usart_lin(), LIN_ID_FIELD_VALUE, lin_instance, LIN_MASTER_AUTO_TRANSMIT_CMD, LIN_MASTER_NODE, lin_master_send_cmd(), lin_master_transmission_status(), rx_buffer, system_init(), usart_enable_transceiver(), usart_read_buffer_job(), USART_TRANSCEIVER_RX, USART_TRANSCEIVER_TX, and usart_write_wait().
|
static |
|
static |
|
static |
Referenced by lin_read_callback().