#ifndef INC_CAN_H
#define INC_CAN_H

#include <string.h>
#include <stdint.h>
#include "stm32f3xx_hal.h"
#include "stm32f3xx_hal_can.h"
#include "stm32f3xx_hal_def.h"
#include "ADBMS_Abstraction.h"
#include "main.h"
#include "state_machine.h"
#include "can-halal.h"

#define CAN_ID_IN   0x501
#define CAN_ID_OUT  0x502
#define CAN_STATUS_FREQ 1000
void can_init(CAN_HandleTypeDef* hcan);

void can_handle_send_status();

void can_handle_recieve_command(const uint8_t *data);

void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data);

#endif /* "INC_CAN_H" */