motorcontroldemo_028/Vinclude/X_CANFlashProgStarter.h

83 lines
2.0 KiB
C
Raw Normal View History

2019-07-29 08:18:57 +03:00
/*!
Copyright 2017 <EFBFBD><EFBFBD> "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\file X_CANFlashProgStarter.h
\brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> CAN<EFBFBD>
\author <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.
\version v 1.0 30/05/2017
\defgroup TCANFlashProgStarter */
/*@{*/
#ifndef X_CANFLASHPROGSTARTER_H
#define X_CANFLASHPROGSTARTER_H
#ifdef __cplusplus
extern "C"
{
#endif
//#define FP_DEVICE_2810
//#define FP_DEVICE_28335
//#define FP_DEVICE_28035
//#define FP_DEVICE_28069
#define FP_DEVICE_M4F
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define FP_BLOCK_PWM pwm.Off(&pwm); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
#define FP_CTRL_STOP sm_ctrl.state=CTRL_STOP
#define FP_FAULT_SET sm_prot.bit_fault2|= F_FLASH_PROGRAM
struct SFlashProgSettings{
Uint16 magic_number;
Uint16 CANa_nodeID; //2000.0 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
Uint16 CANa_bitRate; //2001.0
Uint16 CANa_enable;
Uint16 CANb_nodeID; //2000.0 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
Uint16 CANb_bitRate; //2001.0
Uint16 CANb_enable;
};
typedef volatile struct SFlashProgSettings TFlashProgSettings;
extern TFlashProgSettings FPsettings;
/*
struct SFlashProgStarter
{
Uint16 input;
void(*start)(volatile struct SFlashProgStarter*);
};
typedef volatile struct SFlashProgStarter TFlashProgStarter;
#define TFLASHPROGSTARTER_DEFAULTS {0,\
StartFlashProgrammer,\
}
*/
void StartFlashProgrammer();
extern long swu_vars;
#ifdef __cplusplus
}
#endif
#endif
/*@}*/