U.B.O.R
The [U]seless [B]ox [O]rganizing [R]obot. A FreeRTOS study project written in C which implements a multitasked control unit for a belt conveyor system with robotic sorting arms.
Macros | Functions
ucan.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <carme.h>
#include <can.h>
#include <stm32f4xx.h>
#include <FreeRTOS.h>
#include <queue.h>
#include <task.h>
#include <semphr.h>
#include "display.h"
Include dependency graph for ucan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UCAN_LOG_SENT   0
 Enable or disable logging by setting this to either true or false. More...
 
#define UCAN_LOG_SENDING   0
 Set loglevel to sent messages. More...
 
#define UCAN_LOG_RECEIVE   0
 Set loglevel to recieved messages. More...
 
#define UCAN_LOG_DISPATCH   0
 Set loglevel to dispatched messages. More...
 
#define UCAN_LOG_DROP   0
 Set loglevel to dropped messages (unable to dispatch) More...
 
#define LOG_IF(cond, ...)   do{ if(cond) display_log(__VA_ARGS__); } while(false)
 

Functions

bool ucan_init (void)
 Initialize the hardware and call each init function global. More...
 
bool ucan_send_data (uint8_t n_data_bytes, uint16_t msg_id, const uint8_t *data)
 Send data to the can output message queue global. More...
 
bool ucan_link_message_to_queue (uint16_t message_id, QueueHandle_t queue)
 Link a single message type to a queue global. More...
 
bool ucan_link_message_to_queue_mask (uint16_t mask, uint16_t message_id, QueueHandle_t queue)
 Set a message mask to map multiple message to a queue global. More...
 

Macro Definition Documentation

◆ LOG_IF

#define LOG_IF (   cond,
  ... 
)    do{ if(cond) display_log(__VA_ARGS__); } while(false)

Definition at line 28 of file ucan.h.

◆ UCAN_LOG_DISPATCH

#define UCAN_LOG_DISPATCH   0

Set loglevel to dispatched messages.

Definition at line 25 of file ucan.h.

◆ UCAN_LOG_DROP

#define UCAN_LOG_DROP   0

Set loglevel to dropped messages (unable to dispatch)

Definition at line 26 of file ucan.h.

◆ UCAN_LOG_RECEIVE

#define UCAN_LOG_RECEIVE   0

Set loglevel to recieved messages.

Definition at line 24 of file ucan.h.

◆ UCAN_LOG_SENDING

#define UCAN_LOG_SENDING   0

Set loglevel to sent messages.

Definition at line 23 of file ucan.h.

◆ UCAN_LOG_SENT

#define UCAN_LOG_SENT   0

Enable or disable logging by setting this to either true or false.

Definition at line 22 of file ucan.h.