/*
 * AMS_CAN.h
 *
 *  Created on: Mar 19, 2022
 *      Author: jasper
 */

#ifndef INC_AMS_CAN_H_
#define INC_AMS_CAN_H_

#include "stm32f4xx_hal.h"

#define CAN_ID_AMS_SLAVE_HEARTBEAT_BASE 0x100

void ams_can_init(CAN_HandleTypeDef* ams, CAN_HandleTypeDef* car);

void ams_can_handle_ams_msg(CAN_RxHeaderTypeDef* header, uint8_t* data);
void ams_can_handle_car_msg(CAN_RxHeaderTypeDef* header, uint8_t* data);

void ams_can_send_heartbeat();

#endif /* INC_AMS_CAN_H_ */
