![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Interface from actuators to ChibiOS CAN driver using UAVCan. More...
Go to the source code of this file.
Macros | |
#define | UAVCAN_NODE_ID 100 |
#define | UAVCAN_BAUDRATE 1000000 |
Variables | |
static uavcan_event * | uavcan_event_hd = NULL |
Interface from actuators to ChibiOS CAN driver using UAVCan.
Definition in file uavcan.c.
|
static |
Definition at line 80 of file uavcan.c.
References CAN_EID_MASK, CAN_FRAME_EFF, CAN_SID_MASK, foo, pprz_mtx_lock(), and pprz_mtx_unlock().
Referenced by uavcanInitIface().
|
static |
Whenever a valid and 'accepted' transfer is received.
Definition at line 143 of file uavcan.c.
References abi_struct::cb, ev, foo, abi_struct::next, transfer(), and uavcan_event_hd.
Referenced by uavcanInitIface().
|
static |
If we should accept this transfer.
Definition at line 158 of file uavcan.c.
References ev, foo, abi_struct::next, and uavcan_event_hd.
Referenced by uavcanInitIface().
void uavcan_bind | ( | uint16_t | data_type_id, |
uint64_t | data_type_signature, | ||
uavcan_event * | ev, | ||
uavcan_callback | cb | ||
) |
Bind to a receiving message from uavcan.
Definition at line 215 of file uavcan.c.
References abi_struct::cb, ev, abi_struct::next, and uavcan_event_hd.
Referenced by actuators_uavcan_init(), airspeed_uavcan_init(), can_fuelcell_init(), power_uavcan_init(), and range_sensor_uavcan_init().
void uavcan_broadcast | ( | struct uavcan_iface_t * | iface, |
uint64_t | data_type_signature, | ||
uint16_t | data_type_id, | ||
uint8_t | priority, | ||
const void * | payload, | ||
uint16_t | payload_len | ||
) |
Broadcast an uavcan message to a specific interface.
Definition at line 230 of file uavcan.c.
References foo, pprz_bsem_signal(), pprz_mtx_lock(), and pprz_mtx_unlock().
Referenced by actuators_uavcan_cmd_commit(), and actuators_uavcan_commit().
Initialize all uavcan interfaces.
uavcan interfaces
Definition at line 202 of file uavcan.c.
References foo, and uavcanInitIface().
Definition at line 103 of file uavcan.c.
References CAN_FRAME_EFF, pprzcan_frame::can_id, can_transmit_frame(), pprzcan_frame::data, foo, pprzcan_frame::len, p, pprz_bsem_wait(), pprz_mtx_lock(), and pprz_mtx_unlock().
Referenced by uavcanInitIface().
|
static |
Initialize uavcan interface.
Definition at line 180 of file uavcan.c.
References can_frame_cb(), can_register_callback(), foo, onTransferReceived(), pprz_bsem_init(), pprz_mtx_init(), pprz_thread_create(), shouldAcceptTransfer(), and uavcan_tx().
Referenced by uavcan_init().
|
static |
Definition at line 39 of file uavcan.c.
Referenced by onTransferReceived(), shouldAcceptTransfer(), and uavcan_bind().