Files
GbTModuleEV/Core/Inc/j1939.h
Артём Чамайкин a5b0b7db8d initial commit
first build, test
2024-07-23 18:21:48 +03:00

40 lines
609 B
C

/*
* j1939.h
*
* Created on: May 3, 2024
* Author: colorbass
*/
#ifndef INC_J1939_H_
#define INC_J1939_H_
#define J_ID_SE 0x56
#define J_ID_EV 0xF4
#include "main.h"
extern CAN_HandleTypeDef hcan1;
typedef struct{
uint8_t data[256]; //data array
uint32_t PGN; //received PGN
uint16_t size;
uint8_t packets;
uint8_t packet;
uint8_t step;
uint8_t step_cts_remain;
uint8_t state; //(0 = standby, 1= receiving)
uint32_t tick;
}j_receive_t;
extern j_receive_t j_rx;
void J_SendCTS(j_receive_t rx);
void J_SendACK(j_receive_t rx);
void GBT_CAN_ReInit();
#endif /* INC_J1939_H_ */