Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
link_mcu_spi.c File Reference
#include "link_mcu_spi.h"
+ Include dependency graph for link_mcu_spi.c:

Go to the source code of this file.

Macros

#define LINK_MCU_SPI_DEV   spi1
 
#define PAYLOAD_LENGTH   sizeof(link_mcu_from_fbw_msg.payload)
 
#define LINK_MCU_FRAME_LENGTH   sizeof(struct link_mcu_msg)
 
#define ComputeChecksum(_buf)
 

Variables

struct link_mcu_msg link_mcu_from_ap_msg
 
struct link_mcu_msg link_mcu_from_fbw_msg
 
struct spi_transaction link_mcu_trans
 
bool link_mcu_received
 
static uint16_t crc = 0
 

Macro Definition Documentation

◆ ComputeChecksum

#define ComputeChecksum (   _buf)
Value:
{ \
uint8_t i; \
crc = CRC_INIT; \
for(i = 0; i < PAYLOAD_LENGTH; i++) { \
uint8_t _byte = ((uint8_t*)&_buf)[i]; \
crc = CrcUpdate(crc, _byte); \
} \
}

Definition at line 41 of file link_mcu_spi.c.

◆ LINK_MCU_FRAME_LENGTH

#define LINK_MCU_FRAME_LENGTH   sizeof(struct link_mcu_msg)

Definition at line 39 of file link_mcu_spi.c.

◆ LINK_MCU_SPI_DEV

#define LINK_MCU_SPI_DEV   spi1

Definition at line 26 of file link_mcu_spi.c.

◆ PAYLOAD_LENGTH

#define PAYLOAD_LENGTH   sizeof(link_mcu_from_fbw_msg.payload)

Definition at line 38 of file link_mcu_spi.c.

Variable Documentation

◆ crc

◆ link_mcu_from_ap_msg

struct link_mcu_msg link_mcu_from_ap_msg

Definition at line 29 of file link_mcu_spi.c.

◆ link_mcu_from_fbw_msg

struct link_mcu_msg link_mcu_from_fbw_msg

Definition at line 30 of file link_mcu_spi.c.

◆ link_mcu_received

bool link_mcu_received

Definition at line 34 of file link_mcu_spi.c.

◆ link_mcu_trans

struct spi_transaction link_mcu_trans

Definition at line 32 of file link_mcu_spi.c.

uint8_t
unsigned char uint8_t
Definition: types.h:14