changed AMS_CAN.h -> can.h
This commit is contained in:
27
Core/Src/can.c
Normal file
27
Core/Src/can.c
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* can.c
|
||||
* Created on: Mai 23, 2024
|
||||
* Author: Hamza
|
||||
*/
|
||||
|
||||
#include "can.h"
|
||||
|
||||
#include "AMS_HighLevel.h"
|
||||
#include "TMP1075.h"
|
||||
#include "can-halal.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void can_init(CAN_HandleTypeDef* hcan) { ftcan_init(hcan); }
|
||||
|
||||
/*
|
||||
This function sends the status of the mvbms, the battery and of powerground.
|
||||
once every 1s in states: INACTIVE, PRECHARGE, DISCHARGE, CHARGING, ERROR.
|
||||
once every 0.5s in states: READY, ACTIVE.
|
||||
with format of:
|
||||
|
||||
*/
|
||||
void can_handle_send_status() {
|
||||
static uint8_t data[8];
|
||||
data[0] = state. (sm_get_state_code() << 5); //save 5 bit since codes are from 0-6
|
||||
//ftcan_transmit(id, data, sizeof(data));
|
||||
}
|
||||
Reference in New Issue
Block a user