Move clock sync logic to separate files
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
#define SLAVE_STATUS_BASE_ADDRESS 0x600
|
||||
#define SLAVE_CMD_BASE_ADDRESS 0x500 //
|
||||
#define SLAVE_EMERGENCY_ADDRESS 0x001 // Emergency Frame
|
||||
#define TIME_SYNC_ADDRESS 0x002
|
||||
#define CLOCK_SYNC_ADDRESS 0x002
|
||||
|
||||
typedef struct {
|
||||
int16_t FrameID;
|
||||
|
||||
11
Core/Inc/Clock_Sync.h
Normal file
11
Core/Inc/Clock_Sync.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef INC_CLOCK_SYNC_H_
|
||||
#define INC_CLOCK_SYNC_H_
|
||||
|
||||
#include "stm32g4xx_hal.h"
|
||||
#include "stm32g4xx_hal_fdcan.h"
|
||||
|
||||
void clock_sync_init(FDCAN_HandleTypeDef* can, TIM_HandleTypeDef* timer);
|
||||
|
||||
void clock_sync_handle_timer_complete();
|
||||
|
||||
#endif // INC_CLOCK_SYNC_H_
|
||||
Reference in New Issue
Block a user