initial commit
first build, test
This commit is contained in:
39
Core/Inc/j1939.h
Normal file
39
Core/Inc/j1939.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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_ */
|
||||
Reference in New Issue
Block a user