dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PiOS CAN interface layer

CAN interface for PiOS. More...

Files

file  pios_can.h
 PiOS CAN interface header.
 
file  pios_can_priv.h
 PiOS CAN interface header.
 

Data Structures

struct  pios_can_gimbal_message
 Message to tell gimbal the desired setpoint and FC state. More...
 
struct  pios_can_cfg
 

Enumerations

enum  pios_can_messages { PIOS_CAN_GIMBAL = 0, PIOS_CAN_LAST = 1 }
 The set of CAN messages. More...
 

Functions

struct pios_can_gimbal_message __attribute__ ((packed))
 
int32_t PIOS_CAN_TxData (uintptr_t id, enum pios_can_messages, uint8_t *data)
 Transmit a data message with a particular message ID. More...
 
struct pios_queuePIOS_CAN_RegisterMessageQueue (uintptr_t id, enum pios_can_messages msg_id)
 Get a queue to receive messages of a particular message ID. More...
 
int32_t PIOS_CAN_Init (uintptr_t *id, const struct pios_can_cfg *cfg)
 

Variables

enum pios_can_messages __attribute__
 
const struct pios_com_driver pios_can_com_driver
 
struct pios_can_cfg __attribute__
 

Detailed Description

CAN interface for PiOS.

Enumeration Type Documentation

The set of CAN messages.

Enumerator
PIOS_CAN_GIMBAL 
PIOS_CAN_LAST 

Definition at line 36 of file pios_can.h.

Function Documentation

struct pios_can_gimbal_message __attribute__ ( (packed)  )

Definition at line 38 of file serial_4way.h.

int32_t PIOS_CAN_Init ( uintptr_t *  id,
const struct pios_can_cfg cfg 
)

Initialize the CAN driver and return an opaque id

Parameters
[out]idthe CAN interface handle
[in]cfgthe configuration structure
Returns
0 if successful, negative otherwise
struct pios_queue* PIOS_CAN_RegisterMessageQueue ( uintptr_t  id,
enum pios_can_messages  msg_id 
)

Get a queue to receive messages of a particular message ID.

int32_t PIOS_CAN_TxData ( uintptr_t  id,
enum  pios_can_messages,
uint8_t *  data 
)

Transmit a data message with a particular message ID.

Variable Documentation

const struct pios_com_driver pios_can_com_driver