Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
can_arch.c File Reference

Handling of CAN hardware for STM32. More...

#include <stdint.h>
#include <string.h>
#include "mcu_periph/can_arch.h"
#include "mcu_periph/can.h"
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/can.h>
#include <libopencm3/cm3/nvic.h>
#include "led.h"
+ Include dependency graph for can_arch.c:

Go to the source code of this file.

Functions

void _can_run_rx_callback (uint32_t id, uint8_t *buf, uint8_t len)
 
void can_hw_init (void)
 
int can_hw_transmit (uint32_t id, const uint8_t *buf, uint8_t len)
 
void usb_lp_can_rx0_isr (void)
 

Variables

bool can_initialized = false
 

Detailed Description

Handling of CAN hardware for STM32.

Definition in file can_arch.c.

Function Documentation

void _can_run_rx_callback ( uint32_t  id,
uint8_t buf,
uint8_t  len 
)

Definition at line 43 of file can.c.

References can_rx_callback.

Referenced by usb_lp_can_rx0_isr().

+ Here is the caller graph for this function:

void can_hw_init ( void  )

Definition at line 47 of file can_arch.c.

References CAN1, can_initialized, and gpio_set().

Referenced by ppz_can_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int can_hw_transmit ( uint32_t  id,
const uint8_t buf,
uint8_t  len 
)

Definition at line 139 of file can_arch.c.

References CAN1, and can_initialized.

Referenced by ppz_can_transmit().

+ Here is the caller graph for this function:

void usb_lp_can_rx0_isr ( void  )

Definition at line 167 of file can_arch.c.

References _can_run_rx_callback(), and CAN1.

+ Here is the call graph for this function:

Variable Documentation

bool can_initialized = false

Definition at line 45 of file can_arch.c.

Referenced by can_hw_init(), and can_hw_transmit().