Files @ 01ed20819369
Branch filter:

Location: HydroBot/hydrobot-sharedlibs/inc/can.h

matthewreed
Added send bytes function to protocol
#ifndef _CAN_H_
#define _CAN_H_

#include <stdbool.h>
#include <string.h>
#include "stm32f0xx_hal.h"

#include "config.h"
#include "led.h"
#include "protocol.h"
#include "can_buffer.h"

extern CAN_HandleTypeDef can_handle;

void can_init(uint32_t rx_id, uint32_t broadcast_id);
void can_send_test(uint16_t id);
bool can_send(uint32_t id, uint32_t ide, uint8_t dlc, uint8_t data[8]);
void can_set_receive_mask(uint32_t mask);
void can_set_receive_id(uint32_t id);
bool can_silence_bus(bool value);
void can_receive(void);
void can_process_receive_buffer(void);

#endif //_CAN_H_