#include "asf.h"
#include "compiler.h"
#include "board.h"
#include "power_clocks_lib.h"
#include "gpio.h"
#include "pm_uc3c.h"
#include "scif_uc3c.h"
#include "intc.h"
#include "can.h"
#include "canif.h"
#include "usart.h"
#include "print_funcs.h"
#include "conf_can_example.h"
Functions | |
void | can_example_prepare_data (U8 mode) |
Local function to prepare RX and TX buffers. More... | |
void | can_out_callback_channel0 (U8 handle, U8 event) |
Call Back prototype. More... | |
int | main (void) |
static void | usart_int_handler (void) |
USART interrupt handler, fired each time a character is received. More... | |
Variables | |
volatile U8 | nb_message_received_on_channel0 = 0 |
Define the number of message received on CAN Channel 0. More... | |
volatile U16 | state_machine = 0 |
void can_example_prepare_data | ( | U8 | mode | ) |
Local function to prepare RX and TX buffers.
Prepare Data on CAN Bus.
References appli_remote_rx_msg, appli_rx_msg, appli_tx_msg, CAN_CMD_REFUSED, can_init(), can_mob_alloc(), can_mob_t::can_msg, can_out_callback_channel0(), can_rx(), can_tx(), CANIF_CHANNEL_MODE_NORMAL, can_mob_t::dlc, can_mob_t::handle, and can_mob_t::req_type.
Referenced by main().
Call Back prototype.
Call Back called by can_drv.
References appli_remote_rx_msg, appli_rx_msg, appli_tx_msg, can_get_mob_data(), can_get_mob_dlc(), can_get_mob_id(), can_mob_free(), can_mob_t::can_msg, can_msg_t::data, can_mob_t::dlc, gpio_tgl_gpio_pin(), can_msg_t::id, LED0_GPIO, can_mob_t::status, and Union64::u64.
Referenced by can_example_prepare_data(), and main().
int main | ( | void | ) |
References appli_remote_rx_msg, appli_rx_msg, appli_tx_msg, AVR32_SCIF_GC_NO_DIV_CLOCK, CAN_BusOFFIRQ, CAN_Error, can_example_prepare_data(), can_init(), can_mob_alloc(), can_mob_t::can_msg, can_out_callback_channel0(), can_rx(), CAN_STATUS_BUSOFF, CAN_STATUS_COMPLETED, CAN_STATUS_ERROR, CAN_Success, CANIF_CHANNEL_MODE_LISTENING, can_msg_t::data, Data_Sent_Start_or_Not, Demo_Sent_Data, Disable_global_interrupt, can_mob_t::dlc, Enable_global_interrupt, FPBA_HZ, gpio_enable_module(), can_mob_t::handle, can_msg_t::id, init_dbg_rs232(), INTC_init_interrupts(), INTC_register_interrupt(), print_dbg(), print_dbg_char_hex(), print_dbg_ulong(), can_mob_t::req_type, scif_gc_enable(), scif_gc_setup(), SCIF_GCCTRL_OSC0, can_mob_t::status, sysclk_init(), txt_logo_atmel, Union64::u8, UART_USART, UART_USART_IRQ, UART_USART_IRQ_LEVEL, and usart_int_handler().
|
static |
USART interrupt handler, fired each time a character is received.
References UART_USART, and usart_read_char().
Referenced by main().
volatile U8 nb_message_received_on_channel0 = 0 |
Define the number of message received on CAN Channel 0.
volatile U16 state_machine = 0 |